Troubleshooting and list of error codes
List of HTTP Error Codes
This section captures a list of common HTTP errors you might encounter and possible solutions to fix them.
| HTTP Error Code | Error Text | Reason | Possible Fix |
|---|---|---|---|
HTTP 401 | Authentication failed. Please check your credentials. | The credentials provided in the request were not sufficient for a successful authentication check. | To fix a failed authentication request, see the Authentication page. |
HTTP 403 | Access denied | Possible reasons are, you are trying to: - retrieve, create or update promotions for a property with the wrong hotel ID. - send requests using machine account that do not have access to the specified hotel ID. - retrieve, create or update promotions for a property which is no longer connected to your interface. | Make sure to specify the correct hotel ID or check your machine account credentials. You can then follow the steps: 1. Check if the property is connected to you in the Provider Portal. 2. Check if the connection status is active in the 'Properties' tab in the Provider Portal, using the property ID. 3. Check if the property is added to the machine account you use under 'Machine Accounts' in the Provider Portal. To know more about how to use the Provider Portal for the above actions, take a look at this self-help guide. |
HTTP 400 | Different error messages for different situations (see the error codes) | This error occurs when the request is malformed or contains invalid data. Common issues include: - Invalid date formats - Invalid promotion IDs - Invalid room IDs - Invalid parameter values - Missing required fields | Review the error message details in the response. Check your request against the API specifications and ensure all parameters conform to the expected formats and values. Refer to the error code list below. |
HTTP 500 | Internal server error | Possible reason may be that Booking.com systems are experiencing temporary outage. | Try calling the endpoint later. |
Examples
HTTP/1.1 401 Unauthorized
<promotions>
<fault code="401" string="Authentication failed. Please check your credentials."/>
</promotions>
<!-- RUID: [...] -->HTTP/1.1 403 Forbidden
<promotions>
<fault code="403" string="Access denied"/>
</promotions>
<!-- RUID: [...] -->HTTP/1.1 400 Bad Request
<promotions>
<faults>
<error code="RATES_INVALID">One or more parent_rates ID do not exist or are not active. Invalid parent_rates IDs: [222]</error>
<error code="ROOMS_INVALID">One or more rooms ID do not exist or are not active. Invalid rooms IDs: [1252189033]</error>
</faults>
</promotions>
<!-- RUID: [...] -->HTTP/1.1 400 Bad Request
<promotions>
<faults>
<error code="PROMOTION_ID_INVALID">Invalid promotion.id (value=123)</error>
</faults>
</promotions>
<!-- RUID: [...] -->List of Error Codes for Bad Requests
Each of these error codes may occur in specific product types, depending on the product specifications.
For detailed information about product specifications, please refer to the Managing Promotionspage in the documentation.
| Error Code | Reason |
|---|---|
| ID Related Errors | |
ID_INVALID | The provided promotion ID is invalid |
ID_NOT_FOUND | The specified promotion ID could not be found |
| Type Related Errors | |
TYPE_MANDATORY | The promotion type is required but missing |
TYPE_INVALID | The specified promotion type is not valid |
| Book Date Errors | |
BOOK_DATE_INVALID | The booking date format or value is invalid |
BOOK_DATE_START_OR_END_MISSING | Either the start or end booking date is missing |
BOOK_DATE_RANGE_INVALID | The booking date range is invalid (e.g., end date before start date) |
BOOK_DATE_MAX_DAYS | The booking date range exceeds the maximum allowed days |
BOOK_DATE_START_INVALID | The booking start date is invalid |
BOOK_DATE_END_INVALID | The booking end date is invalid |
| Book Time Errors | |
BOOK_TIME_INVALID | The booking time is invalid |
BOOK_TIME_START_INVALID | The booking start time is invalid |
BOOK_TIME_END_INVALID | The booking end time is invalid |
| Last Minute Errors | |
LAST_MINUTE_UNIT_INVALID | The unit for last minute booking is invalid |
LAST_MINUTE_VALUE_INVALID | The value for last minute booking is invalid |
LAST_MINUTE_VALUE_OUT_OF_RANGE | The last minute value is outside the acceptable range |
LAST_MINUTE_MANDATORY | The last minute parameter is required but missing |
| Early Booker Errors | |
EARLY_BOOKER_INVALID | The early booker parameters are invalid |
EARLY_BOOKER_VALUE_OUT_OF_RANGE | The early booker value is outside the acceptable range |
EARLY_BOOKER_MANDATORY | The early booker parameter is required but missing |
| Target Channel Errors | |
TARGET_CHANNEL_INVALID | The specified target channel is invalid |
TARGET_CHANNEL_NO_ACCESS | No access to the specified target channel |
| Discount Errors | |
DISCOUNT_NOT_IN_RANGE | The discount value is not within the acceptable range |
DISCOUNT_INVALID | The discount format or value is invalid |
| Min Stay Through Errors | |
MIN_STAY_THROUGH_NOT_IN_RANGE | The minimum stay through value is not in acceptable range |
MIN_STAY_THROUGH_INVALID | The minimum stay through value is invalid |
| Name Related Errors | |
NAME_MAX_LENGTH | The promotion name exceeds the maximum length |
| Parent Rates and Rooms Errors | |
RATES_ROOMS_ONLY_RATES | Only rates should be specified |
RATES_EMPTY | Rates list is empty |
ROOMS_EMPTY | Rooms list is empty |
RATES_INVALID | One or more rate IDs are invalid or inactive |
ROOMS_INVALID | One or more room IDs are invalid or inactive |
| Stay Date Errors | |
STAY_DATE_INVALID | The stay date is invalid |
STAY_DATE_START_OR_END_MISSING | Either the start or end stay date is missing |
STAY_DATE_MAX_DAYS_IN_FUTURE | The stay date exceeds the maximum days allowed in the future |
EXCLUDED_DATES_MAX_DAYS_IN_FUTURE | The excluded date exceeds the maximum days allowed in the future |
STAY_DATE_NOT_IN_FUTURE | The stay date must be in the future |
EXCLUDED_DATES_NOT_IN_FUTURE | The excluded date must be in the future |
STAY_DATE_SHOULD_NOT_BE_EMPTY | Stay dates cannot be empty |
EXCLUDED_DATES_SHOULD_NOT_BE_EMPTY | Excluded dates cannot be empty |
STAY_DATE_RANGE_INVALID | The stay date range is invalid |
EXCLUDED_DATES_RANGE_INVALID | The excluded dates range is invalid |
STAY_DATES_NOT_SUPPORTED | Stay dates are not supported for this promotion type |
EXCLUDED_DATES_NOT_SUPPORTED | Excluded dates are not supported for this promotion type |
STAY_DATE_EXCEEDS_MAX_DAYS | The stay date range exceeds maximum allowed days |
EXCLUDED_DATES_EXCEEDS_MAX_DAYS | The excluded dates range exceeds maximum allowed days |
STAY_DATE_OUTSIDE_LIMITS | Stay date is outside the allowed limits |
ACTIVE_WEEKDAY_INVALID | The specified active weekday is invalid |
EXCLUDED_DATES_START_INVALID | The excluded dates start is invalid |
EXCLUDED_DATES_END_INVALID | The excluded dates end is invalid |
EXCLUDED_DATES_INVALID | The excluded dates are invalid |
EXCLUDED_DATES_START_OR_END_MISSING | Either start or end excluded date is missing |
STAY_DATE_START_INVALID | The stay date start is invalid |
STAY_DATE_END_INVALID | The stay date end is invalid |
ADDITIONAL_DATES_START_INVALID | The additional dates start is invalid |
ADDITIONAL_DATES_END_INVALID | The additional dates end is invalid |
ADDITIONAL_DATES_INVALID | The additional dates are invalid |
ADDITIONAL_DATES_RANGE_INVALID | The additional dates range is invalid |
ADDITIONAL_DATES_START_OR_END_MISSING | Either start or end additional date is missing |
STAY_DATE_START_MANDATORY | The stay date start is required but missing |
STAY_DATE_END_MANDATORY | The stay date end is required but missing |
| Hotel Errors | |
HOTEL_INELIGIBLE | The hotel is not eligible for promotions |
HOTEL_DOESNT_HAVE_ACCESS | The hotel does not have access to this feature |