Skip to main content

Displaying a Ticket

The aim of the Display API is to display the next ticket that will be called to a given endpoint, or the tickets that are passing.

This is a good solution to inform all the Users of the evolution of the queue and to dispatch them to the endpoint without having to send a notification to each of them. The possible use cases are, among others:

  • A reception hall with one screen above each desk to call the Visitors to the endpoints differently.
  • A paiement area in a shop with a single screen to inform the Customers of the queue evolution and dispatch them to the different cash desks.
  • A withdrawal area in a store to inform the Customer that it is almost her/his turn to get the articles s/he bought or ordered.

Depending on these use cases you will simply need to get the tickets, or previously get the queues and the endpoints of the place.

Displaying a ticket

info

See the Concepts and Terms for definitions of user, endpoint, queues and other terms.

Step (1) Get the Queues

If your use case is to display all the queues on a single screen, then you have to get the list of the queues.

GET places/{placeId}/queues

Go to the route

Step (2) Get the Endpoints

Then, retrieve the list of the queue endpoints to display the endpoint name in each language.
Actually, the endpoint assigned to a ticket is already stored in the ticket itself but only in the ticket language.

GET /queues/endpoints

Go to the route

Or, if you manage a single queue, simply retrieve the endpoints of the place.

GET /places/{placeId}/endpoints

Go to the route

info

If your use case is to have one screen above each endpoint, you do not need to display the endpoint name and number when calling a ticket.
This means that you do not need to map the endpoint IDs with the endpoint names, nor to get the queue list, or the endpoint list. All you need is to retrieve the tickets to display.

Step (3) Get the Tickets

Once connected to the route tickets/SSE you will get the different events on the tickets as the queue progresses.
For example, a ticket which state is "called" or a ticket which state is "alerted".
You can only display the tickets of the day.

GET /queues/tickets/currents/sse

Go to the route

info

The SSE request allows to get the list of tickets in real time from the server.