获取商品sku详情
根据sku_id获取sku详情信息
请求URL:
公共参数
参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
---|---|---|---|---|
appid | String | 是 | 合作伙伴AppId | |
timestamp | String | 是 | 1657525936 | 当前Unix时间戳,秒 |
seller_nick | String | 是 | 38173182 | 抖店的账号,对应蜂巢授权返回doudianseller字段 |
sign | String | 是 |
业务参数
参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
---|---|---|---|---|
sku_id | Int64 | 否 | 1234 | sku id,推荐使用 |
code | String | 否 | cccc | sku code,不推荐 |
2. 请求示例代码(Java)
请求示例代码
@Test
public void SkuDetailRequest() throws Exception {
Map<String, Object> data = new HashMap<String, Object>();
data.put("appid", Config.AppId);
Long timestamp = System.currentTimeMillis() / 1000;
data.put("timestamp", timestamp.toString());
data.put("seller_nick", Config.DDSellerNick);
data.put("sku_id", "1763516132388916");
data.put("sign", Sign(data,Config.AppSecret));
// 调用服务API
String resp = doHttpRequest(Config.DDSkuDetailUrl, data);
System.out.println(resp);
}
3. 返回结果如下:
{
"code": 0,
"message": "ok",
"data": {
"code": "",
"create_time": 1681820042,
"customs_report_info": {
"bar_code": null,
"first_measure_qty": 0,
"first_measure_unit": null,
"g_model": null,
"hs_code": null,
"report_brand_name": null,
"report_name": null,
"second_measure_qty": 0,
"second_measure_unit": null,
"unit": null,
"usage": null
},
"id": 1763516132388916,
"is_suit": 0,
"open_user_id": 0,
"out_sku_id": 0,
"prehold_step_stock_num": 0,
"prehold_stock_map": {},
"prehold_stock_num": 0,
"price": 1752,
"product_id": 3611681039409361930,
"product_id_str": "3611681039409361930",
"prom_step_stock_num": 0,
"prom_stock_num": 0,
"settlement_price": 0,
"ship_rule_map": null,
"sku_type": 0,
"spec_detail_id1": 1763516129860691,
"spec_detail_id2": 1763516131234827,
"spec_detail_id3": 0,
"spec_detail_name1": "1028黑色",
"spec_detail_name2": "42-43",
"spec_detail_name3": "",
"spec_id": 1763516128832547,
"step_stock_num": 0,
"stock_map": {},
"stock_num": 999,
"suit_num": 0,
"supplier_id": "",
"volume": 0
}
}
说明: code为0表示成功,非0为失败,message会包含失败原因。返回字段说明见文档
https://op.jinritemai.com/docs/api-docs/14/566
文档更新时间: 2023-04-21 20:08 作者:admin