发货单确认接口(查询)

接口介绍

商家调用接口,查询出库单的运单号和物流商。

API名称: deliveryorder.query

入参规范

<?xml version="1.0" encoding="utf-8"?>

<request> 
  <deliveryOrder> 
    <ownerCode>货主编码,string(50),单次查询货主唯一,必填</ownerCode>  
    <deliveryOrderCode>出库单号,string (1000),多个订单号之间用英文逗号隔开,最多传50个订单号,必填</deliveryOrderCode> 
  </deliveryOrder> 
</request>

出参规范

<?xml version="1.0" encoding="utf-8"?>

<response> 
  <flag>success|failure</flag>  
  <code>响应码</code>  
  <message>响应信息</message>  
  <orders> 
    <order> 
        <deliveryOrder>
        <deliveryOrderCode>出库单号,string(50),必填</deliveryOrderCode>
        <deliveryOrderId>仓储系统出库单号,string(50)</deliveryOrderId>
        <warehouseCode>仓库编码,string(50),必填</warehouseCode>
        <orderType>出库单类型,string(50),JYCK=一般交易出库,HHCK=换货出库,BFCK=补发出库,QTCK=其他出库单,必填</orderType>
        <status>出库单状态,string(50)(DELIVERED-发货完成),(只传英文编码)</status>
        <outBizCode>string(50),外部业务编码,消息ID,用于去重,ISV对于同一请求,分配一个唯一性的编码。用来保证因为网络等原因导致重复传输,请求不会被重复处理,条件必填,条件为一单需要多次确认时</outBizCode>
        <confirmType>支持出库单多次发货,int,多次发货后确认时0表示发货单最终状态确认;1表示发货单中间状态确认;</confirmType>
        <orderConfirmTime>订单完成时间,string(19),YYYY-MM-DD HH:MM:SS</orderConfirmTime>
        <operatorCode>当前状态操作员编码,string(50)</operatorCode>
        <operatorName>当前状态操作员姓名,string(50)</operatorName>
        <operateTime>当前状态操作时间,string(19),YYYY-MM-DD HH:MM:SS</operateTime>
        <invoices>
          <invoice>
            <header>发票抬头,string(200)</header>
            <amount>发票金额,double(18,2)</amount>
            <content>发票内容,string(500)</content>
            <detail>
            <!--当content和detail同时存在时,优先处理detail的信息-->
              <items>
                <item>
                  <itemName>商品名称,string(50)</itemName>
                  <unit>商品单位,string(50)</unit>
                  <price>商品单价,double(18,2)</price>
                  <quantity>数量,int</quantity>
                  <amount>金额,double(18,2)</amount>
                </item>
              </items>
            </detail>
            <code>发票代码,string(50),纳税企业的标识</code>
            <number>发票号码,string(50),纳税企业内部的发票号</number>
          </invoice>
        </invoices>
      </deliveryOrder>
      <packages>
        <package>
          <logisticsCode>物流公司编码,string(50),SF=顺丰、YTO=圆通、ZTO=中通(ZTO)、HTKY=百世汇通、JIUYE=九曳供应链、OTHER=其他,必填,(只传英文编码,可根据双方约定确认编码)</logisticsCode>
          <logisticsName>物流公司名称,string(200)</logisticsName>
          <expressCode>运单号,string(50),必填</expressCode>
          <packageCode>包裹编号,string(50)</packageCode>
          <length>包裹长度(厘米),double(18,2)</length>
          <width>包裹宽度(厘米),double(18,2)</width>
          <height>包裹高度(厘米),double(18,2)</height>
          <theoreticalWeight>包裹理论重量(千克),double(18,3)</theoreticalWeight>
          <weight>包裹重量(千克),double(18,3)</weight>
          <volume>包裹体积(升,L),double(18,3)</volume>
          <invoiceNo>发票号,string(500)</invoiceNo>
          <packageMaterialList>
            <packageMaterial>
              <type>包材型号,string(50)</type>
              <quantity>包材的数量,int</quantity>
            </packageMaterial>
          </packageMaterialList>
          <items>
            <item>
              <itemCode>商品编码,string(50),必填</itemCode>
              <itemId>商品仓储系统编码,string(50)</itemId>
              <quantity>包裹内该商品的数量,int,必填</quantity>
            </item>
          </items>
        </package>
      </packages>
      <orderLines>
        <orderLine>
          <orderLineNo>单据行号,string(50)</orderLineNo>
          <orderSourceCode>平台交易订单编码,string(50)</orderSourceCode>
          <subSourceCode>平台交易子订单编码,string(50)</subSourceCode>
          <ownerCode>货主编码,string(50)</ownerCode>
          <itemCode>商品编码,string(50)</itemCode>
          <itemId>商品仓储系统编码,string(50)</itemId>
          <inventoryType>库存类型,string(50),ZP=正品,CC=残次,默认为ZP</inventoryType>
          <ownerCode>货主编码,string(50)</ownerCode>
          <itemName>商品名称,string(200)</itemName>
          <extCode>交易平台商品编码,string(50)</extCode>
          <planQty>应发商品数量,int</planQty>
          <actualQty>实发商品数量,int</actualQty>
          <batchCode>批次编号,string(50),</batchCode>
          <productDate>生产日期,string(10),YYYY-MM-DD</productDate>
          <expireDate>过期日期,string(10),YYYY-MM-DD</expireDate>
          <produceCode>生产批号,string(50),</produceCode>
          <batchs>
          <!--同一行号下多批次支持-->
            <batch>
              <batchCode>批次编号,string(50)</batchCode>
              <productDate>生产日期,string(10),YYYY-MM-DD</productDate>
              <expireDate>过期日期,string(10),YYYY-MM-DD</expireDate>
              <produceCode>生产批号,string(50),</produceCode>
              <inventoryType>库存类型,string(50),ZP=正品,CC=残次,默认为查所有类型的库存</inventoryType>
              <actualQty>实发数量,int,要求batchs节点下所有的实发数量之和等于orderline中的实发数量</actualQty>
            </batch>
          </batchs>
          <qrCode>商品的二维码(类似电子产品的SN码),用来进行商品的溯源,多个二维码之间用分号(;)隔开</qrCode>
        </orderLine>
      </orderLines>
    </order> 
  </orders> 
</response>