latestOpenAPI 3.0.02026-08-106054.4 KB

42536792b3f8

Cancel Booking

Cancel Booking

Cancel a policy booking when a customer no longer requires coverage. This endpoint supports two modes controlled by the preview field:

  • Preview mode (preview: true): Calculate the refund amount without cancelling. Returns a cancellation_id for use with the Confirm Cancellation endpoint.

  • Immediate cancellation (preview: false or omitted): Cancel the booking immediately and process any applicable refunds.

Use preview mode when you need customer confirmation before finalizing the cancellation.

post/partners/{partner_code}/bookings/{booking_id}/cancel

Request body

previewboolean
refund_requiredboolean

Response

OK - cancelled

idstring
statusstring
pds_urlstring uri
created_atstring date-time
updated_atstring date-time
total_priceinteger
total_price_formattedstring
total_refundnumber
total_refund_formattedstring
total_taxinteger
total_tax_formattedstring
total_premiuminteger
total_premium_formattedstring
currencystring
{"stackTrail":"paths:/partners/{partner_code}/bookings/{booking_id}/cancel:post:responses:200:content:application/json:schema:properties:cancellation_id","oasType":"schema","type":"unknown","nullable":true}
{"stackTrail":"paths:/partners/{partner_code}/bookings/{booking_id}/cancel:post:responses:200:content:application/json:schema:properties:confirm_before","oasType":"schema","type":"unknown","nullable":true}
refund_amountnumber
refund_amount_formattedstring
{"stackTrail":"paths:/partners/{partner_code}/bookings/{booking_id}/cancel:post:responses:200:content:application/json:schema:properties:cancellation_payout_url","oasType":"schema","type":"unknown","nullable":true}