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
Name | Value | Required | Description |
---|---|---|---|
code | string | yes | The 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
Name | Value | Description |
---|---|---|
currency | string | currency type of the charge_amount |
code | string | cancellation code |
charge_amount | decimal | The 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_status | error_code | error_type | detail | detail parameter |
---|---|---|---|---|
400 | 4400 | |||
common error | ||||
Invalid client IP | client_IP | |||
Invalid channel | channel | |||
booking error | ||||
Passenger names are required | name | |||
Search pax info and book pax info does not match | detail | |||
This card type is not valid, please check. Available cards:... | card_type | |||
Card number is not valid | card_number | |||
At least one name parameter is required | name | |||
Credit card info is required for direct payment hotels | detail | |||
cancellation error | Booking cannot be cancelled after checkin date | detail | ||
search error | ||||
Invalid currency | detail | |||
Invalid destination code | destination_code | |||
Checkin date is invalid | checkin | |||
Checkin date is in the past | checkin | |||
Checkout date is invalid | checkout | |||
Checkout date appears to be earlier than the checkin date | non_field_errors | |||
Number of room cannot be more than 5 | pax | |||
Number of adults per room must be between 1-6 | pax | |||
Number of children per room cannot be more than 4 | pax | |||
Number of passengers per room cannot be more than 6 | pax | |||
Number of night for a stay cannot be more than 30 days | non_field_errors | |||
Destination code is required | non_field_errors | |||
Invalid destination code | destination_code | |||
401 | 4401 | common error | ||
Authentication credentials were not provided. | ||||
Invalid username/password | ||||
Channel is disabled | ||||
404 | 4404 | booking error | ||
Please go to provision step first! | detail | |||
Search result with given code could not be found | detail | |||
cancellation error | Booking not found | detail | ||
availability/provision error | Product is expired | detail | ||
405 | 4405 | common error | Method not allowed | detail |
409 | 4409 | booking error | ||
This product is already purchased | detail | |||
We could not process the booking due to an unknown error | ||||
cancellation error | Booking already cancelled | detail | ||
410 | 4410 | booking error | The room is no longer available | detail |
500 | 5500 | common error | There was an error. Please try again later |