Cancel Booking
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.
OK
Forbidden
Not Found
Unprocessable Entity
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"
}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.
OK
Forbidden
Not Found
Unprocessable Entity
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?

