Java 相容橋接參考

這個舊的無版本文件連結說明 Java 的三個 API Key 橋接介面,不是原 V1 JWT API,也不是新 V2 資源 API。請按既有整合選擇版本。

開發者 API

查詢運費

目前參考正文提供英文與簡體中文;以下顯示英文內容。

POST
/v1/shipping/rates

權限: labels.read or labels.buy

請求欄位

from, toAddress 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.
parcelsPackage array. Each item contains weight and, for your own packaging, length, width and height. carrierPackageType selects supported carrier packaging.
weightUnit, dimensionUnitUnits for package weights and dimensions. Send these explicitly, for example lb and in.
requestedServiceType, customsOptional 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.


上一篇身分驗證
下一篇購買面單