# InstantBooking

The instant booking endpoint enables the purchase of a policy by creating a quote and confirming the booking instantly with a single API request.

This endpoint can be used when the partner wants to purchase a policy without the need for a Quote.

#### **Endpoint**: `/insurances/instantBooking`

#### **Method**: `POST`

{% tabs %}
{% tab title="Request " %}

```
curl -i -X POST \
-H "X_API_KEY: [my-api-key]" \
-H "Content-Type: application/json" \
-d '{
  "FromDate": "2024-04-18 00:00:00",
  "ToDate": "2024-04-21 00:00:00",
  "CustomerAge": 29,
  "Email": "email+123@covergenius.com",
  "FirstName": "Test",
  "LastName": "Test",
  "Country": "NZ",
  "DestinationCountry": "NZ",
  "PolicyCode": "FP NZ ROW inc.Baggage - Asservo Mutual",
  "LanguageCode": "en",
  "Currency": "AUD",
  "Region": "san fran",
  "City": "brisbane",
  "Address1": "abc street",
  "PhoneNumber": "0400-000-000",
  "PostalCode": "55555",
  "PartnerCollectingPayment": true
}' \
https://api-staging.rentalcover.com/insurances/instantBooking
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "BookingId": "5805150",
    "Reference": "N7U4-A2JE-INS",
    "Status": "Confirmed",
    "FromDate": "2024-04-19 00:00:00",
    "ToDate": "2024-04-22 00:00:00",
    "TotalAmount": "21.64",
    "ConfirmedOn": "2024-04-17 23:17:41",
    "PartnerSiteCode": null,
    "InsuranceCoverAmount": "92100.00",
    "TotalAmountFormatted": "AU$21.64",
    "InsuranceCoverAmountFormatted": "AU$92,100.00",
    "Disclaimer": "By clicking the button you confirm that you have considered the terms of the <a href=\"https://staging.rentalcover.com/pds/N7U4-A2JE-INS\" target=\"_blank\">PDS</a>. Asservo Mutual (NZBN 9429051103644) is the issuer of the mutual risk products and RentalCover.com, a trading name of Cover Genius Pty Ltd (ABN 43 159 983 598, AFSL No.490058) is its' agent. As a member of Asservo Mutual, you can view the Constitution on its' <a href=\"https://asservoprotection.com/\" target=\"_blank\">website</a>.\n",
    "VehicleTypes": {
        "freecancellationcover": false,
        "freetravelinsurance": false,
        "car": true,
        "motorhome": false,
        "campervan": false,
        "4x4": false,
        "minibus": false,
        "lighttruck": false,
        "bus": false,
        "caravan": false
    },
    "Logos": {
        "DarkFontPng": {
            "Type": "png",
            "Url": "https://files.rentalcover.com/logos/RentalCover.png"
        },
        "DarkFontSvg": {
            "Type": "svg",
            "Url": "https://files.rentalcover.com/logos/RentalCover.svg"
        },
        "LightFontPng": {
            "Type": "png",
            "Url": "https://files.rentalcover.com/logos/RentalCover-inverse.png"
        },
        "LightFontSvg": {
            "Type": "svg",
            "Url": "https://files.rentalcover.com/logos/RentalCover-inverse.svg"
        }
    },
    "Policy": {
        "Code": "FP NZ ROW inc.Baggage - Asservo Mutual",
        "Name": "Full Protection",
        "Type": "FullProtection",
        "PdsUrl": "https://staging.rentalcover.com/pds/N7U4-A2JE-INS"
    },
    "Customer": {
        "CustomerId": "347568",
        "FirstName": "Test",
        "LastName": "Test",
        "Email": "email+123@covergenius.com",
        "BackupEmail": "",
        "DateOfBirth": "1995-01-01",
        "Age": "29",
        "Phone": "0432-488-899",
        "Address1": "abc street",
        "Address2": "",
        "City": "brisbane",
        "Region": "SAN FRAN",
        "PostalCode": "55555",
        "Country": "New Zealand"
    }
}
```

{% endtab %}
{% endtabs %}

## **Request Parameters**

