For the complete documentation index, see llms.txt. This page is also available as Markdown.

Modification

Replace RentalCover updateCustomer and update calls with in-place booking modification on the Offers API.

On RentalCover you change customer details with updateCustomer, and many trip changes mean cancelling and repurchasing. On the Offers API you update the booking in place. The INS doesn't change, so one booking ID covers the booking for its whole life.

1

Check what can change

Read the booking with Get Booking before you offer an edit:

  • policyholder.allow_updates is true when the booking can be modified.

  • policyholder.fields_allowed_to_update lists the fields you may change. Don't show an edit option for anything not listed.

Residency (country), age and secondary_email can't be changed through the API. If the residency changes, create a new offer.

2

Update customer details

Send policyholder changes in the top-level policyholder object, and changes to the insured person in quotes[].update_fields. Send an x-idempotency-key.

POST /insurances/updateCustomer
{
  "Email": "[email protected]",
  "FirstName": "Alexandra",
  "LastName": "Example"
}
PATCH /partners/{partner_code}/bookings/{booking_id}/
{
  "quotes": [
    {
      "id": "{quote_id}",
      "update_fields": {
        "insured": [
          { "first_name": "Alexandra", "last_name": "Example", "email": "[email protected]" }
        ]
      }
    }
  ],
  "policyholder": { "first_name": "Alexandra" }
}

The response is the full booking. status stays CONFIRMED, and price_diff is 0 for changes that don't affect the price.

3

Price-affecting changes

Changes that affect the price, such as new rental dates, take two calls, so the customer can see the new price first.

  1. Quote the change. The booking isn't changed yet. The response gives the new price, the price_diff and an update_id.

    PATCH /partners/{partner_code}/bookings/{booking_id}/quote_for_update
  2. Confirm the change once the customer accepts. The booking is updated in place with the same INS.

    POST /partners/{partner_code}/bookings/{booking_id}/confirm_update/{update_id}/

Send the new values in quotes[].update_fields, in the same structure as above. The field names for date changes are agreed with your CSE during scoping. Don't reuse an update_id for a different change.

Who collects the difference depends on your payment model. Under single payment, you collect an increase or refund a reduction. Under dual payment, Cover Genius does.

Changes made by the customer

Depending on your integration, customers can also modify a booking from their XCover account. Subscribe to the optional BOOKING_UPDATED webhook to stay in sync. When it arrives, read the booking with Get Booking and update your record. Don't apply the same change again through the API.

Full modification field mapping

Request

RentalCover
XCover Offers
Notes

Email (booking lookup)

{booking_id} in the URL

The INS

—

quotes[].id

Quote to update

—

quotes[].update_fields

Keys mirror the quote fields being changed

—

quotes[].update_fields.insured[]

Replaces the stored array in full

FirstName, LastName

policyholder.first_name, last_name

Merged

NewEmail

policyholder.email

OtherEmail

policyholder.secondary_email

Can't be changed through the API

DateOfBirth

policyholder.birth_date

CustomerAge

policyholder.age

Can't be changed through the API

CompanyName

policyholder.company

Address1, City

policyholder.address1, address2, city

Country

—

Residency can't be modified

Response

RentalCover
XCover Offers

—

update_id (from quote for update)

TotalAmountOutstanding, RefundAmount

quotes[].price_diff, total_price_diff (and _formatted)

Modified

updated_at

See also

Last updated

Was this helpful?