rates (B.XML)

This call is intended for the Connectivity Partner to be able to pull active rate names and rate 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 as it provides the minimal information below.

Step 1: Request for minimal built rate information on Booking.com

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

Request — HTTP Message Body Model

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

  <!-- optional -->
  <show_rates_status>1</show_rates_status>
</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
show_rates_status L1 request 0,1 integer 0..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 minimal rate data for all accommodations associated with the login credentials.
  • The optional child node show_rates_status defines how the active status of rates is shown:
show_rates_status code Description
0 show only active rates (default behaviour)
1 show all rates and include @active attribute in the output

Feature Required: include_rate_active_and_status

To use the child node show_rate_status as expressed above. The Feature include_rate_active_and_status must be used or enabled on Provider Portal.

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/rates'

Step 2: Response of the minimal built rate information

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

Response — HTTP Message Body Sample

<rates>
  <rate id="343434"
        hotel_id="111111"
        hotel_name="Fake Hotel">Standard Rate</rate>
  <rate id="565656"
        hotel_id="111111"
        hotel_name="Fake Hotel"
        is_child_rate="1">Advance Purchase</rate>
</rates>
<!-- RUID: [XXXXXXXXXXXXXXXXXXXXXXXXXXX==] -->

Response — Node Overview

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

  • The child node rate contains the rate name as built on Booking.com, with the rate @id, @hotel_id, @hotel_name, and possibly a @is_child_rate flag as described below.

Response — Attribute(@) Overview

Attribute Name Node Name Value Range Data Type Node Multiplicity
@active rate 0,1 boolean 0..1
@hotel_id rate @5-7 digits integer 1
@hotel_name rate -- string 1
@id rate @7-9 digits integer 1
@is_child_rate rate 1 boolean 1
  • If @active="1", the rate is active and @active="0" implies inactive rate.

  • The @hotel_id of rate contains the Booking.com id number of the accommodation.

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

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

  • The optional @is_child_rate of rate flags whether the rate is being calculated by Booking.com and therefore does not need to be mapped for rate updates (though still perhaps for reservation pulls). If not present, the value is assumed to be '0' (not a child rate).

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.

Example Outputs of

If 0 (default, show only active rates):

<rates>
  <rate id="343434"
        hotel_id="111111"
        hotel_name="Fake Hotel">Standard Rate</rate>
  <rate id="565656"
        hotel_id="111111"
        hotel_name="Fake Hotel"
        is_child_rate="1">Advance Purchase</rate>
</rates>

If 1 (show all rates with @active status):

<rates>
  <rate id="343434"
        active="1"
        hotel_id="111111"
        hotel_name="Fake Hotel">Standard Rate</rate>
  <rate id="565656"
        active="1"
        hotel_id="111111"
        hotel_name="Fake Hotel"
        is_child_rate="1">Advance Purchase</rate>
  <rate id="787878"
        active="0"
        hotel_id="111111"
        hotel_name="Fake Hotel">Deluxe Purchase</rate>
</rates>

Feature Required: include_rate_active_and_status

For show_rate_status to be used as expressed above. The Feature include_rate_active_and_status must be used or enabled on Provider Portal.

Errors/Warnings

<?xml version='1.0' standalone='yes'?>
<rates>
  <fault code="401"
         string="Authorization Required" />
</rates>
<!-- 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.