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

alibaba.item.edit.schema.get (商品编辑获取schema信息)

商品编辑时,获取商品规则信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
item_id Number 必须 610191026823 商品ID
biz_type String 可选 taobao/1.0.0/brandAsyncRenderEnable 业务扩展参数,需与平台约定好
fields String [] 可选 stuffStatus,title
  • 最大列表长度:999
  • 制定返回schema中field字段列表,可用于裁剪返回的schema信息。不填则为全部field

    响应参数

    名称 类型 示例值 描述
    result String <itemSchema> <field id="title" name="宝贝标题" type="input"> <rules> <rule name="tipRule" value="标题和描述关键词是否违规自检工具:&lt;a href='//ss.taobao.com/compliance#/main' target='_blank'&gt;商品合规工具&lt;/a&gt;"/> <rule name="requiredRule" value="true"/> <rule exProperty="include" name="maxLengthRule" unit="byte" value="60"/> <rule name="tipRule" value="最多允许输入30个汉字(60字符)"/> <rule name="valueTypeRule" value="text"/> </rules> </field> <field id="supplierInfo" name="供应商信息" type="input"> <rules> <rule name="requiredRule" value="true"/> <rule exProperty="include" name="maxLengthRule" unit="byte" value="40"/> <rule name="valueTypeRule" value="text"/> </rules> </field> <field id="outerId" name="商家编码" type="input"> <rules> <rule exProperty="include" name="maxLengthRule" unit="byte" value="64"/> <rule name="valueTypeRule" value="text"/> </rules> </field> </itemSchema> 商品已有规则信息,XML格式.

    请求示例

    • JAVA
    • .NET
    • PHP
    • CURL
    • Python
    • C/C++
    • NodeJS
    TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
    AlibabaItemEditSchemaGetRequest req = new AlibabaItemEditSchemaGetRequest();
    req.setItemId(610191026823L);
    req.setBizType("taobao/1.0.0/brandAsyncRenderEnable");
    req.setFields("stuffStatus,title");
    AlibabaItemEditSchemaGetResponse rsp = client.execute(req, sessionKey);
    System.out.println(rsp.getBody());

    响应示例

    • XML示例
    • JSON示例
    <alibaba_item_edit_schema_get_response>
        <result>&lt;itemSchema&gt; &lt;field id=&quot;title&quot; name=&quot;宝贝标题&quot; type=&quot;input&quot;&gt; &lt;rules&gt; &lt;rule name=&quot;tipRule&quot; value=&quot;标题和描述关键词是否违规自检工具:&amp;lt;a href=&apos;//ss.taobao.com/compliance#/main&apos; target=&apos;_blank&apos;&amp;gt;商品合规工具&amp;lt;/a&amp;gt;&quot;/&gt; &lt;rule name=&quot;requiredRule&quot; value=&quot;true&quot;/&gt; &lt;rule exProperty=&quot;include&quot; name=&quot;maxLengthRule&quot; unit=&quot;byte&quot; value=&quot;60&quot;/&gt; &lt;rule name=&quot;tipRule&quot; value=&quot;最多允许输入30个汉字(60字符)&quot;/&gt; &lt;rule name=&quot;valueTypeRule&quot; value=&quot;text&quot;/&gt; &lt;/rules&gt; &lt;/field&gt; &lt;field id=&quot;supplierInfo&quot; name=&quot;供应商信息&quot; type=&quot;input&quot;&gt; &lt;rules&gt; &lt;rule name=&quot;requiredRule&quot; value=&quot;true&quot;/&gt; &lt;rule exProperty=&quot;include&quot; name=&quot;maxLengthRule&quot; unit=&quot;byte&quot; value=&quot;40&quot;/&gt; &lt;rule name=&quot;valueTypeRule&quot; value=&quot;text&quot;/&gt; &lt;/rules&gt; &lt;/field&gt; &lt;field id=&quot;outerId&quot; name=&quot;商家编码&quot; type=&quot;input&quot;&gt; &lt;rules&gt; &lt;rule exProperty=&quot;include&quot; name=&quot;maxLengthRule&quot; unit=&quot;byte&quot; value=&quot;64&quot;/&gt; &lt;rule name=&quot;valueTypeRule&quot; value=&quot;text&quot;/&gt; &lt;/rules&gt; &lt;/field&gt; &lt;/itemSchema&gt;</result>
    </alibaba_item_edit_schema_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>

    错误码解释

    错误码 错误描述 解决方案
    isp.system-service-error:CHK_SHENBI_ITEM_NOT_ALLOW_TOP TOP端暂不支持编辑神笔详情的宝贝 TOP端暂不支持编辑神笔详情的宝贝
    isp.system-service-error:CHK_NOT_BUYNOW_ITEM_NOT_ALLOW_TOP TOP端暂时只支持一口价付款模式的宝贝 TOP端暂时只支持一口价付款模式的宝贝
    invalid-parameter:product_id
    isv.item.invalid-itemId
    isp.tmallitem-service-error:empty
    isv.invalid-parameter:cid
    invalid-parameter:biz-identity-forbidden
    isp.system-service-error:PUB_BIZCHECK_CAT_DATA_NOTEXIST
    isp.system-service-error:PUB_BIZCHECK_PRAMARY_ITEM_DELETE
    isp.item.edit-error
    isp.system-service-error:API_CONFIG_NOT_FOUND_ERROR
    API_SYSTEM_ERROR
    isv.item.invalid-item-user
    PUB_MARKET_NOT_SUPPORT
    isp.system-service-error:CHK_BIDDING_STATUS_LIMIT
    isv.invalid-parameter:cid;isp.tmallitem-service-error:empty
    isp.system-service-error:CHK_BIDDING_STATUS_LIMIT;isp.system-service-error:CHK_AUCTION_LIMIT_CATEGORY_ERROR
    isp.system-service-error:THD_IC_ERROR_MSG
    isp.system-service-error:CHK_AUCTION_LIMIT_CATEGORY_ERROR
    isv.invalid-parameter:category-frozen
    isp.call-limited
    PUB_BIZCHECK_USER_MARKET_NOT_SUPPORT
    isv.invalid-parameter:category-not-found
    isp.system-service-error:PUB_BIZCHECK_CAT_ID_NOTEXIST
    PUB_BIZCHECK_USER_DATA_NOTEXIST
    isp.tmallitem-service-error:empty;isp.tmallitem-service-error:empty
    isp.system-service-error:AUDITING_ITEM_NOT_ALLOWED_UPSHELF_AND_EDIT
    isp.system-service-error:API_SYSTEM_ERROR
    isp.system-service-error:THD_VIDEO_SERVICE_ERROR
    isp.system-service-error:SHOP_CHECKOUT_DENY_ON_SHELF
    isp.system-service-error:
    isp.remote-service-error:
    isp.system-service-error:sku
    isv.parameter-parse-error:CHK_CAT_FREEZE
    isp.system-service-error:empty
    isp.system-service-error:item_attach_images
    isp.system-service-error:warranty

    API工具

    如何获得此API

    FAQ

    返回
    顶部