3.3运价结果实时推送
# 1. 接口描述
- 当配置了回调接口后,在运价数据获取成功,壹沓会采用异步的方式实时调用回调接口,推送数据给客户,推送的请求方式是POST,客户直接获取响应body中的数据即可
- 请在收到推送请求后第一时间返回HTTP状态码STATUS=200,我方才认为本次推送成功。如果500ms之后没有收到200响应,会认定本次推送异常,并发起重试推送。重试次数3次,每次间隔2分钟
- 推送维度有2种:
- 按子任务维度,即起运港+目的港+船司+箱型+重量(非必须)维度推送,如调用3.1接口批创建的一个批次包含10个查询任务,则会推送10次
- 按批次维度,待整个批次的任务都执行完成后,会将整个批次的运价结果采用分页的方式推送,默认一页推送50条
- 默认按子任务维度推送,如需按批次维度推送,请联系专职对接的技术人员
# 2. 推送请求方式
- POST
- Type: application/json
# 3. 请求入参
参数名 | 类型 | 说明 |
---|---|---|
batchNo | string | 批次号即壹沓查询key |
data | array | 查询结果 |
taskId | int | 任务ID |
shipCompany | string | 船司 |
originalPolPortCd | string | 订阅传入起运港 |
polPort | string | 起运港(船公司) |
polPortCd | string | 起运港五字码 (壹沓标准五字码) |
polPortName | string | 起运港名称 (壹沓标准五字码对应港口名称) |
originalPodPortCd | string | 订阅传入目的港 |
podPort | string | 目的港(船公司) |
podPortCd | string | 目的港五字码 (壹沓标准五字码) |
podPortName | string | 目的港名称 (壹沓标准五字码对应港口名称) |
shipName | string | 船名 |
lineCode | string | 航线代码 |
voyage | string | 航次 |
tripTime | string | 航程(天) |
boxType | string | 箱型 |
departureTime | string | 起运港预计开航时间 |
departureWeek | string | 起运港预计开航时间是星期几 |
arrivalTime | string | 目的港到达时间 |
arrivalWeek | string | 目的港到达时间是星期几 |
travelWay | string | 直达/中转 |
transitNumber | string | 中转次数 |
transitPort | string | 中转港名称,多个以","分隔(该字段为兼容老客户遗留,建议使用transitPortList字段) |
totalCost | string | 总价 |
currency | string | 总价币种 |
runDate | string | 生效日期 |
expireDate | string | 失效日期 |
havePosition | string | 是否有舱位, 0: 没有, 1: 有舱位 |
refreshTime | string | 数据更新时间,格式:yyyy-MM-dd HH:mm:ss) |
remark | string | 备注 |
transitPortList | array | 中转港明细 |
transitPort | string | 中转港名称 |
transitPortCode | string | 中转港港口代码 |
data1PortName | string | 中转港对应壹沓港口名称 |
shipName | string | 船名 |
voyage | string | 航次 |
lineCode | string | 航线代码 |
costList | array | 费用详情 |
costCategory | string | 费用类别:海运费,出口附加费,进口附加费,运费附加费,超重费其他等 |
costDetail | string | 费用描述 |
unit | string | 单位:箱\票 |
price | string | 价格 |
currency | string | 币种 |
demurrageList | array | 滞箱滞港费 |
costCategory | string | 费用类别 |
costDetail | string | 费用明细 |
price | string | 价格 |
unit | string | 单位:箱\票 |
currency | string | 币种 |
dayNum | int | 天数 |
# 4. 推送报文示例
{
"batchNo":"2e173271ba614879b9184ca3966eacdb",
"data":[
{
"arrivalTime":"2023-07-09 00:00:00",
"arrivalWeek":"周日",
"boxType":"40HQ",
"costList":[
{
"costCategory":"海运费",
"currency":"USD",
"price":"700.00"
},
{
"costCategory":"进口附加费",
"costDetail":"Container maintenance charge at destination",
"currency":"AUD",
"price":"44"
},
{
"costCategory":"进口附加费",
"costDetail":"Destinat.Terminal-Intl Ship&Port facility Security",
"currency":"AUD",
"price":"20"
},
{
"costCategory":"进口附加费",
"costDetail":"Terminal handl. ch destination",
"currency":"AUD",
"price":"705"
},
{
"costCategory":"出口附加费",
"costDetail":"Sealing service export",
"currency":"CNY",
"price":"30"
},
{
"costCategory":"出口附加费",
"costDetail":"Terminal handl ch origin",
"currency":"CNY",
"price":"990"
},
{
"costCategory":"运费附加费",
"costDetail":"Ocean Carrier-Intl Ship & port Facility Security",
"currency":"USD",
"price":"14"
}
],
"currency":"USD",
"demurrageList":[
],
"departureTime":"2023-05-27 00:00:00",
"departureWeek":"周六",
"expireDate":"2023-05-25 00:00:00",
"havePosition":1,
"lineCode":"KCM2CNC,AAXSANL",
"originalPodPortCd":"Adelaide, Australia(AUADL)",
"originalPolPortCd":"Shanghai,CHINA(CNSHA)",
"podPort":"ADELAIDE, AU",
"podPortCd":"AUADL",
"podPortName":"Adelaide, Australia(AUADL)",
"polPort":"SHANGHAI, CN",
"polPortCd":"CNSHA",
"polPortName":"Shanghai,CHINA(CNSHA)",
"refreshTime":"2023-05-22 17:31:12",
"runDate":"2023-05-22 00:00:00",
"shipCompany":"CMA",
"shipName":"CMA CGM NANTONG",
"taskId":163579,
"totalCost":"714.00",
"transitNumber":1,
"transitPort":"PORT KLANG,MY",
"transitPortList":[
{
"data1PortName":"Port Kelang,Malaysia(MYPKG)",
"lineCode":"AAXSANL",
"shipName":"SYDNEY EXPRESS",
"transitPort":"PORT KLANG,MY",
"transitPortCode":"MYPKG",
"voyage":"0PW0RS1NL"
}
],
"travelWay":"中转",
"tripTime":"43",
"voyage":"0BYE7S1NL,0PW0RS1NL"
},
{
"arrivalTime":"2023-07-09 00:00:00",
"arrivalWeek":"周日",
"boxType":"40HQ",
"costList":[
{
"costCategory":"海运费",
"currency":"USD",
"price":"700.00"
},
{
"costCategory":"进口附加费",
"costDetail":"Container maintenance charge at destination",
"currency":"AUD",
"price":"44"
},
{
"costCategory":"进口附加费",
"costDetail":"Destinat.Terminal-Intl Ship&Port facility Security",
"currency":"AUD",
"price":"20"
},
{
"costCategory":"进口附加费",
"costDetail":"Terminal handl. ch destination",
"currency":"AUD",
"price":"705"
},
{
"costCategory":"出口附加费",
"costDetail":"Sealing service export",
"currency":"CNY",
"price":"30"
},
{
"costCategory":"出口附加费",
"costDetail":"Terminal handl ch origin",
"currency":"CNY",
"price":"990"
},
{
"costCategory":"运费附加费",
"costDetail":"Ocean Carrier-Intl Ship & port Facility Security",
"currency":"USD",
"price":"14"
}
],
"currency":"USD",
"demurrageList":[
],
"departureTime":"2023-05-29 00:00:00",
"departureWeek":"周一",
"expireDate":"2023-05-26 00:00:00",
"havePosition":1,
"lineCode":"FAL,AAXSANL",
"originalPodPortCd":"Adelaide, Australia(AUADL)",
"originalPolPortCd":"Shanghai,CHINA(CNSHA)",
"podPort":"ADELAIDE, AU",
"podPortCd":"AUADL",
"podPortName":"Adelaide, Australia(AUADL)",
"polPort":"SHANGHAI, CN",
"polPortCd":"CNSHA",
"polPortName":"Shanghai,CHINA(CNSHA)",
"refreshTime":"2023-05-22 17:31:13",
"runDate":"2023-05-22 00:00:00",
"shipCompany":"CMA",
"shipName":"CMA CGM TROCADERO",
"taskId":163579,
"totalCost":"714.00",
"transitNumber":1,
"transitPort":"SINGAPORE,SG",
"transitPortList": null,
"travelWay":"中转",
"tripTime":"41",
"voyage":"0FLF1W1NL,0PW0RS1NL"
}
],
"tenantId":201719
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
最近更新时间: {
"value": "2023-09-20",
"effect": true
}