Retrieve License Information of Room

This endpoint allows you retrieve property license information for a specific room in a property.


Endpoint

POST

https://connect-sandbox.su-api.com/SUAPI/jservice/bdc/room/license/retrieve
-app-id: YOUR_APP_ID
Authorization: YOUR_API_KEY
Content-Type:application/json
Header
Type
Required
Description

app-id

string

Yes

Your application ID. Required for authentication.

Authorization

string

Yes

Your API key. for authorization. Required for authentication.

Content-Type

string

Yes

Must be set to application/json.


Attributes

hotel_id string (Required)

Specifies the hotel ID for the property.


channel_hotel_id string (Required)

Specifies the channel-specific hotel ID for the property.


room_id string (Required)

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


Sample Request

{
    "hotel_id": "new1",
    "channel_hotel_id": "12926584",
    "room_id": "39575303"
}

Response

Sample Success Response

{
    "Status": "Success",
    "Data": {
        "contentData": [
            {
              "dataType": "string",
              "name": "number",
              "value": "1234567890123"
            },
            {
              "value": "private_person",
              "name": "management_type",
              "dataType": "string"
            },
            {
              "dataType": "string",
              "name": "residence_type",
              "value": "primary"
            }
        ],
      "variantId": 22
    },
    "Message": "Room License fetched successfully"
}

Success Response Body Elements

Status string

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 object

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

variantId integer

This is the ID of the license variant that was fetched for the hotel.

contentData array

This array contains the actual property license details.

name string

The name of the property license field.

value string

The value associated with the field.

dataType string

The data type of the value.


Message string

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


Errors

Sample Error Response 1 - Validation Error Response

{
    "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"
        }
    ],
    "Message": ""
}

Sample Error Response 2 - Booking.com Error Response


Error Response Body Elements

Status string

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


Error array

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

Code string

Specific error code that helps identify the type of error.

For example: "400" indicates a bad request.

ShortText string

A short description of the error.


Message string

A message providing more information about the error.


Ruid string

A unique identifier for tracking the request.

Last updated

Was this helpful?