ข้อมูลโรงแรม

ข้อมูลสำหรับส่วนประกอบของหน้าเว็บระบบจองห้องพัก ได้แก่ ข้อมูลติดต่อและที่ตั้ง ลิงก์โซเชียลมีเดีย ข้อความส่วนท้าย (ข้อกฎหมาย เกี่ยวกับโรงแรม โค้ด Analytics/โฆษณา) และการตั้งค่า SMTP สำหรับอีเมลยืนยัน

ข้อมูลติดต่อ#

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"
การตอบกลับ · 200
{
    "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/social/media

การยืนยันตัวตน: Authorization: Bearer

พารามิเตอร์คิวรี

hotelIDintegerจำเป็น
ID ของโรงแรม
limitintegerค่าเริ่มต้น: 20
จำนวนรายการต่อหน้า
pageintegerค่าเริ่มต้น: 1
หมายเลขหน้า
orderstring
id หรือ -id

การตอบกลับ

200 สำเร็จ

คำขอ
curl "https://test.hms.gen.tr/external/online/social/media?hotelID=1000" \
  -H "Authorization: Bearer $HMS_TOKEN"
การตอบกลับ · 200
{
    "success": true,
    "count": 2,
    "items": [
        {
            "url": "https://www.instagram.com/demootel",
            "SosyalMedyaKategori": {
                "icon": "fa-instagram",
                "iconsvg": null
            }
        },
        {
            "url": "https://www.facebook.com/demootel",
            "SosyalMedyaKategori": {
                "icon": "fa-facebook",
                "iconsvg": null
            }
        }
    ]
}

การตั้งค่าเซิร์ฟเวอร์อีเมล#

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"
การตอบกลับ · 200
{
    "success": true,
    "data": {
        "transport": "smtp",
        "encryption": "tls",
        "port": 587,
        "host": "smtp.demootel.com",
        "user": "[email protected]",
        "password": "********"
    }
}