Last updated

Create or update inventory restrictions

Use the OTA_HotelAvailNotif endpoint to:

  • Set the number of rooms available (BookingLimit) for a room type and date combination
  • Close a room type on a specified date. Even if roomrates are open, the room type is not available for booking
  • Set restrictions by specifying room type, rate plan, and date

Usage recommendations

  1. Specify availability in advance: You should specify the availability of your connected properties at least 12 months in advance.

  2. Use Delta Updates Only

  3. Single Hotel Per Request

    • All updates in a request must belong to one hotel
    • Do not mix multiple hotels in the same request
  4. Monthly Batching

    • Break down updates by month
    • Each request should cover a single month period
  5. Room-Rate Grouping

    • Multiple room-rates can be grouped together in the same request
    • Must be for the same hotel and same month period

Endpoint

POST https://supply-xml.booking.com/hotels/ota/OTA_HotelAvailNotif

Request

Headers

HeaderDescriptionTypeRequiredNotes
Accept-VersionSpecify the version number to get the API functionality specific to that version.stringRequiredSupports the following values:
- 1.1: Current version (default)
Content-TypeRequest content typestringRequiredMust be application/xml

Request body

ElementAttributeDescriptionTypeRequiredNotes
OTA_HotelAvailNotifRQRoot element.objectRequired-
> AvailStatusMessagesRoot element for availability updates.objectRequired-
>> AvailStatusMessageContainer for status messages.objectRequired-
BookingLimitSpecifies the number of rooms of this type that Booking.com can sell. The number of available rooms applies across all rates including prices set using other rates for the same room type.integerOptionalMaximum value: 254
NOTE: Use 255 to indicate unlimited rooms. Values greater than 255 are automatically reset to 254.
>>> StatusApplicationControlDefines the scope of the update.objectRequired-
StartStart date of period. Supports dates from 1 day in the past (follows Central European Time (CET) timezone) and up to 5 years in futuredateRequiredFormat: yyyy-MM-dd
EndEnd date of period (inclusive). Supports dates from 1 day in the past (follows Central European Time (CET) timezone) and up to 5 years in futuredateRequiredFormat: yyyy-MM-dd
InvTypeCodeBooking.com room ID.stringRequired-
RatePlanCodeBooking.com rate plan ID.stringConditionalRequired when updating restrictions.
Not required when specifying BookingLimit in AvailStatusMessage, as the availability is updated on room level.
>>> LengthsOfStayRoot element for length of stay restrictions.objectOptional-
ArrivalDateBasedRestriction applies to arrival day.booleanOptionalDefault: 0
Can be set to 0 or 1. If set to 1, then the restriction set has an effect only on the arrival day of a booking. Whereas, setting it to 0 may affect a search for availability or reservation on all the dates that the query covers.
To set both length-of-stay restriction (ArrivalDateBased="0") and length-of-stay restriction on the arrival day (ArrivalDateBased="1"), you must send those restrictions in separate AvailStatusMessage blocks.
>>>> LengthOfStayDefines minimum or maximum stay requirements.objectOptional-
TimeNumber of days for the length of stay restriction.integerOptionalSpecifies the minimum or maximum number of nights a guest must book.
How it works:
- When ArrivalDateBased="0" (default): The restriction applies if the stay includes the specified date (stay-through restriction)
- When ArrivalDateBased="1": The restriction applies only if the guest checks in on the specified date (arrival-based restriction)
NOTE: Each consecutive set of nights with the same rate plan must comply with the restriction. 0 means no restriction.
MinMaxMessageTypeType of length of stay restriction.stringOptionalPossible values:
- SetMinLOS: Sets minimum length of stay
- SetMaxLOS: Sets maximum length of stay
>>> RestrictionStatusRoot element for restriction status.objectOptional-
StatusSpecifies whether all rooms of a room type are closed (not bookable) or only the specified room type and rate combination on the specified date depending on whether the RatePlanCode is provided.stringOptionalValues: Open or Close.
Closing behavior depends on whether RatePlanCode is included:
- Without RatePlanCode: Closes the entire room type for all rates. The room type will not be available for booking, even if individual room and rate combinations are open.
- With RatePlanCode: Closes only the specific room type and rate combination.
NOTE: When a room is closed, all other information such as BookingLimit, prices, and restrictions are preserved. See also Closing room type vs. room and rate combination.
MinAdvancedBookingOffsetThe minimum number of days and/or hours that guests must book in advance (before the stay date at 24:00 in the hotel timezone).stringOptionalFormat: nD or nH or nDnH. Maximum: 360D
The search date is counted as one of the dates in the restriction.
Examples:
- MinAdvancedBookingOffset="4D" means the room must be booked at least 4 days in advance.
- MinAdvancedBookingOffset="4H" means the room must be booked at least 4 hours in advance.
- MinAdvancedBookingOffset="4D4H" means the room must be booked at least 4 days and 4 hours in advance.
MaxAdvancedBookingOffsetThe Maximum number of days and/or hours that guests must book in advance (before the stay date at 24:00 in the hotel timezone).stringOptionalFormat: nD or nH or nDnH. Maximum: 360D
The search date is counted as one of the dates in the restriction.

