注册海运运单
# 接口地址
POST https://api.track123.com/gateway/open-api/tk/v1/ocean/track/import
# 接口描述
一次最多导入100个单号,接口请求限制频率为3 requests/sec。返回的结果包含accepted和rejected两个列表,accepted列表是导入成功的运单,rejected列表是导入失败的运单。单号和物流商都已经存在的重复运单,不会重复导入。但系统里已经存在这些运单,视为导入成功。
- 注意:导入一个海运单号,会消耗200个物流单号额度。
# 请求参数
参数名称 | 参数说明 | 必须 | 数据类型 |
---|---|---|---|
trackNo | 单号 | true | string |
type | 单号类型(1.订舱号 2.提单号 3.箱号) | true | number |
carrierCode | 承运人对应的唯一简码 | true | string |
customerEmail | 客户邮箱,由商家/平台填写的,订单关联的客户邮箱 | false | string |
# 请求示例
[
{
"trackingNo": "MATS5217756000",
"carrierCode": "matson",
"type": 2,
"customerEmail": "support@track123.com"
},
{
"trackingNo": "MATS5217756001",
"carrierCode": "matson",
"type": 2,
"customerEmail": "support@track123.com"
}
]
# 响应参数
参数名称 | 参数说明 | 类型 |
---|---|---|
code | 业务状态码 | string |
msg | 业务状态码对应的描述信息或者其他辅助的描述信息 | string |
data | 返回体 | object |
accepted | 注册成功的单号 | array[object] |
trackingNo | 单号 | String |
type | 单号类型(1.订舱号 2.提单号 3.箱号) | Integer |
carrierCode | 承运人对应的唯一简码 | String |
orderNo | 唯一订单号(由track123生成的订单编号) | String |
customerEmail | 客户邮箱,由商家/平台填写的,订单关联的客户邮箱 | String |
rejected | 注册失败的单号 | array[object] |
carrierCode | 承运人对应的唯一简码 | String |
trackingNo | 单号 | String |
type | 单号类型(1.订舱号 2.提单号 3.箱号) | Integer |
error | 错误 | object |
code | 错误码 | String |
error | 错误 | object |
# 响应示例
{
"code": "00000",
"data": {
"accepted": [
{
"trackingNo": "MATS5217756001",
"type": 2,
"orderNo": "11111112",
"carrierCode": "matson",
"customerEmail": "support@track123.com"
}
],
"rejected": [
{
"trackingNo": "MATS5217756000",
"type": 2,
"carrierCode": "matson",
"error": {
"code": "A0400",
"msg": "单号已经导入"
}
}
]
},
"msg": "成功",
"traceId": "N/A"
}