RatesService class (accessed via client.rates) prices a delivery across every courier serving a route and returns the options side by side. You pick a quote, then hand it to fulfilOrder or createShipment to book it.
calculateRates
Returns priced quotes from every courier that serves the origin → destination route, ranked so you can present a choice to your customer (cheapest, fastest, highest tier, etc.).Two naming inconsistencies worth memorising:
- The response field is
quotes(notrates). - Each quote’s id is
quote_id— but when you later fulfil with it,fulfilOrder/createShipmentexpect it under the keyrate_quote_id. Readquote.quote_id, pass it asrate_quote_id.
Pricing by exact location
For each endpoint, instead of (or alongside)city + zone, you can pass exact coordinates or a
free-form place name. Coordinates take precedence; a place string is resolved to coordinates for
you. When a point is supplied, each courier’s price is matched to the bounded service area it falls
in — more accurate than a city name alone. city is always required as the coarse filter.
Door-delivery distance charge. When
delivery_method is last_mile and the destination is
beyond a courier’s service area, the quote may include a distance_overage in breakdown —
a courier-set surcharge for the extra distance. pickup (collected at a station) is never charged
this. Inside the area, or within a courier’s free allowance past its edge, it is 0.{ quotes, meta }. Each quote includes:

