文档中心 > API类目 > 产品中心API

taobao.spu.get (渠道产品ID查询)

根据id获取产品

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
id Number 可选 298 产品ID
cat_id Number 可选 12 类目ID
key_properties String 可选 品牌:大金/Daikin;型号:MC71NV2C-W 关键属性ID,政采云为关键属性名称
channel String 必须 zcy 渠道来源

响应参数

名称 类型 示例值 描述
result ResultSet result
  • └ result
  • String
  • { "id": 1222, "title": "欢迎使用JSON在线解析编辑器", "cat_id": true, "status": 123, "channel": "zcy", "key_property_text": "品牌:xx;型号:xx", "cat_name": "手机", "features": "环保", "memo": "特选商品", "affect_property_text": "增值服务内容:无;质保时间:12", "sale_property_text": "产品尺寸(长*宽*高)(mm):620*395*230;是否上门安装、调试:是", "sell_pt": "上门维护", "barcode": "http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX", "gmt_modified": "2017-05-02 21:16:13", "gmt_create": "2017-05-02 21:16:13", "main_image_url": "http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX", "extra_image_url": "http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX,http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX" },{ "id": 1222, "title": "欢迎使用JSON在线解析编辑器", "cat_id": true, "status": 123, "channel": "zcy", "key_property_text": "品牌:xx;型号:xx", "cat_name": "手机", "features": "环保", "memo": "特选商品", "affect_property_text": "增值服务内容:无;质保时间:12", "sale_property_text": "产品尺寸(长*宽*高)(mm):620*395*230;是否上门安装、调试:是", "sell_pt": "上门维护", "barcode": "http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX", "gmt_modified": "2017-05-02 21:16:13", "gmt_create": "2017-05-02 21:16:13", "main_image_url": "http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX", "extra_image_url": "http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX,http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX" }
  • result
  • └ exception
  • String
  • exception
  • exception
  • └ error_code
  • String
  • 0
  • errorCode
  • └ error_msg
  • String
  • 0
  • errorMsg
  • └ is_success
  • Boolean
  • true
  • isSuccess

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
SpuGetRequest req = new SpuGetRequest();
req.setId(298L);
req.setCatId(12L);
req.setKeyProperties("品牌:大金/Daikin;型号:MC71NV2C-W");
req.setChannel("zcy");
SpuGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<spu_get_response>
    <result>
        <result>{   &quot;id&quot;: 1222,   &quot;title&quot;: &quot;欢迎使用JSON在线解析编辑器&quot;,   &quot;cat_id&quot;: true,   &quot;status&quot;: 123,   &quot;channel&quot;: &quot;zcy&quot;,   &quot;key_property_text&quot;: &quot;品牌:xx;型号:xx&quot;,   &quot;cat_name&quot;: &quot;手机&quot;,   &quot;features&quot;: &quot;环保&quot;,   &quot;memo&quot;: &quot;特选商品&quot;,   &quot;affect_property_text&quot;: &quot;增值服务内容:无;质保时间:12&quot;,   &quot;sale_property_text&quot;: &quot;产品尺寸(长*宽*高)(mm):620*395*230;是否上门安装、调试:是&quot;,   &quot;sell_pt&quot;: &quot;上门维护&quot;,   &quot;barcode&quot;: &quot;http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX&quot;,   &quot;gmt_modified&quot;: &quot;2017-05-02 21:16:13&quot;,   &quot;gmt_create&quot;: &quot;2017-05-02 21:16:13&quot;,   &quot;main_image_url&quot;: &quot;http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX&quot;,   &quot;extra_image_url&quot;: &quot;http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX,http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX&quot; },{   &quot;id&quot;: 1222,   &quot;title&quot;: &quot;欢迎使用JSON在线解析编辑器&quot;,   &quot;cat_id&quot;: true,   &quot;status&quot;: 123,   &quot;channel&quot;: &quot;zcy&quot;,   &quot;key_property_text&quot;: &quot;品牌:xx;型号:xx&quot;,   &quot;cat_name&quot;: &quot;手机&quot;,   &quot;features&quot;: &quot;环保&quot;,   &quot;memo&quot;: &quot;特选商品&quot;,   &quot;affect_property_text&quot;: &quot;增值服务内容:无;质保时间:12&quot;,   &quot;sale_property_text&quot;: &quot;产品尺寸(长*宽*高)(mm):620*395*230;是否上门安装、调试:是&quot;,   &quot;sell_pt&quot;: &quot;上门维护&quot;,   &quot;barcode&quot;: &quot;http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX&quot;,   &quot;gmt_modified&quot;: &quot;2017-05-02 21:16:13&quot;,   &quot;gmt_create&quot;: &quot;2017-05-02 21:16:13&quot;,   &quot;main_image_url&quot;: &quot;http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX&quot;,   &quot;extra_image_url&quot;: &quot;http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX,http://gw.alicdn.com/tfscom/TB1QtrlQFXXXXcuXVXXXXXXXXXX&quot; }</result>
        <exception>exception</exception>
        <error_code>0</error_code>
        <error_msg>0</error_msg>
        <is_success>true</is_success>
    </result>
</spu_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

返回
顶部