Travelline APIs (1.0.0)
Download OpenAPI specification:Download
Авторизация происходит через OAuth2.0.
OAuth 2.0 – это стандарт авторизации, который позволяет приложениям получать доступ к данным.
Для работы с API в запросах необходимо передавать ключ доступа в формате JSON Web Token (JWT).
JWT (JSON Web Token) — это специальный формат токена, который позволяет безопасно передавать данные между клиентом и сервером.
Получение JWT происходит через Client credentials flow, то есть авторизацию по секретному ключу доступа. Для запроса ключа доступа необходимы следующие параметры:
- Client ID,
- Client Secret.
TravelLine. Auth Server: https://partner.tlintegration.com/auth/token
Лимиты на авторизацию
- 3 запроса в секунду,
- 15 запросов в минуту,
- 300 запросов в час с одного IP-адреса.
Время жизни токена
15 минут.
Endpoint авторизации
Пример Access Token:
eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI2OGZjOHRNUGFSUHRyRHYtVHV2WEpncUNGTE1CVGRheTBpQkdJSUE3amxvIn0.eyJleHAiOjE2OTg5MTYwMzYsImlhdCI6MTY5ODkxNTEzNiwianRpIjoiYTJjZGJhMGQtYzQwNy00OWRmLThiNGQtOTJhNTM1NWQxYTFmIiwiaXNzIjoiaHR0cHM6Ly9wYXJ0bmVyLnRsaW50ZWdyYXRpb24uY29tL2F1dGgvcmVhbG1zL1BhcnRuZXJBcGkiLCJhdWQiOiJUcmF2ZWxMaW5lLlBhcnRuZXJBUEkiLCJzdWIiOiI4NmE0YjZiZS0wYTc0LTRjYjktYjNhYi1iNDYyZWUwYmIyYmQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJwYTMiLCJzY29wZSI6IiIsImFwaV9hY2Nlc3NlcyI6WyJjb250ZW50Il19.Nz6dyaHGyIN5IKv30oM-HrqdQBqaGdzEFrk7ACUWbfvsNCHNowg96iJrGwQbkOUSVPtQJF9Cwf1_jywP6c2UPHclzBIDp9HTsYdVM5QS_k9ecs0GCiI8ACBqld3yatY4dJz3MRkxnU_rp0NbJJQ-uBcmg_9UCSCIc3mKR7UAosr5XOXeb4ckrFd67DK5xfofT0ykE46Qkc6nvev3AGx11fPAVsFnmmPOSnlpQzJTI7XBWbD120q5fDdksVlaiq3YoBueDEeOPFH08Ia6xdTVjIf_zsyOEKt2N8_7BTyWG_3YPThBbgn-eAgybSdeop6_eCrWTfQvX5g8qtR2e9J32A
На сайте JWT.IO можно расшифровать Access Token.
Пример расшифрованного токена
PAYLOAD:
{
"exp": 1698916036,
"iat": 1698915136,
"jti": "a2cdba0d-c407-49df-8b4d-92a5355d1a1f",
"iss": "https://partner.tlintegration.com/auth/realms/PartnerApi",
"aud": "TravelLine.PartnerAPI",
"sub": "86a4b6be-0a74-4cb9-b3ab-b462ee0bb2bd",
"typ": "Bearer",
"azp": "pa3",
"scope": "",
"api_accesses": [
"content"
]
}
Обратите внимание. Refresh token не используется.
Кешируйте на стороне клиента Access Token и используйте его повторно в своих запросах.
Используйте библиотеки для OAuth2.0:
.NET:
IdentityModelMicrosoft.Extensions.DependencyInjectionJavaScript:
oidc-client
oidc-client-js WikicURL:
curl -L -X POST "https://partner.tlintegration.com/auth/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "grant_type=client_credentials" \ -d "client_id=XXXXXXXXXXXX" \ -d "client_secret=XXXXXXXXXXXX"
Чтобы сервис был доступен, мы ввели ограничения на интенсивность запросов к API со стороны пользователей. Если лимит превышен, ваши действия будут заблокированы. В этом случае вернется ошибка 429 Too Many Requests.
| Ограничение | Квота | Разблокировка при превышении квоты |
|---|---|---|
| Количество запросов на авторизацию с одного IP-адреса | 3 в секунду | Когда число запросов к API, совершенных за последнюю секунду, станет меньше 3 |
В каждом ответе API возвращаются заголовки, которые помогут вам отслеживать оставшееся количество запросов:
x-ratelimit-remaining-hour- количество оставшихся запросов в течение часа с момента отправки.x-ratelimit-remaining-minute- количество оставшихся запросов в течение минуты с момента отправки.x-ratelimit-remaining-second- количество оставшихся запросов в течение секунды с момента отправки.retry-after- этот заголовок возвращается при ошибке429 Too Many Requestsи указывает время (в секундах), через которое можно повторить запрос.
| Код ошибки | Сообщение | Описание |
|---|---|---|
| 400 | Bad Request | В содержании запроса есть ошибка — например, отсутствуют обязательные заголовки или значения параметров некорректны. |
| 401 | Unauthorized | Ошибка может возникать по разным причинам: В запросе не указан OAuth-токен. Или указан, но не там. Закончился срок действия токена — в этом случае получите новый. |
| 403 | Forbidden | У пользователя нет доступа к определенным методам API. |
| 404 | Not Found | Запрашиваемый ресурс не существует или устарел. Проверьте адрес запроса. |
| 429 | Too Many Requests | Превышен лимит запросов в секунду (RPS). Убедитесь, что не отправляете лишнего. |
| 500 | Internal Server Error | Внутренняя ошибка сервера. Попробуйте зайти позже. |
| 503 | Service Unavailable | Сервер перегружен. Попробуйте зайти позже. |
Swagger
Правила позволяют устанавливать доплату за ранний заезд и поздний выезд. Эти правила применяются к выбранным тарифам через их свойство extraStayRuleId.
Настройка «Заезд и выезд» задает стандартное время заезда и выезда, которое не требует дополнительной платы.
Эти правила дают возможность назначать доплату за определенные временные промежутки между временем раннего заезда или позднего выезда и стандартным временем заезда/выезда.
Способы расчета доплаты
Free: без дополнительной платы.Fixed: установленная сумма.Percent: процент от стоимости за ночь.HourlyRate: фиксированная ставка за час.HourlyRateAutoCalculated: цена за час рассчитывается автоматически.Forbidden: ранний заезд/поздний выезд не допускается.
Fixed и HourlyRate позволяют устанавливать несколько тарифов (rates) в разных валютах.
Percent позволяет задать процент доплаты и дополнительные параметры:
extraPlacementEnabled:'true', если взимается доплата за дополнительного гостя;'false', если доплата не взимается.extraServiceOption: дополнительные услуги, за которые взимается доплата[None, All, MealOnly].
Свойство OccupyQuota указывает, гарантирована ли доступность номера для дополнительного пребывания.
true: доступность номера гарантирована.false: доступность номера не гарантируется, даже если дополнительное пребывание оплачено заранее.
Endpoint
GET /v1/properties/{propertyId}/extra-stay-rules
Получение правил раннего заезда и позднего выезда.
Параметры:
propertyId(string, path): ID средства размещения.
Пример:
GET /v1/properties/7291/extra-stay-rules
{
"extraStayRules": [
{
"id": "519845",
"propertyId": "7291",
"checkInTime": "13:00",
"overridesPropertyCheckInTime": false,
"earlyCheckInPeriods": [
{
"startTime": "00:00",
"endTime": "09:00",
"chargeType": "Forbidden",
"rates": [],
"occupyQuota": false
},
{
"startTime": "09:00",
"endTime": "13:00",
"chargeType": "Percent",
"rates": [],
"percentOptions": {
"percentage": 0,
"extraPlacementEnabled": false,
"extraServiceOption": "MealOnly"
},
"occupyQuota": false
}
],
"checkOutTime": "12:00",
"overridesPropertyCheckOutTime": true,
"lateCheckOutPeriods": [
{
"startTime": "12:00",
"endTime": "16:00",
"chargeType": "Fixed",
"rates": [
{
"currency": "EUR",
"rate": 20
}
],
"occupyQuota": false
},
{
"startTime": "16:00",
"endTime": "24:00",
"chargeType": "Forbidden",
"rates": [],
"occupyQuota": false
}
]
}
]
}
Receive early check-in and late check-out rules
path Parameters
| propertyId required | string Example: 1024 Property ID |
Responses
Response samples
- 200
{- "extraStayRules": [
- {
- "id": "string",
- "propertyId": "1024",
- "checkInTime": "13:00",
- "overridesPropertyCheckInTime": true,
- "earlyCheckInPeriods": [
- {
- "startTime": "09:00",
- "endTime": "13:00",
- "chargeType": "Free",
- "rates": [
- {
- "currency": "string",
- "rate": 0.1
}
], - "percentOptions": {
- "percentage": 0.1,
- "extraPlacementEnabled": true,
- "extraServiceOption": "None"
}, - "occupyQuota": false
}
], - "checkOutTime": "10:00",
- "overridesPropertyCheckOutTime": true,
- "lateCheckOutPeriods": [
- {
- "startTime": "09:00",
- "endTime": "13:00",
- "chargeType": "Free",
- "rates": [
- {
- "currency": "string",
- "rate": 0.1
}
], - "percentOptions": {
- "percentage": 0.1,
- "extraPlacementEnabled": true,
- "extraServiceOption": "None"
}, - "occupyQuota": false
}
]
}
]
}Swagger
Content API позволяет получить фотографии и описание средства размещения, категорий номеров, тарифов, услуг, удобств. Эта информация отображается в модуле бронирования TL: Booking Engine на официальном сайте средства размещения.
- Общие настройки, описание и фото средства размещения.
services- все услуги, включая питание.ratePlans- тарифы.roomTypes- категории номеров.amenities- удобства.- Отсутствуюшие в личном кабинете настройки:
currency- валюта, определяется страной.timeZone- часовой пояс, определяется городом.stayUnitKind- модель продажи номеров в модуле бронирования (NightRateилиDailyRate), определяется типом средства размещения.multiLocationProperty- позволяет иметь разные адреса для категорий номеров, можно включить по запросу в техподдержку TravelLine.
Кроме того, API предоставляет справочники вариантов выбора для настроек:
meal-plans- типы питания, например:- код
EnglishBreakfastимяАнглийский завтрак. - код
FullBoardимяПолный пансион.
- код
room-type-categories- типы предложений, например:- код
ApartmentsимяАпартаменты. - код
PlaceInRoomимяМесто в номере. - код
SmallHouseимяДомик.
- код
room-amenity-categories- оснащение номеров, например:- группа
Интернет/телефониякодwifi_internetимяWi-Fi-интернет. - группа
Мебелькодjournal_tableимяжурнальный столик.
- группа
Услуги
Вид услуги можно определить по значению поля kind:
Common- любые услуги, кроме питания.Meal- услуги питания.
Для услуг питания дополнительно заданы поля mealPlanCode и mealPlanName,
заполненные значениями из справочника типов питания.
Тарифы
Тарифы связаны с другими подразделами API:
- поле
extraStayRuleIdуказывает на правило раннего заезда и позднего выезда (см. ExtraStayRules). - поле
cancellationRuleIdуказывает на правило отмены бронирования (см. CancellationRules).
Категории номеров
Категории номеров связаны со справочниками:
- поля
categoryCodeиcategoryName- тип предложения. - элементы массива
amenities(codeиname) - оснащение номеров.
Удобства
Список доступных удобств средства размещения:
code- идентификатор.displayName- название для отображения.chargeType- тип оплаты:- free - бесплатная услуга.
- сhargeable - платная услуга.
- none - тип оплаты не применим (услуга не подразумевает оплаты, например: консьерж).
Удобства с идентификаторами swimming_pool и restaurant могут дублироваться поскольку их может быть несколько в рамках одного средства размещения.
Receive property entity
query Parameters
| since | string Example: since=UlUtNDE5NQ== Key to continue viewing from the required spot |
| count | integer <int32> Example: count=200 The number of elements in the response. |
| include | string Example: include= Add additional information to the response |
| languageCode | string Example: languageCode= Language code. Allowed values: 'en' (English). |
Responses
Response samples
- 200
{- "next": null,
- "properties": [
- {
- "id": "1024",
- "name": "Test hotel",
- "description": "Hotel is located in a picturesque location. \n\nThere are 11 hotel rooms of \"Standard\" and \"Standard +\" categories, as well as 4 separate cottages of the \"Duplex\" type for accommodation of guests on the territory of the club.",
- "images": [
- {
- "url": "string"
}
], - "stars": 4,
- "stayUnitKind": "NightRate",
- "contactInfo": {
- "address": {
- "postalCode": "SW1A 1AA",
- "countryCode": "GBR",
- "region": "London",
- "regionId": "020",
- "cityName": "London",
- "cityId": "1",
- "addressLine": "123 Main St.",
- "latitude": 51.5074,
- "longitude": -0.1278,
- "remark": "Take the second left after the bridge"
}, - "phones": [
- {
- "phoneNumber": "+44 20 1234 5678",
- "remark": "Voice Assistant"
}
], - "emails": [
- "email@example.com"
]
}, - "policy": {
- "checkInTime": "14:00",
- "checkOutTime": "12:00"
}, - "timeZone": {
- "id": "Europe/London"
}, - "ratePlans": [
- {
- "id": "133528",
- "name": "Main rate plan",
- "description": "<p>Book your accommodation at the best price!</p>\n<p>The accommodation price includes: </p>\n<p>- Free secure parking on site</p>\n<p>- High-speed wireless Internet</p>\n<p>- Playground on site</p>",
- "currency": "GBP",
- "isStayWithChildrenOnly": false,
- "cancellationRuleId": "56454",
- "extraStayRuleId": "202584",
- "vat": {
- "applicable": true,
- "included": true,
- "percent": 20
}, - "availableServices": [
- {
- "id": 0,
- "included": true,
- "roomTypeIds": [
- 0
], - "roomTypeAvailability": "All"
}
], - "corporateOnly": false
}
], - "roomTypes": [
- {
- "id": "82751",
- "name": "Standard",
- "description": "Each room (25 m2) style combines elegant classics with modern decorative elements and a high level of comfort. Standard rooms can accommodate 2 people on two twin one-and-a-half beds (120*200). A third guest can be accommodated on an extra folding bed. Cots are provided for small children. Among amenities of each room: - High-speed WiFi, LCD TV with a wide choice of cable channels and the option to watch movies online - Spacious bathrooms with walk-in and rain shower; - Cosmetics and toiletries, bathrobes and slippers - High quality bed linen - Balcony with comfortable furniture, views of the Gulf of Finland and the islands.",
- "amenities": [
- {
- "code": "wifi_internet"
}
], - "images": [
- {
- "url": "string"
}
], - "size": {
- "value": 25
}, - "categoryCode": "PlaceInRoom",
- "categoryName": "Place in the room",
- "address": {
- "postalCode": "SW1A 1AA",
- "countryCode": "GBR",
- "region": "London",
- "regionId": "020",
- "cityName": "London",
- "cityId": "1",
- "addressLine": "123 Main St.",
- "latitude": 51.5074,
- "longitude": -0.1278,
- "remark": "Take the second left after the bridge"
}, - "occupancy": {
- "adultBed": 0,
- "extraBed": 0,
- "childWithoutBed": 0
}, - "placements": [
- {
- "kind": "Adult",
- "count": 2,
- "minAge": null,
- "maxAge": null
}
], - "position": 100,
- "fsaCertification": {
- "index": 1
}
}
], - "services": [
- {
- "id": "42807",
- "name": "Christmas tree",
- "description": "Children's New Year party",
- "kind": "Common",
- "mealPlanCode": null,
- "mealPlanName": null,
- "images": [
- {
- "url": "string"
}
], - "status": "Active",
- "vat": {
- "applicable": true,
- "included": true,
- "percent": 20
}
}
], - "multiLocationProperty": true,
- "companyDetails": {
- "legalEntityName": "Google LLC",
- "taxpayerIdentificationNumber": "770493581",
- "companyRegistrationNumber": "1027700132195",
- "legalAddress": "1600 Amphitheatre Parkway, Mountain View, CA 94043, USA"
}, - "currency": "GBP",
- "fsaCertifications": [
- {
- "index": "1",
- "fsaResortId": "f88355a3-6977-4011-a09c-784f2b837644",
- "fsaRegisterRecord": "С162021009062",
- "fsaCertificationStatus": {
- "fsaStatusId": 6,
- "name": "Действует",
- "endDate": "2028-08-15"
}, - "fsaHotelType": {
- "fsaHotelTypeId": 100,
- "name": "Гостиница"
}, - "certificationState": "Available"
}
], - "amenities": [
- {
- "code": "parking",
- "displayName": "Paid parking",
- "chargeType": "None"
}
]
}
], - "warnings": [
- {
- "code": "NotEnoughRights",
- "message": "Not enough rights to hotel"
}
]
}Receive description of a property
path Parameters
| propertyId required | string Example: 1024 Property ID |
query Parameters
| languageCode | string Example: languageCode= Language code. Allowed values: 'en' (English). |
Responses
Response samples
- 200
{- "id": "1024",
- "name": "Test hotel",
- "description": "Hotel is located in a picturesque location. \n\nThere are 11 hotel rooms of \"Standard\" and \"Standard +\" categories, as well as 4 separate cottages of the \"Duplex\" type for accommodation of guests on the territory of the club.",
- "currency": "GBP",
- "images": [
- {
- "url": "string"
}
], - "stars": 4,
- "stayUnitKind": "NightRate",
- "contactInfo": {
- "address": {
- "postalCode": "SW1A 1AA",
- "countryCode": "GBR",
- "region": "London",
- "regionId": "020",
- "cityName": "London",
- "cityId": "1",
- "addressLine": "123 Main St.",
- "latitude": 51.5074,
- "longitude": -0.1278,
- "remark": "Take the second left after the bridge"
}, - "phones": [
- {
- "phoneNumber": "+44 20 1234 5678",
- "remark": "Voice Assistant"
}
], - "emails": [
- "email@example.com"
]
}, - "policy": {
- "checkInTime": "14:00",
- "checkOutTime": "12:00"
}, - "timeZone": {
- "id": "Europe/London"
}, - "ratePlans": [
- {
- "id": "133528",
- "name": "Main rate plan",
- "description": "<p>Book your accommodation at the best price!</p>\n<p>The accommodation price includes: </p>\n<p>- Free secure parking on site</p>\n<p>- High-speed wireless Internet</p>\n<p>- Playground on site</p>",
- "currency": "GBP",
- "isStayWithChildrenOnly": false,
- "cancellationRuleId": "56454",
- "extraStayRuleId": "202584",
- "vat": {
- "applicable": true,
- "included": true,
- "percent": 20
}, - "availableServices": [
- {
- "id": 0,
- "included": true,
- "roomTypeIds": [
- 0
], - "roomTypeAvailability": "All"
}
], - "corporateOnly": false
}
], - "roomTypes": [
- {
- "id": "82751",
- "name": "Standard",
- "description": "Each room (25 m2) style combines elegant classics with modern decorative elements and a high level of comfort. Standard rooms can accommodate 2 people on two twin one-and-a-half beds (120*200). A third guest can be accommodated on an extra folding bed. Cots are provided for small children. Among amenities of each room: - High-speed WiFi, LCD TV with a wide choice of cable channels and the option to watch movies online - Spacious bathrooms with walk-in and rain shower; - Cosmetics and toiletries, bathrobes and slippers - High quality bed linen - Balcony with comfortable furniture, views of the Gulf of Finland and the islands.",
- "amenities": [
- {
- "code": "wifi_internet"
}
], - "images": [
- {
- "url": "string"
}
], - "size": {
- "value": 25
}, - "categoryCode": "PlaceInRoom",
- "categoryName": "Place in the room",
- "address": {
- "postalCode": "SW1A 1AA",
- "countryCode": "GBR",
- "region": "London",
- "regionId": "020",
- "cityName": "London",
- "cityId": "1",
- "addressLine": "123 Main St.",
- "latitude": 51.5074,
- "longitude": -0.1278,
- "remark": "Take the second left after the bridge"
}, - "occupancy": {
- "adultBed": 0,
- "extraBed": 0,
- "childWithoutBed": 0
}, - "placements": [
- {
- "kind": "Adult",
- "count": 2,
- "minAge": null,
- "maxAge": null
}
], - "position": 100,
- "fsaCertification": {
- "index": 1
}
}
], - "services": [
- {
- "id": "42807",
- "name": "Christmas tree",
- "description": "Children's New Year party",
- "kind": "Common",
- "mealPlanCode": null,
- "mealPlanName": null,
- "images": [
- {
- "url": "string"
}
], - "status": "Active",
- "vat": {
- "applicable": true,
- "included": true,
- "percent": 20
}
}
], - "multiLocationProperty": true,
- "companyDetails": {
- "legalEntityName": "Google LLC",
- "taxpayerIdentificationNumber": "770493581",
- "companyRegistrationNumber": "1027700132195",
- "legalAddress": "1600 Amphitheatre Parkway, Mountain View, CA 94043, USA"
}, - "fsaCertifications": [
- {
- "index": "1",
- "fsaResortId": "f88355a3-6977-4011-a09c-784f2b837644",
- "fsaRegisterRecord": "С162021009062",
- "fsaCertificationStatus": {
- "fsaStatusId": 6,
- "name": "Действует",
- "endDate": "2028-08-15"
}, - "fsaHotelType": {
- "fsaHotelTypeId": 100,
- "name": "Гостиница"
}, - "certificationState": "Available"
}
], - "amenities": [
- {
- "code": "parking",
- "displayName": "Paid parking",
- "chargeType": "None"
}
]
}Swagger
Правила отмены бронирования устанавливаются средством размещения для определения срока, в течение которого возможна бесплатная отмена, а также штрафа за позднюю отмену. Эти правила применяются к выбранным тарифам через их свойство cancellationRuleId.
Правило может начать действовать с одного из следующих моментов времени:
- ProviderArrivalTime: Стандартное время заезда. Например, если время заезда в средство размещения установлено на 14:00, бесплатная отмена будет доступна до 14:00 дня, предшествующего дню заезда.
- ProviderDepartureTime: Стандартное время выезда. Отсчет начинается с момента выезда в день прибытия. Например, если время выезда в средстве размещения установлено на 12:00, бесплатная отмена будет доступна до 12:00 дня, предшествующего дню заезда.
- GuestArrivalTime: Время заезда, которое указал гость во время бронирования. Например, если стандартное время заезда — 14:00, но гость выбрал заезд в 16:00, бесплатная отмена будет доступна до 16:00 дня, предшествующего дню заезда. Если гостю не разрешено выбирать время заезда, будет использовано стандартное время, которое принято в средстве размещения.
- CustomArrivalTime: Выбранное время, с которого начинается отсчет для правила отмены. Время указывается в поле
referencePointTimeс использованием часового пояса средства размещения. - BookingCreationTime: Время (но не дата), когда гость сделал бронирование. Например, если время заезда установлено на 14:00, а гость забронировал номер в 9:00, бесплатная отмена будет доступна до 9:00 дня, предшествующего дню заезда.
Штраф за определенный период
Штраф устанавливается с использованием временных рамок, которые включают в себя единицы времени и период до контрольной точки.
Единицы времени:
None: Не указано, используется только с периодомNoMatter.Day: Дни.Hour: Часы.
Период до контрольной точки:
NoMatter: Не зависит от конкретного времени.AtLeast: Больше или равно значениюbeforeArrivalValue.NoMoreThan: Меньше или равно значенияbeforeArrivalValue.Between: В пределах интервала отbeforeArrivalValueдоbeforeArrivalValueMax.
Режимы расчета штрафов
NoPenalty: Штраф не применяется.FirstNightPercent: Штраф составляет указанный процент от стоимости первой ночи.PrepaymentPercent: Штраф составляет указанный процент от суммы предоплаты.FirstNights: Штраф равен полной стоимости первых N ночей.
Штраф для выбранного режима расчета указывается в виде числового значения и валюты.
Период действия правила можно установить, выбрав даты прибытия в часовом поясе гостиницы. Период включает в себя как начальную, так и конечную дату. Если дата окончания не указана, она может быть установлена как «Не ограничено», что соответствует isEndless = true.
Если в правиле нет условий отмены, отмена осуществляется бесплатно.
Endpoint
GET /v1/properties/{propertyId}/cancellation-rules
Получение правил отмены бронирования.
Параметры:
propertyId(string, path): ID средства размещения.
Пример:
GET /v1/properties/7291/cancellation-rules
{
"cancellationRules": [
{
"id": "556875",
"propertyId": "7291",
"referencePointKind": "CustomArrivalTime",
"referencePointTime": "10:57",
"cancellationTerms": [
{
"beforeArrivalMatching": "Between",
"beforeArrivalUnit": "Day",
"beforeArrivalValue": 1,
"beforeArrivalValueMax": 3,
"penaltyCalculationMethod": "PrepaymentPercent",
"penaltyValue": 10,
"penaltyValueCurrency": "EUR",
"arrivalDates": [
{
"startDate": "2024-07-11",
"endDate": "2024-07-11",
"isEndless": true
}
]
},
{
"beforeArrivalMatching": "NoMoreThan",
"beforeArrivalUnit": "Hour",
"beforeArrivalValue": 24,
"penaltyCalculationMethod": "PrepaymentPercent",
"penaltyValue": 100,
"penaltyValueCurrency": "EUR",
"arrivalDates": [
{
"startDate": "2021-02-09",
"endDate": "2021-02-09",
"isEndless": true
}
]
}
]
}
]
}
Receive cancellation rules
path Parameters
| propertyId required | string Example: 1024 Property ID |
Responses
Response samples
- 200
{- "cancellationRules": [
- {
- "id": "232241",
- "propertyId": "1024",
- "referencePointKind": "ProviderArrivalTime",
- "referencePointTime": "15:00",
- "cancellationTerms": [
- {
- "beforeArrivalMatching": "NoMatter",
- "beforeArrivalUnit": "None",
- "beforeArrivalValue": 24,
- "beforeArrivalValueMax": 0,
- "penaltyCalculationMethod": "PrepaymentPercent",
- "penaltyValue": 0,
- "penaltyValueCurrency": "RUB",
- "arrivalDates": [
- {
- "startDate": "2026-02-20",
- "endDate": "2026-02-20",
- "isEndless": true
}
]
}
]
}
]
}Swagger
Read Reservation API позволяет получить информацию о бронированиях средств размещения из компонентов TL: Booking Engine, TL: Channel Manager и TL: Web PMS.
Получение краткой информации по бронированиям
Метод возвращает постраничный список с краткой информацией по каждому бронированию.
- Параметр
lastModificationпозволяет начать получение списка бронирований, сделанных или измененных после указанной даты/времени в часовой зоне UTC. Параметр можно не указывать, чтобы начать полную синхронизацию. - Параметр
continueTokenпозволяет продолжить получение списка. Его значение берется из результатов предыдущего запроса. Срок службы токена не ограничен. Запрос может вернуть полученное ранее, но уже изменившееся бронирование. - Признак
hasMoreData = falseинформирует о достижении конца списка. Даже после этого запросы продолжения будут возвращать новые данные, появившиеся с момента предыдущего запроса.
Если произойдет потеря continueToken, рекомендуется выполнить новый запрос
с использованием параметра lastModification для получения нового continueToken.
Значение для lastModification рекомендуется определить следующим образом:
укажите дату последнего изменения бронирования lastModification минус два дня.
Этот подход поможет избежать пропуска бронирований при последующем запросе данных.
Получение информации по бронированию
Метод возвращает детальную информацию по одному бронированию.
В ответе есть настройки, доступные через ContentApi:
booking.roomStays[].ratePlans[]- тарифы.booking.roomStays[].dailyRates[].RatePlanId- тарифы.booking.roomStays[].roomType- категория номеров.booking.roomStays[].services[]- услуги.booking.services[]- услуги с темпом начислением цены «За бронь».
Receive booking summaries
path Parameters
| propertyId required | string Example: 1024 Property ID |
query Parameters
| continueToken | string Example: continueToken=V2Ugd2lzaCB5b3UgcHJvZHVjdGl2ZSBpbnRlcmFjdGlvbiE= Use the token from the previous response to continue receiving booking summaries including new and updated ones. |
| count | integer <int32> Example: count=1000 Maximum mumber of booking summaries in response. |
| lastModification | string <date-time> Example: lastModification=2023-06-20T10:41:04Z Enumerate booking summaries based on the last modification datetime, starting from the specified datetime in UTC. |
Responses
Response samples
- 200
{- "continueToken": "Qm9va2luZ0NvbnRpbnVhdGlvblRva2Vu",
- "hasMoreData": false,
- "bookingSummaries": [
- {
- "number": "20191001-1024-45675262",
- "propertyId": 1024,
- "status": "Cancelled",
- "createdDateTime": "2019-06-20T10:41:04Z",
- "modifiedDateTime": "2019-06-20T11:41:04Z"
}
]
}Receive booking details
path Parameters
| propertyId required | string Example: 7291 Property ID |
| number required | string Example: 20240303-7291-14573801 Booking number |
Responses
Response samples
- 200
{- "booking": {
- "propertyId": "7291",
- "number": "20240325-7291-260123396",
- "status": "Cancelled",
- "createdDateTime": "2024-03-23T10:41:04Z",
- "modifiedDateTime": "2024-03-27T11:41:04Z",
- "guaranteeInfo": {
- "loyalty": {
- "cards": [
- {
- "cardNumber": "11039500047840",
- "loyaltySystemId": "TLStatusLevel"
}
]
}, - "totalPrepaid": 1234
}, - "currencyCode": "RUB",
- "roomStays": [
- {
- "stayDates": {
- "arrivalDateTime": "2024-03-27T14:00",
- "departureDateTime": "2024-03-28T12:00"
}, - "ratePlans": [
- {
- "id": "341178",
- "name": "Best offer of the day"
}
], - "roomType": {
- "id": "82751",
- "name": "Standard"
}, - "guestCount": {
- "adultCount": 1,
- "childAges": [
- 5
]
}, - "guests": [
- {
- "firstName": "Sherlock",
- "lastName": "Holmes"
}
], - "dailyRates": [
- {
- "ratePlanId": "133467",
- "priceBeforeTax": 8550,
- "date": "2024-03-27"
}
], - "total": {
- "priceBeforeTax": 8550,
- "priceAfterTax": 8650,
- "taxAmount": 100,
- "taxes": [
- {
- "amount": 100,
- "index": 1
}
], - "discounts": [
- {
- "amount": 1185,
- "discountType": "Percentage",
- "name": "Gold",
- "percent": 15
}
]
}, - "services": [
- {
- "id": "42965",
- "name": "Breakfast",
- "description": "Breakfast at a restaurant at a special price",
- "total": {
- "priceBeforeTax": 8550,
- "priceAfterTax": 8650,
- "taxAmount": 100,
- "taxes": [
- {
- "amount": 100,
- "index": 1
}
]
}, - "inclusive": false,
- "kind": "Meal",
- "mealPlanCode": "ContinentalBreakfast"
}
], - "extraStayCharges": {
- "earlyArrival": {
- "overriddenDateTime": "2024-03-27T18:00",
- "total": {
- "priceBeforeTax": 8550,
- "priceAfterTax": 8650,
- "taxAmount": 100,
- "taxes": [
- {
- "amount": 100,
- "index": 1
}
], - "discounts": [
- {
- "amount": 1185,
- "discountType": "Percentage",
- "name": "Gold",
- "percent": 15
}
]
}
}, - "lateDeparture": {
- "overriddenDateTime": "2024-03-27T18:00",
- "total": {
- "priceBeforeTax": 8550,
- "priceAfterTax": 8650,
- "taxAmount": 100,
- "taxes": [
- {
- "amount": 100,
- "index": 1
}
], - "discounts": [
- {
- "amount": 1185,
- "discountType": "Percentage",
- "name": "Gold",
- "percent": 15
}
]
}
}
}
}
], - "services": [
- {
- "id": "7898",
- "name": "Fruit platter",
- "description": "Fruit platter at check-in",
- "total": {
- "priceBeforeTax": 8550,
- "priceAfterTax": 8650,
- "taxAmount": 100,
- "taxes": [
- {
- "amount": 100,
- "index": 1
}
]
}
}
], - "total": {
- "priceBeforeTax": 8550,
- "priceAfterTax": 8650,
- "taxAmount": 100,
- "taxes": [
- {
- "amount": 100,
- "index": 1
}
], - "discounts": [
- {
- "amount": 1185,
- "discountType": "Percentage",
- "name": "Gold",
- "percent": 15
}
]
}, - "taxes": [
- {
- "index": 1,
- "name": "Lodging fee",
- "description": "Fee per guest, payable at check-in"
}
], - "cancellation": {
- "penaltyAmount": 8550,
- "cancelledDateTime": "2024-03-27T07:10:04Z"
}, - "customer": {
- "firstName": "Sherlock",
- "lastName": "Holmes"
}
}
}Swagger
Методы поиска, извлечения и обновления профилей гостей и связанных с ними данных (карты лояльности, бронирования, документы) средства размещения. Эта информация отображается в модуле TL: Web PMS в разделе "Профили гостей".
Searches guest profiles by name, phone or room number.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
query Parameters
| phone | string Example: phone=91390 Partial phone number to match |
| roomId | string Example: roomId=4503599627373585 Room/suite identifier |
| name | string Example: name=Jo Partial first or last name to match |
| languageCode | string Example: languageCode=en ISO 639-1 language code. Supported: en, ru, bg, cs, fr, id, ka, km, ko, pl, th, tr, uk, uz, vi. |
| maxPageSize | integer <int32> Example: maxPageSize=100 Maximum number of items to return (<=100) |
| pageToken | string Example: pageToken=V2Ugd2lzaCB5b3UgcHJvZHVjdGl2ZSBpbnRlcmFjdGlvbiE= Pagination token for next page. Token is in the response if the number of items exceeds the limit. Send it back to get the next set of items. If the request contains the token, other parameters passed in the query are ignored. |
Responses
Response samples
- 200
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "nextPageToken": "b24aRNO0Q0WD2CLexb8G6EnqlYqQTWUdGdkrh9DqjLYBthewTbDErm55sLvB+41A5p8aoDpkA6CG1QCGz63jBOqWcPrwZoHwDLUnPp6HZx4FKcRzBSrItBLY2QpAOWxYZnAF57I8dPg7/fgj/xgWEWT/M9qwM8MNihVJX1twL2jABZ3pG49qjbMJMUpXAHdnFtMNjV1ILwg+WhOXnnHjr+4BdmSTiQMAvo3inEewRRg=",
- "hasNextPage": true,
- "guests": [
- {
- "pmsPersonId": "4503599627465719",
- "personName": {
- "lastName": "Doe",
- "firstName": "John",
- "middleName": "M."
}, - "birthDate": "1999-09-09",
- "citizenship": "NLD",
- "status": {
- "id": "0",
- "displayName": "Not selected"
}, - "emails": [
- {
- "address": "abc@abc.com"
}
], - "phones": [
- {
- "phoneNumber": "+11111111111111111"
}
], - "gender": "Male"
}
]
}Retrieves basic loyalty card details for a guest.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| pmsPersonId required | string Example: 4503599627465719 Guest identifier in PMS |
query Parameters
| maxPageSize | integer <int32> Example: maxPageSize=100 Maximum number of items to return (<=100) |
| pageToken | string Example: pageToken=V2Ugd2lzaCB5b3UgcHJvZHVjdGl2ZSBpbnRlcmFjdGlvbiE= Pagination token for next page. Token is in the response if the number of items exceeds the limit. Send it back to get the next set of items. If the request contains the token, other parameters passed in the query are ignored. |
Responses
Response samples
- 200
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "nextPageToken": "b24aRNO0Q0WD2CLexb8G6EnqlYqQTWUdGdkrh9DqjLYBthewTbDErm55sLvB+41A5p8aoDpkA6CG1QCGz63jBOqWcPrwZoHwDLUnPp6HZx4FKcRzBSrItBLY2QpAOWxYZnAF57I8dPg7/fgj/xgWEWT/M9qwM8MNihVJX1twL2jABZ3pG49qjbMJMUpXAHdnFtMNjV1ILwg+WhOXnnHjr+4BdmSTiQMAvo3inEewRRg=",
- "hasNextPage": true,
- "loyaltyCards": [
- {
- "programId": "1234567",
- "cardNumber": "1234567"
}
]
}Retrieves a guest profile by its PMS identifier.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| pmsPersonId required | string Example: 4503599627465719 Guest identifier in PMS |
query Parameters
| languageCode | string Example: languageCode=en ISO 639-1 language code. Supported: en, ru, bg, cs, fr, id, ka, km, ko, pl, th, tr, uk, uz, vi. |
Responses
Response samples
- 200
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "guest": {
- "pmsPersonId": "4503599627465719",
- "personName": {
- "lastName": "Doe",
- "firstName": "John",
- "middleName": "M."
}, - "birthDate": "1999-09-09",
- "citizenship": "NLD",
- "status": {
- "id": "0",
- "displayName": "Not selected"
}, - "emails": [
- {
- "address": "abc@abc.com"
}
], - "phones": [
- {
- "phoneNumber": "+11111111111111111"
}
], - "gender": "Male"
}
}Retrieves the list of stays for a given guest.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| pmsPersonId required | string Example: 4503599627465719 Guest identifier in PMS |
query Parameters
| maxPageSize | integer <int32> Example: maxPageSize=100 Maximum number of items to return (<=100) |
| pageToken | string Example: pageToken=V2Ugd2lzaCB5b3UgcHJvZHVjdGl2ZSBpbnRlcmFjdGlvbiE= Pagination token for next page. Token is in the response if the number of items exceeds the limit. Send it back to get the next set of items. If the request contains the token, other parameters passed in the query are ignored. |
Responses
Response samples
- 200
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "nextPageToken": "b24aRNO0Q0WD2CLexb8G6EnqlYqQTWUdGdkrh9DqjLYBthewTbDErm55sLvB+41A5p8aoDpkA6CG1QCGz63jBOqWcPrwZoHwDLUnPp6HZx4FKcRzBSrItBLY2QpAOWxYZnAF57I8dPg7/fgj/xgWEWT/M9qwM8MNihVJX1twL2jABZ3pG49qjbMJMUpXAHdnFtMNjV1ILwg+WhOXnnHjr+4BdmSTiQMAvo3inEewRRg=",
- "hasNextPage": true,
- "roomStays": [
- {
- "pmsRoomStayId": "4503599628227391",
- "roomId": "4503599627373585",
- "roomTypeId": "315367",
- "guestsIds": [
- "4503599627465719",
- "4503599627465718"
], - "checkInDateTime": "2024-07-11T14:00",
- "checkOutDateTime": "2024-07-15T12:00",
- "actualCheckInDateTime": "2024-07-11T16:15",
- "actualCheckOutDateTime": "2024-07-11T16:15",
- "status": "New",
- "guestCount": {
- "adults": 2,
- "children": 3
}, - "deposit": {
- "value": 10000.11,
- "currencyCode": "USD"
}, - "totalPrice": {
- "amount": {
- "value": 10000.11,
- "currencyCode": "USD"
}, - "payAmount": {
- "value": 10000.11,
- "currencyCode": "USD"
}, - "refundAmount": {
- "value": 10000.11,
- "currencyCode": "USD"
}
}, - "amenities": [
- {
- "name": "Swimming pool"
}
]
}
]
}Updates guest’s identity document details.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| pmsPersonId required | string Example: 4503599627465719 Guest identifier in PMS |
Request Body schema:
request
| series | string or null Document series (1–64 alphanumeric) |
| number | string or null Document number (1–64 alphanumeric) |
| effectiveDate | string or null Issue date in ISO-8601 YYYY-MM-DD format |
| expiryDate | string or null Expiry date in ISO-8601 YYYY-MM-DD format |
| departmentCode | string or null Issuing authority subdivision code (max 16 chars) |
| issueAuthority | string or null Full issuing authority name (max 2048 chars) |
| type | string (PmsApi_PersonalDocumentType) Enum: "Passport" "ForeignPassport" "InternationalPassportBiometric" "InternationalPassport" "TemporaryPassport" "BirthCertificate" "Diplomatic" "BirthCertificateForeign" "MilitaryPensioner" "MilitaryReserveOfficer" "MilitarySoldier" "MilitaryOfficer" "PassportSailor" "ForeignPassportForeign" "TemporaryPassportInsteadOfMilitary" "Another" "DiplomaticForeign" "TemporaryResidence" "Residence" "TemporaryRefuge" "Cis" "WorkPassport" "ResidenceStateless" "NationalPassport" "KazPassport" "ResidenceStatelessBiometric" "TemporaryResidenceStateless" "TemporaryResidenceStatelessBlank" "Patent" Type of personal document New values can be added (enum is not frozen).
|
Responses
Request samples
- Payload
{- "series": "5000",
- "number": "999999",
- "effectiveDate": "2020-11-11",
- "expiryDate": "2040-12-22",
- "departmentCode": "1234",
- "issueAuthority": "Some authority",
- "type": "Passport"
}Response samples
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
]
}Updates guest's place of birth details.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| pmsPersonId required | string Example: 4503599627465719 Guest identifier in PMS |
Request Body schema:
request
| countryCode | string or null ISO 3166-1 alpha-3 code of birth country |
Responses
Request samples
- Payload
{- "countryCode": "ARG"
}Response samples
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
]
}Uploads guest’s identity document scan files.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| pmsPersonId required | string Example: 4503599627465719 Guest identifier in PMS |
Request Body schema:
request
Array of objects or null (PmsApi_FileInfo) Details of files to upload | |||||
Array
| |||||
Responses
Request samples
- Payload
{- "files": [
- {
- "content": "base64",
- "name": "jackal.jpg"
}
]
}Response samples
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
]
}Swagger
Read Reservation API позволяет получить информацию о бронированиях средств размещения из модуля TL: Web PMS.
Получение краткой информации по бронированиям
Метод возвращает постраничный список с краткой информацией по каждому бронированию.
- Параметр
pageTokenпозволяет продолжить получение списка. Его значение берется из результатов предыдущего запроса. Срок службы токена не ограничен. Запрос может вернуть полученное ранее, но уже изменившееся бронирование. - Признак
hasNextPage = falseинформирует о достижении конца списка. Даже после этого запросы продолжения будут возвращать новые данные, появившиеся с момента предыдущего запроса.
Если произойдет потеря pageToken, рекомендуется выполнить новый запрос для получения нового pageToken.
Получение деталей бронирования
Метод возвращает детальную информацию по одному бронированию.
В ответе есть идентификаторы, которые позволяют получить информацию:
Через ContentApi:
reservation.roomStays[].roomType- категория номеров.reservation.roomStays[].options[]- услуги.
Через PMS Universal API > Rooms:
reservation.roomStays[].room- комнаты.
Через PMS Universal API > Guests:
reservation.roomStays[].guestIds- гости.
Сохранение платежа в проживание
Метод позволяет сложить платёж в проживание по идентификатору проживания pmsRoomStayId, который можно получить в деталях бронирования через PMS Universal API > Reservations.
Входящие данные:
pmsPaymentSystemId- Способ оплаты. Необходимо указать один из доступных способов, которые можно получить через GET/v2/properties/{propertyId}/reservations/{number}/room-stays/{pmsRoomStayId}/find-available-payment-systems
Retrieves reservation details by reservation number.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| number required | string Example: 22200222-111-99999999 Reservation number |
query Parameters
| languageCode | string Example: languageCode=en ISO 639-1 language code. Supported: en, ru, bg, cs, fr, id, ka, km, ko, pl, th, tr, uk, uz, vi. |
Responses
Response samples
- 200
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "reservation": {
- "number": "22200222-111-99999999",
- "customerLanguageCode": "ru",
- "visitPurpose": {
- "id": "1",
- "displayName": "Business"
}, - "customerComment": "I want room with the sea view",
- "modifyDateTime": "2024-07-11T13:15:18Z",
- "groupName": "Wedding",
- "currencyCode": "USD",
- "customer": {
- "pmsPersonId": "4503599627465719",
- "personName": {
- "lastName": "Doe",
- "firstName": "John",
- "middleName": "M."
}, - "birthDate": "1999-09-09",
- "citizenship": "NLD",
- "status": {
- "id": "0",
- "displayName": "Not selected"
}, - "emails": [
- {
- "address": "abc@abc.com"
}
], - "phones": [
- {
- "phoneNumber": "+11111111111111111"
}
], - "gender": "Male"
}, - "customerCompany": {
- "id": "4503599628227391",
- "name": "Undefined Incorporated",
- "type": "Customer"
}, - "creationSource": {
- "id": "999",
- "name": "Channel"
}, - "channelInformation": {
- "channelName": "booking.com"
}, - "reservationStatus": "Unconfirmed",
- "roomStays": [
- {
- "pmsRoomStayId": "4503599628227391",
- "roomId": "4503599627373585",
- "roomTypeId": "315367",
- "guestsIds": [
- "4503599627465719",
- "4503599627465718"
], - "checkInDateTime": "2024-07-11T14:00",
- "checkOutDateTime": "2024-07-15T12:00",
- "actualCheckInDateTime": "2024-07-11T16:15",
- "actualCheckOutDateTime": "2024-07-11T16:15",
- "status": "New",
- "guestCount": {
- "adults": 2,
- "children": 3
}, - "deposit": {
- "value": 10000.11,
- "currencyCode": "USD"
}, - "totalPrice": {
- "amount": {
- "value": 10000.11,
- "currencyCode": "USD"
}, - "payAmount": {
- "value": 10000.11,
- "currencyCode": "USD"
}, - "refundAmount": {
- "value": 10000.11,
- "currencyCode": "USD"
}
}, - "amenities": [
- {
- "name": "Swimming pool"
}
]
}
]
}
}Searches reservations by parameters; at least one time period must be specified.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
query Parameters
| roomId | string Example: roomId=4503599627373585 Room/suite identifier |
| state required | string Example: state=Active Reservation status filter ("Active" or "Cancelled") |
| startModifyDateTime | string Example: startModifyDateTime=2024-09-09T11:11 Last modification of the reservation is on or after the specified datetime in ISO-8601 yyyy-MM-ddTHH:mm format, local time. Limit for "Modify" range is 365 days. |
| endModifyDateTime | string Example: endModifyDateTime=2025-09-09T11:11 Last modification of the reservation is on or before the specified datetime in ISO-8601 yyyy-MM-ddTHH:mm format, local time. Limit for "Modify" range is 365 days. |
| startAffectPeriodDateTime | string Example: startAffectPeriodDateTime=2024-09-09T11:11 Stay or part of stay is after the specified datetime in ISO-8601 yyyy-MM-ddTHH:mm format, local time. Limit for "AffectPeriod" range is 365 days |
| endAffectPeriodDateTime | string Example: endAffectPeriodDateTime=2025-09-09T11:11 Stay or part of stay is before the specified datetime in ISO-8601 yyyy-MM-ddTHH:mm format, local time. Limit for "AffectPeriod" range is 365 days |
| maxPageSize | integer <int32> Example: maxPageSize=100 Maximum number of items to return (<=100) |
| pageToken | string Example: pageToken=V2Ugd2lzaCB5b3UgcHJvZHVjdGl2ZSBpbnRlcmFjdGlvbiE= Pagination token for next page. Token is in the response if the number of items exceeds the limit. Send it back to get the next set of items. If the request contains the token, other parameters passed in the query are ignored. |
Responses
Response samples
- 200
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "nextPageToken": "b24aRNO0Q0WD2CLexb8G6EnqlYqQTWUdGdkrh9DqjLYBthewTbDErm55sLvB+41A5p8aoDpkA6CG1QCGz63jBOqWcPrwZoHwDLUnPp6HZx4FKcRzBSrItBLY2QpAOWxYZnAF57I8dPg7/fgj/xgWEWT/M9qwM8MNihVJX1twL2jABZ3pG49qjbMJMUpXAHdnFtMNjV1ILwg+WhOXnnHjr+4BdmSTiQMAvo3inEewRRg=",
- "hasNextPage": true,
- "reservations": [
- {
- "number": "22200222-111-99999999"
}
]
}Searches available rooms for each stay in the reservation.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| number required | string Example: 22200222-111-99999999 Reservation number |
query Parameters
| maxPageSize | integer <int32> Example: maxPageSize=100 Maximum number of items to return (<=100) |
| pageToken | string Example: pageToken=V2Ugd2lzaCB5b3UgcHJvZHVjdGl2ZSBpbnRlcmFjdGlvbiE= Pagination token for next page. Token is in the response if the number of items exceeds the limit. Send it back to get the next set of items. If the request contains the token, other parameters passed in the query are ignored. |
Responses
Response samples
- 200
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "nextPageToken": "b24aRNO0Q0WD2CLexb8G6EnqlYqQTWUdGdkrh9DqjLYBthewTbDErm55sLvB+41A5p8aoDpkA6CG1QCGz63jBOqWcPrwZoHwDLUnPp6HZx4FKcRzBSrItBLY2QpAOWxYZnAF57I8dPg7/fgj/xgWEWT/M9qwM8MNihVJX1twL2jABZ3pG49qjbMJMUpXAHdnFtMNjV1ILwg+WhOXnnHjr+4BdmSTiQMAvo3inEewRRg=",
- "hasNextPage": true,
- "availableRoomForRoomStays": [
- {
- "pmsRoomStayId": "4503599628227391",
- "currentRoomId": "4503599628227391",
- "roomIds": [
- "4503599628227391",
- "4503599628227392"
]
}
]
}Assigns room/suite for each stay in the reservation.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| number required | string Example: 22200222-111-99999999 Reservation number |
Request Body schema:
request
| pmsRoomStayId | string or null Stay identifier in PMS |
| roomId | string or null Room or suite identifier |
Responses
Request samples
- Payload
[- {
- "pmsRoomStayId": "4503599627373585",
- "roomId": "4503599627373522"
}
]Response samples
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
]
}Assigns the actual check-in time for a stay.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| number required | string Example: 22200222-111-99999999 Reservation number |
| pmsRoomStayId required | string Example: 4503599628227391 Room stay identifier in PMS |
Request Body schema:
request
| actualCheckInDateTime | string or null Actual check-in date and time in ISO-8601 YYYY-MM-DDThh:mm format, local time |
Responses
Request samples
- Payload
{- "actualCheckInDateTime": "2024-07-11T14:00"
}Response samples
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
]
}Assigns the actual check-out time for a stay.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| number required | string Example: 22200222-111-99999999 Reservation number |
| pmsRoomStayId required | string Example: 4503599628227391 Room stay identifier in PMS |
Request Body schema:
request
| actualCheckOutDateTime | string or null Actual check-out date and time in ISO-8601 YYYY-MM-DDThh:mm format, Local time |
Responses
Request samples
- Payload
{- "actualCheckOutDateTime": "2024-07-11T14:00"
}Response samples
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
]
}Retrieves available payment methods for a stay.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| number required | string Example: 22200222-111-99999999 Reservation number |
| pmsRoomStayId required | string Example: 4503599628227391 Room stay identifier in PMS |
query Parameters
| action | string (PmsApi_PaymentActionKind) Enum: "Payment" "Refund" Example: action=Payment Transaction type ("Payment" or "Refund") |
| languageCode | string Example: languageCode=en ISO 639-1 language code. Supported: en, ru, bg, cs, fr, id, ka, km, ko, pl, th, tr, uk, uz, vi. |
| maxPageSize | integer <int32> Example: maxPageSize=100 Maximum number of items to return (<=100) |
| pageToken | string Example: pageToken=V2Ugd2lzaCB5b3UgcHJvZHVjdGl2ZSBpbnRlcmFjdGlvbiE= Pagination token for next page. Token is in the response if the number of items exceeds the limit. Send it back to get the next set of items. If the request contains the token, other parameters passed in the query are ignored. |
Responses
Response samples
- 200
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "nextPageToken": "b24aRNO0Q0WD2CLexb8G6EnqlYqQTWUdGdkrh9DqjLYBthewTbDErm55sLvB+41A5p8aoDpkA6CG1QCGz63jBOqWcPrwZoHwDLUnPp6HZx4FKcRzBSrItBLY2QpAOWxYZnAF57I8dPg7/fgj/xgWEWT/M9qwM8MNihVJX1twL2jABZ3pG49qjbMJMUpXAHdnFtMNjV1ILwg+WhOXnnHjr+4BdmSTiQMAvo3inEewRRg=",
- "hasNextPage": true,
- "paymentSystems": [
- {
- "pmsPaymentSystemId": "0oHjfSIZS0ng==",
- "displayName": "Bank transfer for legal entities"
}
]
}Processes a payment for a stay.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| number required | string Example: 22200222-111-99999999 Reservation number |
| pmsRoomStayId required | string Example: 4503599628227391 Room stay identifier in PMS |
Request Body schema:
request
| actionDateTime | string or null Action date and time in ISO-8601 YYYY-MM-DDThh:mm format, local time |
| pmsPaymentSystemId | string or null Payment system identifier |
object (PmsApi_Amount) Amount with currency | |
| comment | string or null Payment comment |
Responses
Request samples
- Payload
{- "actionDateTime": "2024-07-11T14:00",
- "pmsPaymentSystemId": "CASHLESS",
- "total": {
- "value": 10000.11,
- "currencyCode": "USD"
}, - "comment": "Payment for something"
}Response samples
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
]
}Processes a refund for a stay.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| number required | string Example: 22200222-111-99999999 Reservation number |
| pmsRoomStayId required | string Example: 4503599628227391 Room stay identifier in PMS |
Request Body schema:
request
| actionDateTime | string or null Action date and time in ISO-8601 YYYY-MM-DDThh:mm format, local time |
| pmsPaymentSystemId | string or null Payment system identifier |
object (PmsApi_Amount) Amount with currency | |
| comment | string or null Payment comment |
Responses
Request samples
- Payload
{- "actionDateTime": "2024-07-11T14:00",
- "pmsPaymentSystemId": "CASHLESS",
- "total": {
- "value": 10000.11,
- "currencyCode": "USD"
}, - "comment": "Payment for something"
}Response samples
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
]
}Assigns a room for a stay.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| number required | string Example: 22200222-111-99999999 Reservation number |
| pmsRoomStayId required | string Example: 4503599628227391 Room stay identifier in PMS |
Request Body schema:
request
| roomId | string or null Room or suite identifier |
Responses
Request samples
- Payload
{- "roomId": "4503599627373585"
}Response samples
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
]
}Retrieves all invoices related to a reservation.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
| number required | string Example: 22200222-111-99999999 Reservation number |
query Parameters
| languageCode | string Example: languageCode=en ISO 639-1 language code. Supported: en, ru, bg, cs, fr, id, ka, km, ko, pl, th, tr, uk, uz, vi. |
| maxPageSize | integer <int32> Example: maxPageSize=100 Maximum number of items to return (<=100) |
| pageToken | string Example: pageToken=V2Ugd2lzaCB5b3UgcHJvZHVjdGl2ZSBpbnRlcmFjdGlvbiE= Pagination token for next page. Token is in the response if the number of items exceeds the limit. Send it back to get the next set of items. If the request contains the token, other parameters passed in the query are ignored. |
Responses
Response samples
- 200
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "nextPageToken": "b24aRNO0Q0WD2CLexb8G6EnqlYqQTWUdGdkrh9DqjLYBthewTbDErm55sLvB+41A5p8aoDpkA6CG1QCGz63jBOqWcPrwZoHwDLUnPp6HZx4FKcRzBSrItBLY2QpAOWxYZnAF57I8dPg7/fgj/xgWEWT/M9qwM8MNihVJX1twL2jABZ3pG49qjbMJMUpXAHdnFtMNjV1ILwg+WhOXnnHjr+4BdmSTiQMAvo3inEewRRg=",
- "hasNextPage": true,
- "invoices": [
- {
- "number": "20150823-1111-676271-01",
- "pmsRoomStayId": "4503599628227391",
- "payer": {
- "name": "John Richard Doe"
}, - "items": [
- {
- "accountingCode": "6945A37BC11CE3F42738E4EAA1D109699A08645006B837F66D7C684A4E7454F3",
- "name": "Accomodation",
- "kind": "RoomType",
- "total": {
- "value": 10000.11,
- "currencyCode": "USD"
}, - "vat": {
- "applicable": true,
- "included": false,
- "percent": 20
}, - "quantity": {
- "value": 10,
- "unit": "Pcs"
}
}
]
}
]
}Retrieves the accommodation inventory for a property.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
Responses
Response samples
- 200
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "accommodationInventory": {
- "buildings": [
- {
- "id": "4503599628227393",
- "name": "Main building",
- "floors": [
- {
- "id": "440357547227393",
- "name": "1st floor",
- "rooms": [
- {
- "id": "324235253",
- "displayName": "111",
- "roomTypeId": "315367",
- "floorId": "4"
}
]
}
]
}
]
}
}Swagger
Методы позволяют искать и извлекать информацию о компаниях, содержащихся в справочнике компаний средства размещения. Эта информация отображается в модуле TL: Web PMS в разделе "Справочник компаний".
Retrieves the list of companies for a property.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
query Parameters
| maxPageSize | integer <int32> Example: maxPageSize=100 Maximum number of items to return (<=100) |
| pageToken | string Example: pageToken=V2Ugd2lzaCB5b3UgcHJvZHVjdGl2ZSBpbnRlcmFjdGlvbiE= Pagination token for next page. Token is in the response if the number of items exceeds the limit. Send it back to get the next set of items. If the request contains the token, other parameters passed in the query are ignored. |
Responses
Response samples
- 200
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "nextPageToken": "b24aRNO0Q0WD2CLexb8G6EnqlYqQTWUdGdkrh9DqjLYBthewTbDErm55sLvB+41A5p8aoDpkA6CG1QCGz63jBOqWcPrwZoHwDLUnPp6HZx4FKcRzBSrItBLY2QpAOWxYZnAF57I8dPg7/fgj/xgWEWT/M9qwM8MNihVJX1twL2jABZ3pG49qjbMJMUpXAHdnFtMNjV1ILwg+WhOXnnHjr+4BdmSTiQMAvo3inEewRRg=",
- "hasNextPage": true,
- "companies": [
- {
- "id": "4503599628227391",
- "name": "Undefined Incorporated",
- "type": "Customer"
}
]
}Swagger
Методы позволяют искать и извлекать информацию о номерах, содержащихся в номерном фонде средства размещения. Эта информация отображается в модуле TL: Web PMS в разделе "Номерной фонд".
Retrieves the list of rooms/suites for a property.
path Parameters
| propertyId required | string Example: 5431 Property Identifier |
query Parameters
| roomTypeId | string Example: roomTypeId=315367 Room type identifier |
| maxPageSize | integer <int32> Example: maxPageSize=100 Maximum number of items to return (<=100) |
| pageToken | string Example: pageToken=V2Ugd2lzaCB5b3UgcHJvZHVjdGl2ZSBpbnRlcmFjdGlvbiE= Pagination token for next page. Token is in the response if the number of items exceeds the limit. Send it back to get the next set of items. If the request contains the token, other parameters passed in the query are ignored. |
Responses
Response samples
- 200
- 400
- 404
{- "warnings": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "errors": [
- {
- "code": "11",
- "message": "Incorrect dates format"
}
], - "nextPageToken": "b24aRNO0Q0WD2CLexb8G6EnqlYqQTWUdGdkrh9DqjLYBthewTbDErm55sLvB+41A5p8aoDpkA6CG1QCGz63jBOqWcPrwZoHwDLUnPp6HZx4FKcRzBSrItBLY2QpAOWxYZnAF57I8dPg7/fgj/xgWEWT/M9qwM8MNihVJX1twL2jABZ3pG49qjbMJMUpXAHdnFtMNjV1ILwg+WhOXnnHjr+4BdmSTiQMAvo3inEewRRg=",
- "hasNextPage": true,
- "rooms": [
- {
- "id": "324235253",
- "displayName": "111",
- "roomTypeId": "315367",
- "floorId": "4"
}
]
}Swagger
Важно: Обязательным условием предоставления Search API является использование результатов поиска для создания бронирований в TravelLine: Platform. В случае нарушения условия предоставления, API может быть отключено правообладателем в одностороннем порядке. Для возобновления доступа к API напишите support@travelline.ru
Search API предоставляет поиск вариантов размещения с минимальной ценой по всем доступным средствам размещения (до 200) и выборки предложений для конкретного средства размещения.
В поиске предоставляются данные на год вперед от текущей даты. Максимально количество дней между параметрами arrivalDate и departureDate — 100. Максимальное количество дней между датой arrivalDate и текущей датой — 365.
Доступны два отдельных метода, которые возвращают сведения о раннем заезде/ позднем выезде и о дополнительных услугах для конкретного размещения. Обе группы данных могут быть получены одним запросом:
GET /api/search/v1/properties/{propertyId}/room-stays при указании includeExtraStays=true и includeExtraServices=true.
Фильтры в агрегационном поиске
В методе /api/search/v1/properties/room-stays/search можно указать фильтры:
По наличию питания — поле mealPreference.mealType. В запросе можно передать следующие значения:
All — отображение минимального по стоимости варианта проживания по каждому средству размещения.
MealOnly — отображение минимального по стоимости варианта проживания с включенным в стоимость тарифа питанием по каждому средству размещения. Если отсутствует такой вариант проживания, средство размещения не выводится.
По типу питания — поле mealPreference.mealsIncluded. В запросе можно передать значения возможных вариантов питания, которые доступны в ответе метода content/v1/meal-plans, а также в ответе методов content/v1/properties — отображение всей информации о доступных средствах размещения и content/v1/properties{propertyId} — отображение информации по конкретному средству размещения.
Результат поиска показывает минимальные по стоимости варианты проживания с включенными в стоимость тарифа конкретными типами питания по каждому средству размещения. Например, если в запросе указать только значения BreakFast, в ответе можно получить минимальные по стоимости варианты проживания с включенным в стоимость тарифа типом питания BreakFast. При этом, в ответе будут отсутствовать варианты AllInсlusive или HalfBoard.
Фильтр по типу питания можно использовать только при наличии типа питания MealOnly.
По минимальной и максимальной стоимости проживания — поля pricePreference.minPrice и pricePreference.maxPrice.
Эти поля являются необязательными. Если передать значения полей в API, результат поиска покажет варианты проживания с минимальной ценой по всем доступным средствам размещения по выбранным фильтрам.
Search for the lowest priced accommodation options across all available accommodations. The maximum number of accommodation to be searched - 200.
Request Body schema:
Search parameters
| propertyIds | Array of strings or null Accommodations IDs |
| adults required | integer <int32> Number of adults |
| childAges | Array of integers or null <int32> Child age range |
| include | string or null Add additional information about room types and rate plans to the response |
| arrivalDate required | string <date-time> Check-in date. |
| departureDate required | string <date-time> Check-out date. |
object (SearchApi_MealPreference) Meal filters | |
object (SearchApi_PricePreference) Price filters | |
| corporateIds | Array of strings or null Corporate clients identifiers to identify corporate clients |
Responses
Request samples
- Payload
{- "propertyIds": [
- "1024",
- "11"
], - "adults": 1,
- "childAges": [
- 5
], - "include": "",
- "arrivalDate": "2026-02-19",
- "departureDate": "2026-02-20",
- "mealPreference": {
- "mealType": "MealOnly",
- "mealsIncluded": {
- "mealPlanCodes": [
- "BreakFast"
]
}
}, - "pricePreference": {
- "currencyCode": "GBP",
- "minPrice": 0,
- "maxPrice": 10000
}, - "corporateIds": [
- "string"
]
}Response samples
- 200
{- "roomStays": [
- {
- "propertyId": "1024",
- "roomType": {
- "id": "45687",
- "placements": [
- {
- "code": "AdultBed-2",
- "count": 2,
- "kind": "Adult",
- "minAge": null,
- "maxAge": null
}
]
}, - "ratePlan": {
- "id": "987657",
- "corporateCodes": [
- "string"
], - "corporateIds": [
- "string"
]
}, - "currencyCode": "GBP",
- "total": {
- "priceBeforeTax": 50.5,
- "taxAmount": 5.5,
- "taxes": [
- {
- "amount": 5.5,
- "name": "Lodging fee",
- "description": "Fee per guest, payable at check-in"
}
]
}, - "includedServices": [
- {
- "id": "46545",
- "mealPlanCode": null
}
], - "mealPlanCode": "RoomOnly",
- "bookingFormLink": "",
- "fullPlacementsName": "2 adults in adult beds, 1 child in an extra bed."
}
], - "warnings": [
- {
- "code": "NotEnoughRights",
- "message": "Not enough rights to hotel"
}
]
}Search for accommodation options by specific accommodation
path Parameters
| propertyId required | string Example: 1024 Accommodation ID |
query Parameters
| arrivalDate required | string Example: arrivalDate=2026-02-19 Check-in date. |
| departureDate required | string Example: departureDate=2026-02-20 Check-out date. |
| adults required | integer <int32> Example: adults=1 Number of adults |
| childAges | Array of integers <int32> [ items <int32 > ] Child age range |
| corporateIds | Array of strings Corporate clients identifiers to identify corporate clients |
| includeExtraStays | boolean Default: false Includes extra stay options in search results for all available accommodations |
| includeExtraServices | boolean Default: false Includes extra services options in search results for all available accommodations |
Responses
Response samples
- 200
{- "roomStays": [
- {
- "propertyId": "1024",
- "roomType": {
- "id": "45687",
- "placements": [
- {
- "code": "AdultBed-2",
- "count": 2,
- "kind": "Adult",
- "minAge": null,
- "maxAge": null
}
]
}, - "ratePlan": {
- "id": "987657",
- "corporateCodes": [
- "string"
], - "corporateIds": [
- "string"
]
}, - "guestCount": {
- "adultCount": 1,
- "childAges": [
- 5
]
}, - "stayDates": {
- "arrivalDateTime": "2026-02-19T14:00",
- "departureDateTime": "2026-02-20T12:00"
}, - "availability": 50,
- "currencyCode": "GBP",
- "total": {
- "priceBeforeTax": 50.5,
- "taxAmount": 5.5,
- "taxes": [
- {
- "amount": 5.5,
- "name": "Lodging fee",
- "description": "Fee per guest, payable at check-in"
}
]
}, - "cancellationPolicy": {
- "freeCancellationPossible": true,
- "freeCancellationDeadlineLocal": "2026-02-19T12:00",
- "freeCancellationDeadlineUtc": "2026-02-19T09:00Z",
- "penaltyAmount": 9.72
}, - "includedServices": [
- {
- "id": "46545",
- "mealPlanCode": null
}
], - "mealPlanCode": "RoomOnly",
- "checksum": "eyJDaGVja3N1bVdpdGhPdXRFeHRyYXMiOnsiVG90YWxBbW91bnRBZnRlclRheCI6IjU1LjUwIiwiQ3VycmVuY3lDb2RlIjoiR0JQIiwiU3RhcnRQZW5hbHR5QW1vdW50IjoiOS43MiJ9LCJDaGVja3N1bVdpdGhFeHRyYXMiOnsiVG90YWxBbW91bnRBZnRlclRheCI6IjU1LjUwIiwiQ3VycmVuY3lDb2RlIjoiR0JQIiwiU3RhcnRQZW5hbHR5QW1vdW50IjoiOS43MiJ9fQ==",
- "fullPlacementsName": "2 adults in adult beds, 1 child in an extra bed.",
- "bookingFormLink": "",
- "extraServicesAvailable": true,
- "extraStays": {
- "earlyCheckIn": [
- {
- "total": {
- "priceBeforeTax": 50.5,
- "taxAmount": 5.5,
- "taxes": [
- {
- "amount": 5.5,
- "name": "Lodging fee",
- "description": "Fee per guest, payable at check-in"
}
]
}, - "currencyCode": "GBP",
- "dateTimesLocal": [
- "2026-02-20T12:00"
], - "isOccupyQuota": true
}
], - "lateCheckOut": [
- {
- "total": {
- "priceBeforeTax": 50.5,
- "taxAmount": 5.5,
- "taxes": [
- {
- "amount": 5.5,
- "name": "Lodging fee",
- "description": "Fee per guest, payable at check-in"
}
]
}, - "currencyCode": "GBP",
- "dateTimesLocal": [
- "2026-02-20T12:00"
], - "isOccupyQuota": true
}
]
}, - "extraServices": [
- {
- "id": "8770",
- "kind": "Meal",
- "mealPlanCode": "Dinner",
- "maxQuantity": null,
- "quantity": 1,
- "currencyCode": "GBP",
- "calculationMethod": "PerPerson",
- "total": {
- "priceBeforeTax": 50.5,
- "taxAmount": 5.5,
- "taxes": [
- {
- "amount": 5.5,
- "name": "Lodging fee",
- "description": "Fee per guest, payable at check-in"
}
]
}, - "quantityByGuests": null
}
]
}
], - "warnings": [
- null
]
}Search for extra services by accommodation conditions
path Parameters
| propertyId required | string Example: 1024 Accommodation ID |
Request Body schema: required
Search parameters
required | object (SearchApi_StayDates) Period of stay |
required | object (SearchApi_RoomTypeRq) |
required | object (SearchApi_RatePlan) Rate plan entity |
required | object (SearchApi_GuestCount) Number of guests entity |
Responses
Request samples
- Payload
{- "stayDates": {
- "arrivalDateTime": "2026-02-19T14:00",
- "departureDateTime": "2026-02-20T12:00"
}, - "roomType": {
- "id": "82751",
- "placements": [
- {
- "code": "AdultBed-2"
}
]
}, - "ratePlan": {
- "id": "987657",
- "corporateCodes": [
- "string"
], - "corporateIds": [
- "string"
]
}, - "guestCount": {
- "adultCount": 1,
- "childAges": [
- 5
]
}
}Response samples
- 200
{- "roomStayExtraServices": [
- {
- "id": "8770",
- "kind": "Meal",
- "mealPlanCode": "Dinner",
- "maxQuantity": null,
- "quantity": 1,
- "currencyCode": "GBP",
- "calculationMethod": "PerPerson",
- "total": {
- "priceBeforeTax": 50.5,
- "taxAmount": 5.5,
- "taxes": [
- {
- "amount": 5.5,
- "name": "Lodging fee",
- "description": "Fee per guest, payable at check-in"
}
]
}, - "quantityByGuests": null
}
]
}Search for extra stays by accommodation conditions
path Parameters
| propertyId required | string Example: 1024 Accommodation ID |
Request Body schema: required
Search parameters
object (SearchApi_StayDates) Period of stay | |
object (SearchApi_RoomTypeRq) | |
object (SearchApi_RatePlan) Rate plan entity | |
object (SearchApi_GuestCount) Number of guests entity |
Responses
Request samples
- Payload
{- "stayDates": {
- "arrivalDateTime": "2026-02-19T14:00",
- "departureDateTime": "2026-02-20T12:00"
}, - "roomType": {
- "id": "82751",
- "placements": [
- {
- "code": "AdultBed-2"
}
]
}, - "ratePlan": {
- "id": "987657",
- "corporateCodes": [
- "string"
], - "corporateIds": [
- "string"
]
}, - "guestCount": {
- "adultCount": 1,
- "childAges": [
- 5
]
}
}Response samples
- 200
{- "extraStays": {
- "earlyCheckIn": [
- {
- "total": {
- "priceBeforeTax": 50.5,
- "taxAmount": 5.5,
- "taxes": [
- {
- "amount": 5.5,
- "name": "Lodging fee",
- "description": "Fee per guest, payable at check-in"
}
]
}, - "currencyCode": "GBP",
- "dateTimeLocal": "2026-02-20T12:00",
- "isOccupyQuota": false
}
], - "lateCheckOut": [
- {
- "total": {
- "priceBeforeTax": 50.5,
- "taxAmount": 5.5,
- "taxes": [
- {
- "amount": 5.5,
- "name": "Lodging fee",
- "description": "Fee per guest, payable at check-in"
}
]
}, - "currencyCode": "GBP",
- "dateTimeLocal": "2026-02-20T12:00",
- "isOccupyQuota": false
}
]
}
}Swagger
Public Reviews API позволяет получить отзывы средств размещения и статистику рейтингов из различных источников (Яндекс, Google, Booking, TripAdvisor и др.).
Эта информация используется для отображения репутации отеля на сайтах партнеров и в системах управления репутацией.
Основные возможности
- Получение списка отзывов - постраничный список отзывов с возможностью сортировки по дате или рейтингу
- Статистика отзывов - средняя оценка и общее количество отзывов
- Справочники - источники отзывов и шкала рейтингов
- Переводы - автоматический перевод отзывов на запрашиваемый язык
Кеширование
⚠️ Важно: Метод получения списка отзывов использует серверное кеширование для оптимизации производительности.
Время жизни кеша: 10 минут
Это означает:
- Повторные запросы в течение 10 минут вернут идентичные данные
- Новые отзывы появятся с задержкой до 10 минут
- Изменения существующих отзывов отобразятся с той же задержкой
Пагинация
API использует cursor-based пагинацию для эффективной работы с большими объемами данных:
- Используйте
maxPageSizeдля контроля объема данных за один запрос (максимум 100) - Обрабатывайте
nextPageTokenдля получения всех отзывов - Проверяйте
hasNextPageперед следующим запросом
Авторизация
Все запросы требуют Bearer token в заголовке Authorization. Токен должен быть действительным и иметь права доступа к указанному объекту размещения.
Источники отзывов
API агрегирует отзывы из различных источников:
- Яндекс.Карты
- Google Maps
- Booking.com
- TripAdvisor
- Другие платформы
Каждый отзыв содержит информацию об источнике в поле sourceId.
Рейтинговая шкала
Отзывы оцениваются по 10-балльной шкале с категориями:
- Отлично (8-10) - высокая оценка
- Очень хорошо (6-8) - оценка выше среднего
- Хорошо (4-6) - средняя оценка
- Неплохо (2-4) - оценка ниже среднего
- Плохо (0-2) - низкая оценка
Переводы
API поддерживает автоматический перевод отзывов на различные языки. Для получения перевода используйте параметр languageCode (IETF BCP-47 формат, например: en, de, fr).
Если перевод доступен, он будет возвращен в поле translatedText.
Returns a paginated list of hotel reviews sorted by date or rating.
path Parameters
| propertyId required | string Property id |
query Parameters
| pageToken | string Opaque token for pagination continuation (optional). |
| maxPageSize | integer <int32> Maximum number of reviews to return (optional, default 10, max 100). |
| sortBy | string Sort by field: "date" or "rate" (optional, default "date"). Ignore if pageToken contains a non-zero value |
| sortOrder | string Sort order: "asc" or "desc" (optional, default "desc"). Ignore if pageToken contains a non-zero value |
| languageCode | string Language code (IETF BCP-47, optional). If the review is translated into the provided language, the translation will be returned in the review body. |
header Parameters
| Authorization | string Bearer token |
Responses
Response samples
- 200
{- "reviews": [
- {
- "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
- "authorName": "Irina Zadirskaia",
- "publishDate": "2025-07-30T00:00:00",
- "rating": 9.5,
- "originalText": "Отдыхали здесь с 14 по 23 июля 2025 года...",
- "languageCode": "ru",
- "sourceId": "16",
- "replyText": "Ирина, приветствуем Вас! Благодарим Вас за выбор нашего отеля...",
- "translatedText": "We had a rest here from July 14 to July 23, 2025..."
}
], - "nextPageToken": "eyJwYWdlIjoyfQ==",
- "hasNextPage": true
}Reference list of available rating categories and their score boundaries (e.g. excellent, good, poor). Category rating in (MinScore; MaxScore], except for the lowest rating, which can be 0.
header Parameters
| Authorization | string Bearer token |
Responses
Response samples
- 200
{- "ratingScale": [
- {
- "code": "poor",
- "minScore": 0,
- "maxScore": 2
}, - {
- "code": "not_bad",
- "minScore": 2,
- "maxScore": 4
}, - {
- "code": "good",
- "minScore": 4,
- "maxScore": 6
}, - {
- "code": "very_good",
- "minScore": 6,
- "maxScore": 8
}, - {
- "code": "excellent",
- "minScore": 8,
- "maxScore": 10
}
]
}