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

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

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

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

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param EgoItemQueryParam 可选 商品查询参数
  • └ title
  • String
  • 可选
  • xxxxx
  • 商品标题
  • └ brand_name
  • String
  • 可选
  • xxxxx
  • 商品品牌名称
  • └ leaf_category_name
  • String
  • 可选
  • xxxxx
  • 商品叶子类目名称
  • └ min_platform_price
  • Number
  • 可选
  • 3
  • 商品最小专属价,单位为分
  • └ max_platform_price
  • Number
  • 可选
  • 3
  • 商品最大专属价,单位为分
  • └ sort
  • String
  • 可选
  • price_asc
  • 商品排序,price_asc:商品最小专属价升序,price_desc:商品最小专属价降序,默认按照商品ID降序排列
  • query_options_param
  • QueryOptionsParam
  • 可选
  • 商品查询可选参数
  • └ include_offline_items
  • Boolean
  • 可选
  • true
  • 包含已下架商品
  • address
  • ItemAddressParam
  • 可选
  • 区域库存查询地址,省、市、区、街道必填,详细地址非必填
  • └ province_name
  • String
  • 可选
  • 浙江省
  • 省
  • └ city_name
  • String
  • 可选
  • 杭州市
  • 市
  • └ area_name
  • String
  • 可选
  • 余杭区
  • 区/县
  • └ street_name
  • String
  • 可选
  • 五常街道
  • 街道
  • └ detail_address
  • String
  • 可选
  • 文一西路969号
  • 详细地址
  • └ batch_id
  • String
  • 可选
  • xxxxx
  • 批次ID,同一次分页查询应使用相同的批次ID
  • └ cursor_mode
  • Boolean
  • 可选
  • false
  • 是否开启游标模式
  • └ page_size
  • Number
  • 必须
  • 20
  • 分页大小,区间[1,20]
  • └ current_page
  • Number
  • 可选
  • 1
  • 当前页,未开启游标模式需要传入,从1开始
  • └ cursor
  • String
  • 可选
  • 12345
  • 游标,开启了游标模式需要传入,第一次查询可以不传
  • └ with_total
  • Boolean
  • 可选
  • true
  • 是否需要返回总数
  • └ client_id
  • String
  • 必须
  • 10000001
  • 客户ID
  • └ service_id
  • Number
  • 可选
  • 20000001
  • 服务商ID
  • └ service_nick
  • String
  • 可选
  • 测试服务商1
  • 服务商名称
  • └ ego_item_id_list
  • Number []
  • 可选
  • [1111111,2222222]
  • 商品ID列表,支持按 ID 精确查询

响应参数

