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

RoomTypesService_GetRoomTypes

GET
/api/json/hotels/roomTypes
curl --request GET \
--url 'https://dictionary.example.invalid/api/json/hotels/roomTypes?propertyId=DEMO_VALUE'

GetRoomTypes returns room types for a property by property ID.

propertyId
string

Property ID (dictionary string_id)

Example

DEMO_VALUE

OK

Media typeapplication/json

GetRoomTypesResponse wraps the response in SuccessResponse format.

object
success
required
boolean
data
required

RoomTypesData contains the array of room types.

object
roomTypes
required

Array of room types

Array<object>

RoomType represents detailed information about a room.

object
id
required

Room identifier

string
objectId
required

Object identifier (from platform, needed for calendar and availability checks)

string
name
required

Room name

string
description
required

Room description

string
images
required

Room photos

Array<object>

Image represents a photo.

object
id
required

Photo ID

string
imageUrl
required

Photo URL

string
comment

Description (nullable)

string
blurHash

Blur hash for placeholder effect

string
imageCount
required

Number of photos

integer format: int32
beds
required

Beds in the room

Array<object>

Bed represents a bed in the room.

object
name
required

Bed type code (e.g., “BED_TYPE_SINGLE_BED”)

string
title
required

Bed type title (e.g., “односпальная кровать”)

string
count
required

Number of beds of this type

integer format: int32
isExtraBed
required

Whether this is an extra bed

boolean
info
required

Room properties (area, bedrooms, etc.)

Array<object>

Properties represents room properties.

object
name
required

Property name (e.g., “area”, “floor”, “bedrooms”)

string
title
required

Property title (e.g., “Площадь (м2)”)

string
value
required

Property value (e.g., “45”)

string
amenities
required

Room amenities

Array<object>

AmenityResponse represents an amenity (v2.0).

object
group
required

Amenity group (e.g., “AMENITY_GROUP_ROOM”)

string
title
required

Amenity title (e.g., “Wi-Fi в номере”)

string
name
required

Amenity code (e.g., “AMENITY_INTERNET_ROOMS”)

string
isPaid

Whether this amenity is paid

boolean
price

Price for paid amenity

string
currency

Currency code (e.g., “rub”, “usd”)

string
optionalInfo

Additional information about the amenity

string
priceType

Price unit for paid amenity (daily, period, hourly)

string
bookingRules
required

Booking rules

Array<object>

Rules represents booking rules.

object
name
required

Rule name (e.g., “party”, “pets”, “smoking”)

string
title
required

Rule description (e.g., “вечеринки разрешены”)

string
value

Rule value (e.g., “0”, “1”, “14:00”)

string
importantInfo

Important information from owner

string
superguestPermissions
required

Superguest permissions available for the room type

Array<object>

SuperguestPermission represents a superguest privilege.

object
name
required
string
title
required
string
errors
required
Array<string>
actions
required
Array<string>
platform
required
string
uuid
required
string
timestamp
required
string

Example

{
"success": true,
"data": {
"roomTypes": [
null
]
},
"errors": [
"DEMO_VALUE"
],
"actions": [
"DEMO_VALUE"
],
"platform": "DEMO_VALUE",
"uuid": "DEMO_VALUE",
"timestamp": "DEMO_VALUE"
}

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
}
]
}