导出预估运费列表
/api/shipper/v1/parcel/order/estimateFreight/export |
POST |
参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
sessionId | String | 是 | 登录会话ID |
language | String | 是 | 语言 |
Content-Type | String | 是 | application/json;charset=UTF-8 |
Accept | String | 是 | application/json, text/plain, / |
语言取值:
值 | 说明 |
|---|---|
zh_CN | 中文 |
en_US | 英文 |
字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
Array | 是 | 订单UUID列表(直接传数组,无字段名) |
curl 'https://tracking-qa.etowertech.com/api/shipper/v1/parcel/order/estimateFreight/export' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'language: zh_CN' \ -H 'sessionId: 0HgJ-EO-Sq_ZQ6u93rjMnA' \ --data-raw '["Btf9lMK4Go7oTW3d3SRIPA"]' |
成功时返回文件流(Excel文件)
响应头:
Content-Type: application/xlsx Content-Disposition: attachment; filename=cost_query.xlsx Access-Control-Expose-Headers: Content-Disposition |
浏览器会自动下载名为 `cost_query.xlsx` 的Excel文件。
失败时返回JSON:
{
"success": false,
"code": "400",
"errors": [
{
"message": "未找到符合条件的订单数据"
}
]
}
|
成功时直接返回文件流,浏览器会触发下载Excel文件。
响应头说明:
字段 | 说明 |
|---|---|
Content-Type | application/xlsx(Excel文件类型) |
Content-Disposition | attachment; filename=cost_query.xlsx(指定下载文件名) |
Access-Control-Expose-Headers | Content-Disposition(允许前端访问文件名) |
失败时返回错误信息:
字段 | 类型 | 说明 |
|---|---|---|
success | Boolean | 请求是否成功 |
code | String | 错误状态码 |
errors | Array | 错误信息列表 |