产品信息获取接口schema形式返回
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
product_id | Number | 必须 | 123 | 产品编号 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
get_product_result | String | <itemRule> <field id="can_publish_item" name="能否发布商品" type="input"> <rules> <rule name="tipRule" value="可以发布商品"/> </rules> <default-value>true</default-value> </field> </itemRule> | 产品信息数据。schema形式 |
1 2 3 4 5 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); TmallProductSchemaGetRequest req = new TmallProductSchemaGetRequest(); req.setProductId(123L); TmallProductSchemaGetResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody()); |
1 2 3 | < tmall_product_schema_get_response > < get_product_result ><itemRule> <field id="can_publish_item" name="能否发布商品" type="input"> <rules> <rule name="tipRule" value="可以发布商品"/> </rules> <default-value>true</default-value> </field> </itemRule></ get_product_result > </ tmall_product_schema_get_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 | 产品对应类目删除或者屏蔽 | 无需更新,更换产品 |