Retrieve All Images

This endpoint retrieves all images associated with a specified hotel. The request must include the hotel_id and the channel_hotel_id. Upon a successful request, it returns an array of images with their details.


Endpoint

POST

https://connect-sandbox.su-api.com/SUAPI/jservice/bdc/photo/retrieveAll
-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)

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

Should not be empty or invalid.


channel_hotel_id string (Required)

The unique id for the hotel on the specific channel.

Should not be empty or invalid.


Sample Request

{
   "hotel_id": "NT7",
   "channel_hotel_id":"12837615"
}

Response

Sample Success Response

{
   "Status": "Success",
   "Message": "Image data retrieved successfully",
   "Data": [
       {
           "url": "https://www.xxxxxxx.com/xxxx/roadblue/xxxx.jpg",
           "sample_url": "https://www.xxxxxxx.com/xxxx/roadblue/xxxx.jpg",
           "photo_id": "vIY7mKlAoUw",
           "tags": []
       },
       {
           "url": "https://www.xxxxxxx.com/xxxx/roadblue/xxxx.jpg",
           "sample_url": "https://www.xxxxxxx.com/xxxx/roadblue/xxxx.jpg",
           "photo_id": "KAVVUsPDrSg",
           "tags": [
               6,
               4,
               3,
               2
           ]
       }
   ]
}

Success Response Body Elements

Status string

Indicates the result of the API call.

Will be "Success" for successful operations.


Message string

A message indicating the result of the operation.


Data array

An array of image objects containing details of each retrieved image.


Image object

Each image object in the Data array will have the following structure:

url string

The direct URL to the image.


sample_url string

The URL for a sample view of the image.


photo_id string

The unique identifier for the photo.


tags array

An array of tags associated with the image.

It may be empty as well.


Errors

Sample Error Response 1

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

Sample Error Response 2

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

Sample Error Response 3

{
   "Status": "Fail",
   "Errors": [],
   "Message": "Access denied"
}

Error Response Body Elements

Status string

The status of the response.


Error array

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.

ShortText string

Brief description of the error.


Message string

The descriptive message in the response.

Last updated

Was this helpful?