Use Cases: Sales Data

This section provides practical examples of common integration scenarios that read sales data from SIHOT.POS. These examples are not tied to any specific solution but illustrate some processes you might need to implement as part of your integration.

Import Sales into a Kitchen and Stock Management System

Kitchen and stock management systems control the flow of goods from purchasing to sales. To deduct the consumed ingredients from stock and to calculate the cost of goods sold, such a system needs to know which items were sold, in which quantity and at which price.

This use case explains how to retrieve the settled bills of an outlet, including all booked items and payments, using the SIHOT.POS REST Open API.

This process involves:

  • GET /api/v1/auth: open a session with SIHOT.POS.
  • GET /api/v1/masterdata/outlets: retrieve the outlets, for example restaurant, bar or room service.
  • GET /api/v1/outlet/bills: retrieve the settled bills of an outlet for a business date.
  • POST /api/v1/close: close the session.

Sequence: authenticate, retrieve outlets, retrieve bills per outlet, close the session

NOTE

This integration only reads data. SIHOT.POS stays the leading system for all sales. Recipes, ingredients and stock levels are managed in your system: the API delivers the items that were sold, and your system calculates the resulting consumption.

Step 1 – Authenticate

Every call to the SIHOT.POS REST Open API requires a session. To open a session, call /api/v1/auth with the credentials of a SIHOT.POS user and the number of a cash desk.

The following input parameters are required:

  • AuthKey (header): number of the SIHOT.POS user (waiter) that is set up for your interface.
  • AuthPassword (header): password of this user.
  • CashDeskNumber (query): number of the cash desk the session works with.
  • X-API-Key (header): only required if an API key is configured in SIHOT.POS. If it is configured, send it with every request, including /api/v1/close.

The hotel provides these values during the setup of the interface.

Sample Request – GET /api/v1/auth

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>" } }); const session = await response.json(); const securityId = session.SecurityId;

Sample Response – GET /api/v1/auth

JSON
{
  "DateTime": "2026-11-05T06:15:02.000Z",
  "SecurityId": "6F1C2A9E-3B7D-4E21-9C55-0A8B2D4E7F10",
  "TTLMs": 3600000
}

Send the returned SecurityId in the header securityid of all following requests.

NOTE

Opening a session takes several seconds, and the first request after the authentication also takes a few seconds longer. Open one session per synchronization run and reuse it for all calls of that run, instead of authenticating before every call.

The session expires one hour (TTLMs) after the last request. Every request with a valid securityid restarts this period. If a request returns 401 because the security id is invalid, open a new session.

Step 2 – Retrieve the Outlets

An outlet is a sales area in SIHOT.POS, for example a restaurant, a bar or the room service. Bills are always retrieved per outlet, so you need the outlet numbers first.

Sample Request – GET /api/v1/masterdata/outlets

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 }
});
const { outlets } = await response.json();

Sample Response – GET /api/v1/masterdata/outlets

JSON
{
  "outlets": [
    { "ObjId": 1001, "OutletNumber": 1, "Name": "Restaurant" },
    { "ObjId": 1002, "OutletNumber": 2, "Name": "Bar" }
  ]
}
TIP

Map each OutletNumber once to the matching location or warehouse in your system. Outlets change rarely, so there is no need to retrieve them in every synchronization run.

Step 3 – Retrieve the Bills

/api/v1/outlet/bills returns the settled bills of one outlet for one business date, including all booked items and payments.

The following input parameters are used:

  • OutletNumber (query, required): number of the outlet from step 2.
  • BillDate (query, optional): business date in the format YYYY-MM-DD, without a time. If the parameter is missing, the bills of the current business date are returned.

The response contains:

  • only settled bills. Tables that are still open are not included until they are closed.
  • the booked items without cancelled bookings: a cancelled item and its cancellation booking are both left out.
  • the payments of the bill, one entry per payment booking.

The order of the bills in the response is not defined.

By default, identical bookings of the same item on one bill are combined into one line with the summed quantity and amounts. Bookings count as identical if item number, name, unit price, tax, discount percentage, price level, booking mode and comments are the same. BookedObjIds then lists all bookings that the line represents. Other fields of a combined line, such as WaiterNumber, OutOfHouse or TerminalInfo, show the values of the first booking. Depending on the SIHOT.POS configuration, bookings are not combined.

Sample Request – GET /api/v1/outlet/bills

curl
curl -X GET "https://<pos-api-host>/api/v1/outlet/bills?OutletNumber=1&BillDate=2026-11-04" \
     -H "securityid: 6F1C2A9E-3B7D-4E21-9C55-0A8B2D4E7F10"
Node.js
const response = await fetch(
  `${baseUrl}/api/v1/outlet/bills?OutletNumber=1&BillDate=2026-11-04`,
  { headers: { "securityid": securityId } }
);
const { Bills } = await response.json();

Sample Response – GET /api/v1/outlet/bills (bills of a past business date)

