How to Cancel an Activity Booking
Cancelling an activity booking is a two-step process. First, check the cancellation penalty to determine the refund amount and available cancellation reasons. Then, submit the cancellation request with the appropriate reason code.
Step 1: Check Cancellation Penalty
Before cancelling, retrieve the penalty details and available reasons.
Endpoint
GET {{api_host}}/api/ext/activity/{bookingId}/cancel-penalty
Headers
| Header | Required | Description |
|---|
x-api-key | Yes | Your Xeni API key |
Path Parameters
| Parameter | Type | Required | Description |
|---|
bookingId | string | Yes | The booking ID to check for cancellation penalties. |
Example Request
GET {{api_host}}/api/ext/activity/MY-BOOKING-001/cancel-penalty
Response
| Field | Type | Description |
|---|
data.reasons | array | Available cancellation reasons. |
data.reasons[].reason | string | Machine-readable reason identifier. |
data.reasons[].description | string | Human-readable description of the reason. |
data.reasons[].code | string | Short code for the reason. |
data.refundAmt | number | Refund amount after penalty deduction. |
data.currency | string | Currency of the refund amount. |
Example Response
JSON
{
"data": {
"reasons": [
{
"reason": "CHANGEOFPLANS",
"description": "Change of plans",
"code": "COP"
},
{
"reason": "FOUNDBETTERPRICE",
"description": "Found a better price",
"code": "FBP"
},
{
"reason": "WEATHER_CONCERNS",
"description": "Weather concerns",
"code": "WC"
},
{
"reason": "HEALTH_ISSUES",
"description": "Health issues",
"code": "HI"
}
],
"refundAmt": 793.26,
"currency": "QAR"
}
}
Cancellation Reason Codes
| Reason | Code | Description |
|---|
CHANGEOFPLANS | COP | The customer changed their plans. |
FOUNDBETTERPRICE | FBP | The customer found a better price elsewhere. |
WEATHERCONCERNS | WC | Cancellation due to weather concerns. |
HEALTHISSUES | HI | Cancellation due to health issues. |
Additional reason codes may be available depending on the activity and provider.
Step 2: Cancel the Booking
After reviewing the penalty and refund amount, submit the cancellation.
Endpoint
POST {{api_host}}/api/ext/activity/cancel
Headers
| Header | Required | Description |
|---|
x-api-key | Yes | Your Xeni API key |
Content-Type | Yes | application/json |
Request Body
| Parameter | Type | Required | Description |
|---|
bookingId | string | Yes | The booking ID to cancel. |
reason | string | Yes | The cancellation reason identifier from the penalty response. |
Example Request
JSON
{
"bookingId": "MY-BOOKING-001",
"reason": "CHANGEOFPLANS"
}
Usage Notes
- Always check the cancellation penalty before submitting a cancellation. This lets you display the expected refund amount to the customer before they confirm.
- The
reason field in the cancellation request must be one of the reason identifiers returned by the cancel-penalty endpoint (e.g., "CHANGEOFPLANS", not the code "COP"). - The
refundAmt in the penalty response represents the amount that will be refunded after any penalty deductions. A refundAmt of 0 means the booking is non-refundable at this point. - The refund currency may differ from the original booking currency depending on the provider's configuration.
- Cancellation policies vary by activity and provider. Some activities offer free cancellation up to 24 hours before the travel date, while others may have stricter policies.
- Once a cancellation is submitted and confirmed, it cannot be reversed. A new booking would need to be created.