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

Cancel Booking

Cancel Booking

post

Cancel an event ticket protection booking. Typical cancellation reasons include the event being cancelled by the organizer, the customer being unable to attend, or a duplicate booking.

When preview is true, returns a refund preview with a cancellation_id. When preview is false (or omitted), the cancellation is applied immediately.

Authorizations
AuthorizationstringRequired

Composite Authentication Scheme (Client Key, Date, and Signature)

Requires three mandatory headers in every request:

1. X-Api-Key (Client Key)

  • Purpose: Public identifier for the API consumer.

2. Date (Timestamp)

  • Purpose: Timestamp used for generating the signature and preventing replay attacks.
  • Format: RFC 7231 format (e.g., in GMT).

3. Authorization (Computed Signature)

  • Purpose: Cryptographic signature that verifies the request's authenticity and integrity.
  • Format: SIGNATURE [authHeader]

The authHeader value is derived from a cryptographic hash (e.g., HMAC-SHA256) of canonical request components (HTTP Method, Path, and the contents of the Date header), signed with the private Client Secret.

Path parameters
partner_codestringRequired
booking_idstringRequired
Body
previewbooleanOptional
refund_requiredbooleanOptional
Responses
200

OK

application/json
idstringOptional
statusstringOptional
total_pricenumberOptional
total_price_formattedstringOptional
total_refundnumberOptional
total_refund_formattedstringOptional
currencystringOptional
cancellation_idstring · nullableOptional
confirm_beforestring · date-time · nullableOptional
refund_amountnumberOptional
refund_amount_formattedstringOptional
post/partners/{partner_code}/bookings/{booking_id}/cancel
POST /x/partners/{partner_code}/bookings/{booking_id}/cancel HTTP/1.1
Host: api.xcover.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 40

{
  "preview": false,
  "refund_required": true
}
{
  "id": "ETP9K-4MR2N-INS",
  "status": "CANCELLED",
  "quotes": [
    {
      "id": "78e02aeb-86fa-47e1-b1b7-e0f12b734c5a",
      "policy_start_date": "2025-12-02T22:58:15.061427+00:00",
      "policy_end_date": "2025-12-07T16:00:00+00:00",
      "policy_cancellation_date": "2025-12-03T10:00:00.000000Z",
      "status": "CANCELLED",
      "price": 123.68,
      "refund_value": 123.68,
      "adjustment_fee": 0
    }
  ],
  "policyholder": {
    "first_name": "Jane",
    "last_name": "Doe",
    "email": "[email protected]",
    "country": "US"
  },
  "total_price": 0,
  "total_price_formatted": "US$0.00",
  "total_refund": 123.68,
  "total_refund_formatted": "US$123.68",
  "currency": "USD",
  "cancellation_id": null,
  "confirm_before": null,
  "refund_amount": 123.68,
  "refund_amount_formatted": "US$123.68"
}

Cancel Booking - Confirm

post

Finalize a previewed cancellation.

Authorizations
AuthorizationstringRequired

Composite Authentication Scheme (Client Key, Date, and Signature)

Requires three mandatory headers in every request:

1. X-Api-Key (Client Key)

  • Purpose: Public identifier for the API consumer.

2. Date (Timestamp)

  • Purpose: Timestamp used for generating the signature and preventing replay attacks.
  • Format: RFC 7231 format (e.g., in GMT).

3. Authorization (Computed Signature)

  • Purpose: Cryptographic signature that verifies the request's authenticity and integrity.
  • Format: SIGNATURE [authHeader]

The authHeader value is derived from a cryptographic hash (e.g., HMAC-SHA256) of canonical request components (HTTP Method, Path, and the contents of the Date header), signed with the private Client Secret.

Path parameters
partner_codestringRequired
booking_idstringRequired
cancellation_idstringRequired
Body
reason_for_cancellationstringOptional
Responses
200

OK

application/json
idstringOptional
statusstringOptional
total_refundnumberOptional
total_refund_formattedstringOptional
refund_amountnumberOptional
refund_amount_formattedstringOptional
post/partners/{partner_code}/bookings/{booking_id}/confirm_cancellation/{cancellation_id}/
POST /x/partners/{partner_code}/bookings/{booking_id}/confirm_cancellation/{cancellation_id}/ HTTP/1.1
Host: api.xcover.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 58

{
  "reason_for_cancellation": "event cancelled by organizer"
}
{
  "id": "ETP9K-4MR2N-INS",
  "status": "CANCELLED",
  "quotes": [
    {
      "id": "78e02aeb-86fa-47e1-b1b7-e0f12b734c5a",
      "status": "CANCELLED",
      "price": 123.68,
      "refund_value": 123.68,
      "cancelled_at": "2025-12-03T10:05:00.000000Z"
    }
  ],
  "total_refund": 123.68,
  "total_refund_formatted": "US$123.68",
  "refund_amount": 123.68,
  "refund_amount_formatted": "US$123.68"
}

Last updated

Was this helpful?