<table data-header-hidden><thead><tr><th width="321.40234375">Attributes</th><th>Description</th></tr></thead><tbody><tr><td><code>FromDate</code> date [yyyy-mm-dd hh:mm:ss] <strong>required</strong></td><td>Date/time of vehicle pickup.</td></tr><tr><td><code>ToDate</code> date [yyyy-mm-dd hh:mm:ss] <strong>required</strong></td><td>Date/time of vehicle drop-off.</td></tr><tr><td><code>CustomerAge</code> integer <strong>required</strong></td><td>Customer age.</td></tr><tr><td><code>Email</code> string <strong>required</strong></td><td>Customer email.</td></tr><tr><td><code>FirstName</code> string <strong>required</strong></td><td>Customer first name.</td></tr><tr><td><code>LastName</code> string <strong>required</strong></td><td>Customer last name.</td></tr><tr><td><code>Country</code> string [varchar(2)] <strong>required</strong></td><td>ISO 3166 two character country code for customer country of residence or IP.</td></tr><tr><td><code>DestinationCountry</code> string [varchar(2)] <strong>required</strong></td><td>ISO 3166 two character country code for country of travel.</td></tr><tr><td><code>PolicyCode</code> string <strong>required</strong></td><td>Policy code of available policy in RentalCover Platform.</td></tr><tr><td><code>LanguageCode</code> string [varchar(2)] <strong>required</strong></td><td>Two character language code. See <a href="/pages/AqHiFohyz6sbqorNgVoQ">supported languages</a>.</td></tr><tr><td><code>Currency</code> string [varchar(3)] <strong>required</strong></td><td>If passed all the responses will be in the specified currency. Also, all subsequent actions to that booking will be in the specified currency (i.e. update, and cancel). <a href="https://www.covergenius.com/api-docs/%3C/td%3E%3Ctd%20%3Ecat-5">See supported currencies</a>.</td></tr><tr><td><code>AgentReference</code> string</td><td>partner can provide their INS for a booking. A unique booking reference ending with <code>-INS</code> that is created for each policy booked. If nothing is provided, booking reference will be generated</td></tr><tr><td><code>PartnerReference</code> string</td><td>Important for good customer experience. Your booking reference will appear in our systems to help with customer service inquiries wherever insurance reference number is not known</td></tr><tr><td><code>Address1</code> string</td><td>Customer street address line 1 (50 character limit).</td></tr><tr><td><code>CDWIncluded</code> boolean [0|1]</td><td>Specifies if the policy includes Collision Damage Waiver (CDW). This is typically used for full protection policies. If omitted, the system defaults this value to <code>0</code> (False).</td></tr><tr><td><code>City</code> string</td><td>Customer suburb/city.</td></tr><tr><td><code>PostalCode</code> string|integer</td><td>Customer post code or zip code.</td></tr><tr><td><code>Phone</code> string</td><td>Customer phone.</td></tr><tr><td><code>Region</code> string</td><td>The customer's state, region or territory, this is a 2 or 3-letter code. See <a href="/pages/NJwIOKzISGRtxG1QXMBC">supported regions</a>.</td></tr><tr><td><code>PolicyPrice</code> float</td><td>Price of partner policy (if partner sets price).</td></tr><tr><td><code>VehicleRentalGross</code> float</td><td>The retail price of the vehicle.</td></tr><tr><td><code>PhoneNumber</code> string</td><td>Customer phone number</td></tr><tr><td><code>VehicleTypes</code> string [100]</td><td>Comma-separated list of vehicle types. Codes here:<br><code>car,motorhome,campervan,4x4,</code><br><code>minibus,lighttruck,bus</code></td></tr><tr><td><code>PartnerCollectingPayment</code> boolean</td><td>Indicates whether the partner is collecting the payment. Only true OR NULL is accepted</td></tr><tr><td><code>PartnerSite</code> string [50</td><td>Used if partner has multiple sites to determine partner’s referring domain. Use this format: yoursite.com string would be <code>yoursitecom.</code></td></tr><tr><td><code>VehiclePickupCountry</code> string [varchar(2)]</td><td>Two Letter Country Code.</td></tr><tr><td><code>VehiclePickupCity</code> string [varchar(50)]</td><td>Unstructured data. Pass whatever you use as your own city identifiers.</td></tr><tr><td><code>MetaData</code> json</td><td><p>Additional user-defined data, provided as a valid JSON object. This field allows clients to send supplementary information relevant to their specific use case. The structure and content of this object are entirely determined by the client.<br><br>e.g.</p><pre><code>{
    "securitytoken": "39456fdhUIHIUH",
    "esim": {
        "esim_eligible": true
    }
}
</code></pre></td></tr></tbody></table>

## **Response Attributes**

Response properties with the text `Formatted` appended are formatted with the relevant currency code and symbol.<br>

