اطلاعات هتل
دادههایی که قالب صفحات موتور رزرو را پر میکنند: اطلاعات تماس و موقعیت، پیوندهای شبکههای اجتماعی، متنهای فوتر (متنهای حقوقی، درباره هتل، کدهای Analytics و تبلیغات) و تنظیمات 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الزامیشناسه هتل.
پاسخ
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الزامیشناسه هتل.
پاسخ
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 موفق.