dangdang.custom.price.update

通过商家标识符更新价格

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

    支持的数据格式:XML

    HTTP请求方式:POST

  • 系统级输入参数:

    请参考系统级输入参数

    应用级输入参数:

    参数名称
    参数类型
    是否必填
    示例值
    参数说明
    gShopID Number 489 店铺ID
    out_id String as23s 商品外部编码
    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"?>
    02 <response>
    03 <result>true</result>
    04 <resultCode>0</ resultCode>
    05 <resultMessage>请求成功</resultMessage>
    06 <item>   
    07     <item_id>1012284020</item_id>
    08     <sale_price>1</sale_price>
    09     <market_price>1</market_price>
    10 </item>
    11 <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) ;
    PublicationCustomPriceUpdateRequest request=new PublicationCustomPriceUpdateRequest();
    PublicationCustomPriceUpdate priceUpdateReq=new PublicationCustomPriceUpdate();
    priceUpdateReq.setOut_id("1234abc");
    request.setCustomPriceUpdate(priceUpdateReq);
    PublicationItemPriceUpdateResponse response =sdkClient.excute(request);
    System.out.println(response.toString());


    php版
    $sdkClient = new DDHttpClient(appKey,appSecret,session)
    $PublicationCustomPriceUpdateRequest = new PublicationCustomPriceUpdateRequest();
    $PublicationCustomPriceUpdateRequest->setOutId("98765");
    $sdkResponse = $sdkClient->execute($PublicationCustomPriceUpdateRequest);