Skip to content

Inventory 数据

以下接口适用于 通用数据集成

请求地址

  • API
环境URL
测试https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/open_platform/data/sync/odm/inventory
正式https://api-cn.lenovo.com/v1.0/supply_chain/scc/open_platform/data/sync/odm/inventory
  • FTP
环境合作伙伴 文件目录Lenovo 文件目录文件名
测试/Planning/SCC/{appName}/odm/inventory//Planning/SCC/{appName}/odm/inventory/feedback/inventory_{crud}_{yyyyMMddHHmmss}_
正式/Planning/SCC/{appName}/odm/inventory//Planning/SCC/{appName}/odm/inventory/feedback/inventory_{crud}_{yyyyMMddHHmmss}_

例子:/Planning/SCC/LCFC/odm/inventory/inventory_update_20220928123000_001

频率时间传输方式
Daily or Real time0:00:00Daily version of data (full amount)

请求参数

TIP

注意BU不同时,请参考对应列

参数key类型default 必填PCG-NB 必填MBG-Mobile 必填MDSC-TB 必填PCG-DT 必填PCG-Docking 必填Smart Device 必填长度描述示例
uidString32数据行唯一标识,存在按 uid 变更,不存在按 业务 key 变更
buYStringYYYYYYY50BU 取固定值字段,多个 BU Common 就显示所有 BU 用"/"连接MDSC-TB
odmYStringYYYYYYY40ODM 名称WINGTECH
odm_pnYStringYYYYYYY20ODM 的料号BLXSD68C54106
lenovo_pnStringYYYYY18联想料号(当 Material Type 是 DS or BS 时,必填)SD68C54106
material_typeStringYYYYY10物料类型:DB/DS/BSDS
locationYStringYYYYYY50储位库位,LCFC 通过库位分辨库存的 Status1005_HG66
location_descStringYYYYY100如果 ODM 同一个 location 有不同 type(L/M/N)
如果 ODM 同一个 location 没有有不同 type(L/M/N)
海格平板整机原材不良仓
odm_qtyNumberYYYYYYY10,6I=L+M+N 按照系统实际数字摆放5
odm_hub_qtyNumberY10,6HUB 库存2
poYIntegerYYYYYYY10Y for FG,others No must
unrestricted_qtyNumberYY10,6按照系统实际数字摆放零2
inspection_qtyNumberYY10,6按照系统实际数字摆放零
remarkString200按照系统实际数字摆放零2
block_qtyNumber10,6No must(根据 ODM SAP 设置储位匹配状况选择填或者不填
versionYStringYYYYYY14数据抓取时间 yyyyMMddHHmmss20220915080100
comment1String100预留字段,以备之后使用
comment2String100预留字段,以备之后使用

响应参数

参数类型是否必填描述
codeStringY0 成功其它失败
msgStringY响应具体信息

请求示例

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

响应示例

json
{
  "code": "0",
  "msg": "request success"
}

异常示例

json
{
    "code": "E00V00",
    "msg": "data verification failed!",
    "result": [{
        "row": {
            "odm": "LCFC",
            ...
        },
        "verify": [{
            "type": "value length exceed",
            "fields": "version"
        }]
    }]
}

业务错误码

错误码错误描述解决方案