> For the complete documentation index, see [llms.txt](https://partner-docs.covergenius.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://partner-docs.covergenius.com/rentalcover/endpoints/getallpurchasedpolicies.md).

# GetAllPurchasedPolicies

**What it does:** Returns a paginated list of all bookings (purchased and cancelled) associated with your account.

{% code overflow="wrap" %}

```
POST /insurances/getAllPurchasedPolicies
```

{% endcode %}

## Example request

{% tabs %}
{% tab title="POST" %}

```shellscript
curl -i -X POST \
  -H "X_API_KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"FromDate": "2025-01-01 00:00:00", "ToDate": "2025-06-30 23:59:59", "Page": 1}' \
  https://api-staging.rentalcover.com/insurances/getAllPurchasedPolicies
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
   "MetaData":{
      "TotalItems":1,
      "TotalPages":1,
      "CurrentPage":1,
      "ItemsPerPage":500,
      "Links":{
         "FirstPage":"https://api-staging.rentalcover.com/insurances/getAllPurchasedPolicies/page/1"
      }
   },
   "Bookings":[
      {
         "Booking":{
            "BookingId":"1971444",
            "Status":"Cancelled",
            "Reference":"7VC3-XZ75-INS",
            "FromDate":"2018-05-08 00:00:00",
            "ToDate":"2018-05-20 00:00:00",
            "Currency":"USD",
            "Amount":"52.56",
            "ModifiedOn":"2018-11-23 14:03:56"
         }
      }
   ]
}
```

{% endtab %}
{% endtabs %}

## Request parameters

<table data-header-hidden="false" data-header-sticky><thead><tr><th width="169.7076416015625">Parameter</th><th width="149.7652587890625">Required?</th><th>Description</th></tr></thead><tbody><tr><td><code>FromDate</code></td><td>Optional</td><td>Start of the modification-date filter.</td></tr><tr><td><code>ToDate</code></td><td>Optional</td><td>End of the modification-date filter.</td></tr><tr><td><code>Page</code></td><td>Optional</td><td>Page index. Default: <code>1</code>. Each page contains up to 500 items.</td></tr></tbody></table>

{% hint style="info" %}
**Date filter**

`FromDate` and `ToDate` filter by each booking's last-modification date, not by protection start or end date.
{% endhint %}

## Response

### Pagination metadata

<table data-header-hidden="false" data-header-sticky><thead><tr><th width="234.7935791015625">Field</th><th width="149.7606201171875">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>MetaData.TotalItems</code></td><td>integer</td><td>Total number of matching bookings.</td></tr><tr><td><code>MetaData.TotalPages</code></td><td>integer</td><td>Total number of pages.</td></tr><tr><td><code>MetaData.CurrentPage</code></td><td>integer</td><td>Current page index.</td></tr><tr><td><code>MetaData.ItemsPerPage</code></td><td>integer</td><td>Number of items per page (500 max).</td></tr><tr><td><code>MetaData.Links.FirstPage</code></td><td>string</td><td>URL for page 1.</td></tr></tbody></table>

### Booking items

Each item in the `Bookings` array.

<table data-header-hidden="false" data-header-sticky><thead><tr><th width="274.680419921875">Field</th><th width="150.131103515625">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>Bookings[].Booking.BookingId</code></td><td>string</td><td>Internal booking ID.</td></tr><tr><td><code>Bookings[].Booking.Status</code></td><td>string</td><td>Booking status.</td></tr><tr><td><code>Bookings[].Booking.Reference</code></td><td>string</td><td>Booking reference.</td></tr><tr><td><code>Bookings[].Booking.FromDate</code></td><td>datetime</td><td>Protection start date.</td></tr><tr><td><code>Bookings[].Booking.ToDate</code></td><td>datetime</td><td>Protection end date.</td></tr><tr><td><code>Bookings[].Booking.Currency</code></td><td>string</td><td>Booking currency.</td></tr><tr><td><code>Bookings[].Booking.Amount</code></td><td>string</td><td>Total protection amount.</td></tr><tr><td><code>Bookings[].Booking.ModifiedOn</code></td><td>datetime</td><td>Date of last modification. The <code>FromDate</code>/<code>ToDate</code> filter applies to this field.</td></tr></tbody></table>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://partner-docs.covergenius.com/rentalcover/endpoints/getallpurchasedpolicies.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
