本文档旨在指导您快速查询一批商品是否存在于跨境供销平台(找同款),并根据查询结果批量建立商家的铺品关系。
完成该业务,主要分为以下几个步骤:
创建订单后,您可以:
透过 /product/same/query
接口查询商品是否存在于供销平台。
item_ids
为商品 id 列表,type
为当前商品存在的渠道。目前仅支持 type=TAOBAO
的商品查询。
返回结果中的 data
体中商品为存在于跨境分销平台的商品,可透过 /product/relation/build
接口进行铺货。
fail_items
体中的商品为不存在于跨境分销平台的商品。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | { "code" : "0" , "data" :[ { "images" :[ "https://gd2.alicdn.com/imgextra/i1/1912652759/O1CN01CYrUWe1WFfLdfgysQ_!!0-item_pic.jpg" ], "item_id" : 600084670918432591 , "leaf_cate_id" : 201243089 , "leaf_cate_name" : "Cushions & Mounts" , "supply_item_id" : 619093432591 , "title" : "\u6c7d\u8f66\u5750\u57ab\u56db\u5b63\u901a\u7528\u5168\u5305\u5ea7\u5957\u4e13\u7528\u5ea7\u6905\u59572020\u65b0\u6b3e\u5c0f\u8f66\u5ea7\u57ab\u5957\u590f\u5b63\u51b0\u4e1d" } ], "fail_items" :[ { "error_message" : "10001::NOT_FOUND" , "item_id" : "577677932079" }, { "error_message" : "10001::NOT_FOUND" , "item_id" : "600069234047766362" } ], "request_id" : "0b5fbf9e16142377744363614" , "success" : true } |
透过 /product/relation/build
接口查询商品是否存在于供销平台。根据 data
体内的商品为铺品成功,和 fail_items
内的商品为铺品失败,可以参考每个商品的 error_message
判断失败原因。
如下述「Failed to publish the dest market item for Market Merchant Product query failed」即商品不存在。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | { "code" : "0" , "data" :[ "600069234047766362" , "600082404577235676" ], "fail_items" :[ { "error_message" :Failed to publish the dest market item for Market Merchant Product query failed", "item_id" : "600069234042766362" }, { "error_message" : "Failed to publish the dest market item for Market Merchant Product query failed" , "item_id" : "600069254047766362" } ], "request_id" : "0b17f2b816142355105313491" , "success" : true } |