出库单创建接口

接口介绍

商家调用接口,创建出库单信息。

API名称:stockout.create

入参规范

<?xmlversion="1.0"encoding="utf-8"?>

<request>
  <deliveryOrder>
    <totalOrderLines>单据总行数,int</totalOrderLines>
    <deliveryOrderCode>出库单号(ERP分配),string(50),必填</deliveryOrderCode>
    <orderType>出库单类型,string(50),必填,PTCK=普通出库单,DBCK=调拨出库,B2BCK=B2B出库,QTCK=其他出库,CGTH=采购退货出库单</orderType>
    <warehouseCode>仓库编码,string(50),必填</warehouseCode>
    <createTime>出库单创建时间,string(19),YYYY-MM-DD HH:MM:SS,必填</createTime>
    <scheduleDate>要求出库时间,string(10),YYYY-MM-DD</scheduleDate>
    <logisticsCode>物流公司编码,string(50),SF=顺丰、YTO=圆通、ZTO=中通(ZTO)、HTKY=百世汇通、JIUYE=九曳供应链、OTHER=其他,(只传英文编码,可根据双方约定确认编码),必填</logisticsCode>
    <logisticsName>物流公司名称(包括干线物流公司等),string(200)</logisticsName>
    <transportMode>提货方式(到仓自提,快递,干线物流)</transportMode>
    <pickerInfo>
    <!--提货人信息-->
      <company>公司名称,string(200)</company>
      <name>姓名,string(50)</name>
      <tel>固定电话,string(50)</tel>
      <mobile>移动电话,string(50)</mobile>
      <id>证件号,string(50)</id>
      <carNo>车牌号,string(50)</carNo>
      </pickerInfo>
    <senderInfo>
    <!--发件人信息,若面单需打印商家同步的发件人信息,则必填-->
      <company>公司名称,string(200)</company>
      <name>姓名,string(50),必填</name>
      <zipCode>邮编,string(50)</zipCode>
      <tel>固定电话,string(50)</tel>
      <mobile>移动电话,string(50),必填</mobile>
      <email>电子邮箱,string(50)</email>
      <countryCode>国家二字码,string(50)</countryCode>
      <province>省份,string(50),必填</province>
      <city>城市,string(50),必填</city>
      <area>区域,string(50),必填</area>
      <town>村镇,string(50)</town>
      <detailAddress>详细地址,string(200),必填</detailAddress>
      <id>证件号,string(50)</id>
    </senderInfo>
    <receiverInfo>
    <!--收件人信息-->
      <company>公司名称,string(200)</company>
      <name>姓名,必填</name>
      <zipCode>邮编,string(50)</zipCode>
      <tel>固定电话,string(50)</tel>
      <mobile>移动电话,string(50),必填</mobile>
      <email>电子邮箱,string(50)</email>
      <countryCode>国家二字码,string(50)</countryCode>
      <province>省份,string(50),必填</province>
      <city>城市,string(50),必填</city>
      <area>区域,string(50),必填</area>
      <town>村镇,string(50)</town>
      <detailAddress>详细地址,string(200),必填</detailAddress>
      <id>证件号,string(50)</id>
    </receiverInfo>
    <remark>备注,string(500)</remark>
  </deliveryOrder>
  <orderLines>
    <orderLine>
      <outBizCode>外部业务编码,消息ID,用于去重</outBizCode>
      <orderLineNo>单据行号,string(50)</orderLineNo>
      <ownerCode>货主编码,string(50),必填</ownerCode>
      <itemCode>商品编码,string(50),必填</itemCode>
      <itemId>仓储系统商品编码,string(50),条件必填</itemId>
      <itemName>商品名称,string(200)</itemName>
      <inventoryType>库存类型,string(50),ZP=正品,CC=残次,默认为ZP</      inventoryType>
      <planQty>应发商品数量,int,必填</planQty>
      <batchCode>批次编码,string(50)</batchCode>
      <productDate>商品生产日期,YYYY-MM-DD</productDate>
      <expireDate>商品过期日期,YYYY-MM-DD</expireDate>
      <produceCode>生产批号,string(50)</produceCode>
    </orderLine>
  </orderLines>
</request>

出参规范

<?xmlversion="1.0"encoding="utf-8"?>

<response>
  <flag>success|failure</flag>
  <code>响应码</code>
  <message>响应信息</message>
  <deliveryOrderId>出库单仓储系统编码,string(50)</deliveryOrderId>
  <createTime>订单创建时间,string(19),YYYY-MM-DD HH:MM:SS</createTime>
</response>