PRC AN
The following interfaces apply to API Data Integration
ASN Create AN
- Request address
| Environment | URL |
|---|---|
| Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/an/create_by_asn |
| Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/an/create_by_asn |
- Request data description
| Param | Key | Type | Required | Length | Format | Description | Example |
|---|---|---|---|---|---|---|---|
| deliveryNo | Y | string | Y | 16 | Lenovo delivery no | ||
| shipDate | Y | string | Y | 10 | ship date | ||
| truckLicense | string | N | 8 | truck license | |||
| driver | string | N | 100 | driver name | |||
| telOfDriver | string | N | 11 | driver phone | |||
| ttlCartonQty | number | N | 100 | total carton quantity | |||
| ttlGrossWeight | number | N | 100 | total gross weight |
- Response data description
| Param | Type | Required | Length | Description | Example |
|---|---|---|---|---|---|
| code | String | Y | 10 | response code | "0" |
| msg | String | Y | 10 | response message | "ok"/"error" |
| result | Object | N | response payload | refer to response sample |
- Request sample
json
{
"truckLicense": "****",
"driver": "张****",
"telOfDriver": "*****",
"ttlCartonQty": 10,
"ttlGrossWeight": 10,
"asnList": [
{
"deliveryNo": "****",
"shipDate": "2025-03-12"
},
{
"deliveryNo": "****",
"shipDate": "2025-03-12"
}
]
}- Successful response sample
json
{
"code": "0",
"msg": "ok",
"result": {
"anNo": "AN****"
}
}- Failed response sample
json
{
"code": "-1",
"msg": "error",
"result": [
{
"key": "TEST2022071320220713",
"errors": [
{
"field": "asnNo",
"message":[
{
"value": "TEST2022071320220713",
"error": "ASN not exists"
}
]
}
]
}
]
}- Business error code
| Error code | Error description | Resolution |
|---|---|---|
| -1 | result code | revise field value according to result message |
| 500 | server error | please contact IT with detail error message |
CDA Create AN
- Request address
| Environment | URL |
|---|---|
| Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/an/create_by_cda |
| Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/an/create_by_cda |
- Request data description
| Param | key | Type | Required | Length | Format | Description | Example |
|---|---|---|---|---|---|---|---|
| cdaNo | Y | string | Y | 50 | Customs declaration number | ||
| truckLicense | string | N | 8 | truck license | |||
| driver | string | N | 100 | driver name | |||
| telOfDriver | string | N | 11 | driver phone | |||
| ttlCartonQty | number | N | 100 | total caron quantity | |||
| ttlGrossWeight | number | N | 100 | total gross weight |
- Response data description
| Param | Type | Required | Length | Description | Example |
|---|---|---|---|---|---|
| code | String | Y | 10 | response code | "0" |
| msg | String | Y | 10 | response message | "ok"/"error" |
| result | Object | N | response payload | refer to response sample |
- Request sample
json
{
"truckLicense": "****1",
"driver": "张****",
"telOfDriver": "13****33",
"ttlCartonQty": 1,
"ttlGrossWeight": 1,
"cdaNoList": [
"202****1","20****2"
]
}- Successful response sample
json
{
"code": "0",
"msg": "ok",
"result": {
"anNo": "AN****"
}
}- Failed response sample
json
{
"code": "-1",
"msg": "error",
"result": [
{
"key": "TEST2022071320220713",
"errors": [
{
"field": "cdaNo",
"message":[
{
"value": "TEST2022071320220713",
"error": "CDA not exists"
}
]
}
]
}
]
}- Business error code
| Error code | Error description | Resolution |
|---|---|---|
| -1 | result code | revise field value according to result message |
| 500 | server error | please contact IT with detail error message |
Update AN
- Request address
| Environment | URL |
|---|---|
| Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/an/update |
| Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/an/update |
- Request data description
| Param | Type | Required | Length | Format | Description | Example |
|---|---|---|---|---|---|---|
| anNo | string | Y | Arrival notice | |||
| truckLicense | string | truck license | ||||
| driver | string | driver name | ||||
| telOfDriver | string | driver phone | ||||
| ttlCartonQty | number | total carton quantity | ||||
| ttlGrossWeight | number | total gross weight |
- Response data description
| Param | Type | Required | Length | Description | Example |
|---|---|---|---|---|---|
| code | String | Y | 10 | response code | "0" |
| msg | String | Y | 10 | response message | "ok"/"error" |
| result | Object | N | response payload | refer to response sample |
- Request sample
json
{
"anNo": "AN****",
"truckLicense": "***",
"driver": "张*",
"telOfDriver": "133*****",
"ttlCartonQty": 1,
"ttlGrossWeight": 1
}- Successful response sample
json
{
"code": "0",
"msg": "ok"
}- Failed response sample
json
{
"code": "-1",
"msg": "error",
"result": [
{
"key": "TEST2022071320220713",
"errors": [
{
"field": "anNo",
"message":[
{
"value": "TEST2022071320220713",
"error": "AN不存在"
}
]
}
]
}
]
}- Business error code
| Error code | Error description | Resolution |
|---|---|---|
| -1 | result code | revise field value according to result message |
| 500 | server error | please contact IT with detail error message |
Delete AN
- Request address
| Environment | URL |
|---|---|
| Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/an/delete |
| Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/an/delete |
- Request data description
| Param | Type | Required | Length | Format | Description | Example |
|---|---|---|---|---|---|---|
| anNo | Y | arrival notice |
- Response data description
| Param | Type | Required | Length | Description | Example |
|---|---|---|---|---|---|
| code | String | Y | 10 | response code | "0" |
| msg | String | Y | 10 | response message | "ok"/"error" |
| result | Object | N | response payload | refer to response sample |
- Request sample
json
[
{
"asnNo": "AN****"
}
]- Successful response sample
json
{
"code": "0",
"msg": "ok"
}- Failed response sample
json
{
"code": "-1",
"msg": "error",
"result": [
{
"key": "TEST2022071320220713",
"errors": [
{
"field": "anNo",
"message":[
{
"value": "TEST2022071320220713",
"error": "AN不存在"
}
]
}
]
}
]
}- Business error code
| Error code | Error description | Resolution |
|---|---|---|
| -1 | result code | revise field value according to result message |
| 500 | server error | please contact IT with detail error message |
Search AN
- Request address
| Environment | URL |
|---|---|
| Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/an/query |
| Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/an/query |
- Request data description
| Param | Type | Required | Length | Format | Description | Example |
|---|---|---|---|---|---|---|
| anNoList | Y | collection of anNo | ||||
| cdaNoList | collection of cdaNo | |||||
| asnNoList | collection of asnNo |
- Response data description
| Param | Type | Required | Length | Description | Example |
|---|---|---|---|---|---|
| code | String | Y | 10 | response code | "0" |
| msg | String | Y | 10 | response message | "ok"/"error" |
| result | Object | N | response payload | refer to response sample |
- Request sample
json
[
{
"anNoList": [
"AN2022071320220713",
"AN2022071320220714"
]
}
]- Successful response sample
json
{
"anNo": "AN****",
"driver": "张****",
"telOfDriver": "133****",
"ttlCartonQty": 1,
"ttlGrossWeight": 1,
"status": "Open",
"sysCreatedDate": "2022-08-01",
"sysCreatedBy": "***",
"sysModifyDate": "2022-08-01",
"sysModifyBy": "***",
"truckLicense": "****",
"eta": "2022-08-01",
"anItemList": [
{
"anNo": "AN****",
"anLine": "1",
"status": "Close",
"grQty": 10,
"deliveryQty": 10,
"sysCreatedDate": "2022-08-01",
"sysCreatedBy": "***",
"sysModifyDate": "2022-08-01",
"sysModifyBy": "****",
"type": "ASN",
"deliveryNote": "DN****",
"deliveryLine": "1",
"po": "****",
"poLine": "00010",
"coo": "CN",
"brand": "无品牌",
"lenovoPn": "******",
"cdaType": null,
"asnOrCdaNo": "DN*****"
}
]
}- Failed response sample
json
- Business error code
| Error code | Error description | Resolution |
|---|---|---|
| -1 | result code | revise field value according to result message |
| 500 | server error | please contact IT with detail error message |
Export AN File
- Request address
| Environment | URL |
|---|---|
| Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/an/export |
| Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/an/export |
- Request data description
| Param | Type | Required | Length | Format | Description | Example |
|---|---|---|---|---|---|---|
| anNoList | Y | Collection of anNo |
- Response data description
| Type | required | format | description | Example |
|---|---|---|---|---|
| stream | Y | ZIP | Compressed file |
- Request sample
json
[
{
"anNoList": [
"AN2022071320220713",
"AN2022071320220714"
]
}
]- Response sample
compressed file- Failed response sample
json
{
"code": "-1",
"msg": "error",
"result": [
{
"key": "TEST2022071320220713",
"errors": [
{
"field": "anNo",
"message":[
{
"value": "TEST2022071320220713",
"error": "AN not exists"
}
]
}
]
}
]
}- Business error code
| Error code | Error description | Resolution |
|---|---|---|
| -1 | result code | revise field value according to result message |
| 500 | server error | please contact IT with detail error message |
