Inventory Data
This interface is applicable for data integration API, read Api Access Process first
Request address
- API
| Environment | URL |
|---|---|
| Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/open_platform/data/sync/odm/inventory |
| Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/open_platform/data/sync/odm/inventory |
- FTP
| Environment | Partner directory | Lenovo directory | File name |
|---|---|---|---|
| Test | /Planning/SCC/{appName}/odm/inventory/ | /Planning/SCC/{appName}/odm/inventory/feedback/ | inventory_{crud}_{yyyyMMddHHmmss}_ |
| Prod | /Planning/SCC/{appName}/odm/inventory/ | /Planning/SCC/{appName}/odm/inventory/feedback/ | inventory_{crud}_{yyyyMMddHHmmss}_ |
Sample:/Planning/SCC/LCFC/odm/inventory/inventory_update_20220928123000_001
| Frequency | Time | Data amount |
|---|---|---|
| Daily or Real time | 0:00:00 | Daily version of data (full amount) |
Request data description
TIP
Note: field requirements are different on bu, please refer to the following table
| Param | Key | Type | Required | PCG-NB | MBG-Mobile | MDSC-TB | PCG-DT | PCG-Docking | Smart Device | Length | Description | Example |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| uid | String | 32 | unique id | |||||||||
| bu | Y | String | Y | Y | Y | Y | Y | Y | Y | 50 | Business unit | MDSC-TB |
| odm | Y | String | Y | Y | Y | Y | Y | Y | Y | 40 | ODM name | ABCD |
| odm_pn | Y | String | Y | Y | Y | Y | Y | Y | Y | 20 | ODM part number | **** |
| lenovo_pn | String | Y | Y | Y | Y | Y | 18 | Lenovo part number | **** | |||
| material_type | String | Y | Y | Y | Y | Y | 10 | Material type:DB/DS/BS | DS | |||
| location | Y | String | Y | Y | Y | Y | Y | Y | 50 | Storage location | **** | |
| location_desc | String | Y | Y | Y | Y | Y | 100 | Storage location description | ||||
| odm_qty | Number | Y | Y | Y | Y | Y | Y | Y | 10,6 | odm quantity | 5 | |
| odm_hub_qty | Number | Y | 10,6 | HUB quantiry | 2 | |||||||
| po | Y | String | Y | Y | Y | Y | Y | Y | Y | 200 | Y for FG,others No must | |
| unrestricted_qty | Number | Y | Y | 10,6 | unrestricted quantity | 2 | ||||||
| inspection_qty | Number | Y | Y | 10,6 | inspection quantity | |||||||
| remark | String | 200 | remark | 2 | ||||||||
| block_qty | Number | 10,6 | block quantity | |||||||||
| version | Y | String | Y | Y | Y | Y | Y | Y | 14 | version yyyyMMddHHmmss | 20220915080100 | |
| comment1 | String | 100 | reserved field | |||||||||
| comment2 | String | 100 | reserved field |
Response data description
| Param | Type | Description |
|---|---|---|
| code | String | 0: success, others:failed |
| msg | String | the detail message, especially useful on failure |
Request sample
json
{
"batch_id": "10097",
"batch_size": 1,
"seq_id": "1",
"seq_size": 1,
"data": [
{
"bu": "ThinkNB",
"odm": "LCFC",
"odm_pn": "****",
"lenovo_pn": "****",
"material_type": "DS",
"location": "1234",
"location_desc": "12312312",
"odm_qty": "104",
"odm_hub_qty": "20",
"po": "",
"unrestricted_qty": "2",
"inspection_qty": "2",
"remark": "",
"block_qty": "",
"version": "20220915020433",
"comment1": "",
"comment2": ""
}
]
}Success response sample
json
{
"code": "0",
"msg": "request success"
}Fail response sample
json
{
"code": "E00V00",
"msg": "data verification failed!",
"result": [{
"row": {
"odm": "LCFC",
...
},
"verify": [{
"type": "value length exceed",
"fields": "version"
}]
}]
}