# Retrieve License Information of Property

This endpoint allows you retrieve property license information for a specific 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/property/license/retrieve
```
{% 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.

***

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

```json
{
    "hotel_id": "new1",
    "channel_hotel_id": "12926584"
}
```

***

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

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

```json
{
    "Status": "Success",
    "Data": {
        "variantId": 39,
        "contentData": [
            {
                "name": "number",
                "value": "A123456789",
                "dataType": "string"
            },
            {
                "value": "2020-05-01",
                "name": "issue_date",
                "dataType": "date"
            }
        ]
    },
    "Message": "Property License fetched successfully"
}

```

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

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

This field indicates the overall status of the API request. In this case, the `Status` is `"Success"`, indicating that the property license data has been successfully fetched.

***

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

The `Data` object contains the data returned by the API after processing the request. It includes:

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

This is the ID of the license variant that was fetched for the hotel.&#x20;

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

This array contains the actual property license details.&#x20;

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

The name of the property license field.&#x20;

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

The value associated with the field.&#x20;

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

The data type of the value.&#x20;

***

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

This is a descriptive message that provides additional context about the status of the operation. In this case, the message `"Property License fetched successfully"` indicates that the property license data has been successfully retrieved.

***

#### <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!"
        }
    ],
    "Message": ""
}
```

***

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