接口说明
运输商用于包裹上传航班信息。 |
路径
HTTP Verb | URL |
---|---|
Post | /services/carrier/lineHaul |
请求字段
1 | Field (API) | Data Type | Length | Mandatory | Details | |||||||||
2 | bizType | Number | M | 运输类型,当选择如下序号时: 1:Air Transport; 2:Land Transportation 3:Ocean Transport; 4:Railway Transport | ||||||||||
3 | mawb | String | 40 | M | 航空主单号 | |||||||||
4 | flightNo | String | 80 | M | 航班号 | |||||||||
5 | etd | String | 19 | M | 预计出发时间 格式:yyyy-MM-dd HH:mm:ss
| |||||||||
6 | eta | String | 19 | M | 预计到达时间 格式:yyyy-MM-dd HH:mm:ss
| |||||||||
7 | origin | String | 80 | M | 出发地机场代码 | |||||||||
8 | destination | String | 80 | M | 目的地机场代码 | |||||||||
9 | totalParcels | String | 80 | M | 包裹数 | |||||||||
10 | dataType | Number | M | 数据类型 此接口支持两种关联方式二选一
| ||||||||||
11 | dataNos | List | 200 | M | 当dataType选择 1 的时候应输入Tracking No. 当dataType选择 2 的时候应输入Bag No. | |||||||||
12 | atd | String | 19 | O | 实际出发时间 格式:yyyy-MM-dd HH:mm:ss
| |||||||||
13 | ata | String | 19 | O | 实际到达时间 格式:yyyy-MM-dd HH:mm:ss
| |||||||||
14 | airlineCheckIn | String | 19 | O | 航司办理登机手续时间 格式:yyyy-MM-dd HH:mm:ss
| |||||||||
15 | recovery | String | 19 | O | 其他用途字段 格式:yyyy-MM-dd HH:mm:ss
| |||||||||
16 | handoverTime | String | 19 | O | 交货时间 格式:yyyy-MM-dd HH:mm:ss
| |||||||||
17 | rcsTime | String | 19 | O | 其他用途字段 格式:yyyy-MM-dd HH:mm:ss
| |||||||||
18 | via1 | String | 3 | O | 经停点1 | |||||||||
19 | via2 | String | 3 | O | 经停点2 | |||||||||
20 | hawb | String | 32 | O | 航空分单号 | |||||||||
21 | grossWeight | Double | O | 毛重量(单位:Kg) | ||||||||||
22 | volumetricWeight | Double | O | 体积重量(单位:Kg) | ||||||||||
23 | chargeableWeight | Double | O | 计费重量(单位:Kg) | ||||||||||
24 | comments | String | O | 评论 | ||||||||||
25 | remark | String | 255 | O | 备注 | |||||||||
26 | lineHaulAttachments | List | O | 附件信息 如果包括该字段,则以下字段为必填 | ||||||||||
27 | attachment | String | M | 附件的Base64格式 | ||||||||||
28 | attachmentFileName | String | 90 | M | 附件的文件名称,需要包括文件类型
| |||||||||
29 | attachmentFileType | String | 1 | M | 附件的文件类型,不同bizType有不同的文件类型,请填写对应数字。 空运 (bizType=1)
陆运 (bizType=2)
海运 (bizType=3)
铁路 (bizType=4)
|
响应字段
1 | 字段 | 类型 | 非空 | 说明 |
2 | status | String | 是 | Succeeded/Failure |
3 | code | Number | 否 | 返回代码,请参考以下code和Message关系表 |
4 | message | String | 否 | 响应信息,请参考以下code和Message关系表 |
5 | uuid | String | 是 | 本次LineHaul的唯一标识 |
报错信息
code | message |
999400 | MAWB is required. (航空主单号不可以为空) |
300051 | The bag no is error. (大袋号错误) |
140007 | XXX Barcode already exists. (已经存在) |
2000000 | XXX is required. (XXX字段不可以为空) |
1002000 | Time is invalid. (时间是无效的) |
1003000 | Data is empty. (参数为空) |
2200018 | The port is not configured, please contact the system administrator. (港口未配置,请联系管理员) |
2200004 | The airline is not configured, please contact the system administrator. (航空公司未配置,请联系管理员) |
2200005 | MAWB is invalid. (MAWB是无效的) |
1003004 | Attachment file base64 or fileName or fileType is empty (附件文件base64/文件名称/文件类型为空) |
1003005 | Attachment fileType is invalid (附件文件类型无效) |
请求报文
{ "bizType": "1", "mawb": "78467878565", "flightNo": "CZ455", "etd": "2022-04-12 08:01:02", "eta": "2022-04-13 08:01:02", "origin": "CAN", "destination": "AMS", "atd": "2022-05-31 14:20:05", "ata": "2022-05-31 17:30:05", "totalParcels": "2", "dataType": 1, "dataNos": [ "JB000013817", "000013802" ], "lineHaulAttachments": [ { "attachmentFileType": "0", "attachment": "Base64 format", "attachmentFileName": "test1.pdf" }, { "attachmentFileType": "6", "attachment": "Base64 format", "attachmentFileName": "test2.pdf" } ] }
响应报文
{ "status":"Succeeded", "code":0, "message":null, "uuid": "Qu57HhAhW6TTTQGm1Dvn_a" }
{ "status": "Failed", "code": 2200005, "message": "MAWB is invalid", "uuid": null }
系统异常返回(只有error code为100004时为以下报错返回,系统发布时会偶发)
{ "status": "Failure", "errors": [ { "code": 100004, "message": "System internal error", "messageCn": null } ], "data": null, "warnings": null }