Quickstart

On this page you will generate an API key in the hotel’s HMS panel and fetch the in-house guest list. You need panel access with a user who is allowed to manage API keys; otherwise the hotel management can generate the key and pass it to you.

1. Generate a key#

  • In the HMS admin panel open the API page and switch to the Custom API tab.
  • Enter where the key will be used in the description field (e.g. Hotspot – Main building) and save. HMS generates a 13-character key.
  • Copy the key from the list. It is bound to the hotel and does not expire; it becomes invalid the moment it is deleted from the list.
Terminal
export HMS_API_KEY="017f1daf2d139"

Also note the hotel’s HMS ID; the samples send it as HotelCode: 1000. The header is not used for validation, but it shows in logs which hotel was queried.

2. Fetch the list#

The endpoint is called with POST and takes no body:

Request
curl -X POST "https://test.hms.gen.tr/public/json/customer/inhotel" \
  -H "ApiKey: $HMS_API_KEY" \
  -H "HotelCode: 1000"

3. Read the response#

Every in-house guest is a separate record in the otelde array. A truncated example for two guests sharing a room:

Response · 200 (truncated)
{
    "success": 1,
    "otelde": [
        {
            "unique": 58211,
            "firstName": "AYŞE",
            "lastName": "DEMİR",
            "identityNumber": "11111111110",
            "birthDate": "14.03.1985",
            "roomID": 4,
            "roomName": "104",
            "checkin": 1788863400,
            "checkout": 1788998400,
            "rezervasyon_id": 282799
        },
        {
            "unique": 58212,
            "firstName": "MEHMET",
            "lastName": "DEMİR",
            "identityNumber": "22222222220",
            "birthDate": "02.11.1982",
            "roomID": 4,
            "roomName": "104",
            "checkin": 1788863400,
            "checkout": 1788998400,
            "rezervasyon_id": 282799
        }
    ]
}
  • unique is unique per guest; tie the hotspot user to it. rezervasyon_id is shared by guests in the same room.
  • The room number asked on the portal is compared with roomName, the surname with lastName. Values are usually upper case.
  • checkin is the check-in moment; checkout is the planned check-out date (00:00 UTC) with no time of day. Add the hotel’s check-out time to get the session end.
  • If nobody is in house, otelde is an empty array and success is still 1.

What next#

Last updated: 8 September 2026Found a mistake? Let us know