接口使用场景等说明:唯享客推广位查询接口
环境 | http 地址 | https 地址 |
---|---|---|
正式环境 | http://api.veapi.cn/vip/vip_querypid | 暂无 |
参数名称 | 参数类型 | 必填 | 示例值 | 描述 |
---|---|---|---|---|
vekey | String | 是 | V123M56 | 公共参数,接口秘钥,请在会员中心获取 |
pidList | String | 否 | 推广为Id。传入本参数时,查询指定推广位信息。 该参数不传时,会返回该userId下对应的所有的pid信息列表。 | |
page | Integer | 否 | 1 | 页码 |
pageSize | Integer | 否 | 20 | 页面大小:默认100 |
- GET/POST http://api.veapi.cn/vip/vip_querypid?vekey=xxx
- $api="http://api.veapi.cn/vip/vip_querypid?vekey=xxx";
- $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; //返回值
- 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_querypid?vekey=xxx";
- // JDK 8u111版本后,若目标页面为HTTPS协议,请启用proxy用户密码鉴权
- //System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
- // 发送请求
- String result = HttpRequest.get(url)
- .timeout(10000)//设置超时,毫秒
- .execute().body();
- System.out.println(result);
- }
- }
- import requests
- # 要访问的API网页
- target_url = "http://api.veapi.cn/vip/vip_querypid?vekey=xxx"
- # 发送请求
- response = requests.get(target_url)
- # 获取页面内容
- if response.status_code == 200:
- print response.text
参数名称 | 参数类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
pid | String | 否 | d9c2384d2fc352ca3a4b8a5d9f72d2e7 | 推广位ID |
pidName | String | 否 | aa1 | 推广位名称 |
createTime | Long | 否 | 1673415957000 | 该推广位创建的时间 |
b2cUserId | String | 否 | 所属b2c_user_id | |
status | Integer | 否 | 1 | pid状态,1表示可用,2表示禁用,3表示未在联盟创建 |
hasValidOrder | Boolean | 否 | false | 是否有有效订单 |
{}
- error: "0",
- msg: "接口调用成功!",
- data: {
},
- total: 4,
- pidInfoList: [
]
- {
},
- createTime: 1673415957000,
- pid: "410999c664166f283b60a7fa2dfe6728",
- pidName: "新推广位2",
- hasValidOrder: false,
- status: 1
- {
},
- createTime: 1673415957000,
- pid: "d9c2384d2fc352ca3a4b8a5d9f72d2e7",
- pidName: "新推广位1",
- hasValidOrder: false,
- status: 1
- {
},
- createTime: 1584626960000,
- pid: "4cd0a596c4fced7303fcc59ca7562b88",
- pidName: "bb1",
- hasValidOrder: false,
- status: 1
- {
}
- createTime: 1584626960000,
- pid: "7564dd61f0a563f17ff5ae3fdeb32d30",
- pidName: "aa1",
- hasValidOrder: false,
- status: 1
- request_id: "sF8yEqU"