hype-reports
Hype Reports integration
This page describes how a Hype Reports client integrates with Hype Exchange Service (HES) to synchronize categories, fiscal devices, main categories, menus, payment types, saloons, tables, and users, and to request and poll reports.
All requests use a Bearer token for the Hype Reports account:
Authorization: Bearer <api_token>
You will receive:
- integration_id
- api_token
Base URL
Use the HES environment you were provided.
1) Initial sync
HES supports eight entity types. The integration template determines the actual steps. See the complete integration flow for the step order and readiness requirements.
Hype Reports polls all enabled entity endpoints and returns results through their PUT endpoints. The table lists endpoints, not the pipeline step order.
| Entity | Poll tasks | Acknowledge tasks |
|---|---|---|
| Categories | GET /tasks/hype-reports/categories | PUT /tasks/hype-reports/categories |
| Fiscal devices | GET /tasks/hype-reports/fiscalDevices | PUT /tasks/hype-reports/fiscalDevices |
| Main categories | GET /tasks/hype-reports/mainCategories | PUT /tasks/hype-reports/mainCategories |
| Menus | GET /tasks/hype-reports/menus | PUT /tasks/hype-reports/menus |
| Payment types | GET /tasks/hype-reports/paymentTypes | PUT /tasks/hype-reports/paymentTypes |
| Saloons | GET /tasks/hype-reports/saloons | PUT /tasks/hype-reports/saloons |
| Tables | GET /tasks/hype-reports/tables | PUT /tasks/hype-reports/tables |
| Users | GET /tasks/hype-reports/users | PUT /tasks/hype-reports/users |
Table tasks arrive with saloonId already set to your Hype Reports saloon ID, or 0 if you acknowledged that saloon with {}. HES maps tables by id only; it doesn't read saloonId from your response.
Task types
GET
- Meaning: send your own data to HES.
responsecan be a list or[].- Return
[]if you do not retain records of that type.
POST/PUT
- Meaning: apply or match the source entity.
responsemust be a single object with your existing HR ID.- This creates an HS ID <-> HR ID mapping and prevents duplicates.
- HES does not send
DELETEtasks. A record deleted in Hype arrives as aPUTtask with its fields reset to empty or zero values (for example"name": "").
Entity payloads
| Entity | Fields |
|---|---|
| Category | id, name |
| Fiscal device | id, name, is_active |
| Main category | id, name |
| Menu | id, name, startDate, endDate, isActive, isDefault |
| Payment type | id, name |
| Saloon | id, name, width, height, order |
| Table | id, name, saloonId, x, y, width, height |
| User | id, firstName, middleName, lastName, position, email, phone |
Entity IDs may be strings or integers. Return a stable Hype Reports ID for each entity you retain; report filters and ID mapping in results depend on it.
Task update request
Payload format:
[
{
"entity_task_id": "",
"status": 200,
"response": {
"id": "",
"name": "Table 1",
"saloonId": "",
"x": 0,
"y": 0,
"width": 100,
"height": 100
}
}
]Notes:
- For POST/PUT tasks,
responsemust be a single object. - For GET tasks,
responsecan be a list or[]. response: {}is accepted and advances synchronization, but creates no usable HR-ID mapping. Use it only for saloons and tables you do not retain. Without a mapping, those IDs cannot be used as report filters and HES cannot translate them in results. Do not use it for categories, fiscal devices, main categories, menus, or users: the next change to such a record in Hype cannot be delivered and stops synchronization for the whole integration until the mapping is fixed.- Payment types are optional and may also be acknowledged with
response: {}. orders-summary payments with such a payment type then have noid, and the choice is effectively permanent: Hype sends that payment type again only if its name changes.
Deduplication rule
If you already have the same category, fiscal device, main category, menu, payment type, saloon, table, or user, return its existing HR ID in the POST/PUT response. HES will map the IDs instead of creating duplicates.
2) Request reports
Your Reports client requests a report and polls its status and result. HES handles generation and status transitions asynchronously.
POST /api/v1/integrations/{integration_id}/reports/
Supported reports:
- operator-revenue
- revenue-by-menu
- revenue-by-fiscal-device
- revenue-by-main-category
- revenue-by-category
- revenue-by-table
- reversed-revenue
- cancelled-sales
- orders-summary
All reports require:
- date_from: ISO 8601 datetime or YYYY-MM-DD.
- date_to: ISO 8601 datetime or YYYY-MM-DD.
Send each time with a UTC offset or Z, for example 2026-11-04T00:00:00+02:00 or 2026-11-03T22:00:00Z. HES reads a time without an offset, and a YYYY-MM-DD date, as UTC, and Hype converts the time to the venue's local time before it builds the report. A YYYY-MM-DD date means 00:00 UTC of that day, so a date_to sent as a date leaves out that whole day. To include the day, send its end, for example 2026-11-04T23:59:59+02:00.
date_to must be on or after date_from. Filters and maximum ranges depend on the report:
| Report | Optional filters (HR IDs) | Maximum range |
|---|---|---|
| operator-revenue | user_ids | 31 days |
| revenue-by-menu | menu_ids | 31 days |
| revenue-by-fiscal-device | fiscal_device_ids | 31 days |
| revenue-by-main-category | main_category_ids | 31 days |
| revenue-by-category | category_ids | 31 days |
| revenue-by-table | table_ids | 31 days |
| reversed-revenue | none | 31 days |
| cancelled-sales | table_ids | 31 days |
| orders-summary | user_ids, saloon_ids, table_ids | 1 day |
The range is compared in whole days, with any remainder dropped: a 31-day report accepts any range shorter than 32 days, and orders-summary accepts any range shorter than 48 hours.
orders-summary also accepts account_status:
closed(default): closed accounts whose close time is in the range.open: accounts that are still open and were opened in the range.all: both of the above.
With any value, accounts that have no items and no completed payments are left out.
revenue-by-table also accepts with_discount (boolean):
- omitted (default): all table accounts are counted.
true: only table accounts that have an account discount are counted.false: only table accounts that have no account discount are counted.
The filter applies to each account. A table is returned only when at least one of its accounts matches. Send a JSON true or false; 1, 0, "1", and "0" are also accepted.
All filter IDs must be Hype Reports IDs established through sync tasks. HES translates them before report generation. Unmapped IDs are omitted; if no mapped IDs remain, no filter is applied for that entity type.
Example (operator-revenue):
{
"date_from": "2025-01-01T00:00:00.000Z",
"date_to": "2025-01-31T23:59:59.000Z",
"user_ids": ["hr-user-1", "hr-user-2"]
}Example (revenue-by-table):
{
"date_from": "2025-01-01T00:00:00.000Z",
"date_to": "2025-01-31T23:59:59.000Z",
"table_ids": ["hr-table-20"],
"with_discount": true
}Example (orders-summary):
{
"date_from": "2026-07-08T00:00:00.000Z",
"date_to": "2026-07-08T23:59:59.000Z",
"user_ids": ["hr-user-7"],
"saloon_ids": ["hr-saloon-10"],
"table_ids": ["hr-table-20"],
"account_status": "all"
}On success, HES returns 202:
{
"jobId": "<report_job_id>",
"pollUrl": "https://es.dev.hype-software.com/api/v1/report-data/<report_job_id>",
"message": "Report request accepted and queued for processing"
}3) Poll report status
GET /api/v1/report-data/
Report status values:
- PENDING: accepted, waiting for generation.
- PROCESSING: report generation is in progress.
- POST_PROCESSING_PENDING: queued for ID mapping and formatting.
- POST_PROCESSING: post-processing is running.
- COMPLETED: completed successfully; data is available.
- FAILED: report generation failed; error details are available.
- CANCELLED: the report was cancelled.
Pending response:
{
"jobId": "",
"status": "PENDING",
"data": null
}The shape of a completed data depends on the report:
- operator-revenue: an object with
periodandresults, one entry per operator. - revenue-by-menu: a root array of
{menuId, menuName, total}rows. - revenue-by-fiscal-device: a root array of
{fiscal_device_id, fiscal_device_name, revenue}rows. - revenue-by-main-category: a root array of
{main_category_id, main_category_name, revenue}rows; the ID and name can benull. - revenue-by-category: a root array of
{category_id, category_name, revenue}rows; the ID and name can benull. - revenue-by-table: a root array of
{table_id, table_name, table_is_virtual, revenue, discount}rows; all virtual tables are combined into one row with anullID and name. That row is left out whentable_idsis sent.discountis the sum of the account discounts on the counted accounts, VAT included, and0when there are none. - reversed-revenue: a root array of
{table_account_id, reversed_revenue}rows, one per account closed in the period with reversed money that was not paid again;reversed_revenueis that amount. The report covers all tables, so subtracting its total from revenue-by-table gives net revenue only when revenue-by-table is requested for the same period withouttable_idsorwith_discount.
For cancelled-sales, data is a root array with one row per cancellation, that is, items removed from an account before payment. A cancellation is in the period when its account was closed in the period; accounts that are still open are left out. With table_ids, only cancellations on those tables are returned, and cancellations on virtual tables are left out.
| Field | Meaning |
|---|---|
| cancellation_id | Hype ID of the cancellation. |
| table_account_id | Hype ID of the account. |
| table_id | Your table ID; null for virtual tables (quick orders). |
| table_name | Table name; null for virtual tables. |
| table_is_virtual | true for a virtual table. |
| item_name | Item name saved on the account when the item was ordered; it is set also when the item was deleted from the menu later. |
| quantity | Cancelled portions. |
| cancelled_revenue | Gross amount with VAT: the item's sale price times quantity. It is not rounded per row, so the sum of the rows matches the cancelled sales total in Hype, except that this report also includes cancellations that the Hype report leaves out (for example, ones with no reason or user, or whose menu item no longer exists). |
| reason | Cancel reason name; null when there is none. |
| user_id | Your ID of the user who made the cancellation; null when there is none. |
| user_name | First and last name of that user; null when there is none. |
| cancelled_at | Time of the cancellation. |
| account_closed_at | Time the account was closed. |
| scrapped | true when the cancelled items were scrapped, false when they were returned to stock. |
Cancelled is not the same as reversed. cancelled-sales shows items removed from an account before payment, so their amount is not in the account total or in revenue-by-table. Money paid back after payment is in reversed-revenue.
For orders-summary, data is a root array with one entry per account:
{
"jobId": "",
"status": "COMPLETED",
"data": [
{
"saloonId": "hr-saloon-10",
"saloonName": "Main hall",
"tableId": "hr-table-20",
"tableName": "Table 1",
"accountTotal": 123.45,
"items": [
{ "name": "Coffee", "quantity": 2, "salePrice": 9.5 }
],
"payments": [
{ "id": "hr-payment-type-1", "paymentType": "Cash", "amount": 123.45, "isReversal": false },
{ "paymentType": "Coupons", "amount": 10, "isReversal": true }
],
"operatorId": "hr-user-7",
"operatorName": "Mila Ivanova",
"accountCreatedAt": "2026-07-08T11:05:00.000Z",
"accountClosedAt": "2026-07-08T12:30:00.000Z"
}
],
"completed_at": "2026-07-08T12:31:00+00:00"
}Optional fields may be null or omitted; accountClosedAt is null for open accounts. For accounts on virtual tables, saloon/table fields may be null or omitted. For open accounts, the operator is the user who opened the account; for closed accounts, it is the user the revenue is credited to. user_ids filters on the same operator.
payments lists the account's completed payments in the order they were made, including reversals: paymentType (the payment type name), amount (always positive), isReversal (true for money paid back), and id, your payment type ID, which is present only when that payment type is mapped to an ID in your system.
HES keeps completed report data for at least 7 days after completed_at. A daily cleanup at 03:00 UTC deletes older results, so a result is removed 7 to 8 days after completion. After that, polling its jobId returns 404. Store results on your side if you need them longer.
ID mapping in report results
HES translates report result IDs back to Hype Reports IDs:
- operator-revenue: operatorId
- revenue-by-menu: menuId
- revenue-by-fiscal-device: fiscal_device_id
- revenue-by-main-category: main_category_id
- revenue-by-category: category_id
- revenue-by-table: table_id
- reversed-revenue: none; table_account_id stays a Hype ID
- cancelled-sales: table_id, user_id; cancellation_id and table_account_id stay Hype IDs
- orders-summary: operatorId, saloonId, tableId, and
idin eachpaymentsentry
If no mapping exists, the result retains the original Hype ID. The exception is the orders-summary payment id, which is removed.
Common errors
422 Validation error
- Invalid date or
date_tobeforedate_from. - Range exceeds 1 day for orders-summary or 31 days for the other reports.
account_statusis notclosed,open, orall.with_discountis nottrue,false,1,0,"1", or"0".- The body is
{"error": 1, "message": "Report validation failed", "errors": {...}}, whereerrorslists the messages for each failing field.
403 Unauthorized
- When requesting a report, the token's account is not part of the integration:
{"message": "Requesting account is not part of this integration"}. - When polling, the account is not part of the report's integration or is the account that generates the report:
{"message": "Unauthorized"}.
404 Not found
- The report slug does not exist in the HES report catalog, or the polled
jobIdis unknown:{"message": "Report not found"}. - An unknown
integration_idalso returns404, with the standard{"error": 1, "message": "..."}body.