Last updated

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 CodeError TextReasonPossible Fix
HTTP 401Authentication 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 403Access deniedPossible 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 400Different 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 500Internal server errorPossible 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 CodeReason
ID Related Errors
ID_INVALIDThe provided promotion ID is invalid
ID_NOT_FOUNDThe specified promotion ID could not be found
Type Related Errors
TYPE_MANDATORYThe promotion type is required but missing
TYPE_INVALIDThe specified promotion type is not valid
Book Date Errors
BOOK_DATE_INVALIDThe booking date format or value is invalid
BOOK_DATE_START_OR_END_MISSINGEither the start or end booking date is missing
BOOK_DATE_RANGE_INVALIDThe booking date range is invalid (e.g., end date before start date)
BOOK_DATE_MAX_DAYSThe booking date range exceeds the maximum allowed days
BOOK_DATE_START_INVALIDThe booking start date is invalid
BOOK_DATE_END_INVALIDThe booking end date is invalid
Book Time Errors
BOOK_TIME_INVALIDThe booking time is invalid
BOOK_TIME_START_INVALIDThe booking start time is invalid
BOOK_TIME_END_INVALIDThe booking end time is invalid
Last Minute Errors
LAST_MINUTE_UNIT_INVALIDThe unit for last minute booking is invalid
LAST_MINUTE_VALUE_INVALIDThe value for last minute booking is invalid
LAST_MINUTE_VALUE_OUT_OF_RANGEThe last minute value is outside the acceptable range
LAST_MINUTE_MANDATORYThe last minute parameter is required but missing
Early Booker Errors
EARLY_BOOKER_INVALIDThe early booker parameters are invalid
EARLY_BOOKER_VALUE_OUT_OF_RANGEThe early booker value is outside the acceptable range
EARLY_BOOKER_MANDATORYThe early booker parameter is required but missing
Target Channel Errors
TARGET_CHANNEL_INVALIDThe specified target channel is invalid
TARGET_CHANNEL_NO_ACCESSNo access to the specified target channel
Discount Errors
DISCOUNT_NOT_IN_RANGEThe discount value is not within the acceptable range
DISCOUNT_INVALIDThe discount format or value is invalid
Min Stay Through Errors
MIN_STAY_THROUGH_NOT_IN_RANGEThe minimum stay through value is not in acceptable range
MIN_STAY_THROUGH_INVALIDThe minimum stay through value is invalid
Name Related Errors
NAME_MAX_LENGTHThe promotion name exceeds the maximum length
Parent Rates and Rooms Errors
RATES_ROOMS_ONLY_RATESOnly rates should be specified
RATES_EMPTYRates list is empty
ROOMS_EMPTYRooms list is empty
RATES_INVALIDOne or more rate IDs are invalid or inactive
ROOMS_INVALIDOne or more room IDs are invalid or inactive
Stay Date Errors
STAY_DATE_INVALIDThe stay date is invalid
STAY_DATE_START_OR_END_MISSINGEither the start or end stay date is missing
STAY_DATE_MAX_DAYS_IN_FUTUREThe stay date exceeds the maximum days allowed in the future
EXCLUDED_DATES_MAX_DAYS_IN_FUTUREThe excluded date exceeds the maximum days allowed in the future
STAY_DATE_NOT_IN_FUTUREThe stay date must be in the future
EXCLUDED_DATES_NOT_IN_FUTUREThe excluded date must be in the future
STAY_DATE_SHOULD_NOT_BE_EMPTYStay dates cannot be empty
EXCLUDED_DATES_SHOULD_NOT_BE_EMPTYExcluded dates cannot be empty
STAY_DATE_RANGE_INVALIDThe stay date range is invalid
EXCLUDED_DATES_RANGE_INVALIDThe excluded dates range is invalid
STAY_DATES_NOT_SUPPORTEDStay dates are not supported for this promotion type
EXCLUDED_DATES_NOT_SUPPORTEDExcluded dates are not supported for this promotion type
STAY_DATE_EXCEEDS_MAX_DAYSThe stay date range exceeds maximum allowed days
EXCLUDED_DATES_EXCEEDS_MAX_DAYSThe excluded dates range exceeds maximum allowed days
STAY_DATE_OUTSIDE_LIMITSStay date is outside the allowed limits
ACTIVE_WEEKDAY_INVALIDThe specified active weekday is invalid
EXCLUDED_DATES_START_INVALIDThe excluded dates start is invalid
EXCLUDED_DATES_END_INVALIDThe excluded dates end is invalid
EXCLUDED_DATES_INVALIDThe excluded dates are invalid
EXCLUDED_DATES_START_OR_END_MISSINGEither start or end excluded date is missing
STAY_DATE_START_INVALIDThe stay date start is invalid
STAY_DATE_END_INVALIDThe stay date end is invalid
ADDITIONAL_DATES_START_INVALIDThe additional dates start is invalid
ADDITIONAL_DATES_END_INVALIDThe additional dates end is invalid
ADDITIONAL_DATES_INVALIDThe additional dates are invalid
ADDITIONAL_DATES_RANGE_INVALIDThe additional dates range is invalid
ADDITIONAL_DATES_START_OR_END_MISSINGEither start or end additional date is missing
STAY_DATE_START_MANDATORYThe stay date start is required but missing
STAY_DATE_END_MANDATORYThe stay date end is required but missing
Hotel Errors
HOTEL_INELIGIBLEThe hotel is not eligible for promotions
HOTEL_DOESNT_HAVE_ACCESSThe hotel does not have access to this feature