注意:以下文档只适用于TOP接口,请谨慎使用!

文档中心 > API类目 > 采购宝API

taobao.pc.item.query (获取专属商品库)

获取专属商品库全部商品(分页查询业务商品库)

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param EgoItemQueryParam 可选 商品查询参数
  • └ project_id
  • String
  • 必须
  • 10000001
  • 项目ID
  • └ page_size
  • Number
  • 必须
  • 20
  • 分页大小,区间[1,20]
  • └ current_page
  • Number
  • 必须
  • 1
  • 当前页,从1开始
  • └ cursor
  • String
  • 可选
  • 12345
  • 游标,开启了游标模式,查询下一页的时候需要传入,第一次查询可以不传
  • └ cursor_mode
  • Boolean
  • 可选
  • false
  • 是否开启游标模式
  • └ with_total
  • Boolean
  • 可选
  • true
  • 是否需要返回总数
  • └ service_id
  • Number
  • 必须
  • 10000001
  • 服务商ID
  • └ service_nick
  • String
  • 必须
  • 测试服务商1
  • 服务商名称

响应参数

名称 类型 示例值 描述
page_result PageResult pageResult
  • └ success
  • Boolean
  • true
  • 操作是否成功
  • └ error_code
  • String
  • 200
  • 结果码
  • └ error_msg
  • String
  • 参数错误
  • 结果描述
  • ego_item_detail_d_t_o_page_data
  • PageData
  • 分页结果
  • └ current_page
  • Number
  • 1
  • 当前页码
  • └ page_size
  • Number
  • 20
  • 每页大小
  • └ total_count
  • Number
  • 100
  • 总数量
  • └ cursor_mode
  • Boolean
  • false
  • 是否游标模式
  • └ cursor
  • String
  • 12345
  • 游标
  • ego_item_detail_d_t_o_list
  • EgoItemDetailDto []
  • 数据集合
  • skus
  • EgoSkuDto []
  • sku列表
  • └ ego_item_id
  • String
  • 800000000001
  • 企业购商品ID
  • └ ego_sku_id
  • Number
  • 5000000000001
  • skuId
  • └ title
  • String
  • 红色
  • sku标题
  • └ sku_status
  • String
  • ONLINE
  • sku状态,上架:ONLINE,下架:OFFLINE
  • └ fuzzy_quantity
  • String
  • IN_STOCK
  • 模糊化库存, 有货:IN_STOCK,库存紧张:LOW_STOCK,无货:OUT_OF_STOCK
  • └ platform_price
  • Number
  • 100
  • 专属价,单位分
  • └ market_price
  • Number
  • 200
  • 划线价,单位分
  • └ pic_url
  • String
  • https://gw.alicdn.com/bao/uploaded/i4/xxx/xxx.webp
  • sku图片
  • └ barcode
  • String
  • 6900000000001
  • 条形码
  • sku_specs
  • SkuSpecDto []
  • sku规格列表
  • └ property_id
  • Number
  • 10001
  • 规格属性Id
  • └ property_text
  • String
  • 颜色
  • 规格属性
  • └ value_id
  • Number
  • 10001
  • 规格值Id
  • └ value_text
  • String
  • 红色
  • 规格值
  • └ property_sort_order
  • Number
  • 1
  • 规格属性排序
  • └ value_sort_order
  • Number
  • 1
  • 规格值排序
  • category_chain
  • CategoryDto []
  • 类目链
  • └ category_id
  • Number
  • 10001
  • 类目ID
  • └ parent_id
  • Number
  • 0
  • 父类目ID
  • └ name
  • String
  • 手机
  • 类目名称
  • └ is_leaf
  • Boolean
  • false
  • 是否叶子类目
  • └ level
  • Number
  • 1
  • 类目层级
  • └ fuzzy_quantity
  • String
  • IN_STOCK
  • 模糊化库存,有货:IN_STOCK,库存紧张:LOW_STOCK,无货:OUT_OF_STOCK
  • └ fuzzy_sold_quantity
  • String
  • 100+
  • 模糊化销量
  • item_specs
  • ItemSpecDto []
  • 商品规格(销售属性)
  • └ property_id
  • Number
  • 10001
  • 规格属性Id
  • └ property_text
  • String
  • 颜色
  • 规格属性值
  • values
  • ItemSpecValueDto []
  • 规格值
  • └ value_id
  • Number
  • 10001
  • 规格值ID
  • └ value_text
  • String
  • 红色
  • 规格值
  • properties
  • ItemPropertyDto []
  • 商品属性列表
  • └ text
  • String
  • 颜色
  • 属性文本
  • └ values
  • String []
  • ["白色"]
  • 属性值列表
  • extend_properties
  • ItemExtendProperty []
  • 商品扩展属性
  • └ key
  • String
  • white_bg_image
  • 属性key,white_bg_image:白底图
  • └ value
  • String
  • https://gw.alicdn.com/bao/uploaded/i4/xxx/xxx.webp
  • 属性值
  • └ ego_item_id
  • Number
  • 800000000001
  • 企业购商品ID
  • └ title
  • String
  • 测试商品请不要拍
  • 商品标题
  • └ status
  • String
  • ONLINE
  • 商品状态,上架:ONLINE,下架:OFFLINE
  • └ pic_url
  • String
  • https://gw.alicdn.com/bao/uploaded/i4/xxx/xxx.webp
  • 商品主图
  • └ province
  • String
  • 浙江省
  • 商品所在省份
  • └ city
  • String
  • 杭州市
  • 商品所在城市
  • └ images
  • String []
  • ["https://gw.alicdn.com/bao/uploaded/i4/xxx/xxx.webp"]
  • 商品图片列表
  • └ category_leaf_id
  • String
  • 12345
  • 叶子类目ID
  • └ tax_code
  • String
  • 1111111111111111111
  • 税码
  • └ tax_rate
  • Number
  • 13
  • 税率,单位百分比
  • └ browser_desc_path
  • String
  • https://img.alicdn.com/imgextra/i3/xxx/xxx.jpg
  • PC图文详情
  • └ brand_name
  • String
  • Huawei/华为
  • 品牌名称
  • └ platform_price
  • Number
  • 100
  • 专属价,单位分
  • └ market_price
  • Number
  • 200
  • 划线价,单位分
  • └ ship_time
  • Number
  • 24
  • 发货时效,单位小时

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
PcItemQueryRequest req = new PcItemQueryRequest();
PcItemQueryRequest.EgoItemQueryParam obj1 = new PcItemQueryRequest.EgoItemQueryParam();
obj1.setProjectId("10000001");
obj1.setPageSize(20L);
obj1.setCurrentPage(1L);
obj1.setCursor("12345");
obj1.setCursorMode(false);
obj1.setWithTotal(true);
obj1.setServiceId(10000001L);
obj1.setServiceNick("测试服务商1");
req.setParam(obj1);
PcItemQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<pc_item_query_response>
    <page_result>
        <success>true</success>
        <error_code>200</error_code>
        <error_msg>参数错误</error_msg>
        <ego_item_detail_d_t_o_page_data>
            <current_page>1</current_page>
            <page_size>20</page_size>
            <total_count>100</total_count>
            <cursor_mode>false</cursor_mode>
            <cursor>12345</cursor>
            <ego_item_detail_d_t_o_list>
                <ego_item_detail_dto>
                    <skus>
                        <ego_sku_dto>
                            <ego_item_id>800000000001</ego_item_id>
                            <ego_sku_id>5000000000001</ego_sku_id>
                            <title>红色</title>
                            <sku_status>ONLINE</sku_status>
                            <fuzzy_quantity>IN_STOCK</fuzzy_quantity>
                            <platform_price>100</platform_price>
                            <market_price>200</market_price>
                            <pic_url>https://gw.alicdn.com/bao/uploaded/i4/xxx/xxx.webp</pic_url>
                            <barcode>6900000000001</barcode>
                            <sku_specs>
                                <sku_spec_dto>
                                    <property_id>10001</property_id>
                                    <property_text>颜色</property_text>
                                    <value_id>10001</value_id>
                                    <value_text>红色</value_text>
                                    <property_sort_order>1</property_sort_order>
                                    <value_sort_order>1</value_sort_order>
                                </sku_spec_dto>
                            </sku_specs>
                        </ego_sku_dto>
                    </skus>
                    <category_chain>
                        <category_dto>
                            <category_id>10001</category_id>
                            <parent_id>0</parent_id>
                            <name>手机</name>
                            <is_leaf>false</is_leaf>
                            <level>1</level>
                        </category_dto>
                    </category_chain>
                    <fuzzy_quantity>IN_STOCK</fuzzy_quantity>
                    <fuzzy_sold_quantity>100+</fuzzy_sold_quantity>
                    <item_specs>
                        <item_spec_dto>
                            <property_id>10001</property_id>
                            <property_text>颜色</property_text>
                            <values>
                                <item_spec_value_dto>
                                    <value_id>10001</value_id>
                                    <value_text>红色</value_text>
                                </item_spec_value_dto>
                            </values>
                        </item_spec_dto>
                    </item_specs>
                    <properties>
                        <item_property_dto>
                            <text>颜色</text>
                            <values>
                                <string>[&quot;白色&quot;]</string>
                            </values>
                        </item_property_dto>
                    </properties>
                    <extend_properties>
                        <item_extend_property>
                            <key>white_bg_image</key>
                            <value>https://gw.alicdn.com/bao/uploaded/i4/xxx/xxx.webp</value>
                        </item_extend_property>
                    </extend_properties>
                    <ego_item_id>800000000001</ego_item_id>
                    <title>测试商品请不要拍</title>
                    <status>ONLINE</status>
                    <pic_url>https://gw.alicdn.com/bao/uploaded/i4/xxx/xxx.webp</pic_url>
                    <province>浙江省</province>
                    <city>杭州市</city>
                    <images>
                        <string>[&quot;https://gw.alicdn.com/bao/uploaded/i4/xxx/xxx.webp&quot;]</string>
                    </images>
                    <category_leaf_id>12345</category_leaf_id>
                    <tax_code>1111111111111111111</tax_code>
                    <tax_rate>13</tax_rate>
                    <browser_desc_path>https://img.alicdn.com/imgextra/i3/xxx/xxx.jpg</browser_desc_path>
                    <brand_name>Huawei/华为</brand_name>
                    <platform_price>100</platform_price>
                    <market_price>200</market_price>
                    <ship_time>24</ship_time>
                </ego_item_detail_dto>
            </ego_item_detail_d_t_o_list>
        </ego_item_detail_d_t_o_page_data>
    </page_result>
</pc_item_query_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

返回
顶部