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.
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.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
Sample Response – GET /api/v1/auth
Send the returned SecurityId in the header securityid of all following requests.
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.
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
Sample Response – GET /api/v1/masterdata/outlets
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.
/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:
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
Sample Response – GET /api/v1/outlet/bills (bills of a past business date)
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.
| 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. |
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.RebatePercent and RebateAmount. A bill discount is distributed to the discountable lines of the bill. TotalAmount of a line already contains the discount.Agree with the hotel how discounts are booked in its installation and include each variant in your tests.
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:
OrderId,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.
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.422. Retry the request later.
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
A successful call returns 200.
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
| 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. |
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).