# 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](https://connect.booking.com/feature_management?lang=en), you can also see the details of all the connection types available for the property.

## Viewing property attributes


```http
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:

| Element | Attribute | Description | Type | Required/Optional | Notes |
|  --- | --- | --- | --- | --- | --- |
| `OTA_HotelSearchRQ` |  | Root element. | object | required | - |
| **>** `Criteria` |  | Contains search criteria. | object | optional | By 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`. |
| **>>** `Criterion` |  | Contains search criteria for one property. | object | optional | - |
| **>>>**  `HotelRef` |  | Contains the property ID of the property you want to retrieve status details for. | string | optional | - |
|  | `HotelCode` | Specifies the property ID. | string | optional | - |
| **>** `TPA_Extensions` |  | Contains pagination details. | object | optional | Because 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. |
| **>>** `Pagination` |  | Specifies pagination details. | object | optional | If you specify pagination details using `TPA_Extensions`, you cannot specify property ID using `Criteria`.  Results are sorted in ascending order of `HotelCode`. |
|  | `Page` | Specifies the number of pages you want to see the results in. | string | required | - |
|  | `PageSize` | Specifies the number of properties per page. | string | required | The 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:


```xml
<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


```xml
<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:

| Element | Attribute | Description | Type | Notes |
|  --- | --- | --- | --- | --- |
| `OTA_HotelSearchRS` |  | Root element. | object |  |
| **>** `TPA_Extensions` |  | Contains pagination details. | object | - |
| **>>** `Pagination` |  | Contains pagination details. | object | Results are sorted in ascending order of `HotelCode`. |
|  | `TotalAmount` | Specifies the total number of properties found. | integer | - |
|  | `PageCount` | Specifies the total number of pages of current `PageSize` | integer | - |
|  | `Page` | Specifies the number of requested pages. | integer |  |
|  | `PageSize` | Specifies the number of properties per page. | integer |  |
| **>** `Properties` |  | Contains a collection of attributes for all properties. | array of Property |  |
| **>>** `Property` |  | Contains the attribute details of each property. | object | - |
|  | `HotelCode` | Specifies the Booking.com property ID. | string | - |
|  | `HotelName` | Specifies the property name. | string | - |
|  | `CurrencyCode` | Specifies the [currency code](/connectivity/docs/b_xml-currencies). | [currencycode](/connectivity/docs/b_xml-currencies) | Booking.com defines the currency for each property. Retrieve a list of all currency codes with [/xml/currencies](/connectivity/docs/b_xml-currencies). |
| **>>>** `TPA_Extensions` |  | Contains additional details. | object | - |
|  | `HotelStatus` | Contains the current [property status](/connectivity/docs/property-statuses). | string | To find the list of all supported property status, see [property status](/connectivity/docs/property-statuses). |
|  | `Created` | Specifies the property's creation date and time (CE(S)T). | string | Format: `YYYY-MM-DD HH:MM:DD` |
|  | `LastChange` | Specifies the date and time the [property status](/connectivity/docs/property-statuses) last changed (CE(S)T). | string | Format: `YYYY-MM-DD HH:MM:DD` |
|  | `ContentScore` | Specifies the property page content score as a percentage. | string | The `ContentScore` is calculated periodically. It may take a while for your changes to reflect on the score. |
|  | `ConnectionStatus` | Specifies the property connection status. | string | For more information on all the possible connection status, see [Connections status.](#connections-status) |
| **>>>>** `Connections` |  | Contains information about connection types and their current status. | object | To view the details, enable the feature: *Include hotel connections in HotelSearch* (`hotel_search_include_connections`) in [Provider Portal](https://connect.booking.com/feature_management?lang=en). |
| **>>>>>** `Connection` |  | Contains information about each connection type. | object | - |
|  | `ConnectionType` | Specifies the connection type allowed for the property. | string | - |
|  | `ConnectionStatus` | Specifies the connection status for the specific connection type. | enumerated string | For more information on all the possible connection type status, see [Connections status.](#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](https://connect.booking.com/feature_management?lang=en).

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


```xml
<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
<?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

* [Retrieve a property's details](/connectivity/docs/tsk-retrieve-property)
* [Check a property's content](/connectivity/docs/preparing-a-property-to-be-open-bookable)
* [Open a property](/connectivity/docs/preparing-a-property-to-be-open-bookable)
* [Close a property](/connectivity/docs/preparing-a-property-to-be-open-bookable)