Request example

The request below specifies the following:

  • Sets the rooms to sell for room 36745603 to 25 from the 5th of November to and including the 17th of November 2023
  • Sets the minimum stay through for room 36745603 and rate 1278606 to 2 nights from the 5th of November to and including the 17th of November 2023
  • Sets the maximum stay through for room 36745603 and rate 1278606 to 5 nights from the 5th of November to and including the 17th of November 2023
  • Opens the room and rate combination for booking
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailNotifRQ>
  <AvailStatusMessages>
    <AvailStatusMessage BookingLimit="25" LocatorID="1">
      <StatusApplicationControl Start="2023-11-05" End="2023-11-17" InvTypeCode="36745603" />
    </AvailStatusMessage>
    <AvailStatusMessage LocatorID="2">
      <StatusApplicationControl Start="2023-11-05" End="2023-11-17" InvTypeCode="36745603" RatePlanCode="1278606" />
      <LengthsOfStay>
        <LengthOfStay Time="2" MinMaxMessageType="SetMinLOS" />
        <LengthOfStay Time="5" MinMaxMessageType="SetMaxLOS" />
      </LengthsOfStay>
      <RestrictionStatus Status="Open" />
    </AvailStatusMessage>
  </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>

Response

Response body

ElementAttributeDescriptionTypeNotes
OTA_HotelAvailNotifRSRoot element.object-
> SuccessIndicates a successful request.objectOnly returned if there are no Errors elements.
> WarningsGroups a list of individual warnings.object-
>> WarningList details of individual warnings.objectWarnings can occur even if the response contains Success.
CodeReturns an error code for an error.stringSee Troubleshooting availability error responses
DetailsContains additional context about where the warning occurred.stringMay include identifiers such as hotel_id, room_id, rate_id, or date to help identify the specific data that caused the warning.
ShortTextWarning message.string-
> ErrorsGroups a list of individual errors.object-
>> ErrorList details of individual errors.object-
CodeReturns an error code for an error.stringSee Troubleshooting availability error responses
DetailsContains additional context about where the error occurred.stringMay include identifiers such as hotel_id, room_id, rate_id, or date to help identify the specific data that caused the error.
ShortTextError message.string-

Response examples

This section contains examples of successful and unsuccessful responses. For a detailed description of all possible errors and warnings, see Troubleshooting availability error responses.

Success response

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailNotifRS xmlns="http://www.opentravel.org/OTA/2003/05"
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                       xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05/OTA_HotelAvailNotifRS.xsd"
                       Version="1.004" TimeStamp="2026-02-12T15:35:01.665872Z">
  <Success />
