# ShippingQuote

> 按供应商的运费模板，把商品寄到某地的运费。

网页版：https://okdata.online/zh/docs/objects/shipping_quote/

所有平台同一种结构。平台没有的字段为 null，meta.unavailable 会说明原因。用 fields= 只取需要的字段。

| 字段 | 类型 | 说明 |
|---|---|---|
| `product_id` | string | 商品 ID。 |
| `destination` | string | 寄往的地区，以显示为准。 |
| `unit` | string \| null | 运费按什么计：kg 或件。 |
| `first_units` | number \| null | 首重（首件）有多少，单位见 unit。 |
| `first_fee` | number \| null | 首重（首件）运费，单位见 currency。 |
| `next_units` | number \| null | 续重（续件）每档多少，单位见 unit。 |
| `next_fee` | number \| null | 每档续重（续件）的运费。 |
| `quantity` | integer \| null | 按多少件算的。 |
| `weight_kg` | number \| null | 按多重算的（kg），给了的话。 |
| `total_fee` | number \| null | 这个件数或重量的总运费；商城不算时为 null（按上面的首续重自己算）。 |
| `currency` | string | ISO 4217 货币代码。 |
| `ext` | object | 平台特有字段，只在 view=full 时返回。 |

## 返回 ShippingQuote 的接口

- [1688 运费](https://okdata.online/zh/apis/alibaba_1688/products/shipping/get/) (`alibaba_1688.products.shipping.get`): $0.022/次

## 各 view 返回的字段

每一级 view 都包含上一级的字段。`view=compact` 最精简；`full` 会在 `ext` 里加上平台特有字段。

- compact：`product_id`, `destination`, `unit`, `first_units`, `first_fee`, `next_units`, `next_fee`, `quantity`, `weight_kg`, `total_fee`, `currency`
- standard：—
- full：`ext`
