产品更新接口
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
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和更新时间 |
1 2 3 4 5 6 | 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()); |
1 2 3 | < tmall_product_schema_update_response > < update_product_result ><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></ update_product_result > </ tmall_product_schema_update_response > |
1 2 3 4 5 6 | < 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 | 条形码不存在或错误 | 条形码不存在或错误 |