Skip to content

Cancellation

This method is used to cancel booking. Code value from the booking response must be included.

Booking code should be included which has been received from booking process.

DANGER

Please note that cancellation charge will be applied at 00.00 (GMT+3) once booking is in cancellation deadline.

Request Base Parameters

NameValueRequiredDescription
codestringyesThe code from response of the booking request. (code)

Example Response

POST /api/v2/cancel/<code>

json
{
  "currency": "EUR",
  "charge_amount": "212.38",
  "code": "B3CJBKKDU43F"
}

Response Object Parameters

NameValueDescription
currencystringcurrency type of the charge_amount
codestringcancellation code
charge_amountdecimalThe amount of penalty payment for cancelling the booking. No charge is taken if returned null.

Errors, Error Codes

Errors and error codes are generated specific messages corresponds to the information. When an error occurs, API sends a response which contains error_code and detail information. detail field can be string or javascript object.

json
{
 "error_code": 4405,
 "detail": "Method not allowed"
}
json
{
 "error_code": 4400,
 "detail": {
 "card_type": ["'diners' is not a valid card type. Supported cards: visa"],
 "card_number": ["Card number is not valid"]
 }
}

Error Code List

http_statuserror_codeerror_typedetaildetail parameter
4004400
common error
Invalid client IPclient_IP
Invalid channelchannel
booking error
Passenger names are requiredname
Search pax info and book pax info does not matchdetail
This card type is not valid, please check. Available cards:...card_type
Card number is not validcard_number
At least one name parameter is requiredname
Credit card info is required for direct payment hotelsdetail
cancellation errorBooking cannot be cancelled after checkin datedetail
search error
Invalid currencydetail
Invalid destination codedestination_code
Checkin date is invalidcheckin
Checkin date is in the pastcheckin
Checkout date is invalidcheckout
Checkout date appears to be earlier than the checkin datenon_field_errors
Number of room cannot be more than 5pax
Number of adults per room must be between 1-6pax
Number of children per room cannot be more than 4pax
Number of passengers per room cannot be more than 6pax
Number of night for a stay cannot be more than 30 daysnon_field_errors
Destination code is requirednon_field_errors
Invalid destination codedestination_code
4014401common error
Authentication credentials were not provided.
Invalid username/password
Channel is disabled
4044404booking error
Please go to provision step first!detail
Search result with given code could not be founddetail
cancellation errorBooking not founddetail
availability/provision errorProduct is expireddetail
4054405common errorMethod not alloweddetail
4094409booking error
This product is already purchaseddetail
We could not process the booking due to an unknown error
cancellation errorBooking already cancelleddetail
4104410booking errorThe room is no longer availabledetail
5005500common errorThere was an error. Please try again later

Released under the MIT License.