Skip to content

PRC AN

The following interfaces apply to API Data Integration

ASN Create AN

  • Request address
EnvironmentURL
Testhttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/an/create_by_asn
Prodhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/an/create_by_asn
  • Request data description
ParamKeyTypeRequiredLengthFormatDescriptionExample
deliveryNoYstringY16Lenovo delivery no
shipDateYstringY10ship date
truckLicensestringN8truck license
driverstringN100driver name
telOfDriverstringN11driver phone
ttlCartonQtynumberN100total carton quantity
ttlGrossWeightnumberN100total gross weight
  • Response data description
ParamTypeRequiredLengthDescriptionExample
codeStringY10response code"0"
msgStringY10response message"ok"/"error"
resultObjectNresponse payloadrefer 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 codeError descriptionResolution
-1result coderevise field value according to result message
500server errorplease contact IT with detail error message

CDA Create AN

  • Request address
EnvironmentURL
Testhttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/an/create_by_cda
Prodhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/an/create_by_cda
  • Request data description
ParamkeyTypeRequiredLengthFormatDescriptionExample
cdaNoYstringY50Customs declaration number
truckLicensestringN8truck license
driverstringN100driver name
telOfDriverstringN11driver phone
ttlCartonQtynumberN100total caron quantity
ttlGrossWeightnumberN100total gross weight
  • Response data description
ParamTypeRequiredLengthDescriptionExample
codeStringY10response code"0"
msgStringY10response message"ok"/"error"
resultObjectNresponse payloadrefer 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 codeError descriptionResolution
-1result coderevise field value according to result message
500server errorplease contact IT with detail error message

Update AN

  • Request address
EnvironmentURL
Testhttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/an/update
Prodhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/an/update
  • Request data description
ParamTypeRequiredLengthFormatDescriptionExample
anNostringYArrival notice
truckLicensestringtruck license
driverstringdriver name
telOfDriverstringdriver phone
ttlCartonQtynumbertotal carton quantity
ttlGrossWeightnumbertotal gross weight
  • Response data description
ParamTypeRequiredLengthDescriptionExample
codeStringY10response code"0"
msgStringY10response message"ok"/"error"
resultObjectNresponse payloadrefer 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 codeError descriptionResolution
-1result coderevise field value according to result message
500server errorplease contact IT with detail error message

Delete AN

  • Request address
EnvironmentURL
Testhttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/an/delete
Prodhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/an/delete
  • Request data description
ParamTypeRequiredLengthFormatDescriptionExample
anNoYarrival notice
  • Response data description
ParamTypeRequiredLengthDescriptionExample
codeStringY10response code"0"
msgStringY10response message"ok"/"error"
resultObjectNresponse payloadrefer 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 codeError descriptionResolution
-1result coderevise field value according to result message
500server errorplease contact IT with detail error message

Search AN

  • Request address
EnvironmentURL
Testhttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/an/query
Prodhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/an/query
  • Request data description
ParamTypeRequiredLengthFormatDescriptionExample
anNoListYcollection of anNo
cdaNoListcollection of cdaNo
asnNoListcollection of asnNo
  • Response data description
ParamTypeRequiredLengthDescriptionExample
codeStringY10response code"0"
msgStringY10response message"ok"/"error"
resultObjectNresponse payloadrefer 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 codeError descriptionResolution
-1result coderevise field value according to result message
500server errorplease contact IT with detail error message

Export AN File

  • Request address
EnvironmentURL
Testhttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/an/export
Prodhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/an/export
  • Request data description
ParamTypeRequiredLengthFormatDescriptionExample
anNoListYCollection of anNo
  • Response data description
TyperequiredformatdescriptionExample
streamYZIPCompressed 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 codeError descriptionResolution
-1result coderevise field value according to result message
500server errorplease contact IT with detail error message