JSON
{
  "Bills": [
    {
      "ObjId": 0,
      "OrderId": 100001234,
      "InvoiceId": "4711",
      "TerminalInfo": {
        "CashDeskNUmber": 1,
        "CashDeskName": "Restaurant 1",
        "OutletNumber": 1,
        "OutletName": "Restaurant"
      },
      "TableNumber": 3,
      "TableParty": 0,
      "WaiterNumber": 1,
      "WaiterName": "Waiter 1",
      "BusinessDateTime": "2026-11-04T00:00:00.000Z",
      "LastDateTime": "2026-11-04T19:41:57.000Z",
      "OpenMode": 1,
      "GuestCount": 2,
      "AccountNumber": "",
      "Rebate": 2,
      "TotalAmount": 46,
      "InTrainingMode": false,
      "ShiftNumber": 1,
      "EndOfDayNumber": 312,
      "Items": [
        {
          "ObjId": 880011,
          "ItemNumber": 1001,
          "Name": "Coke 200 ml",
          "ItemGroup": 101,
          "ItemGroupName": "Cold-drinks",
          "MainGroup": 3,
          "MainGroupName": "Beverages",
          "Quantity": 2,
          "Price": 10,
          "OrgPrice": 10,
          "PriceLevel": 1,
          "TaxNumber": 1,
          "TaxPercent": 10,
          "TotalAmount": 18,
          "NetAmount": 16.36,
          "TaxAmount": 1.64,
          "RebatePercent": 10,
          "RebateAmount": 2,
          "OutOfHouse": false,
          "VoidType": 0,
          "OrderComment": "",
          "BillComment": "",
          "OrderType": "X",
          "OrderPrinter": 1,
          "WaiterNumber": 1,
          "WaiterName": "Waiter 1",
          "BookingMode": "",
          "BusinessDateTime": "2026-11-04T00:00:00.000Z",
          "LastDateTime": "2026-11-04T19:05:33.000Z",
          "TerminalInfo": {
            "CashDeskNUmber": 1,
            "CashDeskName": "Restaurant 1",
            "OutletNumber": 1,
            "OutletName": "Restaurant"
          },
          "BookedObjIds": [880011, 880012]
        },
        {
          "ObjId": 880013,
          "ItemNumber": 2040,
          "Name": "Pasta Arrabbiata",
          "ItemGroup": 210,
          "ItemGroupName": "Main courses",
          "MainGroup": 5,
          "MainGroupName": "Food",
          "Quantity": 2,
          "Price": 14,
          "OrgPrice": 14,
          "PriceLevel": 1,
          "TaxNumber": 1,
          "TaxPercent": 10,
          "TotalAmount": 28,
          "NetAmount": 25.45,
          "TaxAmount": 2.55,
          "RebatePercent": 0,
          "RebateAmount": 0,
          "OutOfHouse": false,
          "VoidType": 0,
          "OrderComment": "",
          "BillComment": "",
          "OrderType": "X",
          "OrderPrinter": 2,
          "WaiterNumber": 1,
          "WaiterName": "Waiter 1",
          "BookingMode": "",
          "BusinessDateTime": "2026-11-04T00:00:00.000Z",
          "LastDateTime": "2026-11-04T19:07:48.000Z",
          "TerminalInfo": {
            "CashDeskNUmber": 1,
            "CashDeskName": "Restaurant 1",
            "OutletNumber": 1,
            "OutletName": "Restaurant"
          },
          "BookedObjIds": [880013]
        }
      ],
      "Payments": [
        {
          "ObjId": 880020,
          "PayMethodNumber": 1,
          "Name": "Cash",
          "Amount": 46,
          "VoidType": 0,
          "WaiterNumber": 1,
          "WaiterName": "Waiter 1",
          "BusinessDateTime": "2026-11-04T00:00:00.000Z",
          "LastDateTime": "2026-11-04T19:41:57.000Z",
          "TerminalInfo": {
            "CashDeskNUmber": 1,
            "CashDeskName": "Restaurant 1",
            "OutletNumber": 1,
            "OutletName": "Restaurant"
          },
          "BookedObjIds": [880020]
        }
      ]
    }
  ]
}

All values in the samples are examples. For bills of a past business date, the ObjId of the bill is 0 and the OrderType of the items is X.

Fields Relevant for Stock Management

Field Description
OrderId Unique identifier of the bill in SIHOT.POS. Use it to detect bills you have already imported.
InvoiceId Invoice number of the bill.
BusinessDateTime Business date of the bill. Use only the date part.
LastDateTime Time (UTC) of the most recent booking on the bill.
InTrainingMode For the current business date: true if the waiter of the bill is set to training mode in SIHOT.POS. Bills in training mode are not real sales. For past business dates the value is always false, because training bills are no longer returned after the end of day.
Items[].ItemNumber Number of the item in SIHOT.POS. Map it to the article or recipe in your system.
Items[].ItemGroup, Items[].MainGroup Item group and main group, with their names in ItemGroupName and MainGroupName.
Items[].Quantity Sold quantity of the line. It can be a decimal value (for example for weighed items) and is negative on counter bills.
Items[].Price Unit price of the booking. OrgPrice is the original price of the item at the time of booking, before later price changes.
Items[].TotalAmount Gross amount of the line after discount, tax included.
Items[].NetAmount Net amount of the line.
Items[].TaxAmount Tax amount of the line: TotalAmount minus NetAmount.
Items[].TaxPercent Tax rate of the booking in percent.
Items[].RebatePercent, Items[].RebateAmount Discount of the line in percent and as amount. If the discount was given as an amount, RebatePercent is -1.
Items[].OutOfHouse true if the item was sold as take-away.
Rebate Sum of all line discounts of the bill.
TotalAmount Total amount of the bill.
IMPORTANT

