Tables represent the physical seating units on your restaurant floor. Each table record tracks its number, seating capacity, and two independent availability states — whether it is currently occupied and whether it has a future reservation. Six endpoints let you create, update core details, flip the occupied flag, update a reservation, delete, and list all tables for a company.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/MultiSas/llms.txt
Use this file to discover all available pages before exploring further.
All table endpoints require two authentication middlewares.
TokenAny
validates the bearer token and attaches the user to the request. TokenAuthorize('Admin', 'Super Admin')
restricts access to users whose role is either Admin or Super Admin.
Include the token in every request as token-access: Bearer $TOKEN.Create a Table
POST /api/table/:company_id
Creates a new table record for the given company.
Path Parameters
The MongoDB ObjectId of the owning company.
Body Parameters
Identifying number for the table (e.g.
5).Maximum number of guests the table can seat.
Response Fields
Human-readable result message.
true on success, false on failure.The newly created table document.
Example
Update a Table
PUT /api/table/updating/:company_id/:table_id
Updates the number_table and capacity_table of an existing table.
Path Parameters
The MongoDB ObjectId of the owning company.
The MongoDB ObjectId of the table to update.
Body Parameters
Updated table number.
Updated seating capacity.
Response Fields
Human-readable result message.
true on success.Example
Update Table Occupied State
PUT /api/table/updating-occupied/:company_id/:table_id
Flips the occupied boolean flag on a table — use this when guests are seated or when a table becomes free.
Path Parameters
The MongoDB ObjectId of the owning company.
The MongoDB ObjectId of the table to update.
Body Parameters
true to mark the table as occupied, false to mark it as free.Response Fields
Human-readable result message.
true on success.Example
Update Table Reservation
PUT /api/table/updating-reserved/:company_id/:table_id
Sets or clears the reservation state on a table. When a reservation is set, hour_reserved is automatically populated with the current date.
Path Parameters
The MongoDB ObjectId of the owning company.
The MongoDB ObjectId of the table to update.
Body Parameters
true to create a reservation, false to clear it.Optional notes about the reservation (e.g. guest name, special requirements).
Response Fields
Human-readable result message.
true on success.Example
Delete a Table
DELETE /api/table/remove/:company_id/:table_id
Permanently removes a table record. This action is irreversible.
Path Parameters
The MongoDB ObjectId of the owning company.
The MongoDB ObjectId of the table to delete.
Response Fields
Human-readable result message.
true on success, false if not found.Example
List Tables
GET /api/table/list/:company_id
Returns a paginated list of all tables belonging to the specified company, sorted by most recently created.
Path Parameters
The MongoDB ObjectId of the company whose tables to retrieve.
Response Fields
Human-readable result message.
true on success.Array of table documents for the company.
Pagination metadata.