</OTA_HotelAvailNotifRS>
<!-- RUID: [XXXXXXXXXXXXXXXXXXXXXXXXXXX] -->

Success response with warnings (HTTP 200)

Warnings can be combined with success messages if the request was still processed.

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailNotifRS xmlns="http://www.opentravel.org/OTA/2003/05" 
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                       xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05/OTA_HotelAvailNotifRS.xsd" 
                       Version="1.004" TimeStamp="2026-02-12T15:35:01.665872Z">
  <Success />
  <Warnings>
    <Warning Code="367" ShortText="Rooms to Sell were set below the Minimum Contracted rooms for these dates: 2023-11-15, 2023-11-07, 2023-11-12, 2023-11-13, 2023-11-08, 2023-11-09, 2023-11-17, 2023-11-14, 2023-11-06, 2023-11-11, 2023-11-16, 2023-11-05, 2023-11-10. The values have been amended to the Minimum Contracted Rooms."/>
  </Warnings>
</OTA_HotelAvailNotifRS>
<!-- RUID: [XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX] -->

Error response (HTTP 400)

Errors are returned without success/warnings elements.

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailNotifRS xmlns="http://www.opentravel.org/OTA/2003/05"
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                       xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05/OTA_HotelAvailNotifRS.xsd"
                       Version="1.004" TimeStamp="2026-02-12T15:35:01.665872Z">
    <Errors>
        <Error Code="RATE_NOT_ACTIVE_FOR_ROOM" ShortText="Rate '123' is not active for room '456'" Details="room_ids: 12345; rate_ids: 45678; dates: 2026-02-12,2026-02-12; hotel_ids: 456789;"/>
    </Errors>
</OTA_HotelAvailNotifRS>
<!-- RUID: [XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX] -->

Additional information

Setting availability for child rates

While setting up availability using rate IDs that are configured as child rates, make sure the request doesn't set values for fields that are configured to inherit from the parent rate plan.

For example, if you try to set a value for min_advance_res restrictions for a child rate while the child rate is configured to follow restrictions the API returns an error.

To resolve the error, specify a rate plan ID that is either configured as a parent rate, or a child rate that does not have the following restrictions: FollowsRestrictions.

The above constraint does not apply to the FollowsClosed restriction. While creating availability using a child rate ID, you can update the status of the room type to open or close, irrespective of the value set in FollowsClosed. However, if an availability is set using a parent rate along with open/close information, then the room type status for the associated child rate is also updated. To reiterate, there is no change to the FollowsClosed restriction behaviour.

Closing room type vs. room and rate combination

You can close availability at the:

  • Room type level: Useful when removing availability for all rooms of a room type that has multiple rate combinations.
  • Room type and rate combination level: Useful when removing availability for a room type satisfying a specific rate combination.

Consider the following inventory:

Room typeRatePriceDate periodRooms to sell
VillaSummer rate110Jul 15 - Aug 3110
VillaPeak season rate120Aug 05 - Aug 2010
VillaOff season rate90Nov 01 - Dec 1010

Closing room type and rate combination

To close the availability of the Villa so that guests don't see availability from Nov 01 - Dec 10, you must close the room type (Villa) and rate combination (Off season rate) by:

  1. Setting InvTypeCode to the Villa room ID
  2. Setting RatePlanCode to the Off season rate ID
  3. Setting RestrictionStatus Status="Close"

Closing a room type

To close the availability of a specific room type (Villa) so that guests don't see availability for a specific period, you must close the room type by:

  1. Setting InvTypeCode to the Villa room ID
  2. Not including RatePlanCode in the request
  3. Setting RestrictionStatus Status="Close"
Once a room is closed you must open it before creating availability

Before creating availability for a room that is closed, you must use the OTA_HotelAvailNotif endpoint to open the room. Otherwise, the request to create availability completes successfully, but guests will not be able to see the availability as the room is still closed.