Информация об отеле
Данные для обрамления страниц модуля бронирования: контакты и расположение, ссылки на соцсети, тексты подвала (юридическая информация, об отеле, коды Analytics/Ads) и настройки SMTP для писем с подтверждением.
GET
/external/hotel/{hotelID}/contact/infoКонтактные данныеGET/external/online/social/mediaСсылки на соцсетиGET/external/online/footerТексты подвалаGET/external/online/mail/hostНастройки почтового сервераКонтактные данные#
GET
/external/hotel/{hotelID}/contact/infoАутентификация: Authorization: Bearer
Параметры пути
hotelIDintegerобязательныйID отеля.
Ответ
200 Успешно.
Ответы с ошибками
- 404 Отель не найден.
curl "https://test.hms.gen.tr/external/hotel/1000/contact/info" \
-H "Authorization: Bearer $HMS_TOKEN"const res = await fetch("https://test.hms.gen.tr/external/hotel/1000/contact/info", {
headers: {
"Authorization": `Bearer ${process.env.HMS_TOKEN}`
}
});
const data = await res.json();$ch = curl_init('https://test.hms.gen.tr/external/hotel/1000/contact/info');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('HMS_TOKEN'),
],
]);
$data = json_decode(curl_exec($ch), true);{
"title": "Demo Otel",
"phone": "+90 258 000 00 00",
"cellPhone": "+90 555 000 00 00",
"email": "[email protected]",
"www": "https://www.demootel.com",
"address": "Kumsal Cad. No: 12",
"country": "Türkiye",
"countryIng": "Turkey",
"city": "Antalya",
"district": "Muratpaşa",
"latitude": "36.8841",
"longitude": "30.7056"
}Настройки почтового сервера#
GET
/external/online/mail/hostАутентификация: Authorization: Bearer
Возвращает настройки SMTP, заданные отелем для писем с подтверждением онлайн-бронирований. Содержит пароль, поэтому используйте их только на сервере.
Параметры строки запроса
hotelIDintegerобязательныйID отеля.
Ответ
200 Успешно.
Ответы с ошибками
- 200
mail_host_is_not_found— SMTP не настроен;hotel_id_is_not_found.
curl "https://test.hms.gen.tr/external/online/mail/host?hotelID=1000" \
-H "Authorization: Bearer $HMS_TOKEN"const res = await fetch("https://test.hms.gen.tr/external/online/mail/host?hotelID=1000", {
headers: {
"Authorization": `Bearer ${process.env.HMS_TOKEN}`
}
});
const data = await res.json();$ch = curl_init('https://test.hms.gen.tr/external/online/mail/host?hotelID=1000');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('HMS_TOKEN'),
],
]);
$data = json_decode(curl_exec($ch), true);{
"success": true,
"data": {
"transport": "smtp",
"encryption": "tls",
"port": 587,
"host": "smtp.demootel.com",
"user": "[email protected]",
"password": "********"
}
}
Ссылки на соцсети#
/external/online/social/mediaАутентификация:
Authorization: BearerПараметры строки запроса
hotelIDintegerобязательныйlimitintegerпо умолчанию:20pageintegerпо умолчанию:1orderstringidили-id.Ответ
200 Успешно.