Skip to main content

Booking Cancel API

This method is used to cancel an existing booking.

πŸ“ Endpoint​

POST https://mg.mescogo.com/gw/api/booking/cancel
PropertyValue
URIBaseURL/api/booking/cancel
MethodPOST
Content-Typeapplication/json

πŸ“‹ 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": "1531561"
}

πŸ“₯ Successful Response​

{
"Status": {
"Code": 200,
"Description": "Canceled"
},
"ConfirmationNumber": "1531561"
}

πŸ“₯ 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 API returns HTTP 200 with the payload below:

{
"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 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.
  • Invalid API credentials return a Status object with an error description, typically with HTTP 401 or 404 depending on the failure point.