This interface is applicable for data integration API, read Api Access Process first
send data to Lenovo
Description:3PL send stock data to Lenovo
Method:POST
ContentType:application/json
application/xml
Path:/3pl/stock
Environment | URL |
---|---|
test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/open_platform/data/sync/3pl/stock |
prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/open_platform/data/sync/3pl/stock |
Business data description
field | required | field type | length | format | description |
---|---|---|---|---|---|
uid | 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 | 50 | ||
vendor_code | Y | string | 50 | ||
posa | Y | string | 50 | ||
posa_line | Y | string | 50 | ||
stock_receiving_date | Y | datetime | yyyy-MM-dd HH24:mm:ss | ||
tpl_receiving_id | Y | string | 50 | ||
receipt_id | Y | string | 50 | ||
line_id | Y | string | 50 | ||
supplier_invoice_no | Y | string | 50 | commercial invoice number | |
supplier_delivery_note | Y | string | 50 | ||
stock_receiving_type | Y | string | 50 | 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 | 50 | |||
mpq | Y | integer | 10 | ||
bin | Y | string | 30 | ||
available_quantity | Y | decimal | 10,3 | the quanity could be concumed or move without restriction. | |
ng_qty | Y | decimal | 10,3 | unqualified quantity after quality check in inventory | |
pending_quantity | Y | decimal | 10,3 | the quantity could not be used. | |
waiting_sort_quantity | Y | decimal | 10,3 | waiting for sorting, and could not be used/moved | |
sorting_quantity | Y | decimal | 10,3 | the quantity is being sorting. | |
hold_quantity | Y | decimal | 10,3 | reserved stock for special purpose. | |
odm_reserved_quantity | Y | decimal | 10,3 | ||
aging_days | Y | integer | 10 | ||
coo | Y | string | 50 | ||
supplier_pn | string | 50 | |||
tpl_issuing_no | string | 50 | |||
tpl_remark | string | 200 | any thing 3PL would like to remark | ||
syn_date | Y | datetime | yyyy-MM-dd HH24:mm:ss | when the record is uploaded | |
sender | Y | string | 50 | ||
version | Y | string | 8 | yyyyMMdd | |
comment1 | string | 100 | |||
comment2 | string | 100 |
request sample
json
JSON
{
"batch_id": "11297",
"batch_size": 1,
"seq_id": "1",
"seq_size": 1,
"data": [
{
"warehouse_name":"test_name",
"stock_type":"SOI",
"lenovo_plant_code":"code-1",
"lenovo_storage_location":"location_1",
"lenovo_pn":"pn01",
"vendor_code":"vendor001",
"posa":"tst",
"posa_line":"tst",
"stock_receiving_date":"2023-09-20 12:23:31",
"tpl_receiving_id":"0232823233343",
"receipt_id":"102343",
"line_id":"30233",
"supplier_invoice_no":"",
"supplier_delivery_note":"",
"stock_receiving_type":"",
"order_type_in":"",
"mpq": "1",
"bin":"bin1",
"available_quantity":"233.23",
"ng_qty":"1.23",
"sorting_quantity":"233.23",
"hold_quantity":"233.23",
"odm_reserved_quantity":"233.23",
"pending_quantity": 12.23,
"waiting_sort_quantity":23.12,
"aging_days":"2",
"coo":"xx",
"supplier_pn":"pn01",
"tpl_issuing_no":"any thing to remark",
"tpl_remark":"any thing to remark",
"syn_date": "2023-10-24 23:32:12",
"sender": "3pl"
}
]
}
xml
xml
<?xml version="1.0" encoding="UTF-8" ?>
<Req>
<batch_id>11298</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>code-1</lenovo_plant_code>
<lenovo_storage_location>location_1</lenovo_storage_location>
<lenovo_pn>pn01</lenovo_pn>
<vendor_code>vendor001</vendor_code>
<posa>tst</posa>
<posa_line>tst</posa_line>
<stock_receiving_date>2023-09-20 12:23:31</stock_receiving_date>
<tpl_receiving_id>0232823233343</tpl_receiving_id>
<receipt_id>102343</receipt_id>
<line_id>30233</line_id>
<supplier_invoice_no>123</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>
<mpq>1</mpq>
<bin>bin1</bin>
<available_quantity>233.23</available_quantity>
<ng_qty>1.23</ng_qty>
<sorting_quantity>233.23</sorting_quantity>
<hold_quantity>233.23</hold_quantity>
<odm_reserved_quantity>233.23</odm_reserved_quantity>
<pending_quantity>12.23</pending_quantity>
<waiting_sort_quantity>23.12</waiting_sort_quantity>
<aging_days>2</aging_days>
<coo>xx</coo>
<supplier_pn>pn01</supplier_pn>
<tpl_issuing_no>any thing to remark</tpl_issuing_no>
<tpl_remark>any thing to remark</tpl_remark>
<syn_date>2023-10-24 23:32:12</syn_date>
<sender>3pl</sender>
</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>