名称 类型 示例值 描述
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
  • Number
  • 800000000001
  • 企业购商品ID
  • └ ego_sku_id
  • Number
  • 5000000000001
  • skuId
  • └ ego_sku_p_k_id
  • Number
  • 789012
  • 企业购SKU内部主键ID(请勿直接使用,和技术确认之后再使用)
  • └ title
  • String
  • 红色
  • sku标题
  • └ status
  • String
  • ONLINE
  • sku状态,上架:ONLINE,下架:OFFLINE
  • └ deleted
  • Boolean
  • true
  • 是否删除,默认不使用,若需使用该字段请联系开发人员
  • └ fuzzy_quantity
  • String
  • IN_STOCK
  • 模糊化库存, 有货:IN_STOCK,库存紧张:LOW_STOCK,无货:OUT_OF_STOCK
  • └ quantity
  • Number
  • 200
  • 库存数量,实际库存数量小于等于某一个特定值时返回实际库存,否则返回特定值(并非实际库存)
  • └ 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
  • 条形码
  • └ out_material_code
  • String
  • MC001234
  • 物料编码
  • extra_materials
  • MaterialDto []
  • [{"key":"inspectionReportPdf","type":"file","value":"[{\"fileName\":\"得力签字笔-检测报告.pdf\",\"url\":\"https://oss.example.com/inspection-report.pdf\"}]"},{"key":"inspectionReportImages","type":"file","value":"[{\"fileName\":\"得力签字笔-检测报告截图.png\",\"url\":\"https://oss.example.com/report-1.png\"}]"},{"key":"trademarkCertImages","type":"file","value":"[{\"fileName\":\"得力签字笔-商标注册证.png\",\"url\":\"https://oss.example.com/trademark-1.png\"}]"},{"key":"productAuthCertImages","type":"file","value":"[{\"fileName\":\"得力签字笔-商品授权证书.png\",\"url\":\"https://oss.example.com/auth-1.png\"}]"},{"key":"belongXinchuangProduct","type":"text","value":"1"}]
  • 资质材料列表,客户请按 key/type 解析
  • └ key
  • String
  • inspectionReportImages
  • 材料标识
  • └ type
  • String
  • file
  • 材料类型:text 普通文本、url 单个链接、file 文件列表
  • └ value
  • String
  • [{"fileName":"得力签字笔-检测报告截图.png","url":"https://oss.example.com/report-1.png"}]
  • 材料内容。text:普通业务文本;url:单个链接,可跳转或打开;file:[{"fileName":"","url":""}] 形式的 JSON 数组字符串
  • third_party_platforms
  • ThirdPartyDto
  • {"platform":"JD","productUrl":"https://item.jd.com/123.html","priceCent":9900,"priceImages":[{"fileName":"得力签字笔-第三方报价截图.png","url":"https://oss.example.com/price-1.png"}]}
  • 第三方平台信息
  • └ platform
  • String
  • JD
  • 第三方平台名称
  • └ product_url
  • String
  • https://item.jd.com/123.html
  • 第三方平台商品链接
  • └ price_cent
  • Number
  • 9900
  • 第三方平台价格,单位分
  • price_images
  • FileDto []
  • [{"fileName":"得力签字笔-第三方报价截图.png","url":"https://oss.example.com/price-1.png"}]
  • 第三方报价截图
  • └ file_name
  • String
  • 得力签字笔-第三方报价截图.png
  • 文件名
  • └ url
  • String
  • https://oss.example.com/price-1.png
  • 文件 URL
  • inspection_report
  • InspectionReportDto
  • 历史兼容字段,不建议使用,请改用 extraMaterials
  • └ report_url
  • String
  • xxxxx
  • 检测报告 PDF URL
  • └ report_images
  • String []
  • Top,Pub
  • 检测报告截图 URL 列表
  • third_party_platform
  • ThirdPartyPlatformDto
  • 历史兼容字段,不建议使用,请改用 thirdPartyPlatforms
  • └ platform
  • String
  • xxxxx
  • 第三方平台
  • └ url
  • String
  • xxxxx
  • 商品链接
  • └ price_images
  • String []
  • Top,Pub
  • 报价截图 URL 列表
  • └ price
  • Number
  • 3
  • 价格,单位分
  • trademark_cert
  • TrademarkCertDto
  • 历史兼容字段,不建议使用,请改用 extraMaterials
  • └ cert_images
  • String []
  • Top,Pub
  • 商标注册证图片 URL 列表
  • └ ego_reference_price
  • Number
  • 150
  • 企业购参考价,单位分
  • 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
  • 类目层级
  • └ out_category_id
  • String
  • 23456
  • 外部类目ID
  • └ out_category_name
  • String
  • 手表
  • 外部类目名称
  • └ fuzzy_quantity
  • String
  • IN_STOCK
  • 模糊化库存,有货:IN_STOCK,库存紧张:LOW_STOCK,无货:OUT_OF_STOCK
  • └ quantity
  • Number
  • 200
  • 库存数量,实际库存数量小于等于某一个特定值时返回实际库存,否则返回特定值(并非实际库存)
  • └ 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
  • 红色
  • 规格值
  • └ image_url
  • String
  • https://img.alicdn.com/imgextra/i4/2209044323925/O1CN01fkZsUY1erhdtf15Kg_!!4611686018427387477-0-item_pic.jpg
  • 属性图片
  • 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
  • 属性值
  • └ platform_price
  • Number
  • 100
  • 专属价,单位分
  • └ market_price
  • Number
  • 200
  • 划线价,单位分
  • origin_place
  • OriginPlaceDto
  • 商品产地
  • └ province
  • String
  • 浙江省
  • 省
  • └ city
  • String
  • 杭州市
  • 市
  • └ town
  • String
  • 余杭区
  • 区
  • └ ego_reference_price
  • Number
  • 150
  • 企业购参考价,单位分
  • extra_materials
  • MaterialDto []
  • [{"key":"jiaoTouInquiryItem","type":"text","value":"1"}]
  • 商品维度材料,客户请按 key/type 解析
  • └ key
  • String
  • inspectionReportImages
  • 材料标识
  • └ type
  • String
  • file
  • 材料类型:text 普通文本、url 单个链接、file 文件列表
  • └ value
  • String
  • [{"fileName":"得力签字笔-检测报告截图.png","url":"https://oss.example.com/report-1.png"}]
  • 材料内容。text:普通业务文本;url:单个链接,可跳转或打开;file:[{"fileName":"","url":""}] 形式的 JSON 数组字符串
  • └ ego_item_id
  • Number
  • 800000000001
  • 企业购商品ID
  • └ ego_item_p_k_id
  • Number
  • 123456
  • 企业购商品内部主键ID
  • └ title
  • String
  • 测试商品请不要拍
  • 商品标题
  • └ short_title
  • String
  • 测试商品
  • 商品短标题,可为空
  • └ status
  • String
  • ONLINE
  • 商品状态,上架:ONLINE,下架:OFFLINE
  • └ deleted
  • Boolean
  • true
  • 是否删除,默认不使用,若需使用该字段请联系开发人员
  • └ 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"]
  • 商品图片列表
  • └ leaf_category_id
  • String
  • 12345
  • 淘宝后台叶子类目ID
  • └ leaf_category_name
  • String
  • 手表
  • 淘宝后台叶子类目名称
  • └ 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/华为
  • 品牌名称
  • └ brand_id
  • Number
  • 1234
  • 品牌ID
  • └ brand_pic_url
  • String
  • https://img.alicdn.com/imgextra/i3/xxx/xxx.jpg
  • 品牌图片
  • └ ship_time
  • Number
  • 24
  • 发货时效,单位小时
  • └ free_postage
  • Boolean
  • true
  • 是否包邮
  • └ out_leaf_category_id
  • String
  • 23456
  • 客户前台叶子类目ID
  • └ out_leaf_category_name
  • String
  • 手表
  • 客户前台叶子类目名称

