Booking Cancel API
This method requests cancellation of an existing booking.
π Endpointβ
POST {BaseURL}/api/booking/cancel
| Property | Value |
|---|---|
| URI | {BaseURL}/api/booking/cancel |
| Method | POST |
| Content-Type | application/json |
Authorizationβ
Send the Basic Auth header described in Authentication.
π Request Parametersβ
| Parameter | Type | Description |
|---|---|---|
ConfirmationNumber | String | Confirmation number of the booking to be cancelled |
π Authorizationβ
This endpoint requires a Basic Authorization header, using the same API client credentials as the other booking endpoints.
π€ Example Requestβ
{
"ConfirmationNumber": "00000000-0000-4000-8000-000000000001"
}
Example data note: The confirmation number is synthetic and illustrative. Do not copy it as live booking data.
π₯ Successful Responseβ
{
"Status": {
"Code": 200,
"Description": "Canceled"
},
"ConfirmationNumber": "00000000-0000-4000-8000-000000000001"
}
Example data note: All values in this response are synthetic and illustrative. Do not copy them as live booking data.
π₯ Response Parametersβ
| Parameter | Type | Description |
|---|---|---|
Status | Object | Response status |
Status.Code | Integer | API status code |
Status.Description | String | Success response description |
ConfirmationNumber | String | Confirmation number that was sent in the request |
β οΈ Error Casesβ
Processing Errorβ
When cancellation cannot be completed or an exception occurs, the endpoint can return HTTP 200 with a body-level error payload:
{
"StatusCode": 500,
"Message": "An error occurred during processing",
"Error": "An error occurred during processing"
}
Authorization errorβ
When the Basic Authorization header is missing or invalid, the endpoint returns an HTTP authorization response with a status object:
{
"Status": {
"Code": 401,
"Description": "No Header in Authorization"
}
}
β οΈ Notesβ
- The success response does not include
CancellationStatus,CancellationCharge,RefundAmount, orCurrency. - Send the confirmation number exactly as returned by the booking response.
- A non-refundable or otherwise unavailable booking can return a body-level
StatusCodeof400or500while the HTTP response is200. - Invalid API credentials can return HTTP
401or404, depending on where authentication fails. Always handle both the HTTP status and the response body.