Last updated

Retrieve property attributes

Retrieve the following property attribute details for one or all properties using the OTA_HotelSearch endpoint:

  • Property creation and last change dates along with supported currency code
  • Property status
  • Property content score

If you enable the feature: Include hotel connections in HotelSearch (hotel_search_include_connections) in the Provider Portal, you can also see the details of all the connection types available for the property.

Viewing property attributes

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

Request body parameters

The following table describes the elements you must add in the request body:

ElementAttributeDescriptionTypeRequired/
Optional
Notes
OTA_HotelSearchRQRoot element.objectrequired-
> CriteriaContains search criteria.objectoptionalBy omitting Criteria, you can retrieve the attributes of all properties that you manage. Consider using Pagination to paginate the results.
If you specify a property ID using Criteria, you cannot specify pagination details using TPA_Extensions.
>> CriterionContains search criteria for one property.objectoptional-
>>> HotelRefContains the property ID of the property you want to retrieve status details for.stringoptional-
HotelCodeSpecifies the property ID.stringoptional-
> TPA_ExtensionsContains pagination details.objectoptionalBecause the number of properties that you manage can get quite high, retrieving attribute information for all of them at once can cause pagination issues.
You can request property attributes in batches by specifying the TPA_Extensions->Pagination object in the request body.
>> PaginationSpecifies pagination details.objectoptionalIf you specify pagination details using TPA_Extensions, you cannot specify property ID using Criteria.
Results are sorted in ascending order of HotelCode.
PageSpecifies the number of pages you want to see the results in.stringrequired-
PageSizeSpecifies the number of properties per page.stringrequiredThe response contains the attribute details of only the number of properties specified per each page. We recommend using 100 as PageSize.

Request body example

The following request body example retrieves property attributes for one specified property:

<OTA_HotelSearchRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="2.001">
  <Criteria>
    <Criterion>
      <!-- Replace the {PlaceHolder} in the following line! -->
      <HotelRef HotelCode="{PropertyID}"/>
    </Criterion>
  </Criteria>
</OTA_HotelSearchRQ>

Response body example

<OTA_HotelSearchRS
    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_HotelSearchRS.xsd" TimeStamp="2023-12-02T15:07:34-00:00" Target="Production" Version="3.000">
    <Properties LastChange="2023-12-01 12:00:00">
        <Property HotelCode="{PropertyID}" HotelName="The Best Hotel" CurrencyCode="EUR">
            <TPA_Extensions HotelStatus="XML: Being built" Created="2023-11-19 07:13:06" LastChange="2023-12-01 16:41:53" ContentScore="67" ConnectionStatus="XML Active">
                 <Connections>
                    <Connection ConnectionType="Reservations" ConnectionState="XML Active" />
                    <Connection ConnectionType="Rates and Availability" ConnectionState="XML Active" />
                    <Connection ConnectionType="Content" ConnectionState="XML Active" />
                </Connections>
            </TPA_Extensions>
        </Property>
    </Properties>
</OTA_HotelSearchRS>

Response body elements

The following table describes the response elements:

ElementAttributeDescriptionTypeNotes
OTA_HotelSearchRSRoot element.object
> TPA_ExtensionsContains pagination details.object-
>> PaginationContains pagination details.objectResults are sorted in ascending order of HotelCode.
TotalAmountSpecifies the total number of properties found.integer-
PageCountSpecifies the total number of pages of current PageSizeinteger-
PageSpecifies the number of requested pages.integer
PageSizeSpecifies the number of properties per page.integer
> PropertiesContains a collection of attributes for all properties.array of Property
>> PropertyContains the attribute details of each property.object-
HotelCodeSpecifies the Booking.com property ID.string-
HotelNameSpecifies the property name.string-
CurrencyCodeSpecifies the currency code.currencycodeBooking.com defines the currency for each property. Retrieve a list of all currency codes with /xml/currencies.
>>> TPA_ExtensionsContains additional details.object-
HotelStatusContains the current property status.stringTo find the list of all supported property status, see property status.
CreatedSpecifies the property's creation date and time (CE(S)T).stringFormat: YYYY-MM-DD HH:MM:DD
LastChangeSpecifies the date and time the property status last changed (CE(S)T).stringFormat: YYYY-MM-DD HH:MM:DD
ContentScoreSpecifies the property page content score as a percentage.stringThe ContentScore is calculated periodically. It may take a while for your changes to reflect on the score.
ConnectionStatusSpecifies the property connection status.stringFor more information on all the possible connection status, see Connections status.
>>>> ConnectionsContains information about connection types and their current status.objectTo view the details, enable the feature: Include hotel connections in HotelSearch (hotel_search_include_connections) in Provider Portal.
>>>>> ConnectionContains information about each connection type.object-
ConnectionTypeSpecifies the connection type allowed for the property.string-
ConnectionStatusSpecifies the connection status for the specific connection type.enumerated stringFor more information on all the possible connection type status, see Connections status.

Connections status

The Connections array contains information about connection types and their current status. The endpoint does not return connection details, by default.

To view the details, you must enable the feature: Include hotel connections in HotelSearch (hotel_search_include_connections) in Provider Portal.

The ConnectionState element can contain the following values:

  • Pending Connection: Connection is pending on provider side
  • Pending Property: Connection is pending on property side
  • XML Active: Connection is active

Pagination - Request Example

<OTA_HotelSearchRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="2.001" >
    <TPA_Extensions>
        <Pagination Page="1" PageSize="100"/>
    </TPA_Extensions>
</OTA_HotelSearchRQ>

Pagination - Response Example

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelSearchRS 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_HotelSearchRS.xsd" TimeStamp="2019-12-23T14:18:06+00:00" Target="Test" Version="3.000">
    <TPA_Extensions>
        <Pagination TotalAmount="3500" PageCount="35" Page="1" PageSize="100"/>
    </TPA_Extensions>
    <Properties>
        <Property HotelCode="{PropertyID}" HotelName="The Best Hotel" CurrencyCode="EUR">
            <TPA_Extensions HotelStatus="XML: Being built" Created="2023-11-19 07:13:06" LastChange="2023-12-01 16:41:53" ContentScore="67" ConnectionStatus="XML Active">
                 <Connections>
                    <Connection ConnectionType="Reservations" ConnectionState="XML Active" />
                    <Connection ConnectionType="Rates and Availability" ConnectionState="XML Active" />
                    <Connection ConnectionType="Content" ConnectionState="XML Active" />
                </Connections>
            </TPA_Extensions>
        </Property>
        ...
        <Property HotelCode="{PropertyID}" HotelName="The Best Hotel 2" CurrencyCode="EUR">
            <TPA_Extensions HotelStatus="XML: Being built" Created="2023-12-15 03:23:01" LastChange="2016-12-01 16:41:53" ContentScore="68" ConnectionStatus="Pending Property"/>
            <Connections>
                <Connection ConnectionType="Content" ConnectionState="Pending Property" />
            </Connections>
        </Property>
    </Properties>
</OTA_HotelSearchRS>

Next steps