返回订单API

  • 功能描述:根据订单编号查看订单详细信息(包括自发非COD订单、代发非COD订单、代发COD订单、自发COD订单)。支持有“买A赠多”促销的订单。

    支持的数据格式:XML

    HTTP请求方式:GET

  • 接口调用时传递的v为大版本号,如对于1.1,调用时为v=1.0

    时间:2017-6-13

    版本:v1.1

    变更说明:添加orderStatus、couponId、couponProvider、eReceiptAddress 等信息;扩展receiptType;


    时间:2017-6-27

    版本:v1.2

    变更说明:添加taxpayerId;

  • 系统级输入参数:

    请参考系统级输入参数

    应用级输入参数:


    变量名称 变量命名 变量类型 是否必填 示例 说明

    订单编号

    o

    long

    12345678

    一次只能查询一张订单详细信息。

    “订单编号”和“外部订单编号”:可以都填,但是至少得填写一项。

    推荐按订单号查询

    外部订单编号

    outerOrderID

    string

    AT9-023902

    外部订单编号,可以填写字母/数字/汉字。支持包裹的“外部订单编号”

    和父订单的“外部订单编号”。
    “订单编号”和“外部订单编号”:可以都填,但是至少得填写一项。


     

  • 商家接收到的XML文件格式说明:

  • 商家接收到的XML文件实例:

    <?xml version="1.0" encoding="GBK" standalone="yes"?>
    <response>
        <functionID>getOrderDetail</functionID>
        <time>2019-05-09 14:11:31</time>
        <orderID>37413542202</orderID>
        <orderState>1000</orderState>
        <orderStatus>1000</orderStatus>
        <message></message>
        <remark xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
        <label xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
        <parentOrderID xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
        <outerOrderID xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
        <lastModifyTime>2019-02-17 17:18:00</lastModifyTime>
        <giftCardCharge>0.00</giftCardCharge>
        <sendGiftCardCharge>0.00</sendGiftCardCharge>
        <lackGiftCardCharge>0.00</lackGiftCardCharge>
        <isCourierReceiptDetail>0</isCourierReceiptDetail>
        <paymentDate>2019-01-02 20:57:39</paymentDate>
        <orderMode>1</orderMode>
        <sendDate>2019-01-03 17:17:24</sendDate>
        <isPresale>0</isPresale>
        <OrderOperateList>
            <OperateInfo>
                <operateDetails>顾客下单</operateDetails>
                <operateRole>顾客</operateRole>
                <operateTime>2019-01-02 20:57:39</operateTime>
            </OperateInfo>
            <OperateInfo>
                <operateDetails>商家或者系统审核通过</operateDetails>
                <operateRole>系统 </operateRole>
                <operateTime>2019-01-02 21:07:40</operateTime>
            </OperateInfo>
            <OperateInfo>
                <operateDetails>商家已标记拣货完成</operateDetails>
                <operateRole>商家</operateRole>
                <operateTime>2019-01-03 17:16:07</operateTime>
            </OperateInfo>
            <OperateInfo>
                <operateDetails>系统默认订单交易完成</operateDetails>
                <operateRole>系统 </operateRole>
                <operateTime>2019-02-02 17:17:30</operateTime>
            </OperateInfo>
        </OrderOperateList>
        <buyerInfo>
            <buyerPayMode>货到付款</buyerPayMode>
            <goodsMoney>98.80</goodsMoney>
            <realPaidAmount>400.20</realPaidAmount>
            <deductAmount>0</deductAmount>
            <totalBarginPrice>98.80</totalBarginPrice>
            <promoDeductAmount>0</promoDeductAmount>
            <postage>0.00</postage>
            <giftCertMoney>0</giftCertMoney>
            <giftCertId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            <giftCardMoney>400.20</giftCardMoney>
            <accountBalance>0.00</accountBalance>
            <activityDeductAmount>0.00</activityDeductAmount>
            <custPointUsed>0.00</custPointUsed>
            <pointDeductionAmount>0.00</pointDeductionAmount>
        </buyerInfo>
        <sendGoodsInfo>
            <dangdangAccountID>156530862</dangdangAccountID>
            <consigneeName>陶xx</consigneeName>
            <consigneeAddr>中国,安徽,芜湖市,镜湖区,xx街道,xxx城11-2-602,241000</consigneeAddr>
            <consigneeAddr_State>中国</consigneeAddr_State>
            <consigneeAddr_Province>安徽</consigneeAddr_Province>
            <consigneeAddr_City>芜湖市</consigneeAddr_City>
            <consigneeAddr_Area>镜湖区</consigneeAddr_Area>
            <consigneeAddr_StateCode>9000</consigneeAddr_StateCode>
            <consigneeAddr_ProvinceCode>134</consigneeAddr_ProvinceCode>
            <consigneeAddr_CityCode>1508</consigneeAddr_CityCode>
            <consigneeAddr_AreaCode>1340201</consigneeAddr_AreaCode>
            <consigneePostcode>241000</consigneePostcode>
            <consigneeTel></consigneeTel>
            <consigneeMobileTel>18110888xxx</consigneeMobileTel>
            <sendGoodsMode>普通快递送货上门,时间不限</sendGoodsMode>
            <sendCompany>顺丰快递</sendCompany>
            <sendOrderID>764642554xxx</sendOrderID>
            <DangdangWarehouseAddr xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
        </sendGoodsInfo>
        <ItemsList>
            <ItemInfo>
                <itemID>1042173967</itemID>
                <outerItemID></outerItemID>
                <itemName>【支持礼品卡】Seacom美国 电暖器取暖器电暖气 家用变频节能速热小型办公室桌面人体感应台式暖风机_象牙白</itemName>
                <itemType>0</itemType>
                <specialAttribute>颜色&gt;&gt;象牙白</specialAttribute>
                <marketPrice>899.00</marketPrice>
                <is_energySubsidy>0</is_energySubsidy>
                <subsidyPrice></subsidyPrice>
                <unitPrice>499.00</unitPrice>
                <orderCount>1</orderCount>
                <belongProductsPromoID>6199006</belongProductsPromoID>
                <sendGoodsCount>1</sendGoodsCount>
                <giftCardCharge>0</giftCardCharge>
                <productItemId>37413542202001</productItemId>
                <serialNumbers xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <productImg>http://img3x7.ddimg.cn/76/36/1042173967-1_w.jpg?t=1557382340</productImg>
                <productVersion>1:110-3:49-11:48*200003707:1</productVersion>
                <itemRealPaidAmount>400.20</itemRealPaidAmount>
            </ItemInfo>
        </ItemsList>
        <PromoList/>
        <receiptInfo>
            <receiptName></receiptName>
            <receiptDetails></receiptDetails>
            <receiptMoney>0</receiptMoney>
            <Is_DangdangReceipt>2</Is_DangdangReceipt>
            <receiptTel xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            <receiptType>0</receiptType>
            <eReceiptAddress xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            <taxpayerId></taxpayerId>
        </receiptInfo>
        <taxFee xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
        <consumptionDutyAmount xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
        <tariffAmount xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
        <addedValueTaxAmount xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
        <identityNum xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
        <originalOrderId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
        <einvoiceAddress xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
        <warehouseID>100</warehouseID>
        <isSubsidyOrder>0</isSubsidyOrder>
        <subsidyAmount>0</subsidyAmount>
        <orderBalance>400.2000</orderBalance>
        <couponId>ddb</couponId>
        <couponProvider>-1</couponProvider>
        <couponRate>-1</couponRate>
    </response>



  • <?xml version="1.0" encoding="GBK" standalone="yes"?>
    <response>
        <functionID>getOrderDetail</functionID>
        <time>2017-06-13 17:04:28</time>
        <Error>
            <operCode>35</operCode>
            <operation>订单编号错误</operation>
        </Error>
    </response>

  • java版
    SdkClient sdkClient= new SdkClient(appKey, appSecret, session, version) ;

    OrderDetailsGetRequest request=new OrderDetailsGetRequest();

    OrderDetailsGet orderDetailsGet=new OrderDetailsGet();

    orderDetailsGet.setO("38086091600");

    request.setOrderDetailsGet(orderDetailsGet);

    OrderDetailsGetResponse result=sdkClient.excute(request);

    System.out.println("ok:" + result.toString());

    php版

    $sdkClient=new DDHttpClient(appKey,appSecret,session);

    $OrderDetailsGetRequest = new OrderDetailsGetRequest();
    $OrderDetailsGetRequest->setOrderId("1013037686167");
    $sdkResponse = $sdkClient->execute($OrderDetailsGetRequest);