API文档中心

热门接口:产品ID找同款全量维权查询万能转链字符串ID转换 (有API需求可联系本站)

用户校验查询信息

调用权限:核心接口会员卡调用
接口使用场景等说明:

唯品会用户校验查询信息:

业务场景:

oldUser : 当判定使用该设备的用户为唯品会老用户时返回1;

superRedEnvelope : 当判定使用该设备的用户已领取指定的超级红包时返回1;

surpriseRedEnvelope : 当判定使用该设备的用户已领取指定的惊喜红包时返回1。

调用说明

本接口需要您在会员中心授权(如果多用户可传入sessionkey参数)

接口请求地址

环境 http 地址 https 地址
正式环境 http://api.veapi.cn/vip/vip_userverify 暂无

请求方式:GETPOST

请求参数

参数名称 参数类型 必填 示例值 描述
vekey String V123M56 公共参数,接口秘钥,请在会员中心获取
scene String oldUser 业务场景, oldUser:当判定使用该设备的用户为唯品会老用户时返回1;superRedEnvelope:当判定使用该设备的用户已领取指定的超级红包时返回1;surpriseRedEnvelope:当判定使用该设备的用户已领取指定的惊喜红包时返回1。
attributeValue String   业务场景为superRedEnvelope时,该属性值必须设置为超级红包code;业务场景为surpriseRedEnvelope时,该属性值必须设置为惊喜红包code;其他场景否。
commonParams Commonparams   通用参数
 └─ common_plat Integer 1 用户平台:1-PC,2-APP,3-小程序,不传默认为APP
 └─ common_deviceType String   设备号类型:IMEI,IDFA,OAID,有则传入
 └─ common_deviceValue String   设备号MD5加密后的值,有则传入,IDFA大写后md5,IMER小写后md5,OAID原文md5
 └─ common_ip String   用户ip地址
 └─ common_longitude String   经度 如:29.590961456298828
 └─ common_latitude String   纬度 如:106.51573181152344
 └─ common_warehouse String   分仓 VIP_NH:广州仓, VIP_SH:上海仓, VIP_BJ:北京仓,VIP_CD:成都仓, VIP_HZ:华中仓, ALL:全国仓

请求示例

  • HTTP
  • PHP
  • JAVA
  • PYTHON
GET/POST  http://api.veapi.cn/vip/vip_userverify?vekey=xxx&scene=oldUser&common_plat=1&common_ip=112.36.73.197&common_deviceType=IMEI&common_deviceValue=c81e728d9d4c2f636f067f89cc14862c 

使用curl函数,curl不是php原生库,需要安装才能使用

$api="http://api.veapi.cn/vip/vip_userverify?vekey=xxx&scene=oldUser&common_plat=1&common_ip=112.36.73.197&common_deviceType=IMEI&common_deviceValue=c81e728d9d4c2f636f067f89cc14862c";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api);
//curl_setopt($ch, CURLOPT_POST, true);  //POST方式时启用
//curl_setopt($ch, CURLOPT_POSTFIELDS, $postData );  //POST方式时传参

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);  //如果使用https请启用
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);  //如果使用https请启用
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );   //返回数据流,不直接输出
curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); //使用gzip压缩传输让访问更快
curl_setopt($ch, CURLOPT_TIMEOUT, 6);  //允许执行的最长秒数。这里设定6S
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);

$result = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);

echo $result; //返回值
使用okhttp3/httpclient/jsoup/hutool,以hutool为例:

import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpRequest;

public class testGetParam {

    public static void main(String[] args) {
        // API网址
        String url = "http://api.veapi.cn/vip/vip_userverify?vekey=xxx&scene=oldUser&common_plat=1&common_ip=112.36.73.197&common_deviceType=IMEI&common_deviceValue=c81e728d9d4c2f636f067f89cc14862c";
        // JDK 8u111版本后,若目标页面为HTTPS协议,请启用proxy用户密码鉴权
        //System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");

        // 发送请求
        String result = HttpRequest.get(url)
                .timeout(10000)//设置超时,毫秒
                .execute().body();
        System.out.println(result);
    }
}
推荐使用 requests,支持访问http,https网页:

import requests
		
# 要访问的API网页
target_url = "http://api.veapi.cn/vip/vip_userverify?vekey=xxx&scene=oldUser&common_plat=1&common_ip=112.36.73.197&common_deviceType=IMEI&common_deviceValue=c81e728d9d4c2f636f067f89cc14862c"

# 发送请求
response = requests.get(target_url)

# 获取页面内容
if response.status_code == 200:
	print response.text

返回值(JSON)

参数名称 参数类型 示例值 描述
result Integer 1 校验结果, 0:否, 1:是

返回示例

【提示】推广链接通常有时效性,示例中的链接为创建文档时生成,仅用于展示返回结果使用,有可能已失效。
{ "error": "0", "msg": "接口调用成功!", "data": { "result": 0 }, "request_id": "53RgFtq" }

错误码

如果error不为0时,请点此查看错误码表格

在线
客服

会员请加QQ群交流:

微信
咨询

加微信咨询
顶部