文档中心> 开发文档> 接口列表> 百货商品API> dangdang.item.detail...
dangdang.item.add
发布新商品
dangdang.item.detail...
修改商品详细信息
dangdang.items.delet...
删除商品
dangdang.items.list....
查询商品列表信息
dangdang.item.get
查看商品详细信息
dangdang.item.stock....
更新商品库存
dangdang.item.price....
更新商品价格
dangdang.items.stock...
批量更新商品库存
dangdang.items.price...
批量更新商品价格
dangdang.item.itemid...
查询商品标识符
dangdang.item.custom...
查询企业商品标识符
dangdang.items.bestp...
设置商品最佳拍档
dangdang.item.bestpa...
查询商品最佳拍档
dangdang.items.publi...
设置商品公用栏目
dangdang.item.public...
查询商品公用栏目
dangdang.items.statu...
批量更新商品状态
dangdang.items.codin...
批量更新商品支持COD
dangdang.items.posta...
批量更新商品运费
dangdang.item.update...
库存修改(支持地区仓)
dangdang.item.stock....
库存查询(支持地区仓)
dangdang.item.stock....
增量更新库存(支持地...
系统级输入参数:
请参考系统级输入参数
应用级输入参数:
变量名称 |
变量命名 |
变量类型 |
是否必填 |
示例 |
说明 |
---|---|---|---|---|---|
修改商品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) ; |
php版 |
$sdkClient
= new DDHttpClient(appKey,appSecret,session) $ItemDetailUpdateRequest = new ItemDetailUpdateRequest(); $ItemDetailUpdateRequest->setUpdateItemsDetail($xmlFile); $sdkResponse = $sdkClient->execute($ItemDetailUpdateRequest); |
Copyright © 当当网 2004-2012, All Rights Reserved