ODM PO Data Integration Report
The following interfaces apply to General Data Query
Request URL
- API
获取token接口:
| Environment | URL (TBD) |
|---|---|
| Test | https://apihub-test.lenovo.com/token |
| Prod | https://apihub.lenovo.com/token |
Request Parameters
| field | Type | required | description | length | |
|---|---|---|---|---|---|
| body | |||||
| username | String | Y | |||
| password | String | Y | |||
| header | |||||
| X-API-KEY | String | Y |
参数值
Response Example
json
{
"access_token": "AAAAAA********************AAAAA",
"expires_in": 300,
"refresh_expires_in": 1800,
"refresh_token": "********",
"token_type": "Bearer",
"not-before-policy": 0,
"session_state": "********",
"scope": "email profile"
}Request URL
Request Parameters
| field | Type | required | description | length | |
|---|---|---|---|---|---|
| header | |||||
| Authorization | String | Y | 200 | ||
| X-API-KEY | String | Y | 200 | ||
| body | |||||
| mainPoNo | String | Y | 50 | ||
| mainPoLine | String | Y | 20 | ||
| po | String | Y | 20 | ||
| poLine | String | Y | 20 | ||
| poQty | Double | N | |||
| deliveryNote | String | N | 20 | ||
| confirmedEtd | Date | N | |||
| odmPoChangeRequest | String | N | 500 | ||
| inputDate | Date | N | yyyy-MM-dd | ||
| outputDate | Date | N | yyyy-MM-dd | ||
| mrDate | Date | N | yyyy-MM-dd | ||
| reasonCode | String | N | 100 |
Response Parameters
| field | key | Type | description | sample |
|---|---|---|---|---|
| code | string | 0 | ||
| msg | string |
Request Example
header
| name | value |
|---|---|
| Authorization | Bearer AAAAAA********************AAAAA |
| X-API-KEY | ******** |
body
{
"batch_id":"10067",
"data":[{
"mainPoNo": "po1",
"mainPoLine": "00010",
"po": "po1",
"poLine": "00010",
"poQty": 20,
"deliveryNote": "dn",
"confirmedEtd": "2024-11-07",
"odmPoChangeRequest": "********",
"inputDate": "2025-02-17",
"outputDate": "2025-02-17",
"mrDate": "2025-02-17",
"reasonDate": "********"
}]
}Response Example
json
{
"code": "0",
"message": ""
}Error Example
json
{
"code": "-1",
"message": "System error. Please try again later or contact your system administrator!"
}Business Error code
| error code | error description | solutions |
|---|---|---|
