tmall.channel.products.get (查询供应商的产品数据)

查询供应商的产品数据。 * 入参传入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
  • └ ids
  • Number []
  • 可选
  • [1,2]
  • 要查询的产品id 列表
  • └ page_size
  • Number
  • 可选
  • 10
  • 分页大小
  • └ product_line_id
  • Number
  • 可选
  • 24001
  • 产品线id
  • └ page_num
  • Number
  • 可选
  • 1
  • 当前要查看的页数
  • └ product_outer_id
  • String
  • 可选
  • xx0001
  • 产品商家编码
  • └ item_ids
  • Number []
  • 可选
  • [1,2,3]
  • 关联的前端宝贝id列表
  • └ sku_outer_id
  • String
  • 可选
  • sku001
  • sku商家编码
  • └ channel
  • Number
  • 可选
  • 21
  • 渠道[21 零售plus]

响应参数

名称 类型 示例值 描述
products TopProductDO [] 产品对象记录集
  • └ city
  • String
  • 杭州
  • 所在地:市
  • └ cost_price_yuan
  • String
  • 1.01
  • 代销采购价格,单位:元。
  • └ desc_path
  • String
  • http://img03.taobaocdn.com/xxx.dpc
  • 产品描述路径,通过http请求获取
  • └ created
  • Date
  • 2000-01-01 00:00:00
  • 创建时间
  • └ modified
  • Date
  • 2000-01-01 00:00:00
  • 更新时间
  • └ have_invoice
  • Number
  • true
  • 是否有发票,可选值:false(否)、true(是)
  • └ have_quarantee
  • Number
  • true
  • 是否有保修,可选值:false(否)、true(是)
  • └ auction_id
  • Number
  • 10002
  • 关联的前台宝贝id
  • └ items_count
  • Number
  • 10
  • 下载人数
  • └ postage_ems
  • String
  • 12
  • ems费用,单位:元
  • └ postage_fast
  • String
  • 6
  • 快递费用,单位:元
  • └ postage_id
  • Number
  • 5545
  • 运费模板ID
  • └ postage_ordinary
  • String
  • 4.20
  • 平邮费用,单位:元
  • └ postage_type
  • Number
  • 1
  • 运费类型:1(供应商承担运费)、2(分销商承担运费)可选值:seller(供应商承担运费)、buyer(分销商承担运费)
  • └ pid
  • Number
  • 100001
  • 产品ID
  • └ product_line_id
  • Number
  • 23001
  • 产品所属产品线id
  • └ outer_id
  • String
  • 1
  • 商家编码
  • └ prov
  • String
  • 浙江
  • 所在地:省
  • └ quantity
  • Number
  • 100
  • 产品库存
  • └ retail_price_high
  • String
  • 100
  • 最高零售价,单位:元。
  • └ retail_price_low
  • String
  • 99
  • 最低零售价,单位:元。
  • └ sc_item_id
  • Number
  • 1
  • scItemId
  • skus
  • ProductSkuDo []
  • 1
  • 分销产品SKU列表
  • └ auction_sku_id
  • Number
  • 1
  • 关联的前端宝贝skuid
  • └ cost_price_fen
  • Number
  • 100
  • 代销采购价:单位分
  • └ price_cost_dealer_fen
  • Number
  • 100
  • 经销采购价:单位分
  • └ properties
  • String
  • 1243:1215;5626:5125
  • sku的销售属性组合字符串。格式:pid:vid;pid:vid,如:1627207:3232483;1630696:3284570,表示:机身颜色:军绿色;手机套餐:一电一充。
  • └ quantity
  • Number
  • 1
  • 库存
  • └ quota_quantity
  • Number
  • 100
  • 配额可用库存
  • └ reserved_quantity
  • Number
  • 1
  • 预扣库存
  • └ scitem_id
  • Number
  • 1
  • 关联的后端商品id
  • └ sku_id
  • Number
  • 1
  • skuId
  • └ outer_id
  • String
  • 1
  • 商家编码
  • └ standard_price_fen
  • Number
  • 100
  • 市场价单位分
  • └ spu_id
  • Number
  • 1
  • spuId
  • └ standard_price
  • String
  • 1
  • 市场价:单位元
  • └ status
  • Number
  • 1
  • 发布状态: 1 上架,2 下架,3 删除
  • └ name
  • String
  • 1
  • 产品名称
  • └ orders_count
  • Number
  • 1
  • 累计采购次数
  • └ pictures
  • String
  • http://img01.taobaocdn.com/xxx.jpg,http://img01.taobaocdn.com/xxx.jpg
  • 产品图片路径列表,用“,”分隔
total_results Number 99 查询结果记录数

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
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());

响应示例

  • XML示例
  • JSON示例
<tmall_channel_products_get_response>
    <products>
        <top_product_d_o>
            <city>杭州</city>
            <cost_price_yuan>1.01</cost_price_yuan>
            <desc_path>http://img03.taobaocdn.com/xxx.dpc</desc_path>
            <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>
            <pictures>http://img01.taobaocdn.com/xxx.jpg,http://img01.taobaocdn.com/xxx.jpg</pictures>
        </top_product_d_o>
    </products>
    <total_results>99</total_results>
</tmall_channel_products_get_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部