Java 相容橋接參考
這個舊的無版本文件連結說明 Java 的三個 API Key 橋接介面,不是原 V1 JWT API,也不是新 V2 資源 API。請按既有整合選擇版本。
開發者 API查詢運費
目前參考正文提供英文與簡體中文;以下顯示英文內容。
POST
/v1/shipping/rates權限: labels.read or labels.buy
請求欄位
from, to | Address objects: name, company, phone, email, street1, street2, city, state, zip, country and residential. Use a two-letter country code. Required address details depend on the carrier. |
|---|---|
parcels | Package array. Each item contains weight and, for your own packaging, length, width and height. carrierPackageType selects supported carrier packaging. |
weightUnit, dimensionUnit | Units for package weights and dimensions. Send these explicitly, for example lb and in. |
requestedServiceType, customs | Optional service filter and customs details when needed for the shipment. |
回傳結果
data.rates contains shippingAccountId, rateId, serviceType, amount and currency. data.alerts contains messages from the rate request. Use the selected rate and the same shipment details when buying.
Responses use { code, message, data }. Check both the HTTP status and response code; provider errors are not successful purchases.