Skip to content

Inventory Data

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

Request address

  • API
EnvironmentURL
Testhttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/open_platform/data/sync/odm/inventory
Prodhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/open_platform/data/sync/odm/inventory
  • FTP
EnvironmentPartner directoryLenovo directoryFile 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

FrequencyTimeData amount
Daily or Real time0:00:00Daily version of data (full amount)

Request data description

TIP

Note: field requirements are different on bu, please refer to the following table

ParamKeyTypeRequiredPCG-NBMBG-MobileMDSC-TBPCG-DTPCG-DockingSmart DeviceLengthDescriptionExample
uidString32unique id
buYStringYYYYYYY50Business unitMDSC-TB
odmYStringYYYYYYY40ODM nameWINGTECH
odm_pnYStringYYYYYYY20ODM part numberBLXSD68C54106
lenovo_pnStringYYYYY18Lenovo part numberSD68C54106
material_typeStringYYYYY10Material type:DB/DS/BSDS
locationYStringYYYYYY50Storage location1005_HG66
location_descStringYYYYY100Storage location description
odm_qtyNumberYYYYYYY10,6odm quantity5
odm_hub_qtyNumberY10,6HUB quantiry2
poYIntegerYYYYYYY10Y for FG,others No must
unrestricted_qtyNumberYY10,6unrestricted quantity2
inspection_qtyNumberYY10,6inspection quantity
remarkString200remark2
block_qtyNumber10,6block quantity
versionYStringYYYYYY14version yyyyMMddHHmmss20220915080100
comment1String100reserved field
comment2String100reserved field

Response data description

ParamTypeDescription
codeString0: success, others:failed
msgStringthe 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": "45109112310",
      "lenovo_pn": "45109112310",
      "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"
        }]
    }]
}