TotalAmount is a gross amount. For each item line the API also delivers the net amount, the tax amount and the tax rate. Use these values when you display or evaluate the bill instead of calculating the tax yourself, so that your figures match the SIHOT.POS bill.

All amounts are decimal numbers in the currency of the SIHOT.POS installation. The API does not return a currency code.

Discounts

  • Item and bill discounts given with the SIHOT.POS discount functions are delivered per item line in RebatePercent and RebateAmount. A bill discount is distributed to the discountable lines of the bill. TotalAmount of a line already contains the discount.
  • Package prices (menus) are delivered as a separate package item line with a negative price. The items that make up the package are then not listed.
  • Items with a negative price that are booked in SIHOT.POS, for example a rounding correction, are delivered as normal item lines.

Agree with the hotel how discounts are booked in its installation and include each variant in your tests.

Cancelled Bills and Credit Notes

The items and amounts of a settled bill are not changed when it is cancelled or credited later. Instead, SIHOT.POS creates a counter bill:

  • with its own OrderId,
  • with the same items, but with negative quantities and amounts,
  • with OpenMode = 4 as long as the counter bill belongs to the current business date.

A cancellation on the same business date gets the negative invoice number of the original bill as InvoiceId, for example -4711. In this case, the original bill also shows OpenMode = 4 until the end of day.

Import counter bills like any other bill: they reduce the sold quantities. Your system must therefore accept negative quantities and amounts.

  • Retrieve completed business days. Request the bills of a business date after the end of day of that date has been processed in SIHOT.POS, for example once per night for the previous business date.
  • Intraday updates. If you need sales during the day, call the endpoint without BillDate repeatedly. Each call returns all bills settled so far on the current business date, so you have to skip bills that you have already imported, using OrderId.
  • One call per outlet and date. The endpoint has no paging and no filter by time or change. Plan one call per outlet and business date.
  • No push. The API has no webhooks. Your system has to request the data.
NOTE

While SIHOT.POS processes the end of day, every data request returns 422. Retry the request later.

Step 4 – Close the Session

When the synchronization run is complete, close the session. This releases the resources that SIHOT.POS holds for your session.

Sample Request – POST /api/v1/close

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.

Error Handling

If a request fails, SIHOT.POS returns an HTTP status code and a JSON body with the fields code, title and msg.

Sample Error Response

JSON
{
  "code": 401,
  "title": "Unauthorised.",
  "msg": "Unauthorized access. Invalid security id. Please authenticate connection again."
}
Status Meaning in this use case
400 A parameter is missing or has a wrong format, for example BillDate is not a valid date.
401 The security id is missing or has expired, the credentials or the cash desk number are wrong, or the API key is missing or wrong. If the security id is invalid, open a new session. If the API key is invalid, check your configuration.
422 The request cannot be processed at the moment, for example during the end of day.
500 Internal error in SIHOT.POS. Retry later; if the error persists, contact SIHOT.

Limitations

  • Combination and container items. Combination (combo) and container items are delivered as one line with the main item only, without their components. Add-on items that are booked to a main item, and items that are combined into a package, are not delivered. Map such main items to a recipe in your system that contains the consumption of the components.
  • Read-only. Items, prices and stock levels cannot be changed through the API. Recipes, stock levels and purchase prices are not available.
  • One outlet and one business date per call.

Preparing for Certification

Before certification, make sure your integration covers the following test cases:

Test case Endpoint Expected result
Authentication GET /api/v1/auth Your system authenticates with AuthKey, AuthPassword and CashDeskNumber and receives a SecurityId.
Retrieve outlets GET /api/v1/masterdata/outlets Your system retrieves the list of all outlets with a valid securityid.
Retrieve bills of the current business date GET /api/v1/outlet/bills Without BillDate, your system receives the settled bills of the current business date.
Retrieve bills of a past business date GET /api/v1/outlet/bills With BillDate, your system receives the settled bills of the given business date.
Discounts GET /api/v1/outlet/bills Your system displays bills with discounts correctly, with gross, net and tax amounts that match the SIHOT.POS bill.
Cancelled bill GET /api/v1/outlet/bills Your system imports the counter bill of a cancelled bill and reduces the sold quantities.
Close the session POST /api/v1/close Your system closes the session with its securityid.

✅ Your system uses one session per synchronization run and closes it afterwards.
✅ Your system skips bills it has already imported, using OrderId.
✅ Your system handles negative quantities and amounts.
✅ Your system handles 401 (new session) and 422 (retry later).
✅ Your system ignores bills in training mode (InTrainingMode).