Java bridge reference

This older, unversioned documentation link describes the three Java API-key bridge endpoints. It is not the original V1 JWT API or the new V2 resource API. Choose the version used by your integration.

Developer API

Get rates

POST
/v1/shipping/rates

Permissions: labels.read or labels.buy

Request fields

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.

Response

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.