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

# Quick Start

## Before you begin

You need the following before making your first API call:

* **API credentials:** contact your Cover Genius Client Solutions Engineer (CSE) to receive your staging API key.
* **HTTPS:** all API requests must use HTTPS. HTTP calls are rejected in production.

A server-side environment: the RentalCover API is a server-to-server integration. Never expose your API key in client-side code.

## End-to-end test walkthrough

Walk through the steps below to validate your integration before going live. Confirm you receive the expected response at each step before continuing.

### Step 1. Get a quote

```shellscript
curl -i -X POST \
  -H "X_API_KEY: your_staging_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "FromDate": "2025-08-01 00:00:00",
    "ToDate": "2025-08-08 00:00:00",
    "CustomerAge": 32,
    "DestinationCountry": "IE",
    "Country": "US",
    "FirstName": "Jane",
    "LastName": "Smith",
    "Email": "jane@example.com"
  }' \
  https://api-staging.rentalcover.com/insurances/quote
```

✅ Expect a `200` response containing a `Reference` (e.g. `AB12-345C-INS`) and a `TotalAmount`. **Save the Reference -** you'll use it as `AgentReference` in all subsequent steps.

### Step 2. Retrieve content

```shellscript
curl -i -X POST \
  -H "X_API_KEY: your_staging_api_key" \
  -H "Content-Type: application/json" \
  -d '{"AgentReference": "AB12-345C-INS", "LanguageCode": "en"}' \
  https://api-staging.rentalcover.com/insurances/content
```

✅ Expect marketing copy, logos, and comparison table data.

### Step 3. Record opt-in

```shellscript
curl -i -X POST \
  -H "X_API_KEY: your_staging_api_key" \
  -H "Content-Type: application/json" \
  -d '{"CoverOptIn": 1, "PartnerReference": "PARTNER-REF-001"}' \
  https://api-staging.rentalcover.com/insurances/coverOptOut/AB12-345C-INS
```

✅ Expect `{"success": "..."}`.

### Step 4. Purchase protection

```shellscript
curl -i -X POST \
  -H "X_API_KEY: your_staging_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "AgentReference": "AB12-345C-INS",
    "PolicyCode": "<Policy.Code from Quote response>",
    "FromDate": "2025-08-01 00:00:00",
    "ToDate": "2025-08-08 00:00:00",
    "CustomerAge": 32,
    "DestinationCountry": "IE",
    "Country": "US",
    "FirstName": "Jane",
    "LastName": "Smith",
    "Email": "jane@example.com",
    "Address1": "123 Main St",
    "City": "New York",
    "PostalCode": "10001",
    "CardHolder": "JANE SMITH",
    "CardNumber": "4242424242424242",
    "CardExpiry": "0828",
    "CardSecurityCode": "123"
  }' \
  https://api-staging.rentalcover.com/insurances/purchase
```

✅ Expect Status: `PendingConfirm`.

### Step 5. Verify confirmation

```shellscript
curl -i -X GET \
  -H "X_API_KEY: your_staging_api_key" \
  https://api-staging.rentalcover.com/insurances/status/AB12-345C-INS
```

✅ Expect Status: `Confirmed`.

### Step 6. Cancel protection

```shellscript
curl -i -X POST \
  -H "X_API_KEY: your_staging_api_key" \
  -H "Content-Type: application/json" \
  -d '{"CancelReason": "Test cancellation"}' \
  https://api-staging.rentalcover.com/insurances/cancel/AB12-345C-INS
```

✅ Expect Status: `Confirmed`.

## Test payment cards

Use these card details in the Purchase step above. Do not use real card numbers.

<table data-header-hidden="false" data-header-sticky><thead><tr><th>Card number</th><th width="121.7047119140625">Cardholder</th><th width="147.6776123046875">Expiry</th><th width="80.610595703125">CVV</th><th>Result</th></tr></thead><tbody><tr><td>4242 4242 4242 4242</td><td>Any name</td><td>Any future date</td><td>Any</td><td>Successful payment</td></tr><tr><td>4012 8888 8888 1881</td><td>Any name</td><td>Any future date</td><td>Any</td><td>Successful payment (alternate)</td></tr></tbody></table>

For additional test scenarios including declined cards and 3D Secure flows, see the [Stripe test cards reference](https://stripe.com/docs/testing#cards).


---

# 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/quick-start.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.
