注意:以下文档只适用于TOP接口,请谨慎使用!

文档中心 > 基础技术

淘宝巴拿马schema商品发布介绍

更新时间:2020/05/08 访问次数:2042

一、文档说明

本文档面向对象为淘宝巴拿马商品管理的第三方开发者或者自研发商家;
说明:

  1. 测试账号目前提供沙箱环境进行测试,所有开发者可以使用沙箱测试账号进行测试,

沙箱测试账号:外部接入测试账号01

  1. 接入Schema接口初期,有任何疑问或者bug反馈请到钉钉群(群号:21722793)

    二、Schema体系说明规则(Rule)

    参考天猫schema:https://open.taobao.com/doc.htm?docId=108953&docType=1



    三、巴拿马Schema体系使用说明

    商品新发步骤

    步骤一: 获取类目支持发布的属性

    涉及接口:
    taobao.banamadpc.item.render,入参:cat_id
    以类目50021288为例,获取结果里展示的属性值,为目前可支持的属性值,未展示的为不支持的属性值,以下为通过taobao.banamadpc.item.render接口获取的部分属性截图:
    (注:获取的rule中,target="attribute:inputValue", 表示此属性以target中属性为准;子属性不在此接口展示,可通过taobao.banamadpc.item.select.prop接口获取。)

    <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 name="maxLengthRule" value="60" exProperty="include" unit="byte"/>
            <rule name="tipRule" value="最多允许输入30个汉字(60字符)"/>
            <rule name="valueTypeRule" value="text"/>
        </rules>
    </field>
    <field id="catProp" name="类目属性" type="complex">
        <rules>
            <rule name="tipRule" value="错误填写宝贝属性,可能会引起宝贝下架或搜索流量减少,影响您的正常销售,请认真准确填写!"/>
        </rules>
        <complex-value>
            <field id="p-20000" name="品牌" type="singleCheck"/>
        </complex-value>
        <fields>
            <field id="p-20000" name="品牌" type="singleCheck">
                <rules>
                    <rule name="valueAttributeRule" value="inputValue" desc="输入属性值"/>
                    <rule name="valueTypeRule" value="text" target="attribute:inputValue"/>
                    <rule name="maxLengthRule" value="32" target="attribute:inputValue" exProperty="include" unit="character"/>
                    <rule name="tipRule" value="该属性支持自定义输入,输入值请填写value中inputValue属性,值为任意负数"/>
                    <rule name="tipRule" value="请使用SelectProp接口查询并填充完整子属性后提交"/>
                </rules>
                <options>
                    <option displayName="FEIGUI PACK/飞贵包装" value="1164194232"/>
                    <option displayName="IWEI/威" value="1128204128"/>
                    <option displayName="中敏" value="39649288"/>
                </options>
            </field>
        </fields>
    </field>
    <field id="saleProp" name="" type="complex">
        <complex-value>
            <field id="p-1627207" name="颜色分类" type="multiCheck"/>
        </complex-value>
        <fields>
            <field id="p-1627207" name="颜色分类" type="multiCheck">
                <rules>
                    <rule name="tipRule" value="&lt;b style='color:#ff6600'&gt;选择标准颜色可增加搜索/导购机会&lt;/b&gt;,标准颜色还可填写颜色备注信息(偏深、偏亮等)!&lt;a href='//taobaosell.bbs.taobao.com/detail.html?spm=a210m.7877990.0.0.kxlaIT&amp;appId=23012&amp;postId=2563532' target='_blank'&gt;查看详情&lt;/a&gt;"/>
                    <rule name="valueAttributeRule" value="inputValue" desc="输入属性值"/>
                    <rule name="valueTypeRule" value="text" target="attribute:inputValue"/>
                    <rule name="tipRule" value="该属性支持自定义输入,输入值请填写value中inputValue属性,值为任意负数;多个输入值请保证value负数值不重复"/>
                    <rule name="maxValueRule" value="最大用户输入值个数[24]" exProperty="include"/>
                    <rule name="valueAttributeRule" value="remark" desc="属性备注"/>
                    <rule name="valueTypeRule" value="text" target="attribute:remark"/>
                    <rule name="maxLengthRule" value="16" target="attribute:remark" exProperty="include" unit="character"/>
                    <rule name="valueAttributeRule" value="img" desc="属性图"/>
                    <rule name="valueTypeRule" value="text" target="attribute:img"/>
                </rules>
                <options>
                    <option displayName="乳白色" value="28321"/>
                    <option displayName="白色" value="28320"/>
                    <option displayName="米白色" value="4266701"/>
                </options>
            </field>
        </fields>
    </field>
    <field id="sku" name="宝贝销售规格" type="multiComplex">
        <fields>
            <field id="props" name="属性对" type="complex">
                <fields>
                    <field id="p-1627207" name="颜色分类" type="singleCheck">
                        <rules>
                            <rule name="tipRule" value="&lt;b style='color:#ff6600'&gt;选择标准颜色可增加搜索/导购机会&lt;/b&gt;,标准颜色还可填写颜色备注信息(偏深、偏亮等)!&lt;a href='//taobaosell.bbs.taobao.com/detail.html?spm=a210m.7877990.0.0.kxlaIT&amp;appId=23012&amp;postId=2563532' target='_blank'&gt;查看详情&lt;/a&gt;"/>
                            <rule name="valueAttributeRule" value="inputValue" desc="输入属性值"/>
                            <rule name="valueTypeRule" value="text" target="attribute:inputValue"/>
                            <rule name="tipRule" value="该属性支持自定义输入,输入值请填写value中inputValue属性,值为任意负数;多个输入值请保证value负数值不重复"/>
                            <rule name="maxValueRule" value="最大用户输入值个数[24]" exProperty="include"/>
                        </rules>
                        <options>
                            <option displayName="乳白色" value="28321"/>
                            <option displayName="军绿色" value="3232483"/>
                            <option displayName="卡其色" value="28331"/>
                        </options>
                    </field>
                </fields>
            </field>
            <field id="skuPrice" name="价格(元)" type="input">
                <rules>
                    <rule name="requiredRule" value="true"/>
                    <rule name="maxValueRule" value="10000000" exProperty="not include"/>
                    <rule name="minValueRule" value="0" exProperty="not include"/>
                </rules>
            </field>
            <field id="skuStock" name="数量(件)" type="input">
                <rules>
                    <rule name="requiredRule" value="true"/>
                    <rule name="maxValueRule" value="100000000" exProperty="not include"/>
                    <rule name="valueTypeRule" value="long"/>
                </rules>
            </field>
            <field id="skuOuterId" name="商家编码" type="input">
                <rules>
                    <rule name="maxLengthRule" value="64" exProperty="include" unit="byte"/>
                    <rule name="valueTypeRule" value="text"/>
                </rules>
            </field>
            <field id="skuBarcode" name="商品条形码" type="input">
                <rules>
                    <rule name="maxLengthRule" value="32" exProperty="include" unit="byte"/>
                    <rule name="valueTypeRule" value="text"/>
                </rules>
            </field>
        </fields>
    </field>
    <field id="price" name="一口价" type="input">
        <rules>
            <rule name="requiredRule" value="true"/>
            <rule name="maxValueRule" value="10000000" exProperty="not include"/>
            <rule name="minValueRule" value="0" exProperty="include"/>
        </rules>
    </field>
    <field id="quantity" name="总数量" type="input">
        <rules>
            <rule name="requiredRule" value="true"/>
            <rule name="maxValueRule" value="100000000" exProperty="not include"/>
            <rule name="minValueRule" value="1" exProperty="include"/>
            <rule name="regexRule" value="([1-9][0-9]+|[0-9])"/>
            <rule name="valueTypeRule" value="integer"/>
        </rules>
    </field>
    <field id="handlingFee" name="手续费" type="input">
        <rules>
            <rule name="maxValueRule" value="10000000" exProperty="not include"/>
            <rule name="minValueRule" value="0" exProperty="include"/>
        </rules>
    </field>
    <field id="qualityTestingFee" name="质检费" type="input">
        <rules>
            <rule name="maxValueRule" value="10000000" exProperty="not include"/>
            <rule name="minValueRule" value="0" exProperty="include"/>
        </rules>
    </field>
    <field id="postageFee" name="采购段运费" type="input">
        <rules>
            <rule name="maxValueRule" value="10000000" exProperty="not include"/>
            <rule name="minValueRule" value="0" exProperty="include"/>
        </rules>
    </field>
    <field id="purchasingFee" name="采购成本" type="input">
        <rules>
            <rule name="maxValueRule" value="10000000" exProperty="not include"/>
            <rule name="minValueRule" value="0" exProperty="include"/>
        </rules>
    </field>
    <field id="supplierName" name="供应商名称" type="input">
        <rules>
            <rule name="requiredRule" value="true"/>
            <rule name="maxLengthRule" value="40" exProperty="include" unit="byte"/>
            <rule name="valueTypeRule" value="text"/>
        </rules>
    </field>
    <field id="supplierInfo" name="供应商信息" type="input">
        <rules>
            <rule name="requiredRule" value="true"/>
            <rule name="maxLengthRule" value="40" exProperty="include" unit="byte"/>
            <rule name="valueTypeRule" value="text"/>
        </rules>
    </field>
    <field id="outerId" name="商家编码" type="input">
        <rules>
            <rule name="maxLengthRule" value="64" exProperty="include" unit="byte"/>
            <rule name="valueTypeRule" value="text"/>
        </rules>
    </field>
    <field id="barcode" name="商品条形码" type="input">
        <rules>
            <rule name="maxLengthRule" value="32" exProperty="include" unit="byte"/>
            <rule name="valueTypeRule" value="text"/>
        </rules>
    </field>
    <field id="images" name="电脑端宝贝图片" type="complex">
        <rules>
            <rule name="tipRule" value="宝贝主图大小不能超过3MB;700*700 以上图片上传后宝贝详情页自动提供放大镜功能。第五张图片发商品白底图可增加手淘首页曝光机会 &lt;a href='//diy.bbs.taobao.com/detail.html?postId=7736924' target='_blank'&gt;查看规范&lt;/a&gt; "/>
            <rule name="requiredRule" value="true"/>
            <rule name="maxTargetSizeRule" value="3145728" exProperty="include" unit="byte"/>
        </rules>
        <fields>
            <field id="images_0" name="电脑端宝贝图片" type="input">
                <rules>
                    <rule name="valueTypeRule" value="url"/>
                </rules>
            </field>
            <field id="images_1" name="电脑端宝贝图片" type="input">
                <rules>
                    <rule name="valueTypeRule" value="url"/>
                </rules>
            </field>
            <field id="images_2" name="电脑端宝贝图片" type="input">
                <rules>
                    <rule name="valueTypeRule" value="url"/>
                </rules>
            </field>
            <field id="images_3" name="电脑端宝贝图片" type="input">
                <rules>
                    <rule name="valueTypeRule" value="url"/>
                </rules>
            </field>
            <field id="images_4" name="电脑端宝贝图片" type="input">
                <rules>
                    <rule name="valueTypeRule" value="url"/>
                </rules>
            </field>
        </fields>
    </field>
    <field id="desc" name="电脑端描述" type="input">
        <rules>
            <rule name="requiredRule" value="true"/>
            <rule name="maxLengthRule" value="200000" exProperty="include" unit="byte"/>
            <rule name="valueTypeRule" value="text"/>
        </rules>
    </field>
    <field id="deliverVolumn" name="物流体积" type="input">
        <rules>
            <rule name="valueTypeRule" value="text"/>
        </rules>
    </field>
    <field id="deliverWeight" name="物流重量" type="input">
        <rules>
            <rule name="valueTypeRule" value="text"/>
        </rules>
    </field>
    <field id="deliveryLength" name="物流长度" type="input">
        <rules>
            <rule name="requiredRule" value="true"/>
            <rule name="valueTypeRule" value="text"/>
        </rules>
    </field>
    <field id="deliveryWidth" name="物流宽度" type="input">
        <rules>
            <rule name="requiredRule" value="true"/>
            <rule name="valueTypeRule" value="text"/>
        </rules>
    </field>
    <field id="deliveryHeight" name="物流高度" type="input">
        <rules>
            <rule name="requiredRule" value="true"/>
            <rule name="valueTypeRule" value="text"/>
        </rules>
    </field>
    </itemSchema>"
    获取子属性接口示例,以类目50021288,品牌20000为例,涉及接口:taobao.banamadpc.item.select.prop
    **第一步:**
    **入参:**
    xml: 默认值(目前是:
    prop_id :20000
    cat_id :50021288
    **获取结果:**xml为默认值,先获取品牌的属性规则
    ```xml





    xml 默认值(目前是
    prop_id 20000
    cat_id 50021288


    1128204128


    测试













**第二步:**
**入参:**
xml**:**把第一步获取到的品牌规则精简到如下代码所示,且必须传入有子属性的任一个品牌属性Value,比如下面例子中的:? 1128204128

<itemSchema>
    <field id="catProp" name="类目属性" type="complex">
        <complex-value>
            <field id="p-20000" name="品牌" type="singleCheck">
                <value>1128204128</value>
            </field>
        </complex-value>
        <fields>
            <field id="p-20000" name="品牌" type="singleCheck">
            </field>
        </fields>
    </field>
</itemSchema>


prop_id :20000
cat_id :50021288
**获取结果:**获取到子属性:型号的属性规则, 如下所示:
(注:若型号下面还有子属性,可继续用接口:taobao.banamadpc.item.select.prop 获取)

<itemSchema>
    <field id=\"catProp\" name=\"类目属性\" type=\"complex\">
        <rules>
            <rule name=\"tipRule\" value=\"错误填写宝贝属性,可能会引起宝贝下架或搜索流量减少,影响您的正常销售,请认真准确填写!\"/>
        </rules>
        <complex-value>
            <field id=\"p-20000\" name=\"品牌\" type=\"singleCheck\">
                <value inputValue=\"IWEI/威\">1128204128</value>
            </field>
        </complex-value>
        <fields>
            <field id=\"p-20000\" name=\"品牌\" type=\"singleCheck\">
                <rules>
                    <rule name=\"valueAttributeRule\" value=\"inputValue\" desc=\"输入属性值\"/>
                    <rule name=\"valueTypeRule\" value=\"text\" target=\"attribute:inputValue\"/>
                    <rule name=\"maxLengthRule\" value=\"32\" target=\"attribute:inputValue\" exProperty=\"include\" unit=\"character\"/>
                    <rule name=\"tipRule\" value=\"该属性支持自定义输入,输入值请填写value中inputValue属性,值为任意负数\"/>
                    <rule name=\"tipRule\" value=\"请使用SelectProp接口查询并填充完整子属性后提交\"/>
                </rules>
                <options>
                    <option displayName=\"FEIGUI PACK/飞贵包装\" value=\"1164194232\"/>
                    <option displayName=\"IWEI/威\" value=\"1128204128\"/>
                    <option displayName=\"中敏\" value=\"39649288\"/>
                </options>
            </field>
            <field id=\"p-20000~1\" name=\"型号\" type=\"input\">
                <rules>
                    <rule name=\"requiredRule\" value=\"true\"/>
                    <rule name=\"maxLengthRule\" value=\"32\" exProperty=\"include\" unit=\"byte\"/>
                </rules>
            </field>
        </fields>
    </field>
</itemSchema>"
    },

步骤二: 发布商品

涉及接口:
taobao.banamadpc.item.add,入参:cat_id,xml
以类目50021288为例,示例xml入参:


<itemSchema> <field id="title" name="宝贝标题" type="input"> <value>测试请不要拍chunmu0423</value> </field> <field id="catProp" name="类目属性" type="complex"> <complex-value> <field id="p-20000" name="品牌" type="singleCheck"> <value inputValue="Deli/得力">10446017</value> </field> <field id="p-20021" name="材质" type="singleCheck"> <value inputValue="海绵">105010</value> </field> </complex-value> </field> <field id="saleProp" name="" type="complex"> <complex-value> <field id="p-1627207" name="颜色分类" type="multiCheck"> <values> <value img="" inputValue="浅灰色">28332</value> <value img="" inputValue="黑色">28341</value> </values> </field> </complex-value> </field> <field id="sku" name="宝贝销售规格" type="multiComplex"> <complex-values> <field id="skuPrice" name="价格(元)" type="input"> <value>100.00</value> </field> <field id="skuStock" name="数量(件)" type="input"> <value>2</value> </field> <field id="skuBarcode" name="商品条形码" type="input"> <value>6939199402620</value> </field> <field id="skuOuterId" name="商家编码" type="input"> <value>1234567</value> </field> <field id="props" name="属性对" type="complex"> <complex-value> <field id="p-1627207" name="颜色分类" type="singleCheck"> <value inputValue="浅灰色">28332</value> </field> </complex-value> </field> </complex-values> <complex-values> <field id="skuPrice" name="价格(元)" type="input"> <value>100.00</value> </field> <field id="skuStock" name="数量(件)" type="input"> <value>2</value> </field> <field id="skuBarcode" name="商品条形码" type="input"> <value>6939199402620</value> </field> <field id="skuOuterId" name="商家编码" type="input"> <value>1234567</value> </field> <field id="props" name="属性对" type="complex"> <complex-value> <field id="p-1627207" name="颜色分类" type="singleCheck"> <value inputValue="黑色">28341</value> </field> </complex-value> </field> </complex-values> </field> <field id="price" name="一口价" type="input"> <value>100.00</value> </field> <field id="quantity" name="总数量" type="input"> <value>4</value> </field> <field id="supplierName" name="供应商名称" type="input"> <value>测试1</value> </field> <field id="supplierInfo" name="供应商信息" type="input"> <value>测试2</value> </field> <field id="images" name="电脑端宝贝图片" type="complex"> <complex-value> <field id="images_1" type="input"> <value>https://img.alicdn.com/bao/uploaded/i1/TB1DkHjPFXXXXbMXFXXXXXXXXXX_!!0-item_pic.jpg</value> </field> </complex-value> </field> <field id="desc" name="电脑端描述" type="input"> <value>&lt;p&gt;TOP巴拿马测试&lt;/p&gt;</value> </field> <field id="deliverVolumn" name="物流体积" type="input"> <value>12</value> </field> <field id="deliverWeight" name="物流重量" type="input"> <value>13</value> </field> <field id="deliveryLength" name="物流长度" type="input"> <value>14</value> </field> <field id="deliveryWidth" name="物流宽度" type="input"> <value>15</value> </field> <field id="deliveryHeight" name="物流高度" type="input"> <value>16</value> </field> </itemSchema>

步骤三: 获取编辑商品支持的属性

涉及接口:
taobao.banamadpc.item.edit.render,入参:item_id
以商品617146783975为例,获取结果:


<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 name=\"maxLengthRule\" value=\"60\" exProperty=\"include\" unit=\"byte\"/> <rule name=\"tipRule\" value=\"最多允许输入30个汉字(60字符)\"/> <rule name=\"valueTypeRule\" value=\"text\"/> </rules> <value>测试请不要拍chunmu0423</value> </field> <field id=\"catProp\" name=\"类目属性\" type=\"complex\"> <rules> <rule name=\"tipRule\" value=\"错误填写宝贝属性,可能会引起宝贝下架或搜索流量减少,影响您的正常销售,请认真准确填写!\"/> </rules> <complex-value> <field id=\"p-20000\" name=\"品牌\" type=\"singleCheck\"> <value inputValue=\"Deli/得力\">-10446017</value> </field> </complex-value> <fields> <field id=\"p-20000\" name=\"品牌\" type=\"singleCheck\"> <rules> <rule name=\"valueAttributeRule\" value=\"inputValue\" desc=\"输入属性值\"/> <rule name=\"valueTypeRule\" value=\"text\" target=\"attribute:inputValue\"/> <rule name=\"maxLengthRule\" value=\"32\" target=\"attribute:inputValue\" exProperty=\"include\" unit=\"character\"/> <rule name=\"tipRule\" value=\"该属性支持自定义输入,输入值请填写value中inputValue属性,值为任意负数\"/> <rule name=\"tipRule\" value=\"请使用SelectProp接口查询并填充完整子属性后提交\"/> </rules> <options> <option displayName=\"FEIGUI PACK/飞贵包装\" value=\"1164194232\"/> <option displayName=\"IWEI/威\" value=\"1128204128\"/> <option displayName=\"中敏\" value=\"39649288\"/> </options> </field> <field id=\"p-20000~1\" name=\"型号\" type=\"input\"> <rules> <rule name=\"requiredRule\" value=\"true\"/> <rule name=\"maxLengthRule\" value=\"32\" exProperty=\"include\" unit=\"byte\"/> </rules> </field> </fields> </field> <field id=\"saleProp\" name=\"\" type=\"complex\"> <complex-value> <field id=\"p-1627207\" name=\"颜色分类\" type=\"multiCheck\"> <values> <value img=\"\" inputValue=\"浅灰色\">28332</value> <value img=\"\" inputValue=\"黑色\">28341</value> </values> </field> </complex-value> <fields> <field id=\"p-1627207\" name=\"颜色分类\" type=\"multiCheck\"> <rules> <rule name=\"tipRule\" value=\"&lt;b style='color:#ff6600'&gt;选择标准颜色可增加搜索/导购机会&lt;/b&gt;,标准颜色还可填写颜色备注信息(偏深、偏亮等)!&lt;a href='//taobaosell.bbs.taobao.com/detail.html?spm=a210m.7877990.0.0.kxlaIT&amp;appId=23012&amp;postId=2563532' target='_blank'&gt;查看详情&lt;/a&gt;\"/> <rule name=\"valueAttributeRule\" value=\"inputValue\" desc=\"输入属性值\"/> <rule name=\"valueTypeRule\" value=\"text\" target=\"attribute:inputValue\"/> <rule name=\"tipRule\" value=\"该属性支持自定义输入,输入值请填写value中inputValue属性,值为任意负数;多个输入值请保证value负数值不重复\"/> <rule name=\"maxValueRule\" value=\"最大用户输入值个数[24]\" exProperty=\"include\"/> <rule name=\"valueAttributeRule\" value=\"remark\" desc=\"属性备注\"/> <rule name=\"valueTypeRule\" value=\"text\" target=\"attribute:remark\"/> <rule name=\"maxLengthRule\" value=\"16\" target=\"attribute:remark\" exProperty=\"include\" unit=\"character\"/> <rule name=\"valueAttributeRule\" value=\"img\" desc=\"属性图\"/> <rule name=\"valueTypeRule\" value=\"text\" target=\"attribute:img\"/> </rules> <options> <option displayName=\"乳白色\" value=\"28321\"/> <option displayName=\"白色\" value=\"28320\"/> </options> </field> </fields> </field> <field id=\"sku\" name=\"宝贝销售规格\" type=\"multiComplex\"> <complex-values> <field id=\"skuPrice\" name=\"价格(元)\" type=\"input\"> <value>100.00</value> </field> <field id=\"skuStock\" name=\"数量(件)\" type=\"input\"> <value>2</value> </field> <field id=\"skuBarcode\" name=\"商品条形码\" type=\"input\"> <value>6939199402620</value> </field> <field id=\"skuOuterId\" name=\"商家编码\" type=\"input\"> <value>1234567</value> </field> <field id=\"props\" name=\"属性对\" type=\"complex\"> <complex-value> <field id=\"p-1627207\" name=\"颜色分类\" type=\"singleCheck\"> <value inputValue=\"浅灰色\">28332</value> </field> </complex-value> </field> </complex-values> <complex-values> <field id=\"skuPrice\" name=\"价格(元)\" type=\"input\"> <value>100.00</value> </field> <field id=\"skuStock\" name=\"数量(件)\" type=\"input\"> <value>2</value> </field> <field id=\"skuBarcode\" name=\"商品条形码\" type=\"input\"> <value>6939199402620</value> </field> <field id=\"skuOuterId\" name=\"商家编码\" type=\"input\"> <value>1234567</value> </field> <field id=\"props\" name=\"属性对\" type=\"complex\"> <complex-value> <field id=\"p-1627207\" name=\"颜色分类\" type=\"singleCheck\"> <value inputValue=\"黑色\">28341</value> </field> </complex-value> </field> </complex-values> <fields> <field id=\"props\" name=\"属性对\" type=\"complex\"> <fields> <field id=\"p-1627207\" name=\"颜色分类\" type=\"singleCheck\"> <rules> <rule name=\"tipRule\" value=\"&lt;b style='color:#ff6600'&gt;选择标准颜色可增加搜索/导购机会&lt;/b&gt;,标准颜色还可填写颜色备注信息(偏深、偏亮等)!&lt;a href='//taobaosell.bbs.taobao.com/detail.html?spm=a210m.7877990.0.0.kxlaIT&amp;appId=23012&amp;postId=2563532' target='_blank'&gt;查看详情&lt;/a&gt;\"/> <rule name=\"valueAttributeRule\" value=\"inputValue\" desc=\"输入属性值\"/> <rule name=\"valueTypeRule\" value=\"text\" target=\"attribute:inputValue\"/> <rule name=\"tipRule\" value=\"该属性支持自定义输入,输入值请填写value中inputValue属性,值为任意负数;多个输入值请保证value负数值不重复\"/> <rule name=\"maxValueRule\" value=\"最大用户输入值个数[24]\" exProperty=\"include\"/> </rules> <options> <option displayName=\"乳白色\" value=\"28321\"/> <option displayName=\"军绿色\" value=\"3232483\"/> <option displayName=\"黄色\" value=\"28324\"/> <option displayName=\"黑色\" value=\"28341\"/> <option displayName=\"other\" value=\"-1\"/> </options> </field> </fields> </field> <field id=\"skuPrice\" name=\"价格(元)\" type=\"input\"> <rules> <rule name=\"requiredRule\" value=\"true\"/> <rule name=\"maxValueRule\" value=\"10000000\" exProperty=\"not include\"/> <rule name=\"minValueRule\" value=\"0\" exProperty=\"not include\"/> </rules> </field> <field id=\"skuStock\" name=\"数量(件)\" type=\"input\"> <rules> <rule name=\"requiredRule\" value=\"true\"/> <rule name=\"maxValueRule\" value=\"100000000\" exProperty=\"not include\"/> <rule name=\"valueTypeRule\" value=\"long\"/> </rules> </field> <field id=\"skuOuterId\" name=\"商家编码\" type=\"input\"> <rules> <rule name=\"maxLengthRule\" value=\"64\" exProperty=\"include\" unit=\"byte\"/> <rule name=\"valueTypeRule\" value=\"text\"/> </rules> </field> <field id=\"skuBarcode\" name=\"商品条形码\" type=\"input\"> <rules> <rule name=\"maxLengthRule\" value=\"32\" exProperty=\"include\" unit=\"byte\"/> <rule name=\"valueTypeRule\" value=\"text\"/> </rules> </field> </fields> </field> <field id=\"price\" name=\"一口价\" type=\"input\"> <rules> <rule name=\"requiredRule\" value=\"true\"/> <rule name=\"maxValueRule\" value=\"10000000\" exProperty=\"not include\"/> <rule name=\"minValueRule\" value=\"0\" exProperty=\"include\"/> </rules> <value>100.00</value> </field> <field id=\"quantity\" name=\"总数量\" type=\"input\"> <rules> <rule name=\"requiredRule\" value=\"true\"/> <rule name=\"readOnlyRule\" value=\"true\"/> <rule name=\"maxValueRule\" value=\"100000000\" exProperty=\"not include\"/> <rule name=\"minValueRule\" value=\"1\" exProperty=\"include\"/> <rule name=\"regexRule\" value=\"([1-9][0-9]+|[0-9])\"/> <rule name=\"valueTypeRule\" value=\"integer\"/> </rules> <value>4</value> </field> <field id=\"handlingFee\" name=\"手续费\" type=\"input\"> <rules> <rule name=\"maxValueRule\" value=\"10000000\" exProperty=\"not include\"/> <rule name=\"minValueRule\" value=\"0\" exProperty=\"include\"/> </rules> </field> <field id=\"qualityTestingFee\" name=\"质检费\" type=\"input\"> <rules> <rule name=\"maxValueRule\" value=\"10000000\" exProperty=\"not include\"/> <rule name=\"minValueRule\" value=\"0\" exProperty=\"include\"/> </rules> </field> <field id=\"postageFee\" name=\"采购段运费\" type=\"input\"> <rules> <rule name=\"maxValueRule\" value=\"10000000\" exProperty=\"not include\"/> <rule name=\"minValueRule\" value=\"0\" exProperty=\"include\"/> </rules> </field> <field id=\"purchasingFee\" name=\"采购成本\" type=\"input\"> <rules> <rule name=\"maxValueRule\" value=\"10000000\" exProperty=\"not include\"/> <rule name=\"minValueRule\" value=\"0\" exProperty=\"include\"/> </rules> </field> <field id=\"supplierName\" name=\"供应商名称\" type=\"input\"> <rules> <rule name=\"requiredRule\" value=\"true\"/> <rule name=\"maxLengthRule\" value=\"40\" exProperty=\"include\" unit=\"byte\"/> <rule name=\"valueTypeRule\" value=\"text\"/> </rules> <value>测试1</value> </field> <field id=\"supplierInfo\" name=\"供应商信息\" type=\"input\"> <rules> <rule name=\"requiredRule\" value=\"true\"/> <rule name=\"maxLengthRule\" value=\"40\" exProperty=\"include\" unit=\"byte\"/> <rule name=\"valueTypeRule\" value=\"text\"/> </rules> <value>测试2</value> </field> <field id=\"outerId\" name=\"商家编码\" type=\"input\"> <rules> <rule name=\"maxLengthRule\" value=\"64\" exProperty=\"include\" unit=\"byte\"/> <rule name=\"valueTypeRule\" value=\"text\"/> </rules> </field> <field id=\"barcode\" name=\"商品条形码\" type=\"input\"> <rules> <rule name=\"maxLengthRule\" value=\"32\" exProperty=\"include\" unit=\"byte\"/> <rule name=\"valueTypeRule\" value=\"text\"/> </rules> </field> <field id=\"images\" name=\"电脑端宝贝图片\" type=\"complex\"> <rules> <rule name=\"tipRule\" value=\"宝贝主图大小不能超过3MB;700*700 以上图片上传后宝贝详情页自动提供放大镜功能。第五张图片发商品白底图可增加手淘首页曝光机会 &lt;a href='//diy.bbs.taobao.com/detail.html?postId=7736924' target='_blank'&gt;查看规范&lt;/a&gt; \"/> <rule name=\"requiredRule\" value=\"true\"/> <rule name=\"maxTargetSizeRule\" value=\"3145728\" exProperty=\"include\" unit=\"byte\"/> </rules> <complex-value> <field id=\"images_0\" type=\"input\"> <value>https://img.alicdn.com/imgextra/i1/TB1DkHjPFXXXXbMXFXXXXXXXXXX_!!0-item_pic.jpg</value> </field> </complex-value> <fields> <field id=\"images_0\" name=\"电脑端宝贝图片\" type=\"input\"> <rules> <rule name=\"valueTypeRule\" value=\"url\"/> </rules> </field> <field id=\"images_1\" name=\"电脑端宝贝图片\" type=\"input\"> <rules> <rule name=\"valueTypeRule\" value=\"url\"/> </rules> </field> <field id=\"images_2\" name=\"电脑端宝贝图片\" type=\"input\"> <rules> <rule name=\"valueTypeRule\" value=\"url\"/> </rules> </field> <field id=\"images_3\" name=\"电脑端宝贝图片\" type=\"input\"> <rules> <rule name=\"valueTypeRule\" value=\"url\"/> </rules> </field> <field id=\"images_4\" name=\"电脑端宝贝图片\" type=\"input\"> <rules> <rule name=\"valueTypeRule\" value=\"url\"/> </rules> </field> </fields> </field> <field id=\"desc\" name=\"电脑端描述\" type=\"input\"> <rules> <rule name=\"requiredRule\" value=\"true\"/> <rule name=\"maxLengthRule\" value=\"200000\" exProperty=\"include\" unit=\"byte\"/> <rule name=\"valueTypeRule\" value=\"text\"/> </rules> <value>&lt;p&gt;TOP巴拿马测试&lt;/p&gt;</value> </field> <field id=\"deliverVolumn\" name=\"物流体积\" type=\"input\"> <rules> <rule name=\"valueTypeRule\" value=\"text\"/> </rules> <value>12</value> </field> <field id=\"deliverWeight\" name=\"物流重量\" type=\"input\"> <rules> <rule name=\"valueTypeRule\" value=\"text\"/> </rules> <value>13</value> </field> <field id=\"deliveryLength\" name=\"物流长度\" type=\"input\"> <rules> <rule name=\"requiredRule\" value=\"true\"/> <rule name=\"valueTypeRule\" value=\"text\"/> </rules> <value>14</value> </field> <field id=\"deliveryWidth\" name=\"物流宽度\" type=\"input\"> <rules> <rule name=\"requiredRule\" value=\"true\"/> <rule name=\"valueTypeRule\" value=\"text\"/> </rules> <value>15</value> </field> <field id=\"deliveryHeight\" name=\"物流高度\" type=\"input\"> <rules> <rule name=\"requiredRule\" value=\"true\"/> <rule name=\"valueTypeRule\" value=\"text\"/> </rules> <value>16</value> </field> </itemSchema>

步骤四:更新商品

涉及接口:
taobao.banamadpc.item.update,入参:item_id,? xml
以商品617146783975为例,XML入参:


<itemSchema> <field id="title" name="宝贝标题" type="input"> <value>测试请不要拍chunmu0426更新商品测试</value> </field> <field id="catProp" name="类目属性" type="complex"> <complex-value> <field id="p-20000" name="品牌" type="singleCheck"> <value inputValue="Deli/得力">10446017</value> </field> <field id="p-20021" name="材质" type="singleCheck"> <value inputValue="海绵">105010</value> </field> </complex-value> </field> <field id="saleProp" name="" type="complex"> <complex-value> <field id="p-1627207" name="颜色分类" type="multiCheck"> <values> <value img="" inputValue="浅灰色">28332</value> <value img="" inputValue="黑色">28341</value> <value img="" inputValue="乳白色">28321</value> </values> </field> </complex-value> </field> <field id="sku" name="宝贝销售规格" type="multiComplex"> <complex-values> <field id="skuPrice" name="价格(元)" type="input"> <value>200.00</value> </field> <field id="skuStock" name="数量(件)" type="input"> <value>4</value> </field> <field id="skuBarcode" name="商品条形码" type="input"> <value>6939199402620</value> </field> <field id="skuOuterId" name="商家编码" type="input"> <value>1234567</value> </field> <field id="props" name="属性对" type="complex"> <complex-value> <field id="p-1627207" name="颜色分类" type="singleCheck"> <value inputValue="浅灰色">28332</value> </field> </complex-value> </field> </complex-values> <complex-values> <field id="skuPrice" name="价格(元)" type="input"> <value>100.00</value> </field> <field id="skuStock" name="数量(件)" type="input"> <value>9</value> </field> <field id="skuBarcode" name="商品条形码" type="input"> <value>6939199402620</value> </field> <field id="skuOuterId" name="商家编码" type="input"> <value>1234567</value> </field> <field id="props" name="属性对" type="complex"> <complex-value> <field id="p-1627207" name="颜色分类" type="singleCheck"> <value inputValue="黑色">28341</value> </field> </complex-value> </field> </complex-values> <complex-values> <field id="skuPrice" name="价格(元)" type="input"> <value>150.00</value> </field> <field id="skuStock" name="数量(件)" type="input"> <value>1</value> </field> <field id="skuBarcode" name="商品条形码" type="input"> <value>6939199402620</value> </field> <field id="skuOuterId" name="商家编码" type="input"> <value>1234567</value> </field> <field id="props" name="属性对" type="complex"> <complex-value> <field id="p-1627207" name="颜色分类" type="singleCheck"> <value inputValue="乳白色">28321</value> </field> </complex-value> </field> </complex-values> </field> <field id="price" name="一口价" type="input"> <value>100.00</value> </field> <field id="quantity" name="总数量" type="input"> <value>14</value> </field> <field id="supplierName" name="供应商名称" type="input"> <value>测试供应商名称</value> </field> <field id="supplierInfo" name="供应商信息" type="input"> <value>测试供应商信息</value> </field> <field id="images" name="电脑端宝贝图片" type="complex"> <complex-value> <field id="images_1" type="input"> <value>https://img.alicdn.com/bao/uploaded/i1/TB1DkHjPFXXXXbMXFXXXXXXXXXX_!!0-item_pic.jpg</value> </field> </complex-value> </field> <field id="desc" name="电脑端描述" type="input"> <value>&lt;p&gt;TOP巴拿马测试&lt;/p&gt;</value> </field> <field id="deliverVolumn" name="物流体积" type="input"> <value>12</value> </field> <field id="deliverWeight" name="物流重量" type="input"> <value>13</value> </field> <field id="deliveryLength" name="物流长度" type="input"> <value>14</value> </field> <field id="deliveryWidth" name="物流宽度" type="input"> <value>15</value> </field> <field id="deliveryHeight" name="物流高度" type="input"> <value>16</value> </field> </itemSchema>

FAQ

关于此文档暂时还没有FAQ
返回
顶部