# Sending License Information of Room

This endpoint allows you to to submit license information related to a specific room in a hotel.

***

### <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&#x26;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/license/sending
```
{% endcode %}

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

```xml
-app-id: YOUR_APP_ID
Authorization: YOUR_API_KEY
Content-Type:application/json
```

<table><thead><tr><th width="185">Header</th><th width="85">Type</th><th width="101">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>app-id</code></td><td>string</td><td>Yes</td><td>Your application ID. Required for authentication.</td></tr><tr><td><code>Authorization</code></td><td>string</td><td>Yes</td><td>Your API key. for authorization. Required for authentication.</td></tr><tr><td><code>Content-Type</code></td><td>string</td><td>Yes</td><td>Must be set to <code>application/json</code>.</td></tr></tbody></table>

***

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

***

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

This field specifies the unique identifier for the room associated with the property.



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

This array contains the details about the property license exception. Each entry in the array represents a field and its corresponding value.

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

Specifies the name of the field to be included in the property license exception data.

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

Specifies the value corresponding to the exception type.

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

This field specifies the ID of the license variant that should be applied for the request.

***

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

```json
{
    "hotel_id": "new1", 
    "channel_hotel_id": "12926584", 
    "room_id": "123",
    "content_data": [ 
        {
            "name": "exception_type",
            "value": "dependent_room"
        }
    ],
    "variant_id": 321 
}
```

***

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

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

```json
{
    "Status": "Success",
    "Data": {
        "success": 1
    },
    "Message": "Room License sending successfully"
}
```

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

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

Indicates the result of the API call.

***

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

A message describing the outcome.

***

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

Contains the actual response data.

***

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

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

```json
{
    "Status": "Fail",
    "Errors": [
        {
            "Code": "400",
            "ShortText": "hotel_id: Invalid HotelCode ('')"
        },
        {
            "Code": "572",
            "ShortText": "channel_hotel_id - is invalid or not found!"
        },
        {
            "Code": "941",
            "ShortText": "Invalid Room Id"
        },
        {
            "Code": "620",
            "ShortText": "content_data is invalid or not found!"
        },
        {
            "Code": "622",
            "ShortText": "variant_id is invalid or not found!"
        }
    ],
    "Message": ""
}
```

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

```json
{
    "Status": "Fail",
    "Errors": [],
    "Message": "This variant is not eligible for the given owner"
}
{
    "Status": "Success",
    "Data": {
        "success": 1
    },
    "Message": "Room License sending successfully"
}
```

***

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