查询供应商的产品数据。 * 入参传入pids将优先查询,即只按这个条件查询。 *入参传入sku_number将优先查询(没有传入pids),即只按这个条件查询(最多显示50条) * 入参fields传skus将查询sku的数据,不传该参数默认不查询,返回产品的其它信息。 * 入参fields传入images将查询多图数据,不传只返回主图数据。 * 入参fields仅对传入pids生效(只有按ID查询时,才能查询额外的数据) * 查询结果按照产品发布时间倒序,即时间近的数据在前。 * 传入channel 渠道,会只返回相应渠道的产品
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
top_query_product_d_o | TopQueryProductDo | 可选 | top_query_product_d_o | ||
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
products | TopProductDO [] | 无 | 产品对象记录集 |
|
|||
total_results | Number | 99 | 查询结果记录数 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); TmallChannelProductsGetRequest req = new TmallChannelProductsGetRequest(); TmallChannelProductsGetRequest.TopQueryProductDo obj1 = new TmallChannelProductsGetRequest.TopQueryProductDo(); obj1.setIds( new Long[] { 1 , 2 }; ); obj1.setPageSize(10L); obj1.setProductLineId(24001L); obj1.setPageNum(1L); obj1.setProductOuterId( "xx0001" ); obj1.setItemIds( new Long[] { 1 , 2 , 3 }; ); obj1.setSkuOuterId( "sku001" ); obj1.setChannel(21L); req.setTopQueryProductDO(obj1); TmallChannelProductsGetResponse 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 | < tmall_channel_products_get_response > < products > < top_product_d_o > < city >杭州</ city > < cost_price_yuan >1.01</ cost_price_yuan > < created >2000-01-01 00:00:00</ created > < modified >2000-01-01 00:00:00</ modified > < have_invoice >true</ have_invoice > < have_quarantee >true</ have_quarantee > < auction_id >10002</ auction_id > < items_count >10</ items_count > < postage_ems >12</ postage_ems > < postage_fast >6</ postage_fast > < postage_id >5545</ postage_id > < postage_ordinary >4.20</ postage_ordinary > < postage_type >1</ postage_type > < pid >100001</ pid > < product_line_id >23001</ product_line_id > < outer_id >1</ outer_id > < prov >浙江</ prov > < quantity >100</ quantity > < retail_price_high >100</ retail_price_high > < retail_price_low >99</ retail_price_low > < sc_item_id >1</ sc_item_id > < skus > < product_sku_do > < auction_sku_id >1</ auction_sku_id > < cost_price_fen >100</ cost_price_fen > < price_cost_dealer_fen >100</ price_cost_dealer_fen > < properties >1243:1215;5626:5125</ properties > < quantity >1</ quantity > < quota_quantity >100</ quota_quantity > < reserved_quantity >1</ reserved_quantity > < scitem_id >1</ scitem_id > < sku_id >1</ sku_id > < outer_id >1</ outer_id > < standard_price_fen >100</ standard_price_fen > </ product_sku_do > </ skus > < spu_id >1</ spu_id > < standard_price >1</ standard_price > < status >1</ status > < name >1</ name > < orders_count >1</ orders_count > </ top_product_d_o > </ products > < total_results >99</ total_results > </ tmall_channel_products_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 > |
错误码 | 错误描述 | 解决方案 |
---|