商品属性类目接口
获取商品规格信息
1.请求参数:
请求URL:
参数名 | 类型 | 必须 | 说明 |
---|---|---|---|
appid | String | 必填 | 合作伙伴AppId |
timestamp | String | 必填 | 当前时间戳 |
tb_seller_nick | String | 必填 | 拼多多账号, 非店铺名称 |
sign | String | 必填 | 如何计算生成见示例代码 |
cat_id | LONG | 必填 | 叶子类目ID,必须入参level=3时的cat_id,否则无法返回正确的参数 |
2. 请求示例代码(Java)
@Test
public void PddGoodsSpecGetRequestUrl() throws Exception {
String seller_nick = Config.PddSellerNick; // 拼多多卖家账号
//业务参数
Map<String, String> data = new HashMap<String, String>();
data.put("appid", Config.AppId);
data.put("seller_nick", seller_nick);
Long timestamp = System.currentTimeMillis() / 1000;
data.put("timestamp", timestamp.toString());
data.put("cat_id", "18056" );
// 参数签名
data.put("sign", Utils.Sign(data, Config.AppSecret));
doHttpRequest(Config.PddGoodsSpecGetRequestUrl, data);
}
3. 返回结果
返回结果如下
{
"code": 0,
"message": "ok",
"data": {
"goods_spec_list": [{
"cat_id": 18056,
"parent_spec_id": 1216,
"parent_spec_name": "尺寸"
}, {
"cat_id": 18056,
"parent_spec_id": 1473,
"parent_spec_name": "型号"
}, {
"cat_id": 18056,
"parent_spec_id": 1218,
"parent_spec_name": "款式"
}, {
"cat_id": 18056,
"parent_spec_id": 173120,
"parent_spec_name": "器型"
}, {
"cat_id": 18056,
"parent_spec_id": 1282,
"parent_spec_name": "材质"
}, {
"cat_id": 18056,
"parent_spec_id": 1219,
"parent_spec_name": "口味"
}, {
"cat_id": 18056,
"parent_spec_id": 3203,
"parent_spec_name": "色号"
}, {
"cat_id": 18056,
"parent_spec_id": 2499,
"parent_spec_name": "适用人群"
}, {
"cat_id": 18056,
"parent_spec_id": 1287,
"parent_spec_name": "容量"
}, {
"cat_id": 18056,
"parent_spec_id": 8137,
"parent_spec_name": "花型"
}, {
"cat_id": 18056,
"parent_spec_id": 1226,
"parent_spec_name": "尺码"
}, {
"cat_id": 18056,
"parent_spec_id": 61011436,
"parent_spec_name": "地点"
}, {
"cat_id": 18056,
"parent_spec_id": 1488,
"parent_spec_name": "香型"
}, {
"cat_id": 18056,
"parent_spec_id": 8277,
"parent_spec_name": "货号"
}, {
"cat_id": 18056,
"parent_spec_id": 2774,
"parent_spec_name": "组合"
}, {
"cat_id": 18056,
"parent_spec_id": 174495,
"parent_spec_name": "成份"
}, {
"cat_id": 18056,
"parent_spec_id": 10593,
"parent_spec_name": "版本"
}, {
"cat_id": 18056,
"parent_spec_id": 6883,
"parent_spec_name": "度数"
}, {
"cat_id": 18056,
"parent_spec_id": 175974,
"parent_spec_name": "运营商"
}, {
"cat_id": 18056,
"parent_spec_id": 4773,
"parent_spec_name": "属性"
}, {
"cat_id": 18056,
"parent_spec_id": 1253,
"parent_spec_name": "重量"
}, {
"cat_id": 18056,
"parent_spec_id": 61209667,
"parent_spec_name": "地区"
}, {
"cat_id": 18056,
"parent_spec_id": 20711,
"parent_spec_name": "套餐"
}, {
"cat_id": 18056,
"parent_spec_id": 1384,
"parent_spec_name": "类别"
}, {
"cat_id": 18056,
"parent_spec_id": 3818,
"parent_spec_name": "适用年龄"
}, {
"cat_id": 18056,
"parent_spec_id": 1900,
"parent_spec_name": "功效"
}, {
"cat_id": 18056,
"parent_spec_id": 3820,
"parent_spec_name": "品类"
}, {
"cat_id": 18056,
"parent_spec_id": 61011218,
"parent_spec_name": "时间"
}, {
"cat_id": 18056,
"parent_spec_id": 1215,
"parent_spec_name": "颜色"
}],
"request_id": "16338801188422162"
},
"trace_id": ""
}
说明: code为0表示成功,非0为失败,message会包含失败原因。
4 返回参数说明
参数接口 | 参数类型 | 例子 | 说明 |
---|---|---|---|
goods_spec_list | OBJECT[] | 规格列表对象 | |
cat_id | LONG | 规格所属的叶子类目ID | |
parent_spec_id | LONG | 商品规格对应的ID | |
parent_spec_name | STRING | 商品规格ID对应的规格名称 |
文档更新时间: 2023-03-14 17:04 作者:admin