获取商品sku详情
根据sku id获取商品sku详情
请求URL:
公共参数
参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
---|---|---|---|---|
appid | String | 是 | 合作伙伴AppId | |
timestamp | String | 是 | 1657525936 | 当前Unix时间戳,秒 |
seller_nick | String | 是 | 38173182 | 抖店的账号,对应蜂巢授权返回doudianseller字段 |
sign | String | 是 |
业务参数
参数名称 | 参数类型 | 是否必须 | 示例值 | 参数描述 |
---|---|---|---|---|
sku_id | Number | 否 | 1234 | sku id |
code | String | 否 | cccc | sku code |
2. 请求示例代码(Java)
请求示例代码
@Test
public void DDSkuDetail() 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","1234" );
data.put("code","sk100" );
data.put("sign", Sign(data,Config.AppSecret));
// 调用服务API
String resp = doHttpRequest(Config.DDSkuDetail, data);
System.out.println(resp);
}
3. 返回结果如下:
{
"code": 0,
"message": "ok",
"data": {
"code": "sk100",
"create_time": 1708495124,
"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": 3398076948315650,
"is_suit": 0,
"open_user_id": 0,
"out_sku_id": 0,
"prehold_step_stock_num": 0,
"prehold_stock_map": {},
"prehold_stock_num": 0,
"price": 22223,
"product_id": 3668963015870513459,
"product_id_str": "3668963015870513459",
"prom_step_stock_num": 0,
"prom_stock_num": 0,
"settlement_price": 0,
"ship_rule_map": null,
"sku_type": 0,
"spec_detail_id1": 1791486981413888,
"spec_detail_id2": 0,
"spec_detail_id3": 0,
"spec_detail_name1": "默认",
"spec_detail_name2": "",
"spec_detail_name3": "",
"spec_id": 1791486981410857,
"status": 0,
"step_stock_num": 0,
"stock_map": {},
"stock_num": 1000,
"suit_num": 0,
"supplier_id": "1",
"volume": 0
}
}
说明: code为0表示成功,非0为失败,message会包含失败原因。返回字段说明见文档
https://op.jinritemai.com/docs/api-docs/14/566
文档更新时间: 2024-05-21 22:51 作者:JSL