Skip to content

Hype Reports Integration (Reports Side) ​

This document describes how a Hype Reports client integrates with the Hype Exchange Service (HES) for category, fiscal device, main category, menu, payment type, saloon, table, and user synchronization and for report requests.

Authentication ​

All requests use a Bearer token issued for your Hype Reports account.

Header:

Authorization: Bearer <your_api_token>

You will receive:

  • integration_id
  • api_token

Base URL ​

Use the HES environment you were provided:

  • DEV: https://es.dev.hype-software.com
  • LIVE: https://es.hype-software.com

Flow Diagrams ​

Initial integration sync ​

HES (creates tasks)                         Hype Reports (HR)
        |                                           |
        |  GET /tasks/hype-reports/{entity}         |  (poll)
        |<------------------------------------------|
        |  returns entity tasks                     |
        |------------------------------------------>|
        |                                           |
        |  PUT /tasks/hype-reports/{entity}         |  (ack)
        |<------------------------------------------|
        |  stores values + ID mappings              |
        |------------------------------------------>|
        |                                           |
        |  repeat for every enabled entity type

Report Request Flow ​

text
Hype Reports -> HES: POST /api/v1/integrations/{integration_id}/reports/{report}
HES -> Hype Reports: 202 Accepted, jobId, pollUrl
Hype Reports -> HES: GET pollUrl (repeat while processing)
HES -> Hype Reports: status, data or error

For report generation, your client sends the request and polls the result. HES handles generation and status transitions asynchronously. Your client does not submit report completion or upload generated report data.

1) Initial sync ​

Arrange the Reports integration for the intended customer with Hype support and obtain its integration ID and bearer token. Keep your Reports client processing reference-data tasks while the integration is syncing.

The current configuration supports eight entity types. Poll and acknowledge every type enabled in your integration:

EntityPoll tasksAcknowledge tasks
CategoriesGET /tasks/hype-reports/categoriesPUT /tasks/hype-reports/categories
Fiscal devicesGET /tasks/hype-reports/fiscalDevicesPUT /tasks/hype-reports/fiscalDevices
Main categoriesGET /tasks/hype-reports/mainCategoriesPUT /tasks/hype-reports/mainCategories
MenusGET /tasks/hype-reports/menusPUT /tasks/hype-reports/menus
Payment typesGET /tasks/hype-reports/paymentTypesPUT /tasks/hype-reports/paymentTypes
SaloonsGET /tasks/hype-reports/saloonsPUT /tasks/hype-reports/saloons
TablesGET /tasks/hype-reports/tablesPUT /tasks/hype-reports/tables
UsersGET /tasks/hype-reports/usersPUT /tasks/hype-reports/users

Pipeline order and completion ​

The integration template determines which entities participate. With all current reporting entities enabled, the pipeline has 16 steps:

  1. Hype supplies categories, saloons, tables, menus, users, fiscal devices, main categories, and payment types, in that order. HES creates tasks on the Reports side; return your existing or newly created Reports IDs to establish mappings.
  2. HES asks Reports for categories, fiscal devices, main categories, menus, payment types, saloons, tables, and users, in that order, through GET-type tasks. Return arrays of your records, or [] for entity types you do not retain.

Each step waits for its source response and all resulting synchronization tasks. Inspect GET /api/hype-reports/integrations/{id}?include=pipeline for the pipeline's progress.step, progress.from, status, and message. Pipeline completion sets it to synced and the integration to active.

Reports uses the ID mappings established by task responses. It does not require the custom integration's manual status/channel/payment mapping step. Before normal use, verify that the reference IDs needed for report filters and results have been mapped, then request a small report and check its completed result. Keep polling reference-data tasks after activation.

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.

The response is a list of tasks. Each task contains id, request, status, meta, and a type that defines what to do:

Task Types ​

The task's type describes the entity operation to process. Hype Reports always submits the processing result to HES with HTTP PUT, including for GET- and POST-type tasks. These PUT endpoints acknowledge synchronization tasks. Report generation uses POST to request a report and GET to poll its result; there is no PUT operation for editing a generated report.

GET

  • Meaning: "Send your own data to HES."
  • Response shape: return a list of your entities.
  • Return [] for an entity type you do not retain.

POST/PUT

  • Meaning: "Apply or map the source entity."
  • Response shape: return a single object with your existing HR ID.
  • This creates a mapping (HS ID <-> HR ID) and prevents duplication.
  • HES does not send DELETE tasks. A record deleted in Hype arrives as a PUT task with its fields reset to empty or zero values (for example "name": "").

