Tables
Available since 1.23.0. Responses carry Cache-Control: private, no-store. In coexistence mode, tables appear disabled. See also Tables in the app and in wp-admin.
Routes
| Method | Route | Permission |
|---|---|---|
| GET | /tables/availability | Public |
| GET | /tables/resolve?token= | Public |
| GET | /tables/occupancy | Management |
| GET | /settings/tables | Management |
| PUT | /settings/tables | Management |
| POST | /tables/{id}/release | Management |
| POST | /tables/{id}/regenerate-qr | Management |
Public availability
GET /tables/availability lists active tables, without order data:
{
"success": true,
"data": {
"enabled": true, "available_count": 1, "total_count": 2,
"tables": [
{ "id": "t1", "label": "Mesa 1", "zone": "Terraza", "capacity": 4, "active": true, "status": "available", "selectable": true },
{ "id": "t2", "label": "Mesa 2", "zone": "Salón", "capacity": 2, "active": true, "status": "occupied", "selectable": false }
]
}
}
selectable is true if the table is free or occupied by the same customer (their session or their account).
GET /tables/resolve?token=<QR-token> returns the table for a QR code. If the token does not exist, it responds 404 table_not_found.
Occupancy
GET /tables/occupancy is the staff view: all tables, each with its active orders orders[{ id, status, total, currency, created_at }].
A table is occupied while it has pending, on hold, accepted, processing or completed orders. Checkout drafts occupy it for 5 minutes. Finalized, cancelled, refunded or failed orders release it.
Release a table
POST /tables/{id}/release releases all active orders on the table, adds a note to each one and returns the updated occupancy. Errors: 404 table_not_found, 409 table_busy.
Settings and QR
GET /settings/tables:
{
"enabled": true,
"selection": "qr_or_list",
"require_table": false,
"allow_in_cart": true,
"show_availability": true,
"hide_occupied": false,
"auto_release_minutes": 180,
"tables": [ { "id": "t1", "label": "Mesa 1", "zone": "Salón", "capacity": 2, "active": true, "qr_token": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ],
"store_url": "https://tienda.example.test"
}
This response includes the qr_token values needed to print the codes. Treat them as private store data. Each table's link is https://tienda.example.test/?notiwoo_table=<qr_token>.
| Setting | Values |
|---|---|
selection | qr_only, list or qr_or_list. |
auto_release_minutes | 0 to 10080. 0 = tables are never released automatically. |
tables | Up to 250 tables. id: 1 to 64 characters A-Z a-z 0-9 _ -. label: 1 to 120. zone: up to 120. capacity: 1 to 1000. |
PUT /settings/tables takes the same object. Yes/no values must be real booleans. Tables without qr_token keep theirs or get a new one. store_url is ignored. You cannot delete an occupied table.
POST /tables/{id}/regenerate-qr creates a new 32-character token. The previous QR stops working.
Errors: 400 invalid_tables, 400 invalid_table, 400 duplicate_table, 409 table_busy, 409 table_occupied, 404 table_not_found.