> For the complete documentation index, see [llms.txt](https://docs.terminal.africa/tship/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.terminal.africa/tship/rate/get-rates.md).

# Get Rates

## /rates

<mark style="color:blue;">`GET`</mark> `https://api.terminal.africa/v1/rates`

This endpoint allows you to get a list of all rates generated by a user.

#### Query Parameters

| Name    | Type   | Description                                                                     |
| ------- | ------ | ------------------------------------------------------------------------------- |
| perPage | Number | Specify how many records will be returned in a single request. Defaults to 100. |
| page    | Number | Specify what page of records will be sent in response. Defaults to 1.           |

#### Headers

| Name                                            | Type   | Description                      |
| ----------------------------------------------- | ------ | -------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Set value to `Bearer SECRET_KEY` |

{% tabs %}
{% tab title="200: OK Rates retrieved successfully." %}

```javascript
{
	status: true,
	message: 'Rates retrieved successfully',
	data: {
		rates: [{
                    "amount": 5048.08,
                    "breakdown": [],
                    "carrier_logo": "https://ucarecdn.com/dcdd8109-af8c-4057-8104-192be821dd6e/download4.png",
                    "carrier_name": "DHL Express + (Parcel Insurance)",
                    "carrier_rate_description": "EXPRESS DOMESTIC",
                    "carrier_reference": "CA-81957188177",
                    "carrier_slug": "dhl-ng",
                    "currency": "NGN",
                    "delivery_address": "AD-80439326931",
                    "delivery_date": "2022-06-15T22:59:00.000Z",
                    "delivery_eta": 4237,
                    "delivery_time": "Within 3 days",
                    "insurance_coverage": 0,
                    "insurance_fee": 3500,
                    "includes_insurance": true,
                    "metadata": {
                        "localProductCode": "N",
                        "productCode": "N"
                    },
                    "parcel": "PC-09284697565",
                    "pickup_address": "AD-77298486083",
                    "pickup_eta": 1440,
                    "pickup_time": "Within 24 hours",
                    "rate_id": "RT-98930123958",
                    "used": true,
                    "user": "USER-12568655307",
                    "created_at": "2022-06-13T00:22:37.782Z",
                    "updated_at": "2022-06-13T00:25:03.834Z"
                }],
		pagination: {
    			"total": 1,
    			"perPage": 100,
    			"page": 1,
    			"pageCount": 1		
		}
	}
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.terminal.africa/tship/rate/get-rates.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
