PRC CDA
The following interfaces apply to API Data Integration
Create CDA
- Request address
Environment | URL |
---|---|
Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/cda/create |
Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/cda/create |
- Request data description
Param | key | Type | Required | Length | Format | Description | Example | |
---|---|---|---|---|---|---|---|---|
cdaNo | Y | String | Y | 50 | custom declaration application number | 20211016 粤 B12345-A 编码规则为日期+车牌号+(-)+批次(a/b/c/d…..) | ||
cdaType | String | Y | 50 | custom declaration application | NORMAL REBALANCE FOC 字符串需为大写 | |||
portOfLading | String | Y | 50 | lading port | 991201 详情见码表附件 | |||
portOfEntry | String | Y | 50 | entry port | 110001 详情见码表附件 | |||
importModeOfTransport | String | Y | 50 | transport mode | 2 详情见码表附件 | |||
manifestType | String | 50 | manifest type | 入境 详情见码表附件 | ||||
manifestNo | String | 50 | manifest number | CODE0000001 | ||||
tmsTrafNO | String | 50 | TMS运单号 | |||||
hawb | String | 50 | 入境提运单号 | CODE0000001 | ||||
voyageNo | String | 50 | voyage no | CODE0000001 | ||||
golden2system | String | 50 | gold2system | CODE0000001 | ||||
vehicleType | String | Y | 50 | vehicle type | 吨车 详情见码表附件 | |||
containerType | String | 50 | container type | CODE0000001 | ||||
containerNo | String | 50 | container no | CODE0000001 | ||||
truckLicense | String | 50 | truck license | 粤 B12345 | ||||
driver | String | 50 | driver name | 王师傅 | ||||
telOfDriver | String | 50 | driver phone | 1850000000 请符合手机号规则, 不支持座机 | ||||
weightOfVehicle | Number | 50 | vehicle(KG) | 5000 | ||||
vehicleFrameId | String | 50 | vehicle frame id | CODE0000001 | ||||
weightOfVehicleFrame | Number | 50 | vehicle frame weight(KGS) | 2000 | ||||
weightOfContainer | Number | 50 | container weight(KGS) | 2000 | ||||
cdaLineList | Array | Y | 0 | collection | CDA LINE collection | [] | ||
cdaLine | Y | Number | Y | 50 | CDA line | 1 | ||
deliveryNote | String | Y | 16 | delivery note | DN00001 | |||
packageType | String | Y | 50 | packge type | 22 详情见码表附件 | |||
totalGrossWeightOfGoods | Number | Y | 50 | total gross weight(kg) | 5000 | |||
totalQtyOfCarton | Number | Y | 50 | total carton quantity | 800 | |||
cdaPoList | Array | Y | 0 | collection | PO collection | [] | ||
deliveryNote | String | Y | 16 | delivery note | DN00001 此字段在 cdaLineList,cdaPoList 中都要存在 | |||
vendorCode | String | Y | 150 | vendor code | CODE0000001 | |||
vendorName | String | Y | 150 | vendor name | vendor A | |||
lenovoPn | String | Y | 50 | lenovo part no | PN000001 | |||
declarationQty | Number | Y | 50 | declaration quantity | 98 | |||
coo | String | Y | 50 | country of origin | AD 详情见码表附件 | |||
brand | String | Y | 50 | brand | 品牌 A 无品牌请填写"无品牌" | |||
price | Number | 50 | price | 178.9 FOC 类型填写 | ||||
currency | String | 50 | currency | CNY FOC 类型填写 | ||||
shipToPlant | String | 50 | lenovo plant code | CODE0000001 FOC 类型填写 | ||||
storageLocation | String | 50 | storage location | CODE0000001 FOC 类型填写 | ||||
invoice | String | 16 | invoice | CODE0000001 | ||||
poNo | String | Y | 50 | lenovo PO/SA/FOC | CODE0000001 | |||
poLine | String | Y | 50 | lenovo PO/SA/FOC line | 00010 | |||
uom | String | 50 | unit of measure | EA FOC 类型填写 | ||||
tier2VendorName | String | 100 | tier2 vendor name | |||||
netWeight | String | 100 | 天津厂净重需必填 |
- 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
{
"cdaNo": "20220801粤A78978-A",
"cdaType": "REBALANCE",
"portOfLading": "HKG000",
"importModeOfTransport": "4",
"manifestType": "入境",
"portOfEntry": "471401",
"vehicleType": "柜车",
"driver": "王师傅",
"telOfDriver": "18300000000",
"truckLicense": "粤A78978",
"vehicleFrameId": "38543T",
"weightOfVehicle": 7800,
"weightOfVehicleFrame": 5950,
"containerType": "40HQ",
"containerNo": "NYKU4545836",
"weightOfContainer": 4860,
"manifestNo": "1100390819778",
"tmsTrafNO": "TMS2023021000001",
"cdaLineList": [
{
"cdaLine": "10",
"deliveryNote": "62608566",
"totalQtyOfCarton": 566,
"packageType": "99",
"totalGrossWeightOfGoods": 5656,
"cdaPoList": [
{
"poNo": "6900000304",
"poLine": "00010",
"lenovoPn": "SP50H29573",
"coo": "CN",
"brand": "SAMSUNG",
"declarationQty": 100,
"invoice": "BCD",
"tier2VendorName": "AAA"
},
{
"poNo": "6900000304",
"poLine": "00020",
"lenovoPn": "SP50H29573",
"coo": "CN",
"brand": "SAMSUNG",
"declarationQty": 100,
"invoice": "BCD",
"tier2VendorName": "BBB"
}
]
}
]
}
- Successful response sample
JSON
{
"code": "0",
"msg": "ok"
}
- Failed response sample
JSON
{
"code": "-1",
"msg": "error",
"result": [
{
"key": "20220801粤A78978-A",
"errors": [
{
"field": "cdaNo",
"message":[
{
"value": "20220801粤A78978-A",
"error": "当前cdaNo已创建, 请修改后重试"
}
]
},
{
"field": "poLine",
"message": [
{
"value": "00010",
"error": "数据组合 6900000304:00010:62608566 已存在, 无法执行此操作"
},
{
"value": "00020",
"error": "数据组合 6900000304:00020:62608566 已存在, 无法执行此操作"
}
]
}
]
}
]
}
- 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 |
supplement、modify CDA attachment
- Request address
Environment | URL |
---|---|
Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/cda/uploadAttachment |
Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/cda/uploadAttachment |
- Request data description
Param | Type | Required | Length | Format | Description | Example |
---|---|---|---|---|---|---|
cdaNo | String | Y | 50 | custom | 20220801 粤 A78978-A | |
file | File | Y | 50M | File | compressed attachment | file should compressed by zip or 7z |
- 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
- Successful response sample
JSON
{
"code": "0",
"msg": "ok"
}
- Failed response sample
JSON
{
"code": "-1",
"msg": "error",
"result": [
{
"key": "20220801粤A78978-A",
"errors": [
{
"field": "cdaNo",
"message":[
{
"value": "20220801粤A78978-A",
"error": "cdaNo不存在, 请修改后重试"
}
]
},
{
"field": "file",
"message": [
{
"value": "file",
"error": "文件后缀名必须是zip或者7z"
}
]
}
]
}
]
}
- 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 CDA
- Request address
Environment | URL |
---|---|
Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/cda/update |
Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/cda/update |
- Request data description
Param | Type | Required | Length | Format | Description | Example |
---|---|---|---|---|---|---|
cdaNo | String | Y | 50 | custom declaration application number | 20211016 粤 B12345-A Pattern=Date+vehicleLicense+(-)+batch(a/b/c/d…..) | |
cdaType | String | Y | 50 | custom declaration application type | NORMAL REBALANCE FOC in upper case | |
portOfLading | String | Y | 50 | lading port | 991201 详情见码表附件 | |
portOfEntry | String | Y | 50 | entry port | 110001 详情见码表附件 | |
importModeOfTransport | String | Y | 50 | transport mode | 2 详情见码表附件 | |
manifestType | String | 50 | manifest type | Entry 详情见码表附件 | ||
manifestNo | String | 50 | manifest no | CODE0000001 | ||
hawb | String | 50 | hawb (入境提运单号) | CODE0000001 | ||
voyageNo | String | 50 | voyage no | CODE0000001 | ||
golden2system | String | 50 | golden2sytem | CODE0000001 | ||
vehicleType | String | Y | 50 | vehicle type | xx 详情见码表附件 | |
containerType | String | 50 | container type | CODE0000001 | ||
containerNo | String | 50 | container no | CODE0000001 | ||
truckLicense | String | 50 | truck license | 粤 B12345 | ||
driver | String | 50 | driver name | |||
telOfDriver | String | 50 | driver phone | 1850000000 mobile phone | ||
weightOfVehicle | Number | 50 | vehicle weight(KG) | 5000 | ||
vehicleFrameId | String | 50 | vehicle frame id | CODE0000001 | ||
weightOfVehicleFrame | Number | 50 | vehicle frame weigxingyinght(KGS) | 2000 | ||
weightOfContainer | Number | 50 | container weight(KGS) | 2000 | ||
cdaLineList | Array | Y | 0 | Collection | Collection of CDA line | [] |
cdaLine | Number | Y | 50 | CDA line | 1 | |
deliveryNote | String | Y | 16 | delivery note | DN00001 | |
packageType | String | Y | 50 | pakcage type | 22 详情见码表附件 | |
totalGrossWeightOfGoods | Number | Y | 50 | total gross weight(kg) | 5000 | |
totalQtyOfCarton | Number | Y | 50 | total carton quantity | 800 | |
cdaPoList | Array | Y | 0 | Collection | PO collection | [] |
deliveryNote | String | Y | 16 | delivery note | DN00001 此字段在 cdaLineList,cdaPoList 中都要存在 | |
vendorCode | String | Y | 150 | vendor code | CODE0000001 | |
vendorName | String | Y | 150 | vendor name | vendor A | |
lenovoPn | String | Y | 50 | lenovo part number | PN000001 | |
tier2VendorName | String | 100 | tier2 vendor name | |||
declarationQty | Number | Y | 50 | declaration quantity | 98 | |
coo | String | Y | 50 | country of origin | AD 详情见码表附件 | |
brand | String | Y | 50 | brand | brand A no brand fill with "none" | |
price | Number | ? | 50 | price | 178.9 FOC type | |
currency | String | ? | 50 | currency | CNY FOC type | |
shipToPlant | String | ? | 50 | lenovo plant code | CODE0000001 FOC type | |
storageLocation | String | ? | 50 | lenovo storage location | CODE0000001 FOC type | |
invoice | String | 16 | invoice | CODE0000001 | ||
poNo | String | Y | 50 | lenovo PO/SA/FOC | CODE0000001 | |
poLine | String | Y | 50 | lenovo PO/SA/FOC line | 00010 | |
uom | String | ? | 50 | unit of measure | EA FOC type | |
netWeight | String | ? | 50 | Tianjin plant weight is required |
- 响应参数
Param | Type | Required | Length | Description | Example |
---|---|---|---|---|---|
code | String | Y | 10 | "0" | |
msg | String | Y | 10 | "ok"/"error" | |
result | Object | Y | refer to response sample |
- Request sample
JSON
{
"cdaNo": "20220801粤A78978-A",
"cdaType": "REBALANCE",
"portOfLading": "HKG000",
"importModeOfTransport": "4",
"manifestType": "入境",
"portOfEntry": "471401",
"vehicleType": "柜车",
"driver": "王师傅",
"telOfDriver": "18300000000",
"truckLicense": "粤A78978",
"vehicleFrameId": "38543T",
"weightOfVehicle": 7800,
"weightOfVehicleFrame": 5950,
"containerType": "40HQ",
"containerNo": "NYKU4545836",
"weightOfContainer": 4860,
"manifestNo": "1100390819778",
"cdaLineList": [
{
"cdaLine": "10",
"deliveryNote": "62608566",
"totalQtyOfCarton": 566,
"packageType": "99",
"totalGrossWeightOfGoods": 5656,
"cdaPoList": [
{
"deliveryNote": "62608566",
"poNo": "6900000304",
"poLine": "00010",
"lenovoPn": "SP50H29573",
"tier2VendorName": "str",
"coo": "CN",
"brand": "SAMSUNG",
"declarationQty": 100,
"invoice": "BCD"
},
{
"deliveryNote": "62608566",
"poNo": "6900000304",
"poLine": "00020",
"lenovoPn": "SP50H29573",
"tier2VendorName": "str",
"coo": "CN",
"brand": "SAMSUNG",
"declarationQty": 100,
"invoice": "BCD"
}
]
}
]
}
- Successful response sample
JSON
{
"code": "0",
"msg": "ok"
}
- Failed response sample
JSON
{
"code": "-1",
"msg": "error",
"result": [
{
"key": "20220801粤A78978-A",
"errors": [
{
"field": "cdaNo",
"message":[
{
"value": "20220801粤A78978-A",
"error": "当前cdaNo已创建, 请修改后重试"
}
]
},
{
"field": "poLine",
"message": [
{
"value": "00010",
"error": "数据组合 6900000304:00010:62608566 已存在, 无法执行此操作"
},
{
"value": "00020",
"error": "数据组合 6900000304:00020:62608566 已存在, 无法执行此操作"
}
]
}
]
}
]
}
Query CDA
- Request address
Environment | URL |
---|---|
Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/cda/query |
Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/cda/query |
- Request data description
Param | Type | Required | Description | Example |
---|---|---|---|---|
cdaNo | Array | Y | custom declaration application no | 20220801 粤 A78978-A |
- Response data description
Param | Type | Required | Length | Description | Example |
---|---|---|---|---|---|
code | String | Y | 10 | "0" | |
msg | String | Y | 10 | "ok"/"error" | |
result | Object | N | refer to response sample | ||
status | String | Y | custom declaration status | ||
vehInfoStatus | String | Y | vehicle info declaration status |
- Request sample
JSON
{
"cdaNoList": [
"20211016粤B12345-A"
]
}
- Successfule response sample
JSON
{
"code": "0",
"msg": "ok",
"result": [
{
"cdaNo": "20220801粤A78978-A",
"cdaType": "REBALANCE",
"status": "Draft",
"vehInfoStatus": "Draft",
"portOfLading": "HKG000",
"importModeOfTransport": "4",
"manifestType": "入境",
"portOfEntry": "471401",
"vehicleType": "柜车",
"driver": "王师傅",
"telOfDriver": "18300000000",
"truckLicense": "粤A78978",
"vehicleFrameId": "38543T",
"weightOfVehicle": 7800,
"weightOfVehicleFrame": 5950,
"containerType": "40HQ",
"containerNo": "NYKU4545836",
"weightOfContainer": 4860,
"manifestNo": "1100390819778",
"cdaLineList": [
{
"cdaLine": "10",
"deliveryNote": "62608566",
"totalQtyOfCarton": 566,
"packageType": "99",
"totalGrossWeightOfGoods": 5656,
"cdaPoList": [
{
"deliveryNote": "62608566",
"poNo": "6900000304",
"poLine": "00010",
"lenovoPn": "SP50H29573",
"coo": "CN",
"brand": "SAMSUNG",
"declarationQty": 100,
"invoice": "BCD"
},
{
"deliveryNote": "62608566",
"poNo": "6900000304",
"poLine": "00020",
"lenovoPn": "SP50H29573",
"coo": "CN",
"brand": "SAMSUNG",
"declarationQty": 100,
"invoice": "BCD"
}
]
}
]
}
]
}
- Failed response sample
JSON
{
"code": "-1",
"msg": "error",
"result": [
{
"key": "20220801粤A78978-A",
"errors": [
{
"field": "cdaNo",
"message":[
{
"value": "20220801粤A78978-A",
"error": "当前cdaNo不存在"
}
]
}
]
}
]
}
Query CDA Status
- Request address
Environment | URL |
---|---|
Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/cda/query/status |
Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/cda/query/status |
- Request data description
Param | Type | Required | Length | 描述 | Example |
---|---|---|---|---|---|
cdaNoList | Array | Y | Collection of custom declaration application numbers | 20220801 A78978-A |
- Response data description
Param | Type | Required | Length | Description | Example |
---|---|---|---|---|---|
code | String | Y | 10 | "0" | |
msg | String | Y | 10 | "ok"/"error" | |
result | Object | Y | refer to response sample | ||
status | String | Y | 10 | Draft:can edit Deleted:deleted Published: published to lenovo Returned: rejected by lenovo Rejected: Customs declaration amendment Confirmed: he application has been reviewed by Lenovo Customs and is awaiting customs declaration. Inspection Declared Failed Success | |
vehInfoStatus | String | Y | 10 | Draft:Vehicle info not sent Published:Vehicle info is sent to the customs system Confirmed: Vehicle information confirmed Error: Vehicle information returned | |
message | String | N | 500 | Vehicle information customs declaration status |
- Request sample
JSON
{
"cdaNoList": [
"20220801 A78978-A"
]
}
- Successful response sample
JSON
{
"code": "0",
"msg": "ok",
"result": [
{
"cdaNo": "20220801粤A78978-A",
"status": "Draft",
"vehInfoStatus": "Draft",
"message": "关务备注"
}
]
}
- Failed response sample
JSON
Publish CDA
- Request address
Environment | URL |
---|---|
Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/cda/publish |
Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/cda/publish |
- Request sample
Param | Type | Required | Length | Format | Description | Example |
---|---|---|---|---|---|---|
cdaNo | String | Y | custom declaration application number | 20220801 A78978-A |
- Response data description
Param | Type | Required | Length | Format | Description | Example |
---|---|---|---|---|---|---|
code | String | Y | 10 | code | "0" | |
msg | String | Y | 10 | message | "ok"/"error" | |
result | Object | N | refer to response sample | |||
status | String | Y | cda status | |||
vehInfoStatus | String | Y | vehicle info status |
- Request sample
JSON
{
"cdaNo": "20211016粤B12345-A"
}
- Successful response sample
JSON
{
"code": "0",
"msg": "ok"
}
- Failed response sample
JSON
{
"code": "-1",
"msg": "error",
"result": [
{
"key": "20211016粤B12345-A",
"errors": [
{
"field": "cdaNo",
"message":[
{
"value": "20211016 B12345-A",
"error": "cdaNo not exists"
}
]
}
]
}
]
}
Publish CDA vehicle info
- Request address
Environment | URL |
---|---|
Test | https://api-cn-t.lenovo.com/uat/v1.0/supply_chain/scc/cda/publishVeh |
Prod | https://api-cn.lenovo.com/v1.0/supply_chain/scc/cda/publishVeh |
- Request data description
Param | Type | Required | Length | Format | Description | Example |
---|---|---|---|---|---|---|
cdaNo | String | Y | custom declaration application number | 20220801 A78978-A |
- Response data description
Param | Type | Required | Length | description | Example |
---|---|---|---|---|---|
code | String | Y | 10 | "0" | |
msg | String | Y | 10 | "ok"/"error" | |
result | Object | N | refer to response sample | ||
status | String | Y | cda status | ||
vehInfoStatus | String | Y | vehicle info declaration status |
- Request sample
JSON
{
"cdaNo": "20211016粤B12345-A"
}
- Successful response sample
JSON
{
"code": "0",
"msg": "ok"
}
- Failed response sample
JSON
{
"code": "-1",
"msg": "error",
"result": [
{
"key": "20211016粤B12345-A",
"errors": [
{
"field": "cdaNo",
"message":[
{
"value": "20211016粤B12345-A",
"error": "当前cdaNo不存在"
}
]
}
]
}
]
}
status list
Field | Value | Editable | Comment |
---|---|---|---|
status | Draft | Y | can edit |
status | Deleted | Y | deleted |
status | Published | N | The application has been released to Lenovo Customs Team |
status | Returned | Y | The application was rejected by Lenovo Customs (the reasons can be found in the Customs Notes) |
status | Rejected | Y | Customs declaration change (if there is a problem found by the customs when making a report or passing through the door) |
status | Confirmed | N | The application has been reviewed by Lenovo Customs and is awaiting customs declaration. |
status | Inspection | N | Customs declaration and inspection in progress |
status | Declared | N | The customs declaration application has been declared |
status | Rejected | N | Deletion of customs declaration (if there is a problem found by the customs when making a report or passing through the door) |
status | Success | N | The application has been successfully declared |
vehInfoStatus | Draft | Y | Vehicle information not declared to customs |
vehInfoStatus | Published | N | Vehicle information is sent to the customs system |
vehInfoStatus | Confirmed | N | Vehicle information is being confirmed |
vehInfoStatus | Error | Y | Vehicle information return |
vehInfoStatus | Success | N | Vehicle information customs declaration successful |