请求示例

  • 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.setTitle("xxxxx");
obj1.setBrandName("xxxxx");
obj1.setLeafCategoryName("xxxxx");
obj1.setMinPlatformPrice(3L);
obj1.setMaxPlatformPrice(3L);
obj1.setSort("price_asc");
PcItemQueryRequest.QueryOptionsParam obj2 = new PcItemQueryRequest.QueryOptionsParam();
obj2.setIncludeOfflineItems(true);
PcItemQueryRequest.ItemAddressParam obj3 = new PcItemQueryRequest.ItemAddressParam();
obj3.setProvinceName("浙江省");
obj3.setCityName("杭州市");
obj3.setAreaName("余杭区");
obj3.setStreetName("五常街道");
obj3.setDetailAddress("文一西路969号");
obj2.setAddress(obj3);
obj1.setQueryOptionsParam(obj2);
obj1.setBatchId("xxxxx");
obj1.setCursorMode(false);
obj1.setPageSize(20L);
obj1.setCurrentPage(1L);
obj1.setCursor("12345");
obj1.setWithTotal(true);
obj1.setClientId("10000001");
obj1.setServiceId(20000001L);
obj1.setServiceNick("测试服务商1");
obj1.setEgoItemIdList(new Long[] { 1111111,2222222 };
);
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>
                            <ego_sku_p_k_id>789012</ego_sku_p_k_id>
                            <title>红色</title>
                            <status>ONLINE</status>
                            <deleted>true</deleted>
                            <fuzzy_quantity>IN_STOCK</fuzzy_quantity>
                            <quantity>200</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>
                            <out_material_code>MC001234</out_material_code>
                            <extra_materials>
                                <material_dto>
                                    <key>inspectionReportImages</key>
                                    <type>file</type>
                                    <value>[{&quot;fileName&quot;:&quot;得力签字笔-检测报告截图.png&quot;,&quot;url&quot;:&quot;https://oss.example.com/report-1.png&quot;}]</value>
                                </material_dto>
                            </extra_materials>
                            <third_party_platforms>
                                <platform>JD</platform>
                                <product_url>https://item.jd.com/123.html</product_url>
                                <price_cent>9900</price_cent>
                                <price_images>
                                    <file_dto>
                                        <file_name>得力签字笔-第三方报价截图.png</file_name>
                                        <url>https://oss.example.com/price-1.png</url>
                                    </file_dto>
                                </price_images>
                            </third_party_platforms>
                            <inspection_report>
                                <report_url>xxxxx</report_url>
                                <report_images>
                                    <string>Top</string>
                                    <string>Pub</string>
                                </report_images>
                            </inspection_report>
                            <third_party_platform>
                                <platform>xxxxx</platform>
                                <url>xxxxx</url>
                                <price_images>
                                    <string>Top</string>
                                    <string>Pub</string>
                                </price_images>
                                <price>3</price>
                            </third_party_platform>
                            <trademark_cert>
                                <cert_images>
                                    <string>Top</string>
                                    <string>Pub</string>
                                </cert_images>
                            </trademark_cert>
                            <ego_reference_price>150</ego_reference_price>
                            <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>
                            <out_category_id>23456</out_category_id>
                            <out_category_name>手表</out_category_name>
                        </category_dto>
                    </category_chain>
                    <fuzzy_quantity>IN_STOCK</fuzzy_quantity>
                    <quantity>200</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>
                                    <image_url>https://img.alicdn.com/imgextra/i4/2209044323925/O1CN01fkZsUY1erhdtf15Kg_!!4611686018427387477-0-item_pic.jpg</image_url>
                                </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>
                    <platform_price>100</platform_price>
                    <market_price>200</market_price>
                    <origin_place>
                        <province>浙江省</province>
                        <city>杭州市</city>
                        <town>余杭区</town>
                    </origin_place>
                    <ego_reference_price>150</ego_reference_price>
                    <extra_materials>
                        <material_dto>
                            <key>inspectionReportImages</key>
                            <type>file</type>
                            <value>[{&quot;fileName&quot;:&quot;得力签字笔-检测报告截图.png&quot;,&quot;url&quot;:&quot;https://oss.example.com/report-1.png&quot;}]</value>
                        </material_dto>
                    </extra_materials>
                    <ego_item_id>800000000001</ego_item_id>
                    <ego_item_p_k_id>123456</ego_item_p_k_id>
                    <title>测试商品请不要拍</title>
                    <short_title>测试商品</short_title>
                    <status>ONLINE</status>
                    <deleted>true</deleted>
                    <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>
                    <leaf_category_id>12345</leaf_category_id>
                    <leaf_category_name>手表</leaf_category_name>
                    <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>
                    <brand_id>1234</brand_id>
                    <brand_pic_url>https://img.alicdn.com/imgextra/i3/xxx/xxx.jpg</brand_pic_url>
                    <ship_time>24</ship_time>
                    <free_postage>true</free_postage>
                    <out_leaf_category_id>23456</out_leaf_category_id>
                    <out_leaf_category_name>手表</out_leaf_category_name>
                </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

返回
顶部