简要描述:

  • 入库单确认

接口说明:

  • 1.1接口描述:WMS调用接口,回传入库单信息
  • 1.2接口说明:仓库入库单收货完成后, 把入库单和订单信息回传给 ERP, ERP 自行决定如何处理。
  • 1.3接口方法: taobao.qimen.entryorder.confirm

接口版本:

版本号 制定人 制定日期 修订日期
1.0.0 黄会准 2020-08-07 2020-08-07

请求URL:

环境 HTTP地址
测试环境 http://apitest.yptcgroup.com/thirdpart/dispatcher
预发布环境 http://apiuat.yptcgroup.com/thirdpart/dispatcher
正式环境 http://api.yptcgroup.com/thirdpart/dispatcher

请求头:

参数名 是否必须 类型 说明
Content-Type 是 string 请求类型,统一是 application/xml

请求参数:

公共请求参数

参数名 字段 是否必须 类型 长度 说明
WMS 的appkey app_key 是 String 应用接入时申请的 appkey
接口方法 method 是 String ERP 相关的业务接口名称,method= taobao.qimen.entryorder.confirm
协议版本号 v 是 String 版本号 默认请传3.0
content 格式 format 是 String 目前支持 XML
加密令牌 sign 是 String 根据 url 和密钥计算的结果
加密方法 sign_method 是 String md5
用户id customerid 是 String WMS 颁发给用户的 ID
请求时间 timestamp 是 String yyyy-MM-dd HH:mm:ss 格式

request

参数名 字段 是否必须 类型 说明
入库单信息 entryOrder 否 data 入库单信息
订单信息 orderLines 否 data[] 订单信息
扩展属性 extendProps 否 data 扩展属性

entryOrder

参数名 字段 是否必须 类型 说明
订单编码 orderCode 否 String 订单编码
后端订单id orderId 否 String 后端订单id
单据类型 orderType 否 String 单据类型
仓库名称 warehouseName 否 String 仓库名称
单据总行数 totalOrderLines 否 Long 单据总行数(当单据需要分多个请求发送时;发送方需要将totalOrderLines填入;接收方收到后;根据实际接收到的 条数和 totalOrderLines进行比对;如果小于;则继续等待接收请求。如果等于;则表示该单据的所有请求发送完 成)
入库单号 entryOrderCode 是 String 入库单号
货主编码 ownerCode 是 String 货主编码
仓库名称 warehouseName 否 String 仓库名称
仓库名称 ownerCode 否 String 仓库名称
采购单号 purchaseOrderCode 否 String 采购单号(当orderType=CGRK时使用)
仓库编码 warehouseCode 是 String 仓库编码(统仓统配等无需ERP指定仓储编码的情况填OTHER)
仓储系统入库单ID entryOrderId 否 String 仓储系统入库单ID
入库单类型 entryOrderType 否 String 入库单类型(SCRK=生产入库;LYRK=领用入库;CCRK=残次品入库;CGRK=采购入库;DBRK=调拨入库;QTRK=其他入 库;B2BRK=B2B入库)
外部业务编码 outBizCode 是 String 外部业务编码(消息ID;用于去重;ISV对于同一请求;分配一个唯一性的编码。用来保证因为网络等原因导致重复传输;请求 不会被重复处理)
支持出入库单多次收货 confirmType 否 String 支持出入库单多次收货(多次收货后确认时:0:表示入库单最终状态确认;1:表示入库单中间状态确认;每次入库传入的数量为增 量;特殊情况;同一入库单;如果先收到0;后又收到1;允许修改收货的数量)
入库单状态 status 否 String 入库单状态(NEW-未开始处理;ACCEPT-仓库接单;PARTFULFILLED-部分收货完成;FULFILLED-收货完成;EXCEPTION-异 常;CANCELED-取消;CLOSED-关闭;REJECT-拒单;CANCELEDFAIL-取消失败;只传英文编码)
操作时间 operateTime 否 String 操作时间(YYYY-MM-DD HH:MM:SS;当status=FULFILLED;operateTime为入库时间)
备注 remark 否 String 备注
邮费 freight 否 String 邮费
入库单确认的其他入库子类型 subOrderType 否 String 入库单确认的其他入库子类型,用于entryOrderType设置为其他入库时设置
该笔入库单的费用承担部门或责任部门 responsibleDepartment 否 String 该笔入库单的费用承担部门或责任部门
店铺名称 shopNick 是 String 店铺名称
店铺编码 shopCode 是 String 店铺编码

orderLines

