Skip to main content

Booking Cancel API

This method requests cancellation of an existing booking.

πŸ“ Endpoint​

POST {BaseURL}/api/booking/cancel
PropertyValue
URI{BaseURL}/api/booking/cancel
MethodPOST
Content-Typeapplication/json

Authorization​

Send the Basic Auth header described in Authentication.

πŸ“‹ Request Parameters​

ParameterTypeDescription
ConfirmationNumberStringConfirmation 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​

ParameterTypeDescription
StatusObjectResponse status
Status.CodeIntegerAPI status code
Status.DescriptionStringSuccess response description
ConfirmationNumberStringConfirmation 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, or Currency.
  • Send the confirmation number exactly as returned by the booking response.
  • A non-refundable or otherwise unavailable booking can return a body-level StatusCode of 400 or 500 while the HTTP response is 200.
  • Invalid API credentials can return HTTP 401 or 404, depending on where authentication fails. Always handle both the HTTP status and the response body.