Skip to content

Inventory Data

This interface is applicable for data integration API, read Api Access Process first

frequencytimedata amount
Daily0:00 BJ TimeDaily version of data (full amount)
  • API
EnvURL
testhttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/open_platform/data/sync/ems/inventory
prdhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/open_platform/data/sync/ems/inventory

business data description

ParameterKeyField typeField LengthRequireddescriptionExample
buYString50YLenovo business unit, fixed values as shown in Appendix, use slash to concatenate multiple BUsIdeaNB/ThinkNB
emsYString40YEMS nameDIXON
ems_pnYString20YEMS part numberBLXSD68C54106
lenovo_pnString18Y for material_type=DS /BS /FGLenovo part numberSD68C54106
material_typeString10YFG/SFG/DB/DS/BS, fixed values as shown in AppendixDS
locationYString50YEMS storage location1005_HG66
location_descString100EMS storage location description
ems_qtyNumber10,6YEMS own inventory =unrestricted_qty+inspection_qty+block_qty5
ems_hub_qtyNumber10,6
poYString200YPurchase order number, use slash to concatenate multiple POs, put '0' for non-FG7515830548
unrestricted_qtyNumber10,6Yunrestricted stock5
inspection_qtyNumber10,6Yinspection stock
block_qtyNumber10,6blocked stock2
remarkString200
versionYString14YData cutoff time, yyyyMMddHHmmss20220915000000
comment1String100
comment2String100

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"
        }]
    }]
}