Skip to content

BUD CDA Interface

The following interfaces are applicable to the CDA data integration API. Please understand before docking API 接入流程

Create CDA (REQUEST TYPE : POST)

  • Request Url
ENVURL
UAThttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/cda/bud/create
PRDhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/cda/bud/create
  • params
paramstyperequiredlengthdescexample
cdaIdStringN50Return after successful creationRID_1234567
cdaNoStringN50Return after successful creationCDA2023091100022
mrnStringN50MRN110001
trackingIdStringY50Tracking ID (HAWB/HBL/CMR)CODE0000001
mawbStringN50if Mode of Transport contains air, the field 'MAWB' must not be null!1234
forwarderStringY50Courier/ForwarderCODE0000001
containerNoStringN50if Mode of Transport is sea, the field 'Container No.' must not be null!CODE0000001
containerSizeStringN50if Mode of Transport is sea, the field 'Container Size' must not be null!CODE0000001
modeOfTransportStringY50Mode of TransportCODE0000001
invoiceStringY50InvoiceCODE0000001
bondStringY50BondedY/N
portOfDischargeStringN50if Mode of Transport is not truck or mail, the field 'Port of discharge' must not be null!CODE0000001
chargeableWeightNumberN50if Mode of Transport contains air, the field 'Chargeable Weight' must not be null!5000
portOfLoadingStringN50if Mode of Transport is not truck or mail, the field 'Port of loading' must not be null!CODE0000001
poStringY50Lenovo Po1234567890
poLineStringY50Lenovo Po Line00010
deliveryNoteStringY50DN5000
cartonsStringY50CartonsCODE0000001
grossWeightNumberY50Gross Weight2000
netWeightNumberY50Net Weight2000
lenovoPnStringY50Lenovo PN1234567890
cooStringY50COOCHN
shippingCountryStringY16Shipping CountryCODE0000001
palletsStringY50PalletsCODE0000001
declarationQtyNumberY50Declaration QTY5000
listArrayY50message list[]
errorsArrayN50Return after creation failurepo poLine not found in system!
  • request example
JSON
[
  {
    "mrn": "110001",
    "trackingId": "CODE0000001",
    "mawb": "CODE0000001",
    "forwarder": "CODE0000001",
    "containerNo": "CODE0000001",
    "containerSize": "CODE0000001",
    "modeOfTransport": "Air",
    "invoice": "CODE0000001",
    "bond": "Y",
    "portOfDischarge": "CODE0000001",
    "chargeableWeight": "10.12",
    "portOfLoading": "CODE0000001",
    "po": "CODE0000001",
    "poLine": "CODE0000001",
    "deliveryNote": "CODE0000001",
    "cartons": "CODE0000001",
    "grossWeight": "11.1",
    "netWeight": "11.2",
    "lenovoPn": "CODE0000001",
    "coo": "CHN",
    "pallets": "CODE0000001",
    "declarationQty": "123.1"
  }
]
  • response example
JSON
{
  "code": "0",
  "msg": "ok",
  "result": [
    {
      "list": [
        {
          "mrn": "110001",
          "trackingId": "CODE0000001",
          "mawb": "CODE0000001",
          "forwarder": "CODE0000001",
          "containerNo": "CODE0000001",
          "containerSize": "CODE0000001",
          "modeOfTransport": "Air",
          "invoice": "CODE0000001",
          "bond": "Y",
          "portOfDischarge": "CODE0000001",
          "chargeableWeight": "10.12",
          "portOfLoading": "CODE0000001",
          "po": "CODE0000001",
          "poLine": "CODE0000001",
          "deliveryNote": "CODE0000001",
          "cartons": "CODE0000001",
          "grossWeight": "11.1",
          "netWeight": "11.2",
          "lenovoPn": "CODE0000001",
          "coo": "CHN",
          "pallets": "CODE0000001",
          "declarationQty": "abc",
          "errors": [
            "po and po line not found in system!",
            "declarationQty must be number"
          ]
        },
        {
          "cdaId": "rid_123456",
          "cdaNo": "CDA2023091100022",
          "mrn": "110001",
          "trackingId": "CODE0000001",
          "mawb": "CODE0000001",
          "forwarder": "CODE0000001",
          "containerNo": "CODE0000001",
          "containerSize": "CODE0000001",
          "modeOfTransport": "Air",
          "invoice": "CODE0000001",
          "bond": "Y",
          "portOfDischarge": "CODE0000001",
          "chargeableWeight": "10.12",
          "portOfLoading": "CODE0000001",
          "po": "CODE0000001",
          "poLine": "CODE0000001",
          "deliveryNote": "CODE0000001",
          "cartons": "CODE0000001",
          "grossWeight": "11.1",
          "netWeight": "11.2",
          "lenovoPn": "CODE0000001",
          "coo": "CHN",
          "pallets": "CODE0000001",
          "declarationQty": "abc"
        }
      ],
      "hasError": true
    }
  ]
}
  • exception example
