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

Cancel

The Cancel endpoint enables the RentalCover server to cancel a quoted or purchased policy assuming the FromDate has not yet passed.

Endpoint: /insurances/cancel

Method: DELETE or POST

(Using POST allows a CancelReason to be Posted to the endpoint)

curl -i -X DELETE \
-H "X_API_KEY: [my-api-key]" \
-H "Content-Type: application/json" \
https://api-staging.rentalcover.com/insurances/cancel/AB12-345C-INS
curl -i -X POST \
-H "X_API_KEY: [my-api-key]" \
-H "Content-Type: application/json" \
-d '{"CancelReason":"I am no longer travelling"}' \
https://api-staging.rentalcover.com/insurances/cancel/AB12-345C-INS
curl -i -X POST \
-H "X_API_KEY: [my-api-key]" \
-H "Content-Type: application/json" \
-d '{"CancelReason":"I am no longer travelling"}' \
https://api-staging.rentalcover.com/insurances/cancel/AB12-345C-INS
{
   "BookingId":"12345",
   "Reference":"AB12-345C-INS",
   "Status":"Cancelled",
   "CancelMessage":"Booking: AB12-345C-INS has been cancelled. A refund for AU$99.00 has been processed."
}

Request Parameters

reference string required

The RentalCover.com booking reference (passed in endpoint URL)

CancelReason string [500] required for POST method

Reason for cancelling the policy

PreviousPurchaseNextInstantBooking

Last updated 1 year ago