> 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/product-api/product-map-create-room-based.md).

# Product Map Create (Room Based)

This endpoint creates a new room rate plan mapping for a specific hotel and room type, with pricing and availability details.

***

### <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/product/map
```

{% endcode %}

***

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

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

The type of operation to be performed.&#x20;

{% hint style="info" %}
In this case, it is `"create"`, indicating that the system is creating a new room rate plan for a hotel.
{% endhint %}

***

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

The unique identifier for the hotel. It links the request to a specific hotel in the system, allowing the room rate to be associated with the correct hotel.

***

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

The identifier for the specific room type being referenced in the request. This ties the rate plan to a specific room at the hotel.

***

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

The identifier for the rate plan associated with the room. This determines the pricing structure, discounts, or other conditions for booking the room.

***

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

The identifier for the hotel in the distribution channel’s system. It links the hotel product to the respective channel, enabling it to be managed and booked through that platform.

***

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

The identifier for the specific room type in the channel’s system. This associates the rate plan and availability with the correct room type within the channel.

***

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

The identifier for the rate plan in the channel’s system. It defines the pricing and conditions for booking the room in the distribution channel.

***

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

The identifier for the distribution channel. It links the room and rate plan to a specific external booking platform (for example, OTA, GDS).

***

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

An array of pricing rules that apply to the room based on the number of guests.&#x20;

In this case, it includes:

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

The number of guests the pricing rule applies to.&#x20;

For example, it might apply to a single guest or multiple guests.

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

The multiplier applied to the base rate for the specified number of guests.&#x20;

{% hint style="info" %}
In this case, it’s set to `"1"`, meaning no change to the base price.
{% endhint %}

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

The surcharge applied for the specified number of guests. For example, a surcharge might be added for each additional guest beyond a certain number. In this case, it’s set to `"0"`, meaning there’s no surcharge.

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

Indicates whether the room’s availability is disabled.&#x20;

{% hint style="info" %}
When set to `false`, the room remains available for booking.
{% endhint %}

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

Indicates whether the rate for the room is disabled.&#x20;

{% hint style="info" %}
When set to `false`, the rate is active and available for booking.
{% endhint %}

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

Defines the fixed minimum stay requirement for the room:

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

Indicates whether the minimum stay requirement is fixed.&#x20;

{% hint style="info" %}
In this case, it’s set to `true`, meaning the minimum stay is fixed.
{% endhint %}

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

The minimum number of nights required for booking the room.&#x20;

{% hint style="info" %}
In this case, it’s set to `1`, meaning guests must stay at least one night.
{% endhint %}

***

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

```json
{
    "action": "create",
    "hotel_id": "AWSTEST",
    "room_id": "1000202",
    "rate_id": "BAR",
    "channel_hotel_id": "12962495",
    "channel_room_id": "1296249501",
    "channel_rate_id": "49681540",
    "channel_id": 19,
    "pricing": [
        {
            "applicable_no_of_guest": 5,
            "multiplier": "1",
            "surcharge": "0"
        }
    ],
    "disable_availability": false,
    "disable_rate": false,
    "fixed_minstay": {
        "fixed": true,
        "minstay": 1
    }
}

```

***

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

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

```json
{
    "Status": "Success",
    "Data": [],
    "Message": "Rateplan Mapping added successfully",
    "Ruid": ""
}
```

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

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

Indicates the result of the API call.&#x20;

{% hint style="info" %}
Will be `"Success"` for successful operations.
{% endhint %}

***

`Data` <mark style="color:orange;">**object**</mark>

An object containing data related to the successful image creation. This typically includes identifiers for the created images.

***

`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 - Validation Error Response**</mark>

```json
{
    "Status": "Fail",
    "Errors": [
        {
            "Code": "496",
            "ShortText": "action attribute is required"
        },
        {
            "Code": "400",
            "ShortText": "hotel_id: Invalid HotelCode ('')"
        },
        {
            "Code": "852",
            "ShortText": "Product: room_id - is invalid or not found!"
        },
        {
            "Code": "856",
            "ShortText": "Product: rate_id - is invalid or not found!"
        }
    ],
    "Message": "",
    "Ruid": ""
}
```

***

<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.
