Skip to content

Hype Reports tasks ​

Tasks ​

Each task is a queue entry that Hype Reports must fetch from HES, process, and acknowledge with a status and response.

These endpoints belong to HES. Hype Reports fetches synchronization tasks with HTTP GET and submits their results with HTTP PUT, regardless of the task's type. The type field describes the entity operation to process. Report generation is a separate flow: POST requests a report and GET polls its result. There is no PUT operation for editing a generated report.

HES creates tasks for these entity types:

  • categories
  • fiscalDevices
  • mainCategories
  • menus
  • saloons
  • tables
  • users

Poll endpoints:

  • GET /tasks/hype-reports/categories
  • GET /tasks/hype-reports/fiscalDevices
  • GET /tasks/hype-reports/mainCategories
  • GET /tasks/hype-reports/menus
  • GET /tasks/hype-reports/saloons
  • GET /tasks/hype-reports/tables
  • GET /tasks/hype-reports/users

Acknowledgement endpoints:

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

Task object ​

Each GET response returns an array of task objects:

json
[
  {
    "id": "...",
    "request": { ... },
    "status": 0,
    "meta": {
      "source_account": {
        "id": "a0fa1fe5-feda-4753-9f23-691343e3828c",
        "name": "Local",
        "platform_id": "4d410b0e-ee37-497e-8362-478a383d68ee",
        "platform_name": "Hype Server",
        "platform_key": "hype-server"
      }
    },
    "type": "POST"
  }
]

id is the task ID. Use it as entity_task_id when acknowledging the task.

request is the payload Hype Reports must process. It also includes source_account, the Hype Server account the change came from; the same object is in meta.source_account.

type defines the operation to perform:

  • GET: return Hype Reports records to HES.
  • POST: create or match a new entity.
  • PUT: update or match an existing entity.

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": "").

status is 0 for a new, unprocessed task.

GET tasks ​

A GET task asks Hype Reports for records of the specified entity type. Return an array in response, or [] if you do not retain records of that type.

POST/PUT tasks ​

POST and PUT tasks contain a source entity from Hype Server. Apply it in Hype Reports, then return a single object in response. If the entity already exists, return its existing HR ID. This establishes the link between the Hype Server and Hype Reports IDs.

Report task results ​

After processing, send a PUT request to the endpoint for that entity type:

json
[
  {
    "entity_task_id": "...",
    "status": 200,
    "response": {
      "id": "..."
    }
  }
]

entity_task_id is the ID from the received task.

status is an HTTP-style code for the processing result.

response contains the processing result:

  • GET tasks: an array or [].
  • POST/PUT tasks: a single object with the Hype Reports ID.

Saloons and tables ​

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.

Hype Exchange Service API