Retrieve Property Pending Photos based on photo-batch-id

This endpoint allows you to retrieve pending images for a specific photo batch identified by photo_batch_id.


Endpoint

POST

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


NOTE

When you create an image at that time in response to that create call you will get photo-batch-id.

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.


photo_batch_id string (Required)

Specifies the unique photo batch ID you want to retrieve property pending photo.


Sample Request

{
   "hotel_id": "NT7",
   "channel_hotel_id":"12837615",
   "photo_batch_id": "4EU2z7o-qUQ"
}

Response

Sample Success Response

{
   "Status": "Success",
   "Data": [
       {
           "status_message": "This is a duplicate photo. The original photo id is : xxxxxx",
           "photo_id": "xxxxxx",
           "status": "duplicate",
           "url": "https://www.xxxxxxx.com/xxxx/roadblue/xxxx.jpg",
           "photo_pending_id": "xxxxxx",
           "request_timestamp": "2024-10-23 06:46:12"
       },
       {
           "photo_id": "xxxxxx",
           "status_message": "This is a duplicate photo. The original photo id is : xxxxx",
           "status": "duplicate",
           "request_timestamp": "2024-10-23 06:46:12",
           "url": "https://www.xxxxxxx.com/xxxx/roadblue/xxxx.jpg",
           "photo_pending_id": "xxxxxx"
       }
   ],
   "Message": "Property Pending Images Fetched Successfully",
   "Ruid": "UmFuZG9tSVYkc2RlIyh9YSYBTwfmv9934zi8iNxrDONs4NEQyt5oJs/vbwjmd8/xWxGgWDloV9+RdQV87zaG6dolkA8UFPLNzkW5XM8v4vk="
}

Success Response Body Elements

Status string

Indicates the result of the API call.

Will be "Success" for successful operations.


Data array

This is an array containing objects that hold information about the processed photos. Each object in this array represents an individual photo, providing details about the photo's status and associated metadata.

photo_id string

This is a unique identifier assigned to each photo. It is used to reference and track the photo within the system for future operations, such as retrieval or updates.

status_message string

The message indicates the status of the photo, providing additional context. In this case, it states that the photo is a duplicate and provides the photo_id of the original photo with which it is associated.

status string

This indicates the status of the photo. In this example, the status is "duplicate", meaning the photo is recognized as a duplicate of another photo.

Possible values are: new, ok, enqueued, bad_url, duplicate, error, and error_decode.

url string

This is the URL where the photo is hosted or can be accessed. The provided link allows users or systems to view the photo directly.

photo_pending_id string

Specifies the temporary photo ID (while it is being processed).

This ID expires seven days after creation.

request_timestamp string

This timestamp indicates when the request was made or when the photo status was processed. It helps to track when the photo was processed and provides the time in a human-readable format (YYYY-MM-DD HH:MM:SS).

Format (YYYY-MM-DD HH:MM:SS).


Message string

The value "Property Pending Images Fetched Successfully" confirms that the operation of fetching property pending images was completed successfully.

Ruid string

This is a unique identifier or token associated with the request. It is likely used for tracking or verifying the request, ensuring that the response corresponds to the original request for auditing or logging purposes.

You can send this ID to Booking.com customer support if you run into an issue. This can help to understand what went wrong.


Errors

Sample Error Response 1

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

Sample Error Response 2 - Channel Mapping Not Found

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

Sample Error Response 3

When invalid photo_batch_id used:

{
   "Status": "Fail",
   "Errors": [],
   "Message": "'2nzdsMfFYJc1' is not an accepted value for key main_photo",
  "Ruid": "xxxxxxx"
}

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

This is a unique identifier or token associated with the request, which can be used for tracking or referencing the request.

Last updated

Was this helpful?