> For the complete documentation index, see [llms.txt](https://suissu.gitbook.io/su-api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://suissu.gitbook.io/su-api-documentation/su-channel-manager/channel-content-api/booking.com-content-api/room-api/room-retrieve-api.md).

# Room Retrieve API

This endpoint is used to retrieve details about rooms associated with a specific hotel and channel.&#x20;

> This endpoint allows you to fetch the room configuration, including details about the room type, occupancy, and extra beds for a given hotel and its associated channel.

***

### <mark style="color:yellow;">Endpoint</mark>

<mark style="color:green;background-color:green;">**`POST`**</mark>&#x20;

<div align="left"><figure><img src="https://958347541-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9bn2UcBkeqtqixkl5eF%2Fuploads%2FpsybX0n39kUB8Z8WOk4X%2FSandbox%20image.png?alt=media&amp;token=4ae73d0f-0d1a-4d73-a4e2-673dbc081d6a" alt="" width="56"><figcaption></figcaption></figure></div>

{% code overflow="wrap" %}

```url
https://connect-sandbox.su-api.com/SUAPI/jservice/bdc/room/retrieve
```

{% endcode %}

***

#### <mark style="color:yellow;">Attributes</mark>

`hotel_id` <mark style="color:orange;">**string (Required)**</mark>

Specifies the hotel ID for the property.

***

`channel_hotel_id` <mark style="color:orange;">**string (Required)**</mark>

Specifies the channel-specific hotel ID for the property.

***

## <mark style="color:yellow;">**Sample Request**</mark>

```json
{
   "hotel_id": "AWSTEST",
   "channel_hotel_id": "12962495"
}
```

***

## <mark style="color:yellow;">Response</mark>

#### <mark style="color:green;">**Sample Success Response**</mark>

```json
{
   "Status": "Success",
   "Data": [
       {
           "channel_room_id": 1291567403,
           "configuration": {
               "unit_type_id": 1,
               "rooms": [
                   {
                       "type": "BEDROOM_SUBROOM",
                       "bed_configurations": [
                           {
                               "beds": [
                                   {
                                       "bed_type_id": 1,
                                       "bed_count": 1
                                   }
                               ],
                               "is_default_configuration": true
                           }
                       ]
                   }
               ]
           },
           "unit_name_id": 565,
           "number_of_units": 1,
           "smoking_policy": "SMOKING_AND_NONSMOKING",
           "size": {
               "value": 1,
               "unit": "SQM"
           },
           "partner_reference_name": "string",
           "floor_numbers_located_on": [
               0
           ],
           "occupancy": {
               "max_guests": 1,
               "max_adults": 1,
               "max_children": 0,
               "max_infants": 2,
               "max_infants_on_top": 1
           },
           "extra_beds_configuration": {
               "extra_beds": 0,
               "cribs": 0,
               "is_crib_and_extra_bed_allowed": false
           }
       },
       {
           "channel_room_id": 1291567404,
           "configuration": {
               "unit_type_id": 1,
               "rooms": [
                   {
                       "type": "BEDROOM_SUBROOM",
                       "bed_configurations": [
                           {
                               "beds": [
                                   {
                                       "bed_type_id": 1,
                                       "bed_count": 1
                                   }
                               ],
                               "is_default_configuration": true
                           }
                       ]
                   }
               ]
           },
           "unit_name_id": 9,
           "number_of_units": 1,
           "smoking_policy": "SMOKING_AND_NONSMOKING",
           "size": {
               "value": 1,
               "unit": "SQM"
           },
           "partner_reference_name": "string",
           "floor_numbers_located_on": [
               0
           ],
           "occupancy": {
               "max_guests": 1,
               "max_adults": 1,
               "max_children": 0,
               "max_infants": 2,
               "max_infants_on_top": 1
           },
           "extra_beds_configuration": {
               "extra_beds": 0,
               "cribs": 0,
               "is_crib_and_extra_bed_allowed": false
           }
       }
   ],
   "Message": "Room Details Fetch Successfully",
   "Ruid": "ae430cdd-777f-41d1-a6c1-1a38ed33325d"
}
```

#### <mark style="color:yellow;">Success Response Body Elements</mark>

`data` <mark style="color:orange;">**object**</mark>&#x20;

Contains details of the unit created.

`channel_room_id` <mark style="color:orange;">**integer**</mark>

Specifies the channel-specific room ID for the unit.

{% hint style="info" %}
This is the unique identifier for the room in the channel (for example, Booking.com) system.
{% endhint %}

`unit_id` <mark style="color:orange;">**string**</mark>&#x20;

Specifies the unit ID.&#x20;

`configuration` <mark style="color:orange;">**object**</mark>&#x20;

Contains the unit configuration.

`unit_type_id` <mark style="color:orange;">**enumerated string**</mark>&#x20;

Specifies the unit type ID.&#x20;

{% hint style="info" %}
For example, to create an One-Bedroom Apartment unit, you must specify the unit type ID: 1.
{% endhint %}

`rooms` <mark style="color:orange;">**array of objects**</mark>&#x20;

Contains the room details provided the unit type supports rooms (also known as subrooms).&#x20;

`type` <mark style="color:orange;">**enumerated string**</mark>&#x20;

Specifies the room type supported by the unit type.&#x20;

{% hint style="info" %}
Supports the following values:

* `BEDROOM_SUBROOM`&#x20;
* `LIVING_ROOM_SUBROOM`&#x20;
* `GUEST_ROOM`
  {% endhint %}

`bed_configurations` <mark style="color:orange;">**object**</mark>&#x20;

Contains the details of the bed available in the room.

`beds` <mark style="color:orange;">**array of objects**</mark>&#x20;

Contains the bed type and the total number of beds.

`bed_type_id` <mark style="color:orange;">**enumerated integer**</mark>&#x20;

Specifies the bed type ID that is supported by the unit type.&#x20;

`bed_count` <mark style="color:orange;">**integer**</mark>&#x20;

Specifies the total number of beds available in the unit/room.

`is_default_configuration` <mark style="color:orange;">**boolean**</mark>&#x20;

Specifies whether the specified bed configuration is default for the unit/room.

`unit_name_id`  <mark style="color:orange;">**string**</mark>&#x20;

Specifies the unit name ID that is part of the unit type.&#x20;

`number_of_units` <mark style="color:orange;">**integer**</mark>&#x20;

Specifies the total number of rooms available at the property for the specified room type.&#x20;

{% hint style="info" %}
Default value: 1.
{% endhint %}

`smoking_policy` <mark style="color:orange;">**enumerated string**</mark>&#x20;

Specifies the smoking policy in the room.&#x20;

{% hint style="info" %}
Supports the following values:

* `SMOKING`&#x20;
* `NONSMOKING`&#x20;
* `SMOKING_AND_NONSMOKING`
  {% endhint %}

`size` <mark style="color:orange;">**object**</mark>&#x20;

Contains the unit size details.

`value` <mark style="color:orange;">**integer**</mark>&#x20;

Specifies the unit size in the chosen unit.

`unit` <mark style="color:orange;">**enumerated string**</mark>&#x20;

Specifies the unit of measurement to represent the unit size.

{% hint style="info" %}
Supports the following values:

* `SQM`
* `SQFT`
  {% endhint %}

`partner_reference_name` <mark style="color:orange;">**string**</mark>&#x20;

Specifies a custom unit name that is visible in the extranet and in the API response.&#x20;

{% hint style="info" %}
Default value: "" (an empty string).
{% endhint %}

`floor_numbers_located_on` <mark style="color:orange;">**array of integers**</mark>&#x20;

Specifies the floor where the unit is located.&#x20;

{% hint style="info" %}
Default value: \[] (an empty array).
{% endhint %}

`occupancy` <mark style="color:orange;">**object**</mark>&#x20;

Contains the occupancy details of the unit.&#x20;

{% hint style="info" %}
optional
{% endhint %}

`max_guests` <mark style="color:orange;">**integer**</mark>&#x20;

Specifies the maximum guest occupancy for the unit.&#x20;

{% hint style="info" %}
Maximum value: 50.&#x20;

Default value: 1.
{% endhint %}

`max_adults` <mark style="color:orange;">**integer**</mark>&#x20;

Specifies the maximum adult occupancy for the unit.&#x20;

{% hint style="info" %}
Maximum value: 50.&#x20;

Default value: 1.&#x20;

The total occupancy (sum of adults and children) must not exceed the room's maximum guest occupancy (max\_guests) limit.
{% endhint %}

`max_children` <mark style="color:orange;">**integer**</mark>&#x20;

Specifies the maximum child occupancy for the unit.

{% hint style="info" %}
Maximum value: 49.&#x20;

Default value: 0.&#x20;

The total number of children should be less than the maximum number of guests.
{% endhint %}

`max_infants` <mark style="color:orange;">**integer**</mark>

Specifies the maximum infants (0-2) occupancy for the unit count toward max\_guests

{% hint style="info" %}
**Default Value:** `max_children`
{% endhint %}

`max_infants_on_top` <mark style="color:orange;">**integer**</mark>

Specifies the maximum infants (0-2) occupancy for the unit on top of max\_guests

{% hint style="info" %}
**Default Value:** 0
{% endhint %}

***

`extra_beds_configuration` <mark style="color:orange;">**object**</mark>&#x20;

Contains the extra beds details for the unit.&#x20;

{% hint style="info" %}
If not specified, the API specifies default values.
{% endhint %}

`extra_beds` <mark style="color:orange;">**integer**</mark>&#x20;

Specifies the total number of extra beds available on request per room/unit.&#x20;

{% hint style="info" %}
Default value: 0.&#x20;

Maximum: 100.
{% endhint %}

`cribs` <mark style="color:orange;">**integer**</mark>&#x20;

Specifies the total number of extra cribs available on request per room/unit.&#x20;

{% hint style="info" %}
Default value: 0.&#x20;

Maximum: 100.
{% endhint %}

`is_crib_and_extra_bed_allowed` <mark style="color:orange;">**integer**</mark>&#x20;

Specifies whether guests have the option of requesting both the extra bed and crib in the room/unit.&#x20;

{% hint style="info" %}
Default: false
{% endhint %}

`Message` <mark style="color:orange;">**string**</mark>

A message receives within the response body. This will generally be an empty string if no additional information is needed.

`Ruid` <mark style="color:orange;">**string**</mark>&#x20;

Specifies the unique request ID.&#x20;

{% hint style="info" %}
You can share this ID with Booking.com customer support when you run into an issue. This can help in understanding what went wrong.
{% endhint %}

#### <mark style="color:red;">Errors</mark>

<mark style="color:red;">**Sample Error Response 1**</mark>

```json
{
   "Errors": [
       {
           "Code": "400",
           "ShortText": "HotelCode: Invalid HotelCode ('NT711')"
       }
   ],
   "Status": "Fail"
}
```

<mark style="color:red;">**Sample Error Response 2**</mark>

```json
{
   "Errors": [
       {
           "Code": "573",
           "ShortText": "channel-mapping not found for this property!"
       }
   ],
   "Status": "Fail"
}
```

<mark style="color:red;">**Sample Error Response 3**</mark>

```json
{
   "Status": "Fail",
   "Errors": [],
   "Message": "This account doesn't have access to this property.",
   "Ruid": "87f3ee0d-5033-4063-ae5b-77f23d379ce5"
}
```

***

<mark style="color:yellow;">**Error Response Body Elements**</mark>

`Status` <mark style="color:orange;">**string**</mark>

Indicates the result of the API call, which will be always `"Fail"` in case of an error response.

***

`Error` <mark style="color:orange;">**array**</mark>

Array that contains details about any errors that occurred during the API call. Each object in the `Errors` array contains the following properties:

`Code` <mark style="color:orange;">**string**</mark>

Specific error code that helps identify the type of error.

{% hint style="info" %}
For example: `"400"` indicates a bad request.
{% endhint %}

`ShortText` <mark style="color:orange;">**string**</mark>

A short description of the error.

***

`Message` <mark style="color:orange;">**string**</mark>

A message providing more information about the error.

***

`Ruid` <mark style="color:orange;">**string**</mark>

A unique identifier for tracking the request.