Entity Payloads ​

EntityFields in request/successful response
Categoryid, name
Main categoryid, name
Fiscal deviceid, name, is_active
Menuid, name, startDate, endDate, isActive, isDefault
Payment typeid, name
Saloonid, name, width, height, order
Tableid, name, saloonId, x, y, width, height
Userid, firstName, middleName, lastName, position, email, phone

Entity IDs may be strings or integers. Return a stable Hype Reports id whenever the entity is retained; report filters and result mapping depend on it.

Task Update Request ​

Use PUT to acknowledge tasks:

PUT /tasks/hype-reports/categories
PUT /tasks/hype-reports/fiscalDevices
PUT /tasks/hype-reports/mainCategories
PUT /tasks/hype-reports/menus
PUT /tasks/hype-reports/paymentTypes
PUT /tasks/hype-reports/saloons
PUT /tasks/hype-reports/tables
PUT /tasks/hype-reports/users

Payload format:

json
[
  {
    "entity_task_id": "<task_id>",
    "status": 200,
    "response": { "id": "<hr_table_id>", "name": "Table 1", "saloonId": "<hr_saloon_id>", "x": 0, "y": 0, "width": 100, "height": 100 }
  }
]

Notes:

  • For POST/PUT tasks, response must be a single object.
  • For GET tasks, response can be a list or [].
  • A successful response: {} is accepted and advances the sync without establishing a usable HR-ID mapping. Use it only for saloons and tables you do not retain; their HR IDs then cannot be used as report filters and HES cannot translate their IDs in report 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 no id, 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 your existing HR ID in the POST/PUT response. HES will map the IDs instead of creating duplicates.

2) Request Reports ​

Request Endpoint ​

POST /api/v1/integrations/{integration_id}/reports/{report}

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

Request Payload ​

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 are report-specific:

ReportOptional filters (Hype Reports IDs)Maximum range
operator-revenueuser_ids31 days
revenue-by-menumenu_ids31 days
revenue-by-fiscal-devicefiscal_device_ids31 days
revenue-by-main-categorymain_category_ids31 days
revenue-by-categorycategory_ids31 days
revenue-by-tabletable_ids31 days
reversed-revenuenone31 days
cancelled-salestable_ids31 days
orders-summaryuser_ids, saloon_ids, table_ids1 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.

Filter values must be IDs established by entity sync. HES omits unmapped IDs; if no IDs remain, no filter is applied for that entity type.

Example (operator-revenue):

json
{
  "date_from": "2025-01-01T00:00:00.000Z",
  "date_to": "2025-01-31T23:59:59.000Z",
  "user_ids": ["123", "456"]
}

Example (revenue-by-table):

json
{
  "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):

json
{
  "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"
}

Response ​

On success, HES returns 202 with a job ID:

json
{
  "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"
}

Report Statuses ​

Report status values returned by GET /api/v1/report-data/{jobId}:

  • PENDING: request accepted, waiting for generation
  • PROCESSING: report generation is in progress
  • POST_PROCESSING_PENDING: queued for post-processing (ID mapping, formatting)
  • POST_PROCESSING: post-processing is running
  • COMPLETED: finished successfully (data is present)
  • FAILED: report generation failed; error details are available
  • CANCELLED: report was cancelled

3) Poll Report Status ​

GET /api/v1/report-data/{jobId}

Example while the report is pending:

json
{
  "jobId": "<report_job_id>",
  "status": "PENDING",
  "data": null
}

When status=COMPLETED, the shape of data depends on the report. For operator-revenue, data is an object with period and results, one entry per operator (abbreviated here):

json
{
  "jobId": "<report_job_id>",
  "status": "COMPLETED",
  "data": {
    "results": [
      { "operatorId": "<hr_user_id>", "revenue": 123.45 }
    ]
  },
  "completed_at": "2026-02-04T12:34:56+00:00"
}

For revenue-by-menu, revenue-by-fiscal-device, revenue-by-main-category, revenue-by-category, revenue-by-table, and reversed-revenue, data is a root array with one row per menu, fiscal device, main category, category, table, or account:

