Authentication

Every request to the SIHOT.POS REST Open API runs within a session. You open a session with /api/v1/auth, send the returned security id with every following request and close the session with /api/v1/close.


Sequence: open a session with auth, call endpoints with the securityid header, close the session

What a Session Is

A session represents a SIHOT.POS user who is logged in at a cash desk:

  • The user is a SIHOT.POS user (waiter). All bookings of the session are made in the name of this user.
  • The cash desk determines the context of the session: new guest tables are opened in the outlet of this cash desk, item prices are determined for this outlet, and the printers of this cash desk are used.

The hotel sets up the user and the cash desk for your interface and provides you with the user number, the password and the cash desk number.

NOTE

The user for the interface needs a password, and the password must not contain spaces. Users without a password or with a space in the password cannot authenticate through the API.

For each session, SIHOT.POS starts a separate process on the SIHOT.POS host. Within a session, requests are processed one after another.

Open a Session

Request – GET /api/v1/auth

Parameter Location Required Description
AuthKey Header Yes Number of the SIHOT.POS user (waiter).
AuthPassword Header Yes Password of this user.
CashDeskNumber Query Yes Number of the cash desk.
X-API-Key Header Only if configured API key, if the hotel has configured one in SIHOT.POS. See API Key.
curl
curl -X GET "https://<pos-api-host>/api/v1/auth?CashDeskNumber=1" \
     -H "AuthKey: 100" \
     -H "AuthPassword: <password>"
Node.js
const baseUrl = "https://<pos-api-host>";

const response = await fetch(${baseUrl}/api/v1/auth?CashDeskNumber=1, { headers: { "AuthKey": "100", "AuthPassword": "<password>" } }); if (!response.ok) { throw new Error(Authentication failed: ${response.status}); } const { SecurityId } = await response.json();

Response

Field Description
DateTime Time of the successful authentication, ISO 8601 in UTC.
SecurityId Security id of the session. Send it in the header securityid of every following request.
TTLMs Lifetime of the session in milliseconds without a request (3600000 = one hour).
JSON
{
  "DateTime": "2026-11-05T06:15:02.000Z",
  "SecurityId": "6F1C2A9E-3B7D-4E21-9C55-0A8B2D4E7F10",
  "TTLMs": 3600000
}
NOTE

Opening a session takes several seconds, because SIHOT.POS starts a process for it. The first request after the authentication also takes a few seconds longer. Open a session once and reuse it, instead of authenticating before every request.

Call the API with the Security Id

Send the security id in the header securityid:

curl
curl -X GET "https://<pos-api-host>/api/v1/masterdata/outlets" \
     -H "securityid: 6F1C2A9E-3B7D-4E21-9C55-0A8B2D4E7F10"
Node.js
const response = await fetch(`${baseUrl}/api/v1/masterdata/outlets`, {
  headers: { "securityid": SecurityId }
});

Session Lifetime

The session expires one hour (TTLMs) after the last request. Every request with a valid security id restarts this period.

After the session has expired, requests return 401 with the message Unauthorized access. Invalid security id. Please authenticate connection again. Open a new session in this case.

Close a Session

Close the session as soon as you no longer need it. This ends the process that SIHOT.POS has started for the session.

Request – POST /api/v1/close

Parameter Location Required Description
securityid Header Yes Security id of the session.
X-API-Key Header Only if configured API key, if configured.
curl
curl -X POST "https://<pos-api-host>/api/v1/close" \
     -H "securityid: 6F1C2A9E-3B7D-4E21-9C55-0A8B2D4E7F10"
Node.js
await fetch(`${baseUrl}/api/v1/close`, {
  method: "POST",
  headers: { "securityid": SecurityId }
});

A successful call returns 200.

TIP

Every open session occupies a process on the SIHOT.POS host. Keep the number of parallel sessions low and close sessions you no longer use.

API Key

The hotel can configure an API key in SIHOT.POS. If an API key is configured, every request must contain it in the header X-API-Key, including /api/v1/auth and /api/v1/close. The key is case-sensitive. If the key is missing or wrong, the request returns 401 with the message Invalid API key.

If no API key is configured, the header is not checked.

IMPORTANT

If an API key is configured and you call /api/v1/close without it, the call returns 401 and the session is not closed.

Authentication Errors

Status Message Cause
400 Required details are missing. AuthKey, AuthPassword or CashDeskNumber is missing, or CashDeskNumber is not a number.
401 Authentication failed. The user number, the password or the cash desk number is wrong.
401 Unauthorized access. The header securityid is missing.
401 Unauthorized access. Invalid security id. Please authenticate connection again. The security id is unknown or the session has expired. For /api/v1/close, the message is Unauthorized access. Invalid security id.
401 Invalid API key. An API key is configured and the header X-API-Key is missing or wrong.

The structure of error responses is described in API Basics.