Перейти к содержимому
API для партнёров

PhotosService_GetPropertyGallery

GET
/api/json/hotels/{propertyId}/gallery
curl --request GET \
--url 'https://dictionary.example.invalid/api/json/hotels/DEMO_VALUE/gallery?offset=1&limit=1&tags=1&types=1'

GetPropertyGallery returns hotel photos organized by rooms with previews and pagination.

propertyId
required
string

Property UUID

Example

DEMO_VALUE
offset
integer format: int32

Pagination offset (default 0)

Example

1
limit
integer format: int32

Pagination limit (default 12)

Example

1
tags
Array<integer>

Filter by photo tags (optional, comma-separated in HTTP)

Example

[
1
]
types
Array<integer>

Filter by media types (legacy mdatas type_id values)

Example

[
1
]

OK

Media typeapplication/json

GetPropertyGalleryResponse - hotel photo gallery response.

object
previews

Room preview tabs

Array<object>

Preview - Room preview tab for gallery. Analytics spec: Preview for room tabs with cover photo info.

object
roomTypeId

Room/object ID (UUID string, empty for hotel-level)

string
name

Room name

string
fullPath

Full path to cover photo (e.g., “https://cdn.example.com/photos/xxx/”)

string
fileName

File name of cover photo (e.g., “cover.jpg”)

string
count

Number of photos in this room

integer format: int32
media

Media items for current page

Array<object>

MediaItem - A single photo/media item. Analytics spec: Media item with all photo details.

object
roomTypeId

Room/object ID (UUID string, empty for hotel-level)

string
id

Photo ID (int32 to ensure JSON number serialization)

integer format: int32
title

Photo title/description

string
fullPath

Full path to photo (e.g., “https://cdn.example.com/photos/xxx/”)

string
fileName

File name of photo (e.g., “photo1.jpg”)

string
tags

Photo tags (array of tag objects)

Array<object>

Tag - Photo tag object with id and name. Analytics spec: Tag as object with id and name fields.

object
id

Tag ID (1-7)

integer format: int32
name

Tag name (BEDROOM, KITCHEN, BATHROOM, YARD, VIEW_FROM_WINDOW, POOL, OTHER)

string
aspectRatio

Aspect ratio as float (e.g., 1.333 for 4:3, 1.778 for 16:9)

number format: float
dateAdd

Date photo was added (ISO format string, e.g., “2024-01-15”)

string
count

Total media count (respects tag filter)

integer format: int32

Example

{
"previews": [
{
"roomTypeId": null,
"name": null,
"fullPath": null,
"fileName": null,
"count": null
}
],
"media": [
{
"roomTypeId": null,
"id": null,
"title": null,
"fullPath": null,
"fileName": null,
"tags": null,
"aspectRatio": null,
"dateAdd": null
}
],
"count": 1
}

Default error response

Media typeapplication/json

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.

object
code

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

integer format: int32
message

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.

string
details

A list of messages that carry the error details. There is a common set of message types for APIs to use.

Array<object>

Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.

object
@type

The type of the serialized message.

string
key
additional properties
any

Example

{
"code": 1,
"message": "DEMO_VALUE",
"details": [
{
"@type": null
}
]
}