参数名 字段 是否必须 类型 说明
外部业务编码 outBizCode 否 String 外部业务编码(消息ID;用于去重;当单据需要分批次发送时使用)
入库单的行号 orderLineNo 否 String 入库单的行号
货主编码 ownerCode 是 String 货主编码
商品编码 itemCode 否 String 商品编码
仓储系统商品ID itemId 否 String 仓储系统商品ID
商品名称 itemName 否 String 商品名称
应收商品数量 planQty 是 long 应收商品数量
库存类型 inventoryType 否 String 库存类型(ZP=正品;CC=残次;JS=机损;XS=箱损;默认为ZP)
实收数量 actualQty 否 String 实收数量
商品生产日期 productDate 否 String 商品生产日期(YYYY-MM-DD)
商品过期日期 expireDate 否 String 商品过期日期(YYYY-MM-DD)
生产批号 produceCode 否 String 生产批号
批次编码 batchCode 否 String 批次编码
批次信息 batchs 否 String 批次信息,节点下数据字段详见下述“batch”
备注 remark 否 String 备注
单位 unit 否 String 单位
sn编码列表 snList 否 data sn编码列表,节点下数据字段详见下述“snList”

batch

参数名 字段 是否必须 类型 说明
批次编号 batchCode 否 String 批次编号
生产日期 productDate 否 String 生产日期(YYYY-MM-DD)
过期日期 expireDate 否 String 过期日期(YYYY-MM-DD)
生产批号 produceCode 否 String 生产批号
库存类型 inventoryType 否 String 库存类型(ZP=正品;CC=残次;JS=机损;XS= 箱损;默认为ZP;)
实收数量 actualQty 否 long 实收数量(要求batchs节点下所有的实收数量之和等于orderline中的实收数量)

snList

参数名 字段 是否必须 类型 说明
sn编码 sn 否 String[] sn编码

返回参数:

response

参数名 类型 说明
flag String 响应结果:success
code String 响应码
message String 响应信息
requestId String 查询返回的唯一编码

请求示例(xml)

