The tables resource models the physical dining area of La Previa Restobar. Each table record holds its current occupancy status, an optional reference to the active order, and a seating capacity. The Android app reads the table list to populate the floor plan view, then updates table status automatically as orders move through their lifecycle — a table becomesDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/luisumit/LaPreviaRestobar/llms.txt
Use this file to discover all available pages before exploring further.
OCUPADA when an order is created against it and returns to LIBRE once the order is COMPLETED.
Table Status Values
| Status | Meaning |
|---|---|
LIBRE | Table is empty and available for new guests |
OCUPADA | Table has an active order in progress |
RESERVADA | Table is reserved but guests have not yet arrived |
TableDto — API Response Fields
The fields below are returned by the API inTableDto. They map directly to TableDto.kt.
Numeric table identifier. Used in path parameters when updating status.
Human-readable table number displayed on the floor plan and order tickets.
Current occupancy status. One of
LIBRE, OCUPADA, RESERVADA.ID of the active order associated with this table.
null when the table is LIBRE.Local model note: Thecapacity,version, andsyncStatusfields exist on the localTablemodel (used by Room and the Android ViewModel) but are not part ofTableDtoand are therefore not returned by the API. They are populated with defaults (capacity = 4,version = 0,syncStatus = "SYNCED") whenTableDto.toTable()maps the DTO to the local model.
Local Table model — additional fields (not in API response)
Maximum number of guests the table can seat. Defaults to
4.Optimistic concurrency counter. Incremented on every write to help detect concurrent updates.
Local sync state on the Android client. Defaults to
"SYNCED".GET /tables
Returns every table record stored in thetables node of Firebase.
200 OK
GET /tables/{id}
Returns a single table record by its numeric ID. Path parametersThe numeric table ID.
200 OK
PUT /tables/{id}/status
Updates the occupancy status of a table. Called automatically by the Android app when an order is created (→OCUPADA) or completed (→ LIBRE), and can also be triggered manually by staff to mark a table as RESERVADA.
Path parameters
The numeric table ID to update.
StatusUpdateRequest)
The new status value. Must be one of:
LIBRE, OCUPADA, RESERVADA.200 OK — returns the updated TableDto.