# Get an existing rate request

`GET /v2/rates?id=340099`

**Base URLs:**

- Sandbox: `https://api.sandbox.bobgo.co.za`
- Production: `https://api.bobgo.co.za`

**Authentication:** Bearer token required (see the Authentication page).

## Example request

```bash
curl -X GET 'https://api.sandbox.bobgo.co.za/v2/rates?id=340099' \
  -H "Authorization: Bearer <API_KEY>"
```

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`:

```json
{
  "rate_requests": [
    {
      "id": 340099,
      "account_id": 1234,
      "collection_address": { "...": "..." },
      "delivery_address": { "...": "..." },
      "parcels": [{ "...": "..." }],
      "provider_rate_requests": [{ "...": "..." }]
    }
  ],
  "count": 1
}
```

Each element of `rate_requests` is the same object `POST /v2/rates` returns:
see [Get rates](rates.md#response) 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`.
