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 nameems1
ems_pnYString20YEMS part numberparts1
lenovo_pnString18Y for material_type=DS /BS /FGLenovo part numberlnv_pn1
material_typeString10YFG/SFG/DB/DS/BS, fixed values as shown in AppendixDS
locationYString50YEMS storage locationABCD
location_descString100EMS storage location description
ems_qtyNumber10,6YEMS own inventory =unrestricted_qty+inspection_qty+block_qty1
ems_hub_qtyNumber10,6
poYString200YPurchase order number, use slash to concatenate multiple POs, put '0' for non-FGpo1
unrestricted_qtyNumber10,6Yunrestricted stock1
inspection_qtyNumber10,6Yinspection stock
block_qtyNumber10,6blocked stock1
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": "ems1",
      "ems_pn": "parts1",
      "lenovo_pn": "lnv_pn1",
      "material_type": "DS",
      "location": "ABCD",
      "location_desc": "12312312",
      "ems_qty": "104",
      "ems_hub_qty": "20",
      "po": "po1",
      "unrestricted_qty": "0.00",
      "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": "ems1",
            ...
        },
        "verify": [{
            "type": "value length exceed",
            "fields": "version"
        }]
    }]
}