简要描述:
- 出库单确认
接口说明:
- 1.1接口描述:WMS调用接口,回传出库单信息
- 1.2接口说明:货品出库后,WMS将状态回传给 ERP, ERP 自行决定如何处理。
- 1.3接口方法: taobao.qimen.stockout.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.stockout.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
| 参数名 | 字段 | 是否必须 | 类型 | 说明 |
|---|---|---|---|---|
| 出库单信息 | deliveryOrder | 否 | data | 出库单信息 |
| 包裹信息 | packages | 否 | data[] | 包裹信息 |
| 订单信息 | orderLines | 否 | data[] | 订单信息 |
| 扩展属性 | extendProps | 否 | data | 扩展属性 |
deliveryOrder
| 参数名 | 字段 | 是否必须 | 类型 | 说明 |
|---|---|---|---|---|
| 单据总行数 | totalOrderLines | 否 | long | 单据总行数 |
| 出库单号 | deliveryOrderCode | 是 | String | 出库单号 |
| 仓储系统出库单号 | deliveryOrderId | 否 | String | 仓储系统出库单号 |
| 仓库编码 | warehouseCode | 是 | String | 仓库编码 |
| 出库单类型 | orderType | 否 | String | 出库单类型 |
| 出库单状态 | status | 是 | String | 出库单状态 |
| 外部业务编码 | outBizCode | 是 | String | 外部业务编码 |
| 支持出库单多次发货的状态位 | confirmType | 否 | String | 支持出库单多次发货的状态位 |
| 物流公司编码 | logisticsCode | 否 | String | 物流公司编码 |
| 物流公司名称 | logisticsName | 否 | String | 物流公司名称 |
| 运单号 | expressCode | 是 | String | 运单号 |
| 订单完成时间 | orderConfirmTime | 否 | String | 订单完成时间 |
| 该笔出库单的费用承担部门或责任部门 | responsibleDepartment | 否 | String | 该笔出库单的费用承担部门或责任部门 |
| 出库单确认其他出库单的子类型 | subOrderType | 是 | String | 出库单确认其他出库单的子类型,用于 orderType设置为其他 出库单时设置 |
package
| 参数名 | 字段 | 是否必须 | 类型 | 说明 |
|---|---|---|---|---|
| 物流公司名称 | logisticsName | 否 | String | 物流公司名称 |
| 运单号 | expressCode | 否 | String | 运单号 |
| 包裹编号 | packageCode | 否 | String | 包裹编号 |
| 生产批号 | produceCode | 否 | String | 生产批号 |
| 包裹长度 | length | 否 | String | 包裹长度(厘米) |
| 包裹宽度 | width | 否 | String | 包裹宽度(厘米) |
| 包裹高度 | height | 否 | String | 包裹高度(厘米) |
| 包裹重量 | weight | 否 | String | 包裹重量(千克) |
| 包裹体积 | volume | 否 | String | 包裹体积(升) |
| packageMaterialList | packageMaterialList | 否 | data[] | packageMaterialList,节点下数据字段详见下述“packageMaterial” |
| items | items | 否 | String | 包裹长度(厘米),节点下数据字段详见下述“item” |
packageMaterial
| 参数名 | 字段 | 是否必须 | 类型 | 说明 |
|---|---|---|---|---|
| 包材型号 | type | 否 | String | 包材型号 |
| 包材的数量 | quantity | 否 | String | 包材的数量 |
item
| 参数名 | 字段 | 是否必须 | 类型 | 说明 |
|---|---|---|---|---|
| 商品编码 | itemCode | 是 | String | 商品编码 |
| 商品仓储系统编码 | itemId | 否 | String | 商品仓储系统编码 |
| 包裹内该商品的数量 | quantity | 是 | long | 包裹内该商品的数量 |
orderLines
| 参数名 | 字段 | 是否必须 | 类型 | 说明 |
|---|---|---|---|---|
| 外部业务编码 | outBizCode | 否 | String | 外部业务编码 |
| 单据行号 | orderLineNo | 否 | String | 单据行号 |
| 商品编码 | itemCode | 是 | String | 商品编码 |
| 商品仓储系统编码 | itemId | 否 | String | 商品仓储系统编码 |
| 商品名称 | itemName | 否 | String | 商品名称 |
| 库存类型 | 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 | 库存类型 |
| 实发数量 | actualQty | 否 | long | 实发数量 |
snList
| 参数名 | 字段 | 是否必须 | 类型 | 说明 |
|---|---|---|---|---|
| sn编码 | sn | 否 | String[] | sn编码 |
返回参数:
response
| 参数名 | 类型 | 说明 |
|---|---|---|
| flag | String | 响应结果:success |
| code | String | 响应码 |
| message | String | 响应信息 |
| requestId | String | 查询返回的唯一编码 |
请求示例(xml)
<?xml version="1.0" encoding="UTF-8" ?>
<request>
<deliveryOrder>
<totalOrderLines>1</totalOrderLines>
<deliveryOrderCode>Ox123456</deliveryOrderCode>
<deliveryOrderId>Dx123456</deliveryOrderId>
<warehouseCode>Wx123456</warehouseCode>
<orderType>PTCK</orderType>
<status>NEW</status>
<outBizCode>23456</outBizCode>
<confirmType>1</confirmType>
<logisticsCode>SF</logisticsCode>
<logisticsName>顺丰</logisticsName>
<expressCode>Q123456</expressCode>
<orderConfirmTime>2015-09-12 12:00:00</orderConfirmTime>
<responsibleDepartment>财务部</responsibleDepartment>
<subOrderType>hss</subOrderType>
</deliveryOrder>
<packages>
<package>
<logisticsName>顺丰</logisticsName>
<expressCode>O987654</expressCode>
<packageCode>L123456</packageCode>
<length>12</length>
<width>11</width>
<height>11</height>
<weight>11</weight>
<volume>12</volume>
<packageMaterialList>
<packageMaterial>
<type>XL</type>
<quantity>11</quantity>
</packageMaterial>
<packageMaterial>
<type>DL</type>
<quantity>13</quantity>
</packageMaterial>
<packageMaterial>
<type>TL</type>
<quantity>12</quantity>
</packageMaterial>
</packageMaterialList>
<items>
<item>
<itemCode>JO123456</itemCode>
<itemId>TO67890</itemId>
<quantity>1</quantity>
</item>
<item>
<itemCode>JO123456</itemCode>
<itemId>TO67890</itemId>
<quantity>2</quantity>
</item>
<item>
<itemCode>JO123456</itemCode>
<itemId>TO67890</itemId>
<quantity>3</quantity>
</item>
</items>
</package>
</packages>
<orderLines>
<orderLine>
<outBizCode>O123456</outBizCode>
<orderLineNo>1</orderLineNo>
<itemCode>SH123456</itemCode>
<itemId>Q123456</itemId>
<itemName>小都进</itemName>
<inventoryType>ZP</inventoryType>
<actualQty>10</actualQty>
<batchCode>P12</batchCode>
<productDate>2015-09-12</productDate>
<expireDate>2015-09-12</expireDate>
<produceCode>P23</produceCode>
<batchs>
<batch>
<batchCode>P234</batchCode>
<productDate>2015-09-12</productDate>
<expireDate>2015-09-12</expireDate>
<produceCode>P23456</produceCode>
<inventoryType>ZP</inventoryType>
<actualQty>2</actualQty>
</batch>
<batch>
<batchCode>P234</batchCode>
<productDate>2015-09-12</productDate>
<expireDate>2015-09-12</expireDate>
<produceCode>P23456</produceCode>
<inventoryType>ZP</inventoryType>
<actualQty>5</actualQty>
</batch>
<batch>
<batchCode>P234</batchCode>
<productDate>2015-09-12</productDate>
<expireDate>2015-09-12</expireDate>
<produceCode>P23456</produceCode>
<inventoryType>ZP</inventoryType>
<actualQty>3</actualQty>
</batch>
</batchs>
<unit>个</unit>
<snList>
<sn>x1</sn>
<sn>LX</sn>
<sn>DA</sn>
</snList>
</orderLine>
<orderLine>
<outBizCode>O123456</outBizCode>
<orderLineNo>1</orderLineNo>
<itemCode>SH123456</itemCode>
<itemId>Q123456</itemId>
<itemName>小都进</itemName>
<inventoryType>ZP</inventoryType>
<actualQty>10</actualQty>
<batchCode>P12</batchCode>
<productDate>2015-09-12</productDate>
<expireDate>2015-09-12</expireDate>
<produceCode>P23</produceCode>
<batchs>
<batch>
<batchCode>P234</batchCode>
<productDate>2015-09-12</productDate>
<expireDate>2015-09-12</expireDate>
<produceCode>P23456</produceCode>
<inventoryType>ZP</inventoryType>
<actualQty>2</actualQty>
</batch>
<batch>
<batchCode>P234</batchCode>
<productDate>2015-09-12</productDate>
<expireDate>2015-09-12</expireDate>
<produceCode>P23456</produceCode>
<inventoryType>ZP</inventoryType>
<actualQty>5</actualQty>
</batch>
<batch>
<batchCode>P234</batchCode>
<productDate>2015-09-12</productDate>
<expireDate>2015-09-12</expireDate>
<produceCode>P23456</produceCode>
<inventoryType>ZP</inventoryType>
<actualQty>3</actualQty>
</batch>
</batchs>
<unit>个</unit>
<snList>
<sn>x1</sn>
<sn>LX</sn>
<sn>DA</sn>
</snList>
</orderLine>
<orderLine>
<outBizCode>O123456</outBizCode>
<orderLineNo>1</orderLineNo>
<itemCode>SH123456</itemCode>
<itemId>Q123456</itemId>
<itemName>小都进</itemName>
<inventoryType>ZP</inventoryType>
<actualQty>10</actualQty>
<batchCode>P12</batchCode>
<productDate>2015-09-12</productDate>
<expireDate>2015-09-12</expireDate>
<produceCode>P23</produceCode>
<batchs>
<batch>
<batchCode>P234</batchCode>
<productDate>2015-09-12</productDate>
<expireDate>2015-09-12</expireDate>
<produceCode>P23456</produceCode>
<inventoryType>ZP</inventoryType>
<actualQty>2</actualQty>
</batch>
<batch>
<batchCode>P234</batchCode>
<productDate>2015-09-12</productDate>
<expireDate>2015-09-12</expireDate>
<produceCode>P23456</produceCode>
<inventoryType>ZP</inventoryType>
<actualQty>5</actualQty>
</batch>
<batch>
<batchCode>P234</batchCode>
<productDate>2015-09-12</productDate>
<expireDate>2015-09-12</expireDate>
<produceCode>P23456</produceCode>
<inventoryType>ZP</inventoryType>
<actualQty>3</actualQty>
</batch>
</batchs>
<unit>个</unit>
<snList>
<sn>x1</sn>
<sn>LX</sn>
<sn>DA</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>
</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>备注:
- 更多返回错误代码请看首页的错误代码描述
文档更新时间: 2020-08-07 14:29 作者:黄会准