Informasi hotel
Data yang mengisi kerangka halaman booking engine: detail kontak dan lokasi, tautan media sosial, teks footer (legal, tentang hotel, snippet analytics/iklan), dan pengaturan SMTP untuk email konfirmasi.
GET
/external/hotel/{hotelID}/contact/infoDetail kontakGET/external/online/social/mediaTautan media sosialGET/external/online/footerTeks footerGET/external/online/mail/hostPengaturan server emailDetail kontak#
GET
/external/hotel/{hotelID}/contact/infoAutentikasi: Authorization: Bearer
Parameter path
hotelIDintegerwajibID hotel.
Respons
200 Berhasil.
Respons error
- 404 Hotel tidak ditemukan.
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"
}Pengaturan server email#
GET
/external/online/mail/hostAutentikasi: Authorization: Bearer
Mengembalikan pengaturan SMTP yang dikonfigurasi hotel untuk email konfirmasi reservasi online. Berisi kata sandi; gunakan hanya di sisi server.
Parameter kueri
hotelIDintegerwajibID hotel.
Respons
200 Berhasil.
Respons error
- 200
mail_host_is_not_found— SMTP belum dikonfigurasi;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": "********"
}
}
Tautan media sosial#
/external/online/social/mediaAutentikasi:
Authorization: BearerParameter kueri
hotelIDintegerwajiblimitintegerdefault:20pageintegerdefault:1orderstringidatau-id.Respons
200 Berhasil.