Stock Out
以下接口适用于数据集成 API,对接前请了解 API 接入流程
发送数据到Lenovo
Description:3PL发送stock out的数据
Method:POST PUT DELETE
ContentType:application/json
Path:/3pl/stock_out
- API
| Env | URL |
|---|---|
| test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/open_platform/data/sync/3pl/stock_out |
| prd | https://api-cn.lenovo.com/v1.0/supply_chain/scc/open_platform/data/sync/3pl/stock_out |
业务数据说明
| 参数名称 | KEY | 必填 | 参数类型 | 长度 | 参数格式 | 描述 |
|---|---|---|---|---|---|---|
| uid | Y | Y | String | 32 | 数据行唯一标识 | |
| warehouse_name | Y | string | 40 | --- | e.g.:HE XN HUB, MTY CEVA, etc. length is around 30. this is provided by 3PL, SCC does not control it. | |
| stock_type | Y | string | 10 | SOI or LOI | ||
| lenovo_plant_code | Y | string | 30 | Lenovo SAP Plant Code | ||
| lenovo_storage_location | Y | string | 50 | Lenovo SAP Storage Location | ||
| lenovo_pn | Y | string | 30 | |||
| vendor_code | Y | string | 30 | |||
| posa | Y | string | 30 | |||
| posa_line | Y | string | 30 | |||
| aging_days | Y | string(integer) | 10 | |||
| stock_receiving_date | Y | string(datetime) | yyyy-MM-dd HH24:mm:ss | |||
| tpl_receiving_id | Y | string | 32 | XNG Receive No. | ||
| receipt_id | Y | string | 32 | |||
| line_id | Y | string | 32 | |||
| supplier_invoice_no | Y | string | 100 | suppiler invoice | ||
| supplier_delivery_note | Y | string | 100 | |||
| stock_receiving_type | Y | string | 20 | 1.通过PO/SA GR的 (SOI, LOI), rebalance in 2.SOI转LOI的LOI进 3.没有PO/SA的收货,但有3PL Pull No.的场景 4.除1,2,3之外,其他归为others (传数字代码) | ||
| order_type_in | string | 30 | 1.Normal Procurement a.for LOI, PO's GR b.for SOI, SA's GR as consigned stock c.for financing supplier, Po's GR asn consigned stock 2.Normal Buy Ahead a.75 PO approved by leadership b.GSM inform 3PL that buy ahead SOI convert to LOI 3.Special Buy Ahead a.GSM inform 3PL that this is special buy ahead, 3PL mark it here 4.Rebalance In 5.ODM Return | |||
| stock_issuing_type | Y | string | 30 | 1. VMI pull trigger的sell出库或者生产叫料出库 2. SOI转LOI的SOI出 3. Stock Transfer in Site (Out) (没有SO/PO/STO等的出库,HUB到HUB之间的转储) 4. Others 5. rebalance SO 出库,或者STO出库 (3PL给数字) | ||
| order_type_out | string | 30 | 1.Sales Order to ODM 2.Rebalance Out 3.SOI Reverse 4.Purchase Return 5.SOI Transfer to InvFin 6.Normal Buy Ahead SOI Out 7.Special Buy Ahead SOI Out 8.Transfer Between Customs Areas 9.SOI Transfer to LOI for MFG | |||
| tpl_goods_issue_no | Y | string | 1000 | XNG Pull No. | ||
| goods_issue_date | Y | string(datetime) | yyyy-MM-dd HH24:mm:ss | Pull Date | ||
| vmi_pull_id | Y | string | 32 | |||
| vmi_line_id | Y | string | 32 | |||
| delivery_quantity | Y | string(decimal) | 10,3 | |||
| odm | string | 32 | ||||
| ship_to | string | 50 | 1. 当HUB转HUB,填写目的地hub的名称。 2. 当卖给ODM,填写ODM name 缩写。 3. Others=NA | |||
| coo | Y | string | 30 | |||
| supplier_pn | string | 50 | ||||
| tpl_remark | string | 200 | any thing 3PL would like to remark | |||
| syn_date | Y | string(datetime) | yyyy-MM-dd HH24:mm:ss | when the record is uploaded, 显示最新的Syn Date. 格式是date+time | ||
| sender | Y | string | 50 | |||
| pull_date | Y | string(date) | yyyy-MM-dd | |||
| delivery_date | Y | string(date) | yyyy-MM-dd | |||
| comment1 | string | 100 | ||||
| comment2 | string | 100 |
请求示例
json
JSON
{
"batch_id": "11297",
"batch_size": 1,
"seq_id": "1",
"seq_size": 1,
"data": [
{
"uid": "2C437F1A87FC4874A73ED2F180F875B7",
"warehouse_name":"test_name",
"stock_type":"SOI",
"lenovo_plant_code":"code01",
"lenovo_storage_location":"location01",
"lenovo_pn":"pn01",
"vendor_code":"code01",
"posa":"",
"posa_line":"",
"aging_days":"",
"stock_receiving_date":"2023-9-10 23:43:22",
"tpl_receiving_id":"ud001",
"receipt_id":"23234324",
"line_id":"4335501",
"supplier_invoice_no":"",
"supplier_delivery_note":"",
"stock_receiving_type":"",
"order_type_in":"",
"stock_issuing_type":"",
"order_type_out":"",
"tpl_goods_issue_no":"",
"goods_issue_date":"2023-08-25 14:44:32",
"vmi_pull_id":"id3",
"vmi_line_id":"id2",
"delivery_quantity":"0.00",
"odm":"ABC",
"ship_to":"xxx",
"coo":"1",
"supplier_pn":"pn002",
"tpl_remark":"remark anything",
"syn_date":"2023-10-23 13:22:34",
"sender": "3pl",
"pull_date":"2024-03-13",
"delivery_date":"2024-03-13",
"comment1": "",
"comment2": ""
}
]
}xml
xml
<?xml version="1.0" encoding="UTF-8" ?>
<Req>
<batch_id>11397</batch_id>
<batch_size>1</batch_size>
<seq_id>1</seq_id>
<seq_size>1</seq_size>
<data>
<uid>2C437F1A87FC4874A73ED2F180F875B7</uid>
<warehouse_name>test_name</warehouse_name>
<stock_type>SOI</stock_type>
<lenovo_plant_code>code01</lenovo_plant_code>
<lenovo_storage_location>location01</lenovo_storage_location>
<lenovo_pn>pn01</lenovo_pn>
<vendor_code>code01</vendor_code>
<posa>1</posa>
<posa_line>2</posa_line>
<aging_days>3</aging_days>
<stock_receiving_date>2023-9-10 23:43:22</stock_receiving_date>
<tpl_receiving_id>ud001</tpl_receiving_id>
<receipt_id>23234324</receipt_id>
<line_id>4335501</line_id>
<supplier_invoice_no>2242</supplier_invoice_no>
<supplier_delivery_note>note_xx</supplier_delivery_note>
<stock_receiving_type>1</stock_receiving_type>
<order_type_in>1</order_type_in>
<stock_issuing_type>1</stock_issuing_type>
<order_type_out>2</order_type_out>
<tpl_goods_issue_no>3</tpl_goods_issue_no>
<goods_issue_date>2023-08-25 14:44:32</goods_issue_date>
<vmi_pull_id>id3</vmi_pull_id>
<vmi_line_id>id2</vmi_line_id>
<delivery_quantity>0.00</delivery_quantity>
<odm>ABC</odm>
<ship_to>xxx</ship_to>
<coo>1</coo>
<supplier_pn>pn002</supplier_pn>
<tpl_remark>remark anything</tpl_remark>
<syn_date>2023-10-23 13:22:34</syn_date>
<pull_date>2024-03-13</pull_date>
<delivery_date>2024-03-13</delivery_date>
<comment1></comment1>
<comment2></comment2>
</data>
<data>
...
</data>
</Req>返回成功示例
json
json
{
"code": "0",
"msg": "request success"
}xml
xml
<Resp>
<code>0</code>
<msg>request success!</msg>
<result>request success!</result>
</Resp>返回包含错误数据示例
json
json
{
"code": "E00V00",
"msg": "data verification failed!",
"result": {
"verify": {
"type": "value missing",
"fields": "tpl_receiving_id"
},
"row": {
"uid": "1233"
}
}
}xml
xml
<Resp>
<code>E00V00</code>
<msg>data verification failed!</msg>
<result>
<verify>
<type>value missing</type>
<fields>tpl_receiving_id</fields>
</verify>
<row>
<uid>1233</uid>
</row>
</result>
</Resp>