For the complete documentation index, see llms.txt. This page is also available as Markdown.

GetAllPurchasedPolicies

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

POST /insurances/getAllPurchasedPolicies

Example request

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
{
   "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":"7VC1-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"
         }
      }
   ]
}

Request parameters

Parameter
Required?
Description

FromDate

Optional

Start of the modification-date filter.

ToDate

Optional

End of the modification-date filter.

Page

Optional

Page index. Default: 1. Each page contains up to 500 items.

Date filter

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

Response

Pagination metadata

Field
Type
Description

MetaData.TotalItems

integer

Total number of matching bookings.

MetaData.TotalPages

integer

Total number of pages.

MetaData.CurrentPage

integer

Current page index.

MetaData.ItemsPerPage

integer

Number of items per page (500 max).

MetaData.Links.FirstPage

string

URL for page 1.

Booking items

Each item in the Bookings array.

Field
Type
Description

Bookings[].Booking.BookingId

string

Internal booking ID.

Bookings[].Booking.Status

string

Booking status.

Bookings[].Booking.Reference

string

Booking reference.

Bookings[].Booking.FromDate

datetime

Protection start date.

Bookings[].Booking.ToDate

datetime

Protection end date.

Bookings[].Booking.Currency

string

Booking currency.

Bookings[].Booking.Amount

string

Total protection amount.

Bookings[].Booking.ModifiedOn

datetime

Date of last modification. The FromDate/ToDate filter applies to this field.

Last updated

Was this helpful?