Get rates
Asks every courier enabled on your account to quote for a set of parcels moving between two addresses, and returns their answers in one response.
The call is synchronous: Bob Go fans the request out to the couriers and waits
for them, up to timeout milliseconds. A courier that fails or times out is
reported on its own entry and does not fail the request.
Always send
timeoutexplicitly. Omit it and Bob Go checks once, after about 200 ms, so the response comes back with most rates stillpending. Send25000for the full wait. See below.
Request
| Field | Type | Required | Notes |
|---|---|---|---|
collection_address |
object | yes | Where the parcels are collected. See address fields. Not needed when you send collection_pickup_point_location_id. |
delivery_address |
object | yes | Where the parcels are delivered. Not needed when you send delivery_pickup_point_location_id. |
parcels |
array | yes | At least one parcel. See parcel fields. |
declared_value |
number | no | Value of the contents in ZAR. Drives insurance and, for some couriers, the rate. |
providers |
array of string | no | Restrict the quote to these provider slugs. Defaults to every provider enabled on the account. |
service_levels |
array of string | no | Restrict the quote to these service level codes. |
timeout |
integer | send it | Milliseconds to wait for couriers, capped at 25000. Defaults to 0, which means a single check after about 200 ms, not the maximum. |
requested_collection_date |
timestamp | no | The date you intend to hand the parcels over. Affects couriers that price by lead time. |
collection_contact_full_name |
string | no | |
collection_contact_mobile_number |
string | no | |
collection_contact_email |
string | no | |
delivery_contact_full_name |
string | no | |
delivery_contact_mobile_number |
string | no | |
delivery_contact_email |
string | no | |
collection_pickup_point_location_id |
integer | no | Collect from a pickup point instead of an address. Needs pickup_point_provider_slug. |
delivery_pickup_point_location_id |
integer | no | Deliver to a pickup point / locker instead of an address. |
pickup_point_provider_slug |
string | with a collection pickup point | The provider the pickup points belong to. Required with collection_pickup_point_location_id, and send it with delivery_pickup_point_location_id too. It restricts the quote to that provider, overriding providers, and it is what makes Bob Go check that the location is available and the parcels fit. Without it a delivery pickup point is not checked at all. See Pickup points. |
Couriers charge on the greater of actual and volumetric weight, so dimensions matter as much as weight.
Response
See the example response.
Keep the top-level id: that is the selected_rate_request_id you pass when
you create the shipment.
How long the call actually waits
timeout is the budget for the whole request, and Bob Go reserves the last
five seconds of it to build and return the response. So timeout: 25000 polls
the couriers for roughly 20 seconds, not 25, and stops early once every courier
has answered. Anything above 25000, or below 0, is clamped to 25000.
Omitting timeout is not the same as sending the maximum. Anything up to 5000
leaves no polling budget, so Bob Go checks once after about 200 ms and returns
a 200 with whatever has come back, usually most providers still pending.
Either send a real timeout, or send a short one and poll
GET /v2/rates?id=….
Rate statuses
status appears both per provider and per rate:
| Status | Meaning |
|---|---|
success |
The rate is bookable. |
success-no-rates |
The courier answered but does not service this lane. |
pending |
Still waiting when the timeout elapsed. |
failed-will-retry |
A transient failure at the courier. |
failed-indefinitely |
The courier rejected the request, or Bob Go did: the parcels are over the service level's weight or size limit, or your balance does not cover the rate. failed_reason says why. |
unimplemented |
The courier does not support this kind of quote. |
Only offer rates with status: "success" to your customers.
Notes
- Rates are quotes, not reservations. Prices can move between quoting and booking; the amount actually charged is the one on the shipment.
rate_amountis what Bob Go will charge you for the shipment, VAT included, andrate_amount_excl_vatis the same price without VAT. Both include the markup on your Bob Go plan, unless the service level is set to exclude it. None of your rates-at-checkout markups or checkout rules apply here.- On a courier account connected with your own credentials, Bob Go adds nothing: both amounts are the courier's price as the courier quotes it, so they are equal.
- A rate request with no usable rates is a
200, not an error, so check the statuses.