JSON
{
  "code": "-1",
  "msg": "error message"
}

Update CDA (REQUEST TYPE : POST)

  • Request Url
ENVURL
UAThttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/cda/bud/update
PRDhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/cda/bud/update
  • params
paramstyperequiredlengthdescexample
cdaIdStringN50Return after successful creationRID_1234567
cdaNoStringN50Return after successful creationCDA2023091100022
mrnStringN50MRN110001
trackingIdStringY50Tracking ID (HAWB/HBL/CMR)CODE0000001
mawbStringN50if Mode of Transport contains air, the field 'MAWB' must not be null!1234
forwarderStringY50Courier/ForwarderCODE0000001
containerNoStringN50if Mode of Transport is sea, the field 'Container No.' must not be null!CODE0000001
containerSizeStringN50if Mode of Transport is sea, the field 'Container Size' must not be null!CODE0000001
modeOfTransportStringY50Mode of TransportCODE0000001
invoiceStringY50InvoiceCODE0000001
bondStringY50BondedY/N
portOfDischargeStringN50if Mode of Transport is not truck or mail, the field 'Port of discharge' must not be null!CODE0000001
chargeableWeightNumberN50if Mode of Transport contains air, the field 'Chargeable Weight' must not be null!5000
portOfLoadingStringN50if Mode of Transport is not truck or mail, the field 'Port of loading' must not be null!CODE0000001
poStringY50Lenovo Po1234567890
poLineStringY50Lenovo Po Line00010
deliveryNoteStringY50DN5000
cartonsStringY50CartonsCODE0000001
grossWeightNumberY50Gross Weight2000
netWeightNumberY50Net Weight2000
lenovoPnStringY50Lenovo PN1234567890
cooStringY50COOCHN
shippingCountryStringY16Shipping CountryCODE0000001
palletsStringY50PalletsCODE0000001
declarationQtyNumberY50Declaration QTY5000
listArrayY50message list[]
errorsArrayN50Return after creation failurepo poLine not found in system!
  • request example
JSON
[
  {
    "mrn": "110001",
    "trackingId": "CODE0000001",
    "mawb": "CODE0000001",
    "forwarder": "CODE0000001",
    "containerNo": "CODE0000001",
    "containerSize": "CODE0000001",
    "modeOfTransport": "Air",
    "invoice": "CODE0000001",
    "bond": "Y",
    "portOfDischarge": "CODE0000001",
    "chargeableWeight": "10.12",
    "portOfLoading": "CODE0000001",
    "po": "CODE0000001",
    "poLine": "CODE0000001",
    "deliveryNote": "CODE0000001",
    "cartons": "CODE0000001",
    "grossWeight": "11.1",
    "netWeight": "11.2",
    "lenovoPn": "CODE0000001",
    "coo": "CHN",
    "pallets": "CODE0000001",
    "declarationQty": "123.1"
  }
]
  • response example
JSON
{
  "code": "0",
  "msg": "ok",
  "result": [
    {
      "list": [
        {
          "mrn": "110001",
          "trackingId": "CODE0000001",
          "mawb": "CODE0000001",
          "forwarder": "CODE0000001",
          "containerNo": "CODE0000001",
          "containerSize": "CODE0000001",
          "modeOfTransport": "Air",
          "invoice": "CODE0000001",
          "bond": "Y",
          "portOfDischarge": "CODE0000001",
          "chargeableWeight": "10.12",
          "portOfLoading": "CODE0000001",
          "po": "CODE0000001",
          "poLine": "CODE0000001",
          "deliveryNote": "CODE0000001",
          "cartons": "CODE0000001",
          "grossWeight": "11.1",
          "netWeight": "11.2",
          "lenovoPn": "CODE0000001",
          "coo": "CHN",
          "pallets": "CODE0000001",
          "declarationQty": "abc",
          "errors": [
            "po and po line not found in system!",
            "declarationQty must be number"
          ]
        },
        {
          "cdaId": "rid_123456",
          "cdaNo": "CDA2023091100022",
          "mrn": "110001",
          "trackingId": "CODE0000001",
          "mawb": "CODE0000001",
          "forwarder": "CODE0000001",
          "containerNo": "CODE0000001",
          "containerSize": "CODE0000001",
          "modeOfTransport": "Air",
          "invoice": "CODE0000001",
          "bond": "Y",
          "portOfDischarge": "CODE0000001",
          "chargeableWeight": "10.12",
          "portOfLoading": "CODE0000001",
          "po": "CODE0000001",
          "poLine": "CODE0000001",
          "deliveryNote": "CODE0000001",
          "cartons": "CODE0000001",
          "grossWeight": "11.1",
          "netWeight": "11.2",
          "lenovoPn": "CODE0000001",
          "coo": "CHN",
          "pallets": "CODE0000001",
          "declarationQty": "abc"
        }
      ],
      "hasError": true
    }
  ]
}
  • exception example
