跟据卖家设定的Sku的外部id获取商品,如果一个outer_id对应多个Sku会返回所有符合条件的sku 这个Sku所属卖家从传入的session中获取,需要session绑定(注:iid标签里是num_iid的值,可以用作num_iid使用)
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
fields | String | 必须 | sku_id,properties | 需返回的字段列表。可选值:Sku结构体中的所有字段;字段之间用“,”隔开 | |
outer_id | String | 必须 | bb | Sku的外部商家ID |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
skus | Sku [] | Sku对象,具体字段以fields决定 | |
|
1 2 3 4 5 6 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); SkusCustomGetRequest req = new SkusCustomGetRequest(); req.setFields( "sku_id,properties" ); req.setOuterId( "bb" ); SkusCustomGetResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | < skus_custom_get_response > < skus > < sku > < sku_id >123</ sku_id > < iid >asdf12323adfaa</ iid > < properties >1243:1215;5626:5125</ properties > < properties_name >20000:3275069:品牌:盈讯;1753146:3485013:型号:F908;-1234:-5678:自定义属性1:属性值1</ properties_name > < quantity >3</ quantity > < price >200.07</ price > < outer_id >12345</ outer_id > < created >2009-11-04 15:24:43</ created > < modified >2009-11-04 15:24:43</ modified > < status >normal</ status > < num_iid >12345</ num_iid > </ sku > </ skus > </ skus_custom_get_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|---|---|
isv.item-skus-custom-get-service-error:ITEM_NOT_FOUND | 没有找到宝贝 | 没有找到宝贝 |
isp.top-remote-connection-timeout-tmall | 系统超时 | 请稍后重试 |
isp.top-remote-method-connection-error-tmall | 系统错误 | 请稍后重试 |
isp.service-unavailable | 系统错误 | 偶尔出现重试,频繁出现反馈平台 |