tmall.item.store.schema.update (天猫门店商品编辑)

天猫门店商品编辑

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
main_item_id Number 必须 123456789 主商品ID
store_id Number 必须 324 门店ID
xml String 必须 <itemSchema> <field id="title" name="商品标题" type="input"> <value>测试商品请不要拍</value> </field> <field id="sku" name="商品销售规格" type="multiComplex"> <complex-values> <field id="skuPrice" name="价格(元)" type="input"> <value>0.01</value> </field> <field id="skuStock" name="数量" type="input"> <value>1</value> </field> <field id="skuId" name="skuId" type="input"> <value>4503562362199</value> </field> <field id="skuOuterId" name="商家编码" type="input"/> </complex-values> </field> </itemSchema> 商品的schema xml

响应参数

名称 类型 示例值 描述
api_result ApiResult
  • └ er_msg
  • String
  • 系统异常类目不存在或无效
  • 错误信息
  • └ er_code
  • String
  • isp.system-service-error:API_SYSTEM_ERROR
  • 错误码
  • └ result
  • Number
  • 主商品ID
  • 商品ID
  • └ error
  • Boolean
  • true
  • 成功
  • └ mapped_error_messages
  • String
  • 类目数据不存在
  • 错误信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallItemStoreSchemaUpdateRequest req = new TmallItemStoreSchemaUpdateRequest();
req.setMainItemId(123456789L);
req.setStoreId(324L);
req.setXml("<itemSchema> <field id=\"title\" name=\"商品标题\" type=\"input\"> <value>测试商品请不要拍</value> </field> <field id=\"sku\" name=\"商品销售规格\" type=\"multiComplex\"> <complex-values> <field id=\"skuPrice\" name=\"价格(元)\" type=\"input\"> <value>0.01</value> </field> <field id=\"skuStock\" name=\"数量\" type=\"input\"> <value>1</value> </field> <field id=\"skuId\" name=\"skuId\" type=\"input\"> <value>4503562362199</value> </field> <field id=\"skuOuterId\" name=\"商家编码\" type=\"input\"/> </complex-values> </field> </itemSchema>");
TmallItemStoreSchemaUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<tmall_item_store_schema_update_response>
    <api_result>
        <er_msg>系统异常类目不存在或无效</er_msg>
        <er_code>isp.system-service-error:API_SYSTEM_ERROR</er_code>
        <result>主商品ID</result>
        <error>true</error>
        <mapped_error_messages>类目数据不存在</mapped_error_messages>
    </api_result>
</tmall_item_store_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>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部