获取单个商品的全部信息
点击查看更多商品API说明
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
fields | String | 必须 | num_iid,title,nick,price,approve_status,sku | 需要返回的商品字段列表。可选值:Item商品结构体中所有字段均可返回,多个字段用“,”分隔。 | |
num_iid | Number | 必须 | 123456789 | 商品数字ID |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
item | Item | 商品详细信息 | |
|
1 2 3 4 5 6 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); ItemSellerGetRequest req = new ItemSellerGetRequest(); req.setFields( "num_iid,title,nick,price,approve_status,sku" ); req.setNumIid(123456789L); ItemSellerGetResponse 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 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | < item_seller_get_response > < item > < after_sale_id >123</ after_sale_id > < approve_status >onsale</ approve_status > < auction_point >15</ auction_point > < auto_fill >time_card</ auto_fill > < auto_repost >true</ auto_repost > < barcode >6903244981002</ barcode > < cid >132443</ cid > < cod_postage_id >53899</ cod_postage_id > < created >2000-01-01 00:00:00</ created > < custom_made_type_id >1</ custom_made_type_id > < delist_time >2000-01-01 00:00:00</ delist_time > < desc >这是一个好商品</ desc > < desc_module_info > < anchor_module_ids >1,4,7</ anchor_module_ids > < type >1</ type > </ desc_module_info > < ems_fee >5.00</ ems_fee > < express_fee >5.00</ express_fee > < features >;tags:3522,7234;source:sell;sp:2;</ features > < food_security > < contact >00800-021216</ contact > < design_code >Q/DHL.001-2008</ design_code > < factory >远东恒天然乳品有限公司</ factory > < factory_site >台北市仁爱路4段85号</ factory_site > < food_additive >磷脂 、膨松剂</ food_additive > < health_product_no >卫食健字(1997)第167号</ health_product_no > < mix >有机乳糖、有机植物油</ mix > < period >2年</ period > < plan_storage >常温</ plan_storage > < prd_license_no >QS410006010388</ prd_license_no > < product_date_end >2012-06-10</ product_date_end > < product_date_start >2012-06-01</ product_date_start > < stock_date_end >2012-06-30</ stock_date_end > < stock_date_start >2012-06-20</ stock_date_start > < supplier >深圳岸通商贸有限公司</ supplier > </ food_security > < freight_payer >seller</ freight_payer > < global_stock_country >美国</ global_stock_country > < global_stock_type >1</ global_stock_type > < has_discount >true</ has_discount > < has_invoice >true</ has_invoice > < has_showcase >true</ has_showcase > < has_warranty >true</ has_warranty > < increment >0</ increment > < inner_shop_auction_template_id >2185480</ inner_shop_auction_template_id > < input_pids >2432,5353,656425</ input_pids > < input_str >耐克;耐克系列;科比系列;科比系列;2K5</ input_str > < is_3D >true</ is_3D > < is_ex >true</ is_ex > < is_fenxiao >0</ is_fenxiao > < is_lightning_consignment >true</ is_lightning_consignment > < is_prepay >true</ is_prepay > < is_taobao >true</ is_taobao > < is_timing >true</ is_timing > < is_virtual >true</ is_virtual > < is_xinpin >false</ is_xinpin > < item_imgs > < item_img > < id >1645920</ id > < position >1</ position > </ item_img > </ item_imgs > < item_size >bulk:10</ item_size > < item_weight >10</ item_weight > < list_time >2009-10-22 14:22:06</ list_time > < locality_life > < choose_logis >0</ choose_logis > < eticket >;market:eticket;refundmafee:b;</ eticket > < expirydate >2012-08-06,2012-08-16</ expirydate > < merchant >56879:码商X</ merchant > < network_id >5645746</ network_id > < onsale_auto_refund_ratio >80</ onsale_auto_refund_ratio > < refund_ratio >50</ refund_ratio > < refundmafee >b</ refundmafee > < verification >1</ verification > </ locality_life > < location > < city >杭州</ city > < state >浙江</ state > </ location > < modified >2000-01-01 00:00:00</ modified > < mpic_video > < num_iid >1497217011</ num_iid > < video_duaration >9</ video_duaration > < video_id >9527</ video_id > < video_status >0</ video_status > </ mpic_video > < newprepay >1</ newprepay > < nick >tbtest561</ nick > < num >8888</ num > < num_iid >1489161932</ num_iid > < one_station >true</ one_station > < outer_id >34143554352</ outer_id > < outer_shop_auction_template_id >2185481</ outer_shop_auction_template_id > < paimai_info > < deposit >20</ deposit > < increment >0</ increment > < interval >5</ interval > < mode >1</ mode > < reserve >12.0</ reserve > < valid_hour >20</ valid_hour > < valid_minute >23</ valid_minute > < repeat >0</ repeat > < start >2000-01-01 00:00:00</ start > < end >2000-01-01 00:00:00</ end > < start_price >10</ start_price > < ceil_price >10</ ceil_price > < delay_in_minute >10</ delay_in_minute > < period >10</ period > < frequency >10</ frequency > </ paimai_info > < period_sold_quantity >100</ period_sold_quantity > < post_fee >5.00</ post_fee > < postage_id >32</ postage_id > < price >5.00</ price > < product_id >85883030</ product_id > < promoted_service >2</ promoted_service > < prop_imgs > < prop_img > < id >1646146</ id > < position >1</ position > < properties >1627207:28326</ properties > </ prop_img > </ prop_imgs > < property_alias >property</ property_alias > < props >135255:344454</ props > < props_name >20000:3275069:品牌:盈讯;1753146:3485013:型号:F908;30606:112030:上市时间:2008年</ props_name > < score >2</ score > < second_kill >web_only</ second_kill > < sell_point >2013新款 时尚 前卫</ sell_point > < sell_promise >true</ sell_promise > < seller_cids >2234445,3344466,446434</ seller_cids > < skus > < sku > < barcode >6903244981002</ barcode > < created >2009-11-04 15:24:43</ created > < modified >2009-11-04 15:24:43</ modified > < outer_id >12345</ outer_id > < price >200.07</ price > < properties >1243:1215;5626:5125</ properties > < properties_name >20000:3275069:品牌:盈讯;1753146:3485013:型号:F908;-1234:-5678:自定义属性1:属性值1</ properties_name > < quantity >3</ quantity > < sku_id >123</ sku_id > </ sku > </ skus > < sold_quantity >8888</ sold_quantity > < stuff_status >new</ stuff_status > < sub_stock >1</ sub_stock > < template_id >123456</ template_id > < title >Google test item</ title > < type >fixed</ type > < valid_thru >7</ valid_thru > < video_id >9527</ video_id > < videos > < video > < created >2000-01-01 00:00:00</ created > < id >123456</ id > < modified >2000-01-01 00:00:00</ modified > < video_id >123456</ video_id > </ video > </ videos > < violation >true</ violation > < volume >22</ volume > < wap_desc >Wap宝贝详情</ wap_desc > < wap_detail_url >http://auction1.wap.taobao.com/auction/item_detail-0db0-1234567.jhtml</ wap_detail_url > < wireless_desc >无线宝贝描述,亲</ wireless_desc > < with_hold_quantity >12</ with_hold_quantity > < ww_status >true</ ww_status > < desc_modules >[{"module_id":123,"module_name":"模特图","type":"cat_mod","content":"模特要漂亮一点拜托"},{"module_id":null,"module_name":"店主最漂亮","type":"usr_mod","content":"老娘全网最美"}]</ desc_modules > < cuntao_item_specific > < kick_back_rate >3.3即3.3%</ kick_back_rate > </ cuntao_item_specific > < large_screen_image_url >i4/2054159008/TB2ixFaXXXXXXbrXXXXXXXXXXXX_!!2054159008.png</ large_screen_image_url > < is_area_sale >true</ is_area_sale > < cpv_memo >1627207:28320:绿叶繁花;</ cpv_memo > < item_rectangle_imgs > < item_img > < position >0</ position > </ item_img > </ item_rectangle_imgs > < first_starts_time >2000-01-01 00:00:00</ first_starts_time > </ item > </ item_seller_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.missing-parameter:iid-or-numIid | 参数:iid或numIid一个都没有传入 | 在前端对是否传入num_iid做好校验,必须传入num_iid |
isv.invalid-permission:nick-and-item | 商品ID与卖家昵称不匹配 | 输入num_iid就完全可以取得商品信息,nick只是可选,不确定的情况下请不要输入 |
isv.item-get-service-error:ITEM_NOT_FOUND | 没有找到宝贝 | 1. 确认num_iid是否正确(建议通过taobao.items.onsale.get和taobao.items.inventory.get 获取num_iid), 如果num_iid无误,则对应的宝贝可能已违规或进入历史库,在本地增加逻辑:发现报“ITEM_NOT_FOUND”错误就将本地的商品记录删除掉,防止卖家或者系统自动重试再次发生这个问题。2. 解决该问题,可以使用消息服务(http://open.taobao.com/doc/detail.htm?spm=0.0.0.0.ky0yHF&id=101663)功能,实时监控商品被删除的消息,及时把已删除商品从本地数据库中移除,保持数据同步。 |
isv.item-is-delete:invalid-numIid | 商品id对应的商品已经被删除 | 程序做好控制,报错后禁止重试,并做相应提示。另可以使用消息服务(http://open.taobao.com/doc/detail.htm?spm=0.0.0.0.ky0yHF&id=101663)功能,实时监控商品被删除的消息,及时把已删除商品从本地数据库中移除,保持数据同步。 |
isv.invalid-permission:get-item | 非商品所属的卖家无权查看仓库中的商品 | 不要查询别人的商品 |
isv.item-is-delete:invalid-numIid-or-iid | 商品已经被删除 | 传入一个存在的商品ID |
isv.invalid-permission | 没有权限查看别人的商品 | 请确保传入的授权用户和商品所属用户一致 |
isv.item-get-service-error:IC_INTERFACE_QPS_LIMIT | 系统繁忙,请稍后重试 | 系统繁忙,请稍后重试 |
isv.item-get-service-error:ITEM_QUERY_ERROR | 系统异常 | 系统异常 |
isv.item-get-service-error:QUERY_USER_INFO_ERROR | 系统错误,获取用户数据失败 | 系统错误,获取用户数据失败 |
isv.invalid-permission-tmall | 参数错误 | 请检查传入参数 |
isv.item-get-service-error:ITEM_NOT_FOUND-tmall | 商品找不到 | 请检查商品 |
isv.item-is-delete:invalid-numIid-or-iid-tmall | 该商品已被删除 | 请检查商品是否正确,或者是否允许使用接口 |
isv.item-get-service-error:IC_INTERFACE_QPS_LIMIT-tmall | 频率限制 | 控制请求频率 |
isp.top-remote-connection-timeout-tmall | 请求超时 | 重试 |
isp.top-mapping-parse-error-tmall | 传入的数字太长 | 确认参数的长度 |
isv.item-get-service-error:QUERY_USER_INFO_ERROR-tmall | 系统错误,获取用户数据失败 | 系统错误,获取用户数据失败 |
isp.item-get-service-error-tmall | 查询商品失败 | 请稍后重试 |
isv.item-not-exist:invalid-numIid-or-iid-tmall | 商品不存在 | 请检查商品是否正确 |
isv.item-get-service-error:SYSTEM_ERROR | 查询商品失败 | 请稍后重试 |
isp.service-unavailable-tmall | 系统异常 | 请稍后重试 |
isv.item-not-exist:invalid-numIid-or-iid | 商品不存在 | 请检查商品是否正确 |
isv.user-not-exist:invalid-nick-tmall | 商品所属的用户不存在 | 请检查卖家账号情况 |
isv.item-get-service-error:GENERIC_FAILURE | 系统异常 | 请稍后重试 |
isv.item-service-error:ITEM_NOT_FOUND-tmall | 商品找不到 | 商品找不到 |
isv.item-service-error:ITEM_NOT_FOUND | 商品找不到 | 商品找不到 |