Java 相容橋接參考
這個舊的無版本文件連結說明 Java 的三個 API Key 橋接介面,不是原 V1 JWT API,也不是新 V2 資源 API。請按既有整合選擇版本。
開發者 API購買面單
目前參考正文提供英文與簡體中文;以下顯示英文內容。
/v1/shipping/buy權限: labels.buy
請求欄位
shippingAccountId, rateId | The shipping account and rate identifiers returned by the selected rate. |
|---|---|
rateRequest | The shipment request used to obtain the rate, including addresses and packages. |
clientReferenceId | Your stable reference for this purchase. Reuse it when retrying the same purchase; use a different reference for a new purchase. |
回傳結果
Returns shipmentId, trackingNumber, shippingCost, insuranceCost, currency and available labelBase64 / labelMimeType. In this legacy response, shipmentId is the provider's identifier and shippingCost / insuranceCost are provider costs, not a receipt for the amount charged to your wallet. Multi-package results can include packages and forms. A replay of an already successful purchase returns that purchase without label bytes; retain the original label response.
Responses use { code, message, data }. Check both the HTTP status and response code; provider errors are not successful purchases.
必要提醒
This operation purchases a real label and can charge the account. Keep the same clientReferenceId after a timeout; do not start another purchase with a new reference while the first result is uncertain. If you cannot recover the label, contact support before purchasing again. A label response alone does not confirm wallet settlement.