General data integration API solution
A unified API solution for partners to query data from Lenovo. Please understand the API access process before connecting.
Request address
Public request parameters
Before calling, please obtain Token first
| Parameter location | Parameter name | Description | Remarks |
|---|---|---|---|
| Http Method | POST | ||
| - | - | - | - |
| Header | Authorization | Bearer + space + Token | Bearer aa*******019d |
| - | - | - | - |
| Url Path | data_category | Data classification | Refer to the specific data interface URL |
| Url Path | biz_key | Business keyword | Refer to the specific data interface URL |
Public request parameters
| Position | Name | Required | Type | Length | Description |
|---|---|---|---|---|---|
| Body | appName | String | 10 | Partner short name, optional | |
| Body | pageNo | Y | String | 5 | Page number |
| Body | pageSize | Y | String | 5 | Amount of data per page |
| Body | criteria | N | Map | Query conditions |
Public response parameters
| Location | Name | Required | Type | Format | Description | Example |
|---|---|---|---|---|---|---|
| Body | code | Y | String | --- | Status code | "0" represents success, other failures can refer to the return code |
| Body | msg | N | String | --- | Prompt message | If it is not "0", an error message will be prompted |
| Body | result | N | object/array | --- | data body |
Request example
POST https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/data/query/odm/DemoData
Header Authorization = Bearer aa*****019d
- Content-Type application/json
json
{
"pageNo": 1,
"pageSize": 10,
"criteria": {
"vendorCode": "****",
"lastModifiedDate": "2023-10-24 00:02:08"
}
}- Response example
json
{
"code": "0",
"msg": "request success!",
"result": {
"total": 15,
"data": [
{
"lpart_category": "PRODUCT",
"odm": "ABCD",
....
},
....
]
}
}- Exception examples
json
{
"code": "-1",
"msg": "System error!",
"result": null
}General error code description
| Parameter position | Value | Description |
|---|---|---|
| httpcode | 200 | Normal return result |
| httpcode | 401 | Token error/Signature error |
| httpcode | 404 | The accessed path does not exist |
| httpcode | 500 | Server error |
| body.code | "0" | Success |
| body.code | "-1" | System error |
