dangdang.item.price.update

价格更新

  • 此接口用于修改一个商品的定价和当当价

    支持的数据格式:XML

    HTTP请求方式:POST

    版本:3.0

  • 系统级输入参数:

    请参考系统级输入参数

    应用级输入参数:

    参数名称
    参数类型
    是否必填
    示例值
    参数说明
    item_id Number 1235213 商品id
    sale_price Price 207.02 销售价格(也叫当当价,小数点后最多保留2位小数,范围0.01-9999999.99)
    market_price Price 207.02 定价(小数点后最多保留2位小数,范围0.01-9999999.99)

  • XML数据格式:

    01 <?xml version="1.0" encoding="GBK" standalone="yes"?>
    02 <response>
    03 <functionId>item-price-update</functionId>
    04 <result>true</result>
    05 <resultCode>0</resultCode>
    06 <resultMessage>请求成功.</resultMessage>
    07 <time>2014-12-30 18:37:34</time>
    08 <item>   
    09     <item_id>1012284020</item_id>
    10     <price>0 </price>
    11 </item>
    12 </response>

    JSON数据格式:

    01 {
    02   "response": {
    03     "result""true",
    04     "resultCode""0",
    05     "resultMessage""请求成功",
    06     "item":{
    07         "item_id":1012284020,
    08         "sale_price":1,
    09         "market_price":1
    10     }
    11   }
    12 }

  • java版

    SdkClient sdkClient=new SdkClient(appKey, appSecret, session, version) ;
    PublicationItemPriceUpdateRequest request=new PublicationItemPriceUpdateRequest();
    PublicationItemPriceUpdate itemPriceUpdate=new PublicationItemPriceUpdate();
    itemPriceUpdate.setItem_id("1393047703");
    request.setItemPriceUpdateDto(itemPriceUpdate);
    PublicationItemPriceUpdateResponse response =sdkClient.excute(request);
    System.out.println(response.toString());


    php版

    $sdkClient = new DDHttpClient(appKey,appSecret,session)
    $publicationItemPriceUpdateRequest = new PublicationItemPriceUpdateRequest();
    $publicationItemPriceUpdateRequest->setItemId("1079064024");
    $sdkResponse = $sdkClient->execute($publicationItemPriceUpdateRequest);