ReportRow fields
revenue-by-menumenuId, menuName, total
revenue-by-fiscal-devicefiscal_device_id, fiscal_device_name, revenue
revenue-by-main-categorymain_category_id, main_category_name, revenue; the ID and name can be null
revenue-by-categorycategory_id, category_name, revenue; the ID and name can be null
revenue-by-tabletable_id, table_name, table_is_virtual, revenue, discount; all virtual tables are combined into one row with a null ID and name, which is left out when table_ids is sent. discount is the sum of the account discounts on the counted accounts, VAT included, and 0 when there are none
reversed-revenuetable_account_id, reversed_revenue; one row per account closed in the period with reversed money that was not paid again, with that amount. It 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 without table_ids or with_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.

FieldMeaning
cancellation_idHS ID of the cancellation
table_account_idHS ID of the account
table_idYour table ID; null for virtual tables (quick orders)
table_nameTable name; null for virtual tables
table_is_virtualtrue for a virtual table
item_nameItem name saved on the account when the item was ordered; it is set also when the item was deleted from the menu later
quantityCancelled portions
cancelled_revenueGross 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)
reasonCancel reason name; null when there is none
user_idYour ID of the user who made the cancellation; null when there is none
user_nameFirst and last name of that user; null when there is none
cancelled_atTime of the cancellation
account_closed_atTime the account was closed
scrappedtrue 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:

json
{
  "jobId": "<report_job_id>",
  "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"
}

Each entry contains accountTotal, an items array (quantity, salePrice, and optional name), a payments array, and may contain operatorId/operatorName, saloonId/saloonName, tableId/tableName, accountCreatedAt, and accountClosedAt. Optional fields can be null or omitted; accountClosedAt is null for open accounts. For accounts created on a virtual table, saloon and table fields can 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 was mapped to an ID in your system.

When status=FAILED:

json
{
  "jobId": "<report_job_id>",
  "status": "FAILED",
  "data": null,
  "error": {
    "code": "INVALID_PARAMETERS",
    "message": "Parameter validation failed: date_from must be ISO 8601"
  }
}

Notes:

  • data is always present; it is null until status=COMPLETED.
  • completed_at is only present when status=COMPLETED.
  • error is only present when status=FAILED.
  • 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 maps IDs in report results:

  • If mappings exist, HS IDs are translated to your HR IDs.
  • If mappings are missing, IDs will remain as HS IDs.
  • operator-revenue maps operatorId in each results entry.
  • revenue-by-menu maps menuId, revenue-by-fiscal-device maps fiscal_device_id, revenue-by-main-category maps main_category_id, revenue-by-category maps category_id, and revenue-by-table maps table_id.
  • reversed-revenue maps nothing; table_account_id is always the HS account ID.
  • cancelled-sales maps table_id and user_id in each root-array row; cancellation_id and table_account_id are always HS IDs.
  • orders-summary maps operatorId, saloonId, and tableId in each root-array item, and id in each payments entry. A payment id without a mapping is removed instead of keeping the HS ID.

4) Integration and Sync Queue API ​

The Hype Reports adapter also exposes operational endpoints using the same Bearer token:

MethodEndpointPurpose
GET/api/hype-reports/integrationsList integrations visible to the Hype Reports account
GET/api/hype-reports/integrations/{integration_id}Read one integration
GET/api/hype-reports/integrations/{integration_id}/queue-jobsList queued entity-sync jobs
DELETE/api/hype-reports/integrations/{integration_id}/queue-jobs/{job_id}Remove one queued sync job (204)
DELETE/api/hype-reports/integrations/{integration_id}/queue-jobsClear all queued sync jobs for the integration (204)

Each queue item contains id, entity, request_method, payload, source (id and name), status, and error_msg.

The queue endpoint is for entity synchronization jobs, not for polling report generation. Continue to use GET /api/v1/report-data/{jobId} for report status.

Common Errors ​

422 Validation error

  • Happens when a date string is invalid, date_to is before date_from, the range exceeds the report's limit (1 day for orders-summary, 31 days for the others), account_status is not closed, open, or all, or with_discount is not true, false, 1, 0, "1", or "0".
  • The body is {"error": 1, "message": "Report validation failed", "errors": {...}}, where errors lists the messages for each failing field.

403 Unauthorized

  • When requesting a report: your account is not part of the integration. The body is {"message": "Requesting account is not part of this integration"}.
  • When polling: your account is not part of the report's integration, or it is the account that generates the report. The body is {"message": "Unauthorized"}.

404 Not found

  • The report slug does not exist in the HES report catalog, or the jobId you poll is unknown. The body is {"message": "Report not found"}.
  • An unknown integration_id also returns 404, with the standard {"error": 1, "message": "..."} body.

Hype Exchange Service API