Set Profile

This endpoint allows users to set or update the profile of a hotel property. It requires essential identifiers such as hotel_id and channel_hotel_id, along with details about the property, including its location, dates for renting and renovation, and optional images.


Endpoint

POST

https://connect-sandbox.su-api.com/SUAPI/jservice/bdc/property/profile/setProfile
-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.

Content-Type

string

Yes

Must be set to application/json.


Attributes

hotel_id string (Required)

The unique property ID as assigned by the provider upon creation of the property.


channel_hotel_id string (Required)

The unique id for the hotel on the specific channel.


host_location string (Required)

Specifies the location type of the host.

Only one value is allowed: 'onsite' (the property is managed on location) or 'offsite' (management is done remotely).


name_or_company string (Optional)

The name of the hotel or company. This field is optional and can be used for branding purposes or internal identification.


renting_date string (Optional)

The date when the property will be available for rent.

Formatted as YYYY-MM-DD.

This field is optional but provides important information for guests.


renovating_date string (Optional)

The date when renovations are expected to be completed.

Formatted as YYYY-MM-DD.

This is optional and helps inform guests about potential disruptions.


built_date string (Optional)

The date when the property was built

Formatted as YYYY-MM-DD.

This optional field provides historical context about the property.


is_company_profile integer (Optional)

Indicates whether the profile is for a company.

Use 1 for true (indicating it is a company profile) or 0 for false (indicating it is an individual profile).

image array (Optional)

An array of image objects associated with the property.

This field is optional. If provided, each image object must include a valid url.

url string (Required)

The URL of the image. It's required if Images is present.

This must meet the following criteria:

  • Minimum dimensions: 300 x 300 pixels.

  • Maximum dimensions: 14000 x 14000 pixels.

  • Maximum file size: 50000000 bytes or 50 megabytes.

  • jpg, png, jpeg and gif image is allowed.

  • Only 1 image is allowed.


Sample Request

{
   "hotel_id": "NT7", 
   "channel_hotel_id": "12837615",
   "host_location": "onsite", 
   "name_or_company": "test-use-demo",
   "renting_date": "2024-10-11",
   "renovating_date": "2024-10-12",
   "built_date": "2024-10-09",
   "is_company_profile": 1,
   "Images":[ 
       {
           "url": "https://www.xxxxxxx.com/xxxx/roadblue/xxxx.jpg" 
       }
   ]
}

Response

Sample Success Response

{
   "Status": "Success",
   "Data": [],
   "Message": "Property Profile Set Successfully",
   "Ruid": "xxxxxxxxx"
}

Success Response Body Elements

Status string

Indicates the overall status of the request. In this case, "Success" means the operation was completed successfully.


Data array

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


Message string

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


Ruid string

A unique request identifier.

UUID format


Errors

Sample Error Response 1

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

Sample Error Response 2

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

Sample Error Response 3

{
   "Status": "Fail",
   "Errors": [],
   "Message": "Field must contain a valid date in YYYY-MM-DD format. - [\"renting_date\"]",
  "Ruid": "xxxxxxxxx"
}

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 associated with the error code.

For example, "channel-mapping not found for this property!"


Message string

A message providing more information about the error.

Last updated

Was this helpful?