Rates

Get an existing rate request

GET /v2/rates?id=340099 Bearer token

Returns a rate request you already made, with whatever the couriers have answered by now. Leave out id and you get the account's most recent rate requests instead.

POST /v2/rates blocks until the couriers reply or timeout elapses, which is fine for a server-side call and awkward for anything user-facing. The alternative is to post with a short timeout, keep the id from the response, and poll here. Providers still marked pending when the timeout elapsed will have finished by the time you come back.

Parameters

Name Type Required Notes
id integer send it The rate request id from the POST /v2/rates response.
limit integer no Page size when listing without an id. Defaults to 10.
offset, order, order_by no Standard pagination when listing. The default order is newest first.

Response

This is a list endpoint, so the shape differs from POST /v2/rates. The rate request is wrapped in an array with a count, even when you filtered to one id:

See the example response.

Each element of rate_requests is the same object POST /v2/rates returns: see Get rates for the fields, including the per-provider and per-rate status values you must read before using a rate. A request that came back with no usable rates is still a 200.