<?xml version="1.0" encoding="UTF-8" ?>
<request>
    <entryOrder>
        <orderCode>orderCode</orderCode>
        <orderId>orderId</orderId>
        <orderType>orderType</orderType>
        <warehouseName>仓库名称</warehouseName>
        <totalOrderLines>12</totalOrderLines>
        <entryOrderCode>E1234</entryOrderCode>
        <ownerCode>O1234</ownerCode>
        <purchaseOrderCode>C123455</purchaseOrderCode>
        <warehouseCode>W1234</warehouseCode>
        <entryOrderId>E1234</entryOrderId>
        <entryOrderType>SCRK</entryOrderType>
        <outBizCode>O1234</outBizCode>
        <confirmType>0</confirmType>
        <status>NEW</status>
        <operateTime>2017-09-09 12:00:00</operateTime>
        <remark>备注信息</remark>
        <freight>邮费</freight>
        <subOrderType>hss</subOrderType>
        <responsibleDepartment>财务部</responsibleDepartment>
        <shopNick>旗舰店</shopNick>
        <shopCode>ssss</shopCode>
    </entryOrder>
    <orderLines>
        <orderLine>
            <outBizCode>O123</outBizCode>
            <orderLineNo>EL123</orderLineNo>
            <ownerCode>O123</ownerCode>
            <itemCode>I123</itemCode>
            <itemId>CI123</itemId>
            <itemName>IN123</itemName>
            <planQty>12</planQty>
            <inventoryType>ZP</inventoryType>
            <actualQty>36</actualQty>
            <productDate>2017-09-09</productDate>
            <expireDate>2017-09-09</expireDate>
            <produceCode>P1234</produceCode>
            <batchCode>PCODE123</batchCode>
            <batchs>
                <batch>
                    <batchCode>P1234</batchCode>
                    <productDate>2016-09-09</productDate>
                    <expireDate>2016-09-09</expireDate>
                    <produceCode>P1234</produceCode>
                    <inventoryType>ZP</inventoryType>
                    <actualQty>12</actualQty>
                </batch>
                <batch>
                    <batchCode>P1234</batchCode>
                    <productDate>2016-09-09</productDate>
                    <expireDate>2016-09-09</expireDate>
                    <produceCode>P1234</produceCode>
                    <inventoryType>ZP</inventoryType>
                    <actualQty>12</actualQty>
                </batch>
                <batch>
                    <batchCode>P1234</batchCode>
                    <productDate>2016-09-09</productDate>
                    <expireDate>2016-09-09</expireDate>
                    <produceCode>P1234</produceCode>
                    <inventoryType>ZP</inventoryType>
                    <actualQty>12</actualQty>
                </batch>
            </batchs>
            <remark>备注</remark>
            <unit>盒</unit>
            <snList>
                <sn>X1</sn>
                <sn>S2</sn>
                <sn>C3</sn>
            </snList>
        </orderLine>
        <orderLine>
            <outBizCode>O123</outBizCode>
            <orderLineNo>EL123</orderLineNo>
            <ownerCode>O123</ownerCode>
            <itemCode>I123</itemCode>
            <itemId>CI123</itemId>
            <itemName>IN123</itemName>
            <planQty>12</planQty>
            <inventoryType>ZP</inventoryType>
            <actualQty>36</actualQty>
            <productDate>2017-09-09</productDate>
            <expireDate>2017-09-09</expireDate>
            <produceCode>P1234</produceCode>
            <batchCode>PCODE123</batchCode>
            <batchs>
                <batch>
                    <batchCode>P1234</batchCode>
                    <productDate>2016-09-09</productDate>
                    <expireDate>2016-09-09</expireDate>
                    <produceCode>P1234</produceCode>
                    <inventoryType>ZP</inventoryType>
                    <actualQty>12</actualQty>
                </batch>
                <batch>
                    <batchCode>P1234</batchCode>
                    <productDate>2016-09-09</productDate>
                    <expireDate>2016-09-09</expireDate>
                    <produceCode>P1234</produceCode>
                    <inventoryType>ZP</inventoryType>
                    <actualQty>12</actualQty>
                </batch>
                <batch>
                    <batchCode>P1234</batchCode>
                    <productDate>2016-09-09</productDate>
                    <expireDate>2016-09-09</expireDate>
                    <produceCode>P1234</produceCode>
                    <inventoryType>ZP</inventoryType>
                    <actualQty>12</actualQty>
                </batch>
            </batchs>
            <remark>备注</remark>
            <unit>盒</unit>
            <snList>
                <sn>X1</sn>
                <sn>S2</sn>
                <sn>C3</sn>
            </snList>
        </orderLine>
        <orderLine>
            <outBizCode>O123</outBizCode>
            <orderLineNo>EL123</orderLineNo>
            <ownerCode>O123</ownerCode>
            <itemCode>I123</itemCode>
            <itemId>CI123</itemId>
            <itemName>IN123</itemName>
            <planQty>12</planQty>
            <inventoryType>ZP</inventoryType>
            <actualQty>36</actualQty>
            <productDate>2017-09-09</productDate>
            <expireDate>2017-09-09</expireDate>
            <produceCode>P1234</produceCode>
            <batchCode>PCODE123</batchCode>
            <batchs>
                <batch>
                    <batchCode>P1234</batchCode>
                    <productDate>2016-09-09</productDate>
                    <expireDate>2016-09-09</expireDate>
                    <produceCode>P1234</produceCode>
                    <inventoryType>ZP</inventoryType>
                    <actualQty>12</actualQty>
                </batch>
                <batch>
                    <batchCode>P1234</batchCode>
                    <productDate>2016-09-09</productDate>
                    <expireDate>2016-09-09</expireDate>
                    <produceCode>P1234</produceCode>
                    <inventoryType>ZP</inventoryType>
                    <actualQty>12</actualQty>
                </batch>
                <batch>
                    <batchCode>P1234</batchCode>
                    <productDate>2016-09-09</productDate>
                    <expireDate>2016-09-09</expireDate>
                    <produceCode>P1234</produceCode>
                    <inventoryType>ZP</inventoryType>
                    <actualQty>12</actualQty>
                </batch>
            </batchs>
            <remark>备注</remark>
            <unit>盒</unit>
            <snList>
                <sn>X1</sn>
                <sn>S2</sn>
                <sn>C3</sn>
            </snList>
        </orderLine>
    </orderLines>
    <extendProps>
        <xzz>111</xzz>
        <hhz>222</hhz>
    </extendProps>
</request>

返回示例(xml):

正确时返回:

<?xml version="1.0" encoding="utf-8"?>
<response>
 <flag>success|failure</flag>
 <code>响应码</code>
 <message>响应信息</message>
 <entryOrderId>仓储系统入库单编码</entryOrderId>
</response>'

错误时返回:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
    <flag>failure</flag>
    <code>failure</code>
    <message>请求奇门接口失败</message>
    <subCode>100002</subCode>
    <subMessage>请求奇门接口失败,错误原因:{"code":"TOP29","flag":"failure","message":"Invalid app Key","success":false}</subMessage>
    <requestId>ace95ef4cb9a4b42b2e6812a50745b64</requestId>
</response>

备注:

  • 更多返回错误代码请看首页的错误代码描述
文档更新时间: 2026-06-17 09:44   作者:黄会准