> 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/cancel.md).

# Cancel

**What it does:** Cancels a quote or purchased protection.

**When to call it:** Before the booking's `FromDate`. Cancellation is blocked if a claim is in progress or the customer has raised a card dispute.

Use `DELETE` to cancel without a reason. Use `POST` to include a `CancelReason` (recommended - useful for reporting and customer service).

```
DELETE /insurances/cancel/<reference>
POST   /insurances/cancel/<reference>
```

## Example request

### DELETE (no reason)

```shellscript
curl -i -X DELETE \
  -H "X_API_KEY: your_api_key" \
  https://api-staging.rentalcover.com/insurances/cancel/AB12-345C-INS
```

### POST (with reason)

```shellscript
curl -i -X POST \
  -H "X_API_KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"CancelReason": "Customer trip has been cancelled"}' \
  https://api-staging.rentalcover.com/insurances/cancel/AB12-345C-INS
```

## Request parameters

<table data-header-hidden="false" data-header-sticky><thead><tr><th width="200.0098876953125">Parameter</th><th width="169.5711669921875">Required?</th><th>Description</th></tr></thead><tbody><tr><td><code>reference</code> (URL)</td><td>Required</td><td>The RentalCover booking reference.</td></tr><tr><td><code>CancelReason</code></td><td>Required for <code>POST</code></td><td>Reason for cancellation. Max 500 characters.</td></tr></tbody></table>

## Response

<table data-header-hidden="false" data-header-sticky><thead><tr><th width="200.0999755859375">Field</th><th width="170.3096923828125">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>BookingId</code></td><td>string</td><td>Internal booking ID.</td></tr><tr><td><code>Reference</code></td><td>string</td><td>Booking reference.</td></tr><tr><td><code>Status</code></td><td>string</td><td><code>Cancelled</code> on success.</td></tr><tr><td><code>CancelMessage</code></td><td>string</td><td>Human-readable cancellation confirmation, including any refund amount.</td></tr></tbody></table>

```graphql
{
   "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."
}
```


---

# 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://partner-docs.covergenius.com/rentalcover/endpoints/cancel.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.
