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.
Check what can change
Read the booking with Get Booking before you offer an edit:
policyholder.allow_updatesistruewhen the booking can be modified.policyholder.fields_allowed_to_updatelists 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.
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.
{
"Email": "[email protected]",
"FirstName": "Alexandra",
"LastName": "Example"
}{
"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.
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.
Quote the change. The booking isn't changed yet. The response gives the new price, the
price_diffand anupdate_id.PATCH /partners/{partner_code}/bookings/{booking_id}/quote_for_updateConfirm 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.
See also
Last updated
Was this helpful?