JSON
{
  "code": "-1",
  "msg": "error message"
}

Delete CDA (REQUEST TYPE : DELETE)

  • request url
ENVURL
UAThttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/cda/bud/delete
PRDhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/cda/bud/delete
  • params
paramstyperequiredlengthdescexample
cdaIdsArrayY50
  • request example
JSON
{
  "cdaId":[
    "cdaId12345",
    "cdaId67890"
  ]
}
  • response example
JSON
{
  "code": "0",
  "msg": "ok"
}
  • exception example
JSON
{
  "code": "-1",
  "msg": "'1234' cannot be deleted in the 'Submitted' state"
}

Query CDA (REQUEST TYPE : POST)

  • request url
ENVURL
UAThttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/cda/bud/query
PRDhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/cda/bud/query
  • 请求参数
paramsrequiredlengthdescexample
cdaNoNList of CDA NO.
statusNyou can choose the status what you want"Hold", "Submitted", "Rejected", "Approve", "Close"
  • 响应参数
paramstyperequiredlengthdescexample
codeStringY10"0"
msgStringY10"ok"/"error"
resultArrayN
statusStringY
  • 请求示例
JSON
{
  "cdaNo": ["CDA2023091200001"],
  "status": ["Hold", "Submitted", "Rejected", "Approve", "Close"]
}
  • 响应示例
JSON
{
  "code": "0",
  "msg": "ok",
  "result": [
    {
      "cdaId": "dc5d7a4dd21749e9bfbbf4d901ae8679",
      "cdaNo": "CDA2023091200001",
      "status": "Hold",
      "mrn": "1",
      "modeOfTransport": "Air",
      "portOfDischarge": "AAL Aalborg Airport",
      "mawb": "3",
      "bond": "N",
      "groupKey": "dc5d7a4dd21749e9bfbbf4d901ae8679",
      "createBy": "wangxc35",
      "chargeableWeight": "9",
      "cdaType": "NORMAL",
      "forwarder": "APEX",
      "invoice": "4",
      "portOfLoading": "AAL Aalborg Airport",
      "containerSize": "7",
      "createDate": "2023-09-12 10:18:14",
      "trackingId": "2"
    }
  ]
}
  • exception example
JSON
{
  "code": "-1",
  "msg": "CDA No. NOT FOUND IN SYSTEM"
}

Submit CDA (REQUEST TYPE : POST)

  • request url
ENVURL
UAThttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/cda/bud/submit
PRDhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/cda/bud/submit
  • 请求参数
paramsrequiredlengthdescexample
cdaIdsYList of cdaId
  • 响应参数
paramstyperequiredlengthdescexample
codeStringY10"0"
msgStringY10"ok"/"error"
  • 请求示例
JSON
{
  "cdaIds": ["rid_1234567"]
}
  • 响应示例
JSON
{
  "code": "0",
  "msg": "ok"
}
  • exception example
JSON
{
  "code": "-1",
  "msg": "CDA 'XXX' cannot submit due to status 'Approved' "
}

CDA Attachment (REQUEST TYPE : POST)

  • request url
ENVURL
UAThttps://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/cda/bud/uploadFile
PRDhttps://api-cn.lenovo.com/v1.0/supply_chain/scc/cda/bud/uploadFile
  • 请求参数
paramsrequiredlengthdescexample
cdaIdY
fileYfile
  • 响应参数
paramstyperequiredlengthdescexample
codeStringY10"0"
msgStringY10"ok"/"error"
  • 请求示例
JSON
{
  "cdaId": "cdaId123456",
  "file": ["file1", "file2"]
}
  • 响应示例
JSON
{
  "code": "0",
  "msg": "ok"
}
  • exception example
JSON
{
  "code": "-1",
  "msg": "CDA 'XXX' cannot upload due to status 'Approved' "
}