This interface is applicable for data integration API, read Api Access Process first
send data to Lenovo
Description:3PL send stock out data to Lenovo
Method:POST PUT DELETE
ContentType:application/json application/xml
Path:/3pl/stock_out
| Environment | URL |
|---|---|
| test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/open_platform/data/sync/3pl/stock_out |
| prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/open_platform/data/sync/3pl/stock_out |
Business data description
| field | KEY | required | field type | length | format | description |
|---|---|---|---|---|---|---|
| uid | Y | Y | String | 32 | a unique ID to identity records for update or delete | |
| 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.Purchase GR (SOI GR, LOI GR) 2.SOI Tranfer to LOI 3.Stock Transfer in Site (In) 4.ODM Return 5.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.SOI Trasnfer to LOI 2.RMA Out 3.Sales Order Delivery 4.Pull to MFG 5.Rebalance Out 6.Stock Transfer in Site (Out) 7.Others | ||
| 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 | ||||
| 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 |
request sample
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>success response sample
json
json
{
"code": "0",
"msg": "request success"
}xml
xml
<Resp>
<code>0</code>
<msg>request success!</msg>
<result>request success!</result>
</Resp>failed response sample
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>