接口名称
预估报价(计算包裹订单报价)
接口地址
/api/shipper/v1/parcel/order/quotation/calculate
请求方式
POST
请求头
参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
sessionId | String | 是 | 登录会话ID |
language | String | 是 | 语言 |
Content-Type | String | 是 | application/json;charset=UTF-8 |
语言取值:
值 | 说明 |
|---|---|
zh_CN | 中文 |
en_US | 英文 |
请求参数
字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
facility | String | 否 | 发件人网点,"*"表示不限 |
countryFrom | String | 否 | 发件国家代码 |
postcodeFrom | String | 否 | 发件邮编 |
stateFrom | String | 否 | 发件省/州 |
cityFrom | String | 否 | 发件城市 |
country | String | 是 | 目的地国家代码 |
postcode | String | 否 | 目的地邮编 |
state | String | 否 | 目的地省/州 |
city | String | 否 | 目的地城市 |
addressType | String | 否 | 地址类型:residential(住宅地址)/ commercial(商业地址)接口同5-8. 电池包装和电池类型下拉框接口,传递参数 'ADT001' |
weightUnit | String | 是 | 重量单位:KG / G / LB |
dimensionUnit | String | 是 | 尺寸单位:CM / M / IN |
piecesRequest | Array | 是 | 包裹数据数组 |
piecesRequest 字段说明
包裹数据数组,每个元素代表一个包裹的信息。
字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
weight | String | 是 | 重量 |
length | String | 否 | 长度 |
width | String | 否 | 宽度 |
height | String | 否 | 高度 |
invoiceCurrency | String | 是 | 发票币种代码 |
invoiceValue | BigDecimal | 是 | 申报金额 |
请求示例
curl 'https://tracking-qa.etowertech.com/api/shipper/v1/parcel/order/quotation/calculate' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'language: zh_CN' \
-H 'sessionId: vP1l43F_OqvoTUWBcaAtyg' \
-H 'Accept-Language: zh-CN,zh;q=0.9' \
--data-raw '{
"facility": "*",
"country": "AF",
"postcode": "11",
"state": "22",
"city": "33",
"addressType": "residential",
"countryFrom": "AX",
"postcodeFrom": "",
"stateFrom": "",
"cityFrom": "",
"weightUnit": "G",
"dimensionUnit": "M",
"piecesRequest": [
{
"weight": "1",
"length": "",
"width": "",
"height": "",
"invoiceValue": 0,
"invoiceCurrency": "AED",
"moreFlag": true
}
]
}'
返回示例
{
"success": true,
"code": "0",
"data": [
{
"amount": 0.02,
"battery": false,
"currency": "AUD",
"dropOff": true,
"incuringDate": "2026-03-24 17:35:18",
"remarks": "",
"status": 1,
"tax": 0.0,
"taxRate": 0.0,
"totalAmount": 0.02,
"trackingNo": "",
"weight": 0.001,
"billingFrom": 100,
"billingTo": 100,
"batteryCharge": 0.0,
"surcharge": 0.0,
"freightRateId": "918pII8c5oglR9kAJM14tg",
"discount": 0.0,
"serviceOption": "*",
"unit": "KG",
"fuelSurcharge": 0.0,
"totalSurcharge": 0.0,
"remoteAreaSurcharge": 0.0,
"totalTax": 0.0,
"vat": 0.0,
"vatRate": 0.0,
"volumeRatio": "",
"serviceName": "CN-EU Postal Fully - NonIOSS-General",
"service": 901,
"rateCardId": "2_-GybjNdYaGQfaA5n7rvA",
"billDetailSpecialDTOList": [
{
"amount": 0.02,
"feeDisplayName": "基础运费"
}
],
"bulkyCargoFlag": false,
"destination": "AF",
"parcelWeightList": [],
"customerDiscount": 0.0,
"piecesFlag": false,
"opZoneHubId": 100,
"opZoneFacility": "*",
"addressType": "residential"
}
],
"errors": []
}
返回字段说明
字段 | 类型 | 说明 |
|---|---|---|
success | Boolean | 请求是否成功 |
code | String | 响应状态码,"0"表示成功 |
data | Array | 报价结果数组 |
errors | Array | 错误信息列表 |
data 字段说明
data 返回的是 报价方案列表数组,每个元素代表一个可用的服务报价方案。
字段 | 类型 | 说明 |
|---|---|---|
amount | BigDecimal | 基础运费金额 |
battery | Boolean | 是否带电 |
currency | String | 币种 |
dropOff | Boolean | 是否支持自寄 |
incuringDate | String | 产生日期时间 |
remarks | String | 备注 |
status | Integer | 状态 |
tax | BigDecimal | 税费 |
taxRate | BigDecimal | 税率 |
totalAmount | BigDecimal | 总金额(含附加费、税费等) |
trackingNo | String | 跟踪号 |
weight | BigDecimal | 重量 |
billingFrom | Integer | 计费起始重量 |
billingTo | Integer | 计费结束重量 |
batteryCharge | BigDecimal | 带电费用 |
surcharge | BigDecimal | 附加费 |
freightRateId | String | 运费费率ID |
discount | BigDecimal | 折扣金额 |
serviceOption | String | 服务选项 |
unit | String | 单位 |
fuelSurcharge | BigDecimal | 燃油附加费 |
totalSurcharge | BigDecimal | 总附加费 |
remoteAreaSurcharge | BigDecimal | 偏远地区附加费 |
totalTax | BigDecimal | 总税费 |
vat | BigDecimal | 增值税 |
vatRate | BigDecimal | 增值税率 |
volumeRatio | String | 体积比 |
serviceName | String | 服务名称 |
service | Integer | 服务ID |
rateCardId | String | 费率卡ID |
billDetailSpecialDTOList | Array | 账单明细列表 |
bulkyCargoFlag | Boolean | 是否大货 |
destination | String | 目的地国家代码 |
parcelWeightList | Array | 包裹重量列表 |
customerDiscount | BigDecimal | 客户折扣 |
piecesFlag | Boolean | 多包裹标识 |
opZoneHubId | Integer | 操作区域Hub ID |
opZoneFacility | String | 操作区域网点 |
addressType | String | 地址类型 |
specialSurcharge | BigDecimal | 特殊附加费(某些服务有此字段) |
前端渲染字段详细说明
第一列 - 服务名称
渲染内容: `serviceName(serviceOption)`
字段 | 用途 |
|---|---|
serviceName | 服务名称显示 |
serviceOption | 服务选项显示 |
第二列 - 参数
渲染内容:
- 重量:`weight unit`
- 体积大货:`bulkyCargoFlag ? '是' : '否'`
字段 | 用途 |
|---|---|
weight | 显示重量值 |
unit | 显示重量单位 |
bulkyCargoFlag | 判断是否显示体积大货标识 |
第三列 - 预估金额
渲染内容:
- 总金额:`currency totalAmount`(绿色加粗显示)
- 费用明细:遍历 `billDetailSpecialDTOList`,显示 `feeDisplayName: amount`
字段 | 用途 |
|---|---|
currency | 币种符号 |
totalAmount | 总金额 |
billDetailSpecialDTOList | 费用明细列表 |
billDetailSpecialDTOList[].feeDisplayName | 费用名称 |
billDetailSpecialDTOList[].amount | 费用金额 |
billDetailSpecialDTOList 字段说明
账单明细列表,展示各项费用明细。
字段 | 类型 | 必有 | 说明 |
|---|---|---|---|
amount | BigDecimal | 是 | 金额 |
feeDisplayName | String | 是 | 费用显示名称 |
feeId | String | 否 | 费用ID |
feeNameCn | String | 否 | 费用中文名称 |
feeName | String | 否 | 费用英文名称 |
currency | String | 否 | 费用币种(与外层 currency 可能不同) |
formular | String | 否 | 费用计算公式 |