RoomTypesService_GetRoomTypes
const url = 'https://dictionary.example.invalid/api/json/hotels/roomTypes?propertyId=DEMO_VALUE';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Parameters
Заголовок раздела «Parameters»Query Parameters
Заголовок раздела «Query Parameters»Property ID (dictionary string_id)
Example
DEMO_VALUEResponses
Заголовок раздела «Responses»OK
GetRoomTypesResponse wraps the response in SuccessResponse format.
object
RoomTypesData contains the array of room types.
object
Array of room types
RoomType represents detailed information about a room.
object
Room identifier
Object identifier (from platform, needed for calendar and availability checks)
Room name
Room description
Room photos
Image represents a photo.
object
Photo ID
Photo URL
Description (nullable)
Blur hash for placeholder effect
Number of photos
Beds in the room
Bed represents a bed in the room.
object
Bed type code (e.g., “BED_TYPE_SINGLE_BED”)
Bed type title (e.g., “односпальная кровать”)
Number of beds of this type
Whether this is an extra bed
Room properties (area, bedrooms, etc.)
Properties represents room properties.
object
Property name (e.g., “area”, “floor”, “bedrooms”)
Property title (e.g., “Площадь (м2)”)
Property value (e.g., “45”)
Room amenities
AmenityResponse represents an amenity (v2.0).
object
Amenity group (e.g., “AMENITY_GROUP_ROOM”)
Amenity title (e.g., “Wi-Fi в номере”)
Amenity code (e.g., “AMENITY_INTERNET_ROOMS”)
Whether this amenity is paid
Price for paid amenity
Currency code (e.g., “rub”, “usd”)
Additional information about the amenity
Price unit for paid amenity (daily, period, hourly)
Booking rules
Rules represents booking rules.
object
Rule name (e.g., “party”, “pets”, “smoking”)
Rule description (e.g., “вечеринки разрешены”)
Rule value (e.g., “0”, “1”, “14:00”)
Important information from owner
Superguest permissions available for the room type
SuperguestPermission represents a superguest privilege.
object
Example
{ "success": true, "data": { "roomTypes": [ null ] }, "errors": [ "DEMO_VALUE" ], "actions": [ "DEMO_VALUE" ], "platform": "DEMO_VALUE", "uuid": "DEMO_VALUE", "timestamp": "DEMO_VALUE"}default
Заголовок раздела «default»Default error response
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
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
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.
A list of messages that carry the error details. There is a common set of message types for APIs to use.
Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
object
The type of the serialized message.
Example
{ "code": 1, "message": "DEMO_VALUE", "details": [ { "@type": null } ]}