dangdang.item.stock.update

库存修改

  • 此接口用于修改一个商品的库存

    支持的数据格式:XML

    HTTP请求方式:POST

    版本:3.0

  • 系统级输入参数:

    请参考系统级输入参数

    应用级输入参数:


  • 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     <stock>1</stock >
    09 </item>
    10 <response>

    JSON数据格式:

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

  • java版

    SdkClient sdkClient= new SdkClient(appKey, appSecret, session, version) ;
    PublicationItemStockUpdateRequest request=new PublicationItemStockUpdateRequest();
    PublicationItemStockUpdate itemStockUpdate=new PublicationItemStockUpdate();
    itemStockUpdate.setItem_id(1393047703L);
    request.setStockUpdateReq(itemStockUpdate);
    PublicationItemStockUpdateResponse response =sdkClient.excute(request);
    System.out.println(response.toString());


    php版
    $sdkClient = new DDHttpClient(appKey,appSecret,session)
    $publicationItemStockUpdateRequest = new PublicationItemStockUpdateRequest();
    $publicationItemStockUpdateRequest->setItemId("1079064024");
    $sdkResponse = $sdkClient->execute($publicationItemStockUpdateRequest);