rooms (B.XML)

This call is intended for the Connectivity Partner to be able to pull active room names and room ids with their corresponding accommodation ids and max children allowed from the Booking.com system. NOTE: The roomrates is to be preferred as a source of information for mapping, as this call only contains basic information as described below. It is still useful, however, in troubleshooting issues with mapping by seeing what rooms have been built.

Step 1: Request for active room information

POST https://supply-xml.booking.com/hotels/xml/rooms

Request — HTTP Message Body Model

<?xml version="1.0" encoding="UTF-8"?>
<request>
  <username>providermachinelogin</username>
  <password>********</password>
  <hotel_id>111111</hotel_id>
</request>

Request — Node Overview

Node Name Nest Level Parent Node Value Range Data Type Node Multiplicity
hotel_id L1 request @5-7 digits integer 0..1
password L1 request -- string 1
request L0 NULL(root) -- -- 1
username L1 request -- string 1
  • The request body consists of a mandatory request root element. This is the parent node to the username, password, and optional hotel_id nodes.
  • The mandatory child node username contains the authorized machine account login of the Connectivity Partner.
  • The mandatory child node password contains the authorized machine account password of the Connectivity Partner.
  • The optional child node hotel_id contains the Booking.com id of the specific accommodation for which the Connectivity Partner would like to query. Omitting the hotel_id will show the room data for all accommodations associated with the login credentials.

Request — cURL Model

curl -H "Host: providerhostname" \
-H "Connection: keep-alive" \
-H "Content-Length: XXX" \
-H "Cache-Control: no-cache" \
-H "Origin: XXXXXXXXXXXXX" \
-H "User-Agent: Provider User-Agent name" \
-H "Content-Type: text/xml;charset=UTF-8" \
-H "Accept: */*" \
-H "Accept-Encoding: gzip,deflate" \
--http1.1 \
-d @messagebody.xml -X POST \
'https://supply-xml.booking.com/hotels/xml/rooms'

Step 2: Response of the active room information

Type HTTP Method Message Sender Message Receiver
Response POST Booking.com Connectivity Partner

Response — HTTP Message Body Sample

<rooms>
  <room id="11111101"
        hotel_id="111111"
        hotel_name="Fake Hotel"
        max_children="0">Single Room</room>
  <room id="11111102"
        hotel_id="111111"
        hotel_name="Fake Hotel"
        max_children="2">Double Room</room>
</rooms>
<!-- RUID: [XXXXXXXXXXXXXXXXXXXXXXXXXXX==] -->

Response — Node Overview

Node Name Nest Level Parent Node Value Range Data Type Node Multiplicity
room L1 rooms -- -- 0..X
rooms L0 NULL(root) -- -- 1
  • The response body consists of a rooms root element. This is the parent node to the room node, whose multiplicity is determined by the number of active rooms associated with the login account.

  • The child node room contains the room name as built on Booking.com, with the room @id, @hotel_id, @hotel_name, and @max_children allowed as described below.

Response — Attribute(@) Overview

Attribute Name Node Name Value Range Data Type Node Multiplicity
@hotel_id room @5-7 digits integer 1
@hotel_name room -- string 1
@id room @7-9 digits integer 1
@max_children room -- integer 1
  • The @hotel_id of room contains the Booking.com id number of the accommodation.

  • The @hotel_name of room contains the name of the accommodation on Booking.com.

  • The @id of room contains the room id on Booking.com.

  • The @max_children of room contains the maximum number of children allowed to stay in the room.

As with every standard Booking.com response, an RUID string terminates the message inside an XML comment node and should be stored by the Connectivity Partner for at least 30 days.

Errors/Warnings

<?xml version='1.0' standalone='yes'?>
<rooms>
  <fault code="401"
         string="Authorization Required" />
</rooms>
<!-- RUID: [XXXXXXXXXXXXXXXXXXXXXXXXXXX==] -->

This error will be returned due to incorrect login credentials, an invalid accommodation id provided, or a machine white list error. Double check your username, password (including capitalization), any accommodation id specified, as well as the machine whitelist in your provider portal configuration.

If an error/warning is encountered, and basic troubleshooting methods has been found ineffective, please provide the error/warning message along with the RUID of the response message to your Booking.com support contact.