List Tables
The ListTables
operation requests a list of tables. You can filter the list using the request parameters. If there are any parameters set, the response will contain only tables matching all filters using AND logic:
- SUB /ListTables
- PUB /ListTables
A request from Dojo for a table:
- Receive a
listTablesRequest
from Dojo. - The EPOS should respond with a
listTablesResponse
.
You can filter the table list by the current tableStatus
. Filtering by table status is optional. If no status parameter is set, the response will return all tables that match the requestorInfo
, regardless of current status.
The requestorInfo
is a required parameter. The example below requests all currently-available tables attached to a particular terminal (123123
) and
a particular waiter (1
).
{
"jsonrpc": "2.0",
"id": "38741a62-b0b9-46a5-a172-dc339960820b",
"method": "ListTables",
"params": {
"statuses": [
"TABLE_STATUS_AVAILABLE"
],
"requestorInfo": {
"requestorType": "REQUESTOR_TYPE_CARD_MACHINE",
"cardMachineRequestorInfo": {
"terminalId": "123123",
"waiterId": 1
}
}
}
}
In this example listTablesresponse
, only a single table matched the parameters in the request. The table named TBL 101
is currently available, and it is associated with the
terminal with an ID 123123
and the waiter with an ID of 1
.
{
"jsonrpc": "2.0",
"id": "38741a62-b0b9-46a5-a172-dc339960820b",
"result": {
"tables": [
{
"name": "TBL 101",
"maxCovers": 5,
"status": "TABLE_STATUS_AVAILABLE"
}
]
}
}