LogoLogo
  • Introduction
  • Authentication
  • Endpoints
    • Content
    • Quote
    • Status
    • Update
    • Purchase
    • Cancel
    • InstantBooking
    • Update Customer
    • Notifications/list
    • Notification/update
    • GetAllPurchasedPolicies
    • GetAllCancelledPolicies
    • CoverOptOut
    • Invoice
  • Webhook
    • HMAC Verification
    • Events
      • Cancellation Event
  • Testing
  • Errors
    • Quote Errors
    • Purchase Errors
    • Cancel Errors
  • Supported Currencies
  • Supported Languages
  • Supported Regions
  • Non-API Functions
Powered by GitBook
On this page
  1. Endpoints

GetAllPurchasedPolicies

The GetAllPurchasedPolicies endpoint enables the partners to get a list of the bookings purchased and cancelled by users.

Endpoint: /insurances/getAllPurchasedPolicies

Method: POST

curl -i -X POST \
-H "X_API_KEY: [my-api-key]" \
-H "Content-Type: application/json" \
-d '{"FromDate":"2017-11-10 00:00:00","ToDate": "2018-11-20 00:00:00"}' \
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

X_API_KEY string [varchar(32)] required

API Key, provided by RentalCover.com.

FromDate datetime

Start date/time for the filter.

ToDate datetime

End date/time for the filter.

Page integer

Pagination index.

Note: Date filters do not refer to bookings FromDate or ToDate, but instead to the latest modification date of each item.

PreviousNotification/updateNextGetAllCancelledPolicies

Last updated 1 year ago