<table><thead><tr><th width="356">Attributes</th><th>Description</th></tr></thead><tbody><tr><td><code>BookingId</code> integer</td><td>Internal ID of the booking (primary key)</td></tr><tr><td><code>Reference</code> string</td><td>This is the sole identifier for all claims and support requests. A unique booking reference ending with <code>-INS</code> that is created for each policy booked. Customers will receive this reference in confirmation emails. Also used in update and cancel requests.</td></tr><tr><td><code>Status</code> string</td><td>See <a href="/pages/XOjmTeDisrN7PPKyCuJL#booking-statuses">booking statuses</a>.</td></tr><tr><td><code>FromDate</code> datetime</td><td>Start date/time of booking.</td></tr><tr><td><code>ToDate</code> datetime</td><td>End date/time of booking.</td></tr><tr><td><code>ConfirmedOn</code> datetime</td><td>Datetime of when the booking was confirmed</td></tr><tr><td><code>PartnerReference</code> string</td><td>PartnerReference passed in the InstantBooking request.</td></tr><tr><td><code>TotalAmount</code> float</td><td>Total amount the customer is to pay for the policy (already includes discounts &#x26; markups).</td></tr><tr><td><code>TotalAmountFormatted</code> string</td><td>Total amount customer must pay for the policy (already includes discounts &#x26; markups). Includes currency formatting. e.g <code>US$39.82</code></td></tr><tr><td><code>InsuranceCoverAmount</code> float</td><td>Amount of cover the policy includes.</td></tr><tr><td><code>InsuranceCoverAmountFormatted</code> string</td><td>Amount of cover the policy includes.</td></tr><tr><td><code>Disclaimer</code> string</td><td>Policy disclaimer.</td></tr><tr><td><code>VehicleTypes.freecancellationcover</code> boolean</td><td>Whether the policy covers free cancellation cover</td></tr><tr><td><code>VehicleTypes.freetravelinsurance</code> boolean</td><td>Whether the policy covers free travel insurance</td></tr><tr><td><code>VehicleTypes.car</code> boolean</td><td>Whether the policy covers car</td></tr><tr><td><code>VehicleTypes.motorhome</code> boolean</td><td>Whether the policy covers motorhome</td></tr><tr><td><code>VehicleTypes.campervan</code> boolean</td><td>Whether the policy covers campervan</td></tr><tr><td><code>VehicleTypes.4X4</code> boolean</td><td>Whether the policy covers 4X4</td></tr><tr><td><code>VehicleTypes.minibus</code> boolean</td><td>Whether the policy covers minibus</td></tr><tr><td><code>VehicleTypes.lighttruck</code> boolean</td><td>Whether the policy covers lighttruck</td></tr><tr><td><code>VehicleTypes.bus</code> boolean</td><td>Whether the policy covers bus</td></tr><tr><td><code>VehicleTypes.caravan</code> boolean</td><td>Whether the policy covers caravan</td></tr><tr><td><code>Logos.DarkFontPng.Type</code> string</td><td>Type of logo</td></tr><tr><td><code>Logos.DarkFontPng.Url</code> string</td><td>Link to the logo</td></tr><tr><td><code>Logos.DarkFontSvg.Type</code> string</td><td>Type of logo</td></tr><tr><td><code>Logos.DarkFontSvg.Url string</code></td><td>Link to the logo</td></tr><tr><td><code>Logos.LightFontPng.Type</code> string</td><td>Type of logo</td></tr><tr><td><code>Logos.LightFontPng.Url</code> string</td><td>Link to the logo</td></tr><tr><td><code>Logos.LightFontSvg.Type</code> string</td><td>Type of logo</td></tr><tr><td><code>Logos.LightFontSvg.Url</code> string</td><td>Link to the logo</td></tr><tr><td><code>Policy.Code</code> string</td><td>Policy code.</td></tr><tr><td><code>Policy.Name</code> string</td><td>Name of the policy.</td></tr><tr><td><code>Policy.Type</code> string</td><td>Type of the Policy.</td></tr><tr><td><code>Policy.PdsUrl</code> string</td><td>URL to the policy PDS PDF.</td></tr><tr><td><code>Customer.CustomerId</code> Integer</td><td>Id of the customer.</td></tr><tr><td><code>Customer.FirstName</code> string</td><td>First name of customer.</td></tr><tr><td><code>Customer.LastName</code> string</td><td>Last name of customer.</td></tr><tr><td><code>Customer.Email</code> string</td><td>Email address of customer.</td></tr><tr><td><code>Customer.BackupEmail</code> string</td><td>Backup email address of customer.</td></tr><tr><td><code>DateOfBirth</code> string</td><td>Customer 'sDate of birth.</td></tr><tr><td><code>Customer.Age</code> integer</td><td>Age of customer.</td></tr><tr><td><code>Customer.Phone</code> string</td><td>Customer's phone number.</td></tr><tr><td><code>Customer.Address1</code> string</td><td>Customer's street address line 1.</td></tr><tr><td><code>Customer.Address2</code> string</td><td>Customer's street address line 2.</td></tr><tr><td><code>Customer.City</code> string</td><td>Customer's city.</td></tr><tr><td><code>Customer.Region</code> string</td><td>Customer's region.</td></tr><tr><td><code>Customer.PostalCode</code> string</td><td>Customer's PostalCode.</td></tr><tr><td><code>Customer.Country</code> string</td><td>Customer's country name.</td></tr></tbody></table>


---

# Agent Instructions: 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:

```
GET https://partner-docs.covergenius.com/rentalcover/endpoints/instantbooking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
