In-house guests
The only resource of the hotspot integration. Returns room, identity and check-in/check-out details for every guest currently in house (checked in, not yet checked out). The hotspot software fetches this list at regular intervals and opens or closes Wi-Fi accounts accordingly; the steps are described in the Guest verification flow guide.
Object#
Fields
uniqueintegerrezervasyon_idintegerinHotelinteger1 = the guest is in house. Always 1, since the endpoint returns in-house guests only.firstNamestringlastNamestringidentityNumberstring | nullbirthDatestring | nullDD.MM.YYYY. May be empty.roomIDintegerroomNamestringcheckinintegercheckoutintegercheckout2integer | nullnull for in-house guests; a guest who checks out drops off the list anyway.mikrotikSifrelemeinteger0 room name (the Wi-Fi password is the room number), 1 no password. Apply the same policy on your own portal.01{
"mikrotikSifreleme": 0,
"unique": 58211,
"inHotel": 1,
"identityNumber": "11111111110",
"firstName": "AYŞE",
"lastName": "DEMİR",
"birthDate": "14.03.1985",
"roomID": 4,
"roomName": "104",
"checkin": 1788863400,
"checkout": 1788998400,
"checkout2": null,
"rezervasyon_id": 282799
}List in-house guests#
/public/json/customer/inhotelAuthentication: ApiKey header
Returns the full list of in-house guests. There are no filter parameters and no request body. A guest appears in the list when the reservation is active, has been checked in and not yet checked out, and the guest is flagged as “in house”. Every guest of the same reservation is a separate record.
The response is not paginated; large hotels may return several hundred records. Cache the list and refresh it at the recommended interval.
Headers
ApiKeystringrequiredHotelCodeintegerResponse
200 success: 1 and the otelde array. If nobody is in house the array is empty; that is not an error.
successinteger1 success, 0 failure. A number, not a boolean as in Online Booking.otelde[]object[]Error responses
- 401
ApiKeyheader missing, empty or not defined in HMS (it may have been deleted). Body:{"success": 0}. - 405 The request used a method other than
POST(for exampleGETfrom a browser address bar).
curl -X POST "https://test.hms.gen.tr/public/json/customer/inhotel" \
-H "ApiKey: $HMS_API_KEY" \
-H "HotelCode: 1000"const res = await fetch("https://test.hms.gen.tr/public/json/customer/inhotel", {
method: "POST",
headers: {
"ApiKey": process.env.HMS_API_KEY,
"HotelCode": "1000"
}
});
const data = await res.json();$ch = curl_init('https://test.hms.gen.tr/public/json/customer/inhotel');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'ApiKey: ' . getenv('HMS_API_KEY'),
'HotelCode: 1000',
],
]);
$data = json_decode(curl_exec($ch), true);{
"success": 1,
"otelde": [
{
"mikrotikSifreleme": 0,
"unique": 58211,
"inHotel": 1,
"identityNumber": "11111111110",
"firstName": "AYŞE",
"lastName": "DEMİR",
"birthDate": "14.03.1985",
"roomID": 4,
"roomName": "104",
"checkin": 1788863400,
"checkout": 1788998400,
"checkout2": null,
"rezervasyon_id": 282799
},
{
"mikrotikSifreleme": 0,
"unique": 58212,
"inHotel": 1,
"identityNumber": "22222222220",
"firstName": "MEHMET",
"lastName": "DEMİR",
"birthDate": "02.11.1982",
"roomID": 4,
"roomName": "104",
"checkin": 1788863400,
"checkout": 1788998400,
"checkout2": null,
"rezervasyon_id": 282799
},
{
"mikrotikSifreleme": 0,
"unique": 58197,
"inHotel": 1,
"identityNumber": "U01234567",
"firstName": "JULIA",
"lastName": "WAGNER",
"birthDate": "27.06.1990",
"roomID": 12,
"roomName": "205",
"checkin": 1788782700,
"checkout": 1789084800,
"checkout2": null,
"rezervasyon_id": 282803
}
]
}{
"success": 1,
"otelde": []
}{
"success": 0
}