页面树结构
转至元数据结尾
转至元数据起始

接口说明

运输商用于包裹上传航班信息。

路径

HTTP Verb URL
Post/services/carrier/lineHaul

请求字段

1Field (API)Data TypeLengthMandatoryDetails
2bizTypeNumber
M

运输类型,当选择如下序号时:

1:Air Transport;     

2:Land Transportation

3:Ocean Transport;

4:Railway Transport

3mawbString40M航空主单号
4flightNoString80M航班号
5etdString19M

预计出发时间

格式:yyyy-MM-dd HH:mm:ss 

    • 例:2022-04-12 08:01:02
6etaString19M

预计到达时间

格式:yyyy-MM-dd HH:mm:ss 

    • 例:2022-04-12 08:01:02
7originString80M出发地机场代码
8destinationString80M目的地机场代码
9totalParcelsString80

M

包裹数
10dataTypeNumber

M

数据类型

此接口支持两种关联方式二选一

  1. 小包级别(Tracking No.)
  2. 大袋级别(Bag No.)
11dataNosList200

M

当dataType选择 1 的时候应输入Tracking No.

当dataType选择 2 的时候应输入Bag No.

12

atd

String

19O

实际出发时间

格式:yyyy-MM-dd HH:mm:ss  

    • 例:2022-05-31 14:20:05
13

ata



String

19O

实际到达时间

格式:yyyy-MM-dd HH:mm:ss  

    • 例:2022-05-31 17:30:05
14

airlineCheckIn


String

19O

航司办理登机手续时间

格式:yyyy-MM-dd HH:mm:ss  

    • 例:2022-05-31 18:30:05
15

recovery



String

19O

其他用途字段

格式:yyyy-MM-dd HH:mm:ss

    • 例:2022-05-31 18:40:05
16

handoverTime



String

19O

交货时间

格式:yyyy-MM-dd HH:mm:ss  

    • 例:2022-05-31 19:30:05
17

rcsTime



String

19O

其他用途字段

格式:yyyy-MM-dd HH:mm:ss  

    • 例:2022-05-31 17:30:05
18

via1

String

3O

经停点1

19

via2

String

3O

经停点2

20

hawb

String

32O

航空分单号

21

grossWeight

Double


O

毛重量(单位:Kg)

22

volumetricWeight

Double


O

体积重量(单位:Kg)

23

chargeableWeight

Double


O

计费重量(单位:Kg)

24

comments

String


O

评论

25

remark

String

255O

备注

26lineHaulAttachmentsList

O

附件信息

如果包括该字段,则以下字段为必填

27
attachmentString
M

附件的Base64格式

28

attachmentFileName

String90M

附件的文件名称,需要包括文件类型

  • 例:test.pdf
29
attachmentFileTypeString1M

附件的文件类型,不同bizType有不同的文件类型,请填写对应数字。

空运 (bizType=1)

  • 0: MAWB
  • 6: Invoice

陆运 (bizType=2)

  • 5: Other
  • 6: Invoice

海运 (bizType=3)

  • 2: MB/L
  • 6: Invoice

铁路 (bizType=4)

  • 5: Other
  • 6: Invoice

响应字段

1

字段

类型

非空

说明

2

status

String

Succeeded/Failure

3

code

Number

返回代码,请参考以下code和Message关系表

4

message

String

响应信息,请参考以下code和Message关系表

5uuidString本次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.

(航空公司未配置,请联系管理员)

2200005MAWB is invalid. (MAWB是无效的)
1003004Attachment file base64 or fileName or fileType is empty (附件文件base64/文件名称/文件类型为空)
1003005Attachment fileType is invalid (附件文件类型无效)


请求报文

Request
{
    "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"
        }
    ]
}

响应报文

Succeeded Response
{
    "status":"Succeeded",
    "code":0,
    "message":null,
    "uuid": "Qu57HhAhW6TTTQGm1Dvn_a"
}
Failed Response
{
    "status": "Failed",
    "code": 2200005,
    "message": "MAWB is invalid",
    "uuid": null
}

系统异常返回(只有error code为100004时为以下报错返回,系统发布时会偶发)

异常Response
{
  "status": "Failure",
  "errors": [
    {
      "code": 100004,
      "message": "System internal error",
      "messageCn": null
    }
  ],
  "data": null,
  "warnings": null
}
  • 无标签