文档中心 > API类目 > 淘宝商品API

tmall.product.schema.update (产品更新接口)

产品更新接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
product_id Number 必须 123455 产品编号
xml_data String 必须 <itemrule><field id="prop_14837340 " name="体积 (含包装)" type="input "></field></itemrule> 根据tmall.product.update.schema.get生成的产品更新规则入参数据

响应参数

名称 类型 示例值 描述
update_product_result String <itemrule> <field id="product_id" name="产品ID" type="input ">1221</field> <field id="modified_time" name="修改时间" type="input ">2014-01-01 00:00:00</field> <itemrule> 产品数据,格式和入参xml_data一致,仅包含产品ID和更新时间

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallProductSchemaUpdateRequest req = new TmallProductSchemaUpdateRequest();
req.setProductId(123455L);
req.setXmlData("<itemrule><field id=\"prop_14837340 \" name=\"体积 (含包装)\" type=\"input \"></field></itemrule>");
TmallProductSchemaUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<tmall_product_schema_update_response>
    <update_product_result>&lt;itemrule&gt; &lt;field id=&quot;product_id&quot; name=&quot;产品ID&quot; type=&quot;input &quot;&gt;1221&lt;/field&gt; &lt;field id=&quot;modified_time&quot; name=&quot;修改时间&quot; type=&quot;input &quot;&gt;2014-01-01 00:00:00&lt;/field&gt; &lt;itemrule&gt;</update_product_result>
</tmall_product_schema_update_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>

错误码解释

错误码 错误描述 解决方案
isv.invalid-parameter:prductId 产品不存在 无需更新,调整为发布
isv.invalid-parameter:cid 产品对应类目删除或者屏蔽 无需更新,更换产品
isv.parameter-parase-error:xml_data 入参数据无法被转换识别 按tmall.product.update.schema.get格式修改入参
isv.parameter-parase-error: 入参数据无法被转换识别 入参数据无法被转换识别
isv.invalid-parameter:barcode 条形码不存在或错误 条形码不存在或错误

API工具

如何获得此API

FAQ

返回
顶部