查询商品详情

使用场景:查询抖店商品详情信息 1、支持使用抖店商品id 2、商品外部开发者自定义编码查询

请求URL:

POST https://kf.fw199.com/gateway/dd/product/detail

公共参数

参数名称 参数类型 是否必须 示例值 参数描述
appid String 合作伙伴AppId
timestamp String 1657525936 当前Unix时间戳,秒
seller_nick String 38173182 抖店的账号,对应蜂巢授权返回doudianseller字段
sign String

业务参数

参数名称 参数类型 是否必须 示例值 参数描述
product_id String 3558192687276554544 商品ID,抖店系统生成,店铺下唯一;长度19位。
out_product_id String dy001 外部商家编码,商家自定义字段
show_draft String false true:读取草稿数据;false:读取线上数据;不传默认为false

2. 请求示例代码(Java)

请求示例代码

@Test  
public void  DDProductDetail() 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("product_id", "3612119741067590119");  
    data.put("sign", Sign(data,Config.AppSecret));  
    // 调用服务API  
    String resp = doHttpRequest(Config.DDProductDetailUrl, data);  
    System.out.println(resp);  
}

3. 返回结果如下:

返回成功的情况,data里包含宝贝的信息,限于篇幅,json只展示部分内容


{
  "code": 0,
  "message": "ok",
  "data": {
    "code": "",
    "create_time": 1682075121,
    "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": 1763783601578032,
    "is_suit": 0,
    "open_user_id": 0,
    "out_sku_id": 5143079130917,
    "prehold_step_stock_num": 0,
    "prehold_stock_map": {},
    "prehold_stock_num": 0,
    "price": 33800,
    "product_id": 3612228815260098474,
    "product_id_str": "3612228815260098474",
    "prom_step_stock_num": 0,
    "prom_stock_num": 0,
    "settlement_price": 0,
    "ship_rule_map": null,
    "sku_type": 0,
    "spec_detail_id1": 1763783600606352,
    "spec_detail_id2": 0,
    "spec_detail_id3": 0,
    "spec_detail_name1": "X035玫瑰 金   十字链钛钢",
    "spec_detail_name2": "",
    "spec_detail_name3": "",
    "spec_id": 1763783597052943,
    "step_stock_num": 0,
    "stock_map": {},
    "stock_num": 95831,
    "suit_num": 0,
    "supplier_id": "",
    "volume": 0
  }
}



说明: code为0表示成功,非0为失败,message会包含失败原因。返回字段说明见文档
https://op.jinritemai.com/docs/api-docs/14/56

文档更新时间: 2023-04-21 20:07   作者:admin