dangdang.custom.getItemId

通过商家标识符获取商品

  • 此接口用于商品标识符获取商品信息

    支持的数据格式:XML

    HTTP请求方式:GET

    版本:3.0

  • 系统级输入参数:

    请参考系统级输入参数

    应用级输入参数:

    参数名称
    参数类型
    是否必填
    示例值
    参数说明
    out_id Number 38382934 商品数字ID
    gShopID Number 489 店铺id

  • XML数据格式:

    01 <?xml version="1.0" encoding="GBK" standalone="yes"?>
    02 <response>
    03 <functionId> custom -getItemId</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     <out_id>abc123</out_id >
    11 </item>
    12 </response>

    JSON数据格式:

    01 {
    02   "response": {
    03     "functionId"" custom -getItemId",
    04     "result""true",
    05     "resultCode""0",
    06     "resultMessage""请求成功.",
    07     "time""2014-12-30 18:37:34",
    08     "item": {
    09       "item_id""1012284020",
    10       "out_id""abc123"
    11     }
    12   }
    13 }

  • java版

    SdkClient sdkClient= new SdkClient(appKey, appSecret, session, version) ;
    PublicationItemIdGetRequest request=new PublicationItemIdGetRequest();
    PublicationItemIdGet itemIdGet=new PublicationItemIdGet();
    itemIdGet.setOut_id("1234abc");
    request.setItemIdGet(itemIdGet);
    PublicationItemOrOutIdGetResponse response =sdkClient.excute(request);
    System.out.println(response.toString());


    php版

    $sdkClient = new DDHttpClient(appKey,appSecret,session)
    $publicationCustomGetOutIdRequest = new PublicationCustomGetOutIdRequest();
    $publicationCustomGetOutIdRequest->setItemId("1079064124");
    $sdkResponse = $sdkClient->execute($publicationCustomGetOutIdRequest);