roomrateavailability (B.XML)¶
The xml/roomrateavailability
endpoint (see schema) returns inventory information per property from Booking.com.
The response contains this information:
- room/rate/date information;
- number of booked rooms;
- number of cancelled rooms;
- whether a room/rate combination is closed for a certain date;
- number of minimum contracted rooms for a room/rate combination per date;
- number of minimum contracted rooms until for a room/rate combination per date;
- number of rooms left to sell.
HTTP Request¶
POST https://supply-xml.booking.com/hotels/xml/roomrateavailability
Request headers¶
Header | Description | Type | Required | Notes |
---|---|---|---|---|
Authorization |
Machine account username and password | string | Required | Example: Authorization: Basic {username:password} |
Sample request¶
<request>
<hotel_id>367456</hotel_id>
<version>1.0</version>
<number_of_days>2</number_of_days>
<start_date>2018-09-19</start_date>
<room_level>1</room_level>
<room_id>12302</room_id>
</request>
Request body¶
Field | Description | Type | Required | Notes |
---|---|---|---|---|
request |
Root element. | object | Required | - |
hotel_id |
The property for which you want to retrieve availability. | ID | Required | - |
version |
Interface specification version. | float | Optional | Default: 1.0 |
number_of_days |
The number of days (from start_date ) for which you want to retrieve availability info. |
integer | Required | Min/max value: 0 /31 |
start_date |
The date from which you want to retrieve availability info. | datetime | Required | Format: YYYY-MM-DD |
room_level |
Indicates whether you want to retrieve info at room level or rate level. | integer | Optional | Boolean expressed as integer. 1 = true , 0 = false . Default: 0 |
room_id |
Filter results by room ID | integer | Optional | Occurences: 0..N |
Sample response (room_level
= 1
)¶
<result>
<room room_id="12302">
<date booked="0"
cancelled="0"
min_contracted_rooms="0"
min_contracted_rooms_until="0"
rooms_to_sell="0"
value="2018-09-19"/>
<date booked="0"
cancelled="0"
min_contracted_rooms="0"
min_contracted_rooms_until="0"
rooms_to_sell="0"
value="2018-09-20"/>
</room>
<warnings>
<warning>We excluded the following rooms from the result, because they have no room-level availability and the request contained room_level=1. room_ids: 12301, 12303</warning>
</warnings>
</result>
<!-- RUID: [UmFuZG9tSVYkc2etc] -->
Notes:
- Booking.com generally handles availability at room level. If you request availability information at rate level for a property with a room level inventory, the response is likely to be inaccurate.
- If you use
room_level=1
, the API ignores rooms that have no room-level availability. See thewarning
in the sample above.
Sample response (room_level
= 0
)¶
<result>
<roomrate
booked="0"
cancelled="0"
closed="0"
date="2018-09-19"
rate_id="12345678"
room_id="12302"
rooms_to_sell="2"/>
<!-- More <roomrate> elements would follow here. Skipped for brevity. -->
</result>
<!-- RUID: [UmFuZG9tSVYkc2RlIyetc] -->
Response body¶
Default values
For integer-type attributes, the default value is 0
. For non-integer attributes, the default is an empty string.
Field | Description | Type | Notes | |
---|---|---|---|---|
result |
Root element. | object | Children will be either roomrate or a combination of room and rate elements, depending on value of room_level in request. |
|
roomrate |
Contains availability info for specified room/rate/date combination. | object | This element is present only if room_level value in request is 1 . |
|
room |
Contains availability info for specified room. | object | This element is present only if room_level value in request is 0 . |
|
rate |
Contains availability info for specified rate. | object | This element is present only if room_level value in request is 0 . |
|
roomrate[@booked] / rate[@booked] |
The number of booked rooms for the specified room/rate/date combination. | integer | - | |
roomrate[@cancelled] / rate[@cancelled] |
The number of cancelled rooms for the specified room/rate/date combination. | integer | - | |
roomrate[@closed] / rate[@closed] |
Indicates whether the room/rate/date combination is closed for sales or open bookable. | integer | Boolean expressed as integer. 1 = true , 0 = false . |
|
roomrate[@date] |
The date from which availability is being shown. | datetime | Format: YYYY-MM-DD |
|
roomrate[@min_contracted_rooms] / rate[@min_contracted_rooms] |
The number of rooms that must be sold on Booking.com, as agreed with the property owner. | integer | NOTE: This attribute is no longer in use. | |
roomrate[@min_contracted_rooms_until] / rate[@min_contracted_rooms_until] |
The amount of days before current date, a hotelier can remove it's rooms to sell or close a room, where there are still minimum contracted rooms left to sell | integer | NOTE: This attribute is no longer in use. | |
roomrate[@rate_id] / rate[@rate_id] |
The rate for which information is being shown. | integer | - | |
roomrate[@room_id] / room[@room_id] |
The room for which information is being shown. | integer | - | |
roomrate[@rooms_to_sell] / date[@rooms_to_sell] |
The number of available rooms left for the specified room/rate/date combination. | integer | - | |
date |
Contains availability info for specified date. | object | This element is present only if room_level value in request is 0 . |
|
date[@value] |
The date from which availability is being shown. | - | datetime | Format: YYYY-MM-DD |
Features¶
Full read of inventory (full_rate_avail_matrix)¶
Enable this feature to get full inventory information for roomrateavailability.
<result>
<room room_id="26551401">
<date
min_contracted_rooms="0"
min_contracted_rooms_until="0"
rooms_to_sell="0"
value="2017-09-01">
<rate
booked="0"
cancelled="0"
closed="1"
closed_on_arrival="0"
closed_on_depart="0"
exact_stay_arrival="0"
length_of_stay="0"
max_advance_res=""
max_stay_arrival="0"
max_stay_through="0"
min_advance_res=""
min_contracted_rooms="0"
min_contracted_rooms_until="0"
min_stay_arrival="0"
min_stay_through="0"
occupancy="2"
policygroup=""
price="3500"
price_single="3500"
rate_id="910013"/>
</date>
</room>
</result>
- booked : The amount of booked rooms for the specified room/rate/date combination - integer
- cancelled : The amount of cancelled rooms for the specified room/rate/date combination - integer
- closed : Specifies in a boolean value whether the room/rate/date combination is closed for sales or open bookable - boolean
- closed_on_arrival : Specifies in a boolean value whether it's possible to check int for room/rate/date combination - boolean
- closed_on_depart : Specifies in a boolean value wether it's possible to checkout out for the room/rate/date combination - boolean
- exact_stay_arrival : Stay length needs to have exactly that value, checked on arrival day - integer
- length_of_stay : This is the FPLOS (Full Pattern Length of Stay restriction). Binary representation of length of stay where 0 means there is no constraint and 1 means no checkout at this date - string of length 32. if there is 3 dots at the end then this means repeat the last bit till the length of the string is 32. For example 1001... means 10011111111111111111111111111111 This is only relevant to providers who have FPLOS setting enabled
- max_advance_res : Maximum time before the checkin date when the booking can be made - XD, XH where X is integer, D stands for Day and H for hour
- max_stay_arrival : Maximum length of stay, checked on arrival day - integer
- max_stay_through : Maximum length of stay of any reservation that overlaps this date - integer
- min_advance_res : Minimum time before the checkin date when the booking can be made - XD, XH where X is integer, D stands for Day and H for hour
- min_contracted_rooms : The amound of rooms that need to be sold on Booking.com, contracted with the hotelier.cannot be more than the amount of rooms to sell - integer
- min_contracted_rooms_until : The amount of days before current date, a hotelier can remove its rooms to sell or close a room, where there are still minimum contracted rooms left to sell - integer
- min_stay_arrival : Minimum length of stay, checked on arrival day - integer
- occupancy : The number of guests in a room under a particular room rate. You can only access and use this attribute when the property opted for the OBP or LOS pricing model - integer
- policygroup : policygroup - integer
- price : The monetary value per night for the maximum occupancy of a room under a particular room rate. This price is dependent on the currency, which is set in the Booking.com system - integer
- If the pricing model is OBP, then this price relates to the level of occupancy specified in the @occupancy attribute.
- If the pricing model is LOS, then you receive a list of comma-separated prices. Each price corresponds to a length of stay ( 1 night, 2 nights, ...) with the level of occupancy specified in the @occupancy attribute.
- price_single : The room rate for 1 person per night depending on the currency of the hotel set in the Booking.com system - integer
- rate_id : the rate ID. Needs to be active in the Booking.com system - integer