Otel bilgileri
Rezervasyon motorunun sayfa iskeletini besleyen bilgiler: iletişim ve konum, sosyal medya bağlantıları, alt bilgi metinleri (bilgiler, otel, analytics/adwords kodları) ve onay e-postası için SMTP ayarları.
GET
/external/hotel/{hotelID}/contact/infoİletişim bilgileriGET/external/online/social/mediaSosyal medya bağlantılarıGET/external/online/footerAlt bilgi metinleriGET/external/online/mail/hostE-posta sunucu ayarlarıİletişim bilgileri#
GET
/external/hotel/{hotelID}/contact/infoKimlik doğrulama: Authorization: Bearer
Yol parametreleri
hotelIDintegerzorunluOtel kimliği.
Yanıt
200 Başarılı.
Hata yanıtları
- 404 Otel bulunamadı.
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"
}E-posta sunucu ayarları#
GET
/external/online/mail/hostKimlik doğrulama: Authorization: Bearer
Otelin online rezervasyon onay e-postaları için tanımladığı SMTP bilgilerini döner. Şifre içerir; yalnızca sunucu tarafında kullanın.
Sorgu parametreleri
hotelIDintegerzorunluOtel kimliği.
Yanıt
200 Başarılı.
Hata yanıtları
- 200
mail_host_is_not_found— tanımlı SMTP yok;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": "********"
}
}
Sosyal medya bağlantıları#
/external/online/social/mediaKimlik doğrulama:
Authorization: BearerSorgu parametreleri
hotelIDintegerzorunlulimitintegervarsayılan:20pageintegervarsayılan:1orderstringidveya-id.Yanıt
200 Başarılı.