接口使用场景等说明:通过SKUID查询推广商品的名称、主图、类目、价格、物流、是否自营、30天引单数量等详细信息,支持批量获取。通常用于在媒体侧展示商品详情。
| 环境 | http 地址 | https 地址 |
|---|---|---|
| 正式环境 | http://api.veapi.cn/jd/promotiongoodsinfo | 暂无 |
| 参数名称 | 参数类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| vekey | String | 是 | V123M56 | 公共参数,接口秘钥,请在会员中心获取 |
| skuIds | String | 是 | 5225346,7275691 | 京东skuID串,逗号分割,最多100个,开发示例如param_json={'skuIds':'5225346,7275691'}(非常重要 请大家关注:如果输入的sk串中某个skuID的商品不在推广中[就是没有佣金],返回结果中不会包含这个商品的信息) |
GET/POST http://api.veapi.cn/jd/promotiongoodsinfo?vekey=xxxx&skuIds=10053012444284,100008656851
$api="http://api.veapi.cn/jd/promotiongoodsinfo?vekey=xxxx&skuIds=10053012444284,100008656851"; $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/jd/promotiongoodsinfo?vekey=xxxx&skuIds=10053012444284,100008656851";
// 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/jd/promotiongoodsinfo?vekey=xxxx&skuIds=10053012444284,100008656851" # 发送请求 response = requests.get(target_url) # 获取页面内容 if response.status_code == 200: print response.text
| 参数名称 | 参数类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| skuId | Number | 是 | 61861866 | 商品ID |
| unitPrice | Number | 是 | 89 | 商品单价即京东价 |
| materialUrl | String | 是 | http://item.jd.com/10000000.html | 商品落地页 |
| endDate | Number | 是 | 1668096000000 | 推广结束日期(日期对应的时间戳,包含当天,例:1668096000000,转换后日期为2022-11-11,包含2022-11-11当天) |
| isFreeFreightRisk | Number | 是 | 0 | 是否支持运费险(1:是,0:否) |
| isFreeShipping | Number | 是 | 1 | 是否包邮(1:是,0:否,2:自营商品遵从主站包邮规则) |
| commisionRatioWl | Number | 是 | 25 | 无线佣金比例 |
| commisionRatioPc | Number | 是 | 25 | PC佣金比例 |
| imgUrl | String | 是 | http://img14.360buyimg.com/....jpg | 图片地址 |
| vid | Number | 是 | 16815866 | 商家ID |
| cidName | String | 是 | 母婴 | 一级类目名称 |
| wlUnitPrice | Number | 是 | 89 | 商品无线京东价(单价为-1表示未查询到该商品单价) |
| cid2Name | String | 是 | 童装 | 二级类目名称 |
| isSeckill | Number | 是 | 0 | 是否秒杀(1:是,0:否) |
| cid2 | Number | 是 | 11842 | 二级类目ID |
| cid3Name | String | 是 | 裙子 | 三级类目名称 |
| inOrderCount | Number | 是 | 703 | 30天引单数量 |
| cid3 | Number | 是 | 11225 | 三级类目ID |
| shopId | Number | 是 | 168168 | 店铺ID |
| isJdSale | Number | 是 | 1 | 是否自营(1:是,0:否) |
| goodsName | String | 是 | 童装女童连衣裙儿童裙子大童女装2018夏季新品公主裙 横条纹款 130码(正码) | 商品名称 |
| startDate | Number | 是 | 1529251200000 | 推广开始日期(时间戳,毫秒) |
| cid | Number | 是 | 1319 | 一级类目ID |
{ "error": "0", "msg": "查询成功!", "data": [ { "unitPrice": "2399.00", "materialUrl": "http://item.jd.com/10053012444284.html", "endDate": "1673280000000", "isFreeFreightRisk": "1", "isFreeShipping": "1", "commisionRatioWl": "4.1", "commisionRatioPc": "4.1", "imgUrl": "http://img14.360buyimg.com/n1/jfs/t1/143631/13/31729/142169/63b78c94F966e49a7/1a415625c9b6111a.jpg", "vid": "128869", "cidName": "家用电器", "wlUnitPrice": "2399.00", "cid2Name": "大 家 电", "isSeckill": "1", "cid2": "794", "cid3Name": "壁挂洗衣机", "inOrderCount": "100", "cid3": "23050", "shopId": "125326", "isJdSale": "0", "goodsName": "小天鹅(LittleSwan)3公斤壁挂洗衣机母婴儿童宝宝内衣高温煮洗 滚筒全自动 智能家电WIFI 【水魔方系列】TG30V860E", "skuId": "10053012444284", "startDate": "1672416000000", "cid": "737" } ], "request_id": "LJDuj6U" }