# 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`
