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 | 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 | 50 | 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 | ||||
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 | ||||
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 | ||
sender | Y | string | 50 | |||
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":"1.23",
"odm":"",
"ship_to":"xxx",
"coo":"",
"supplier_pn":"pn002",
"tpl_remark":"remark anything",
"syn_date":"2023-10-23 13:22:34",
"sender": "3pl",
"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>1233</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>1.23</delivery_quantity>
<odm></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>
<sender>3pl</sender>
<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>