dangdang.item.detail.update

修改商品详细信息

  • 功能描述:商家一次可以同时修改多个商品。不允许修改“商品标识符”,其他值都允许被修改。支持只修改部分信息;上传分色分码商品时,以最后一次信息为准。

    当商品为分色分码商品时,支持修改商品分类。分类可以改为经营分类范围内的任意一个分色分码的叶子分类,而且销售属性必需一致。

    不允许修改促销品的价格(N件起购商品除外)。

    产品为赠品,添加分色分码时,该商品也自动为赠品。

    支持的数据格式:XML

    HTTP请求方式:POST

    版本:2.0

  • 系统级输入参数:

    请参考系统级输入参数

    应用级输入参数:

    变量名称
    变量命名
    变量类型
    是否必填
    示例
    说明
    修改商品XML文件
    updateItemsDetail
    file

    <input type=file..

    修改商品的XML文件,具体内容请参考“

    修改商品XML文件格式说明”


    修改商品XML文件格式说明:

     

    说明:

    1.分色分码商品使用<SpecilaItemInfo>组合:

    1.1<specialAttributeClass><specialAttribute><specialAttributeSeq><unitPrice><stockCount><outerItemID>。

    1.2<specialAttributeClass>允许为空;<specialAttributeSeq>非数字、为空或者大于9999时,对应属性值显示顺序自动设置为0。

    1.3<specialAttribute>的自定义属性名称:不允许超过20个字符(10个汉字)。

    1.4、销售属性的“组合”是不允许修改的,比如商品原有的销售属性组合是“颜色+尺码”,则不能只填写“颜色”或者“尺码”,也不允许不填,填写格式如上所述。可以重新自定义属性名称。

    2.使用<ItemsList>组合多个<ItemUpadteInfo>

    3.当重新设置了<bestPartnerList>,将会覆盖之前的拍档商品;

    4.4、 bestPartnerList字段对普通商品和产品都有效,内容必须符合格式要求;“拍档商品的商品ID”对应的商品必须是商家店内商品、不能是产品下的分色分码商品、不能重复、不能是被设置商品本身;依照设置时的商品顺序,在单品页中从左到右展示;拍档数量不能多于3个

    5.[限]节能补贴政策为“是”时,节能补贴金额为必填项。节能补贴政策为“否”时,不读取节能补贴金额项。

    6.[限]节能补贴政策和节能补贴金额目前仅适用于特定商家,暂时不对其他商家开放使用。

  • 修改商品XML文件示例:

     <?xml version="1.0" encoding="GBK"?>

    <request>

     <functionID>dangdang.item.detail.update</functionID>

     <time>2009-03-20 15:10:50</time>

     <ItemsList>

      <ItemUpadteInfo>

       <itemID>40056780123</itemID>

       <itemBarcode>123456789</itemBarcode>

       <itemName>瑜珈/图文鞋</itemName>

       <itemSubhead>漂亮又便宜</itemSubhead>
            <classificationCode1>4001832</classificationCode1>

       <classificationCode2>4001832</classificationCode2>

       <brand>皮尔瑜伽</brand>

       <model>瑜珈/图文鞋</model>

       <attribute>性别>>女性;质地>>牛皮</attribute>

       <itemDetail>规格:15*69cm材质:牛皮</itemDetail> 

       <stockPrice>28</stockPrice>

       <marketPrice>88</marketPrice>

       <isShopVip>是</isShopVip>

       <vipPriceType>是</vipPriceType>

       <shopCategoryID1>10000</shopCategoryID1>

       <shopCategoryID2>10000</shopCategoryID2>

       <shopCategoryID3>10000</shopCategoryID3>

       <shopCategoryID4>10000</shopCategoryID4>

       <shopCategoryID5>10000</shopCategoryID5>

       <shopCategoryID6>10006</shopCategoryID6>
            <shopCategoryID7>10007</shopCategoryID7>
            <shopCategoryID8>10008</shopCategoryID8>
            <shopCategoryID9>10009</shopCategoryID9>
            <shopCategoryID10>10010</shopCategoryID10>

       <itemState>上架</itemState>

       <guaranteeRepairType>有</guaranteeRepairType> 

       <guaranteeReturnType>否</guaranteeReturnType>

        <is_cod>是</is_cod>

       <SpecilaItemInfo>

        <specialAttributeClass>颜色>>军绿;鞋码>>38</specialAttributeClass>

        <specialAttribute>颜色>>军绿色;鞋码>>38</specialAttribute>

        <specialAttributeSeq>0;10</specialAttributeSeq>

        <stockCount>199</stockCount>

        <unitPrice>28</unitPrice>

        <outerItemID>sku001</outerItemID>

       </SpecilaItemInfo>

       <SpecilaItemInfo>

       ……

       </SpecilaItemInfo>

    <isSubsidy>是</isSubsidy>

    < subsidyAmount >180.00</ subsidyAmount >

    < volume>180.00</volume>

    < weight>180.00</ weight>

    < templateName >店铺运费</ templateName >

      </ItemUpadteInfo>

      <ItemUpadteInfo>

       ......

      </ItemUpadteInfo>

     </ItemsList>

    </request>

  • 商家接收到的XML文件格式说明:

  • 商家接收到的XML文件实例:

    <?xml version="1.0" encoding="GBK" ?>

    <response>

     <functionID>dangdang.item.detail.update</functionID>

     <time>2009-04-20 15:33:29</time>

     <ItemsIDList>

      <ItemIDInfo>

       <outerItemID>00001</outerItemID>

       <itemID>10001</itemID>

       <itemName>10000</itemName>

      </ItemIDInfo>

      <ItemIDInfo>

       <itemID>10000</itemID>

       <itemName>10000</itemName>

       <SpecialItemInfo>

        <outerItemID>00002</outerItemID>

    <subItemID>2132</ subItemID>

        <operCode>0</operCode>

        <operation>发布商品成功</operation>

       </SpecialItemInfo> 

      <SpecialItemInfo>

        <outerItemID>000

    03</outerItemID>

    <subItemID>2132</ subItemID>

        <operCode>11</operCode>

        <operation>单价错误</operation>

       </SpecialItemInfo>

      </ItemIDInfo>

      <ItemIDInfo>

       <outerItemID>00001</outerItemID>

       <itemName>10000</itemName>

       <operCode>10</operCode>

       <operation>进货价:必填</operation>

      </ItemIDInfo>

     </ItemsIDList>

    </response>


  • java版

    SdkClient sdkClient= new SdkClient(appKey, appSecret, session, version) ;
    ItemUpdateRequest request=new ItemUpdateRequest();
    request.setUpdateItemsDetailFile(new FileItem(new File(path)));
    ItemAddResponse result=sdkClient.excute(request);
    System.out.println( result.toString());


    php版
    $sdkClient = new DDHttpClient(appKey,appSecret,session)
    $ItemDetailUpdateRequest = new ItemDetailUpdateRequest();
    $ItemDetailUpdateRequest->setUpdateItemsDetail($xmlFile);
    $sdkResponse = $sdkClient->execute($ItemDetailUpdateRequest);