Inventory Data
This interface is applicable for data integration API, read Api Access Process first
frequency | time | data amount |
---|---|---|
Daily | 0:00 BJ Time | Daily version of data (full amount) |
- API
Env | URL |
---|---|
test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/open_platform/data/sync/ems/inventory |
prd | https://api-cn.lenovo.com/v1.0/supply_chain/scc/open_platform/data/sync/ems/inventory |
business data description
Parameter | Key | Field type | Field Length | Required | description | Example |
---|---|---|---|---|---|---|
bu | Y | String | 50 | Y | Lenovo business unit, fixed values as shown in Appendix, use slash to concatenate multiple BUs | IdeaNB/ThinkNB |
ems | Y | String | 40 | Y | EMS name | DIXON |
ems_pn | Y | String | 20 | Y | EMS part number | BLXSD68C54106 |
lenovo_pn | String | 18 | Y for material_type=DS /BS /FG | Lenovo part number | SD68C54106 | |
material_type | String | 10 | Y | FG/SFG/DB/DS/BS, fixed values as shown in Appendix | DS | |
location | Y | String | 50 | Y | EMS storage location | 1005_HG66 |
location_desc | String | 100 | EMS storage location description | |||
ems_qty | Number | 10,6 | Y | EMS own inventory =unrestricted_qty+inspection_qty+block_qty | 5 | |
ems_hub_qty | Number | 10,6 | ||||
po | Y | String | 200 | Y | Purchase order number, use slash to concatenate multiple POs, put '0' for non-FG | 7515830548 |
unrestricted_qty | Number | 10,6 | Y | unrestricted stock | 5 | |
inspection_qty | Number | 10,6 | Y | inspection stock | ||
block_qty | Number | 10,6 | blocked stock | 2 | ||
remark | String | 200 | ||||
version | Y | String | 14 | Y | Data cutoff time, yyyyMMddHHmmss | 20220915000000 |
comment1 | String | 100 | ||||
comment2 | String | 100 |
request sample
json
{
"batch_id": "10097",
"batch_size": 1,
"seq_id": "1",
"seq_size": 1,
"data": [
{
"bu": "IdeaNB/ThinkNB",
"ems": "DIXON",
"ems_pn": "BLXSD68C54106",
"lenovo_pn": "SD68C54106",
"material_type": "DS",
"location": "1005_HG66",
"location_desc": "12312312",
"ems_qty": "104",
"ems_hub_qty": "20",
"po": "7515830548",
"unrestricted_qty": "21.35",
"inspection_qty": "2",
"block_qty": "",
"remark": "",
"version": "20220915020433",
"comment1": "",
"comment2": ""
}
]
}
success response sample
json
{
"code": "0",
"msg": "request success"
}
failed response sample
json
{
"code": "E00V00",
"msg": "data verification failed!",
"result": [{
"row": {
"ems": "DIXON",
...
},
"verify": [{
"type": "value length exceed",
"fields": "version"
}]
}]
}