# 试算费用
说明
通过下单接口下单前,请到登录系统 API设置里面设置回调信息,比如:下单回调地址(如果下单失败,会回调错误信息),面单回调(系统会回调面单)
type:POST
endpoint:/api/rate
Header:
Token: 登录系统 API设置里面
1
Request:
{
"channelCode": "XXXX",
"insuranceAmountPerCarton": 100, // 每箱的保险费用
"cartons": [
{
"length": 20.0,
"width": 30.0,
"height": 10.0,
"weight": 10.0,
"sameSpecCartons": 10
}
],
"consigneeAddress": {
"contacter": "Gabriela Dominguez",
"phone": "13423040008",
"countryCode": "US",
"state": "CA",
"city": "SAN JOSE",
"address": " 2247 Flint Avenue",
"address2": "",
"company": "",
"zipCode": "95148",
"fbaCode": ""
}
}
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| 参数 | 类型 | 长度 | 是否必填 | 说明 | - |
|---|---|---|---|---|---|
| channelCode | String | 必填 | 渠道代码(登录系统 API设置 可以查看) | ||
| insuranceAmountPerCarton | double | 每箱的保险费用 | |||
| cartons | 数组 | 必填 | 装箱单 | ||
| length | double | 必填 | 箱子的长 | ||
| width | double | 必填 | 箱子的宽 | ||
| height | double | 必填 | 箱子的高 | ||
| weight | double | 必填 | 箱子的重 | ||
| sameSpecCartons | int | 必填 | 同尺寸重量箱数 | ||
| consigneeAddress | Object | 必填 | 收件人地址 | ||
| contacter | String | 60 | 必填 | 收件人 | |
| phone | String | 60 | 必填 | 收件人电话 | |
| countryCode | String | 2 | 必填 | 国家二位简码 | |
| state | String | 60 | 必填 | 省/州 | |
| city | String | 60 | 必填 | 城市 | |
| address | String | 200 | 必填 | 地址 | |
| address2 | String | 200 | 地址2 | ||
| company | String | 60 | 公司 | ||
| zipCode | String | 20 | 必填 | 邮编 | |
| fbaCode | String | 亚马逊仓码 |
Response:
{
"success": false,
"message": "错误信息",
"data": {
"channelId": "",
"channelName": "",
"totalAmount": "150",
"txs": [
{
"chargeName": "物流费",
"amount": "100",
"currency": "USD"
},
{
"chargeName": "燃油费",
"amount": "50",
"currency": "USD"
}
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| 参数 | 类型 | 说明 | |
|---|---|---|---|
| success | boolean | 成功与否 | |
| message | String | 如果成功了该值为null,如果失败了,就是失败信息 | |
| data | String | 如果成功了费用信息,如果失败了为null |