入库单创建接口

接口介绍

商家调用接口,创建入库单。

API名称:entryorder.create

入参规范

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

<request>
  <entryOrder>
  <totalOrderLines>单据总行数,int</totalOrderLines>
  <entryOrderCode>入库单号,string(50),必填</entryOrderCode>
  <ownerCode>货主编码,string(50),必填</ownerCode>
  <purchaseOrderCode>采购单号,string(50),当orderType=CGRK时,使用</purchaseOrderCode>
  <warehouseCode>仓库编码,string(50),必填</warehouseCode>
  <orderCreateTime>订单创建时间,string(19),YYYY-MM-DD HH:MM:SS</orderCreateTime>
  <orderType>业务类型(CCRK=残次品入库,CGRK=采购入库,DBRK=调拨入库,QTRK=其他入库,B2BRK=B2B入库,string(50),(只传英文编码)</orderType>
  <expectStartTime>预期到货时间,string(19),YYYY-MM-DD HH:MM:SS</expectStartTime>
  <expectEndTime>最迟预期到货时间,string(19),YYYY-MM-DD HH:MM:SS</expectEndTime>
  <logisticsCode>物流公司编码,string(50),SF=顺丰、YTO=圆通、ZTO=中通(ZTO)、HTKY=百世汇通、JIUYE=九曳供应链、OTHER=其他(只传英文编码,可根据双方约定确认编码)</logisticsCode>
  <logisticsName>物流公司名称,string(200)</logisticsName>
  <expressCode>运单号,string(50)</expressCode>
  <supplierCode>供应商编码,string(50)</supplierCode>
  <supplierName>供应商名称,string(200)</supplierName>
  <operatorCode>操作员编码,string(50)</operatorCode>
  <operatorName>操作员名称,string(50)</operatorName>
  <operateTime>操作时间,string(19),YYYY-MM-DD HH:MM:SS</operateTime>
  <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>
  </senderInfo>
  <receiverInfo>
  <!--收件人信息-->
    <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>
  </receiverInfo>
  <remark>备注,string(500)</remark>
  <extendProps>扩展属性
    <key1>value1</key1>
    <key2>value2</key2>
  </extendProps>
  </entryOrder>
  <orderLines>
    <orderLine>
      <outBizCode>外部业务编码,消息ID,用于去重</outBizCode>
      <orderLineNo>入库单的行号,string(50)</orderLineNo>
      <ownerCode>货主编码,string(50),必填</ownerCode>
      <itemCode>商品编码,string(50),必填</itemCode>
      <itemId>仓储系统商品ID,string(50),条件必填</itemId>
      <itemName>商品名称,string(200)</itemName>
      <planQty>应收商品数量,int,必填</planQty>
      <skuProperty>商品属性,string(200)</skuProperty>
      <purchasePrice>采购价,double(18,2)</purchasePrice>
      <retailPrice>零售价,double(18,2)</retailPrice>
      <inventoryType>库存类型,string(50),ZP=正品,CC=残次,默认为ZP</inventoryType>
      <productDate>商品生产日期,YYYY-MM-DD</productDate>
      <expireDate>商品过期日期,YYYY-MM-DD</expireDate>
      <produceCode>生产批号,string(50)</produceCode>
      <batchCode>批次编码,string(50)</batchCode>
      <extendProps>扩展属性
        <key1>value1</key1>
        <key2>value2</key2>
      </extendProps>
    </orderLine>
  </orderLines>
</request>

出参规范

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

<response>
  <flag>success|failure</flag>
  <code>响应码</code>
  <message>响应信息</message>
  <entryOrderId>仓储系统入库单编码,string(50)</entryOrderId>
</response>