The Reservations API handles the full lifecycle of a table booking: walk-in and online creation, staff confirmation, availability queries, and one-click conversion to an active order. The system automatically marks overdue reservations asDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/FloresJesus/SS_RESTAURANT/llms.txt
Use this file to discover all available pages before exploring further.
no_asistio whenever the reservation list is fetched. There are two route groups — a public route that requires no authentication (for customer-facing booking forms) and a set of authenticated routes for restaurant staff.
Reservation object
Unique reservation identifier.
Linked customer record ID.
ID of the assigned table.
Human-readable table number.
Number of guests in the party.
Reservation start datetime (ISO 8601).
Reservation end datetime (ISO 8601).
Current reservation state. One of
pendiente, confirmada, cancelada, completada, or no_asistio.Optional notes from the customer or staff.
ISO timestamp of when the reservation was created.
Name of the associated customer.
Phone number of the associated customer.
Email address of the associated customer.
Public routes (no authentication)
POST /api/public/reservations
Accepts a booking request from a customer without requiring an account. The server always creates a new customer record from the supplied contact details and assigns the most suitable available table ifmesa_id is not specified. No de-duplication is performed on the customer data.
POST /api/public/reservations
Customer’s full name. A new customer record is created in the database using this value.
Customer’s phone number. Used to identify the customer record.
Reservation start datetime in a format accepted by MySQL (e.g.
"2024-07-20 19:00:00").Reservation end datetime. Must be after
fecha_hora_inicio.Number of guests. Used for automatic table selection — the server will pick the smallest available table with sufficient capacity.
Explicitly request a specific table. If omitted, the server auto-assigns one. Returns
400 if no tables are available.Customer’s email address (optional).
Special requests or notes for the reservation.
Example request
Example response
Public error responses
| Status | Condition |
|---|---|
400 | One or more required fields are missing. |
400 | No tables are available for the requested time window and party size. |
409 | The explicitly requested mesa_id is already booked for that time window. |
500 | Server error. |
Authenticated routes
All routes below requireAuthorization: Bearer <token>.
GET /api/reservations
Returns all reservations sorted byfecha_hora_inicio descending. Before returning results, the server automatically updates any past pendiente or confirmada reservations whose fecha_hora_fin has passed to no_asistio.
Accepts an optional fecha query parameter (YYYY-MM-DD) to filter by start date.
GET /api/reservations/pendientes
Returns only reservations withestado = 'pendiente', sorted by start time ascending. Useful for the host’s confirmation queue.
GET /api/reservations/mesas-disponibles
Returns tables that have enough capacity and no conflictingpendiente or confirmada reservation in the specified time window.
Query parameters (all required)
| Parameter | Type | Description |
|---|---|---|
fecha_hora_inicio | string | Window start (e.g. 2024-07-20 19:00:00). |
fecha_hora_fin | string | Window end. |
cantidad_personas | number | Minimum required seating capacity. |
{ id, numero, capacidad } objects, sorted by capacity ascending.
GET /api/reservations/:id
Returns a single reservation by ID. Returns404 if not found.
POST /api/reservations
Creates a reservation from the staff side. Themesa_id is required (unlike the public endpoint, no auto-assignment is performed). The reservation checks for time conflicts before inserting.
ID of the table to reserve.
Reservation start datetime.
Reservation end datetime.
Number of guests.
ID of an existing customer record to link.
Staff notes.
409 if the table is already reserved for the overlapping window.
PUT /api/reservations/:id
Performs a full replacement update. All fields exceptobservaciones are required.
New table ID.
New start datetime.
New end datetime.
New party size.
New state. Must be one of
pendiente, confirmada, cancelada, completada, or no_asistio.Updated notes.
PATCH /api/reservations/:id/estado
Updates only the reservation state. When the new state iscancelada or no_asistio, the table is freed to libre if it has no other active orders.
One of
pendiente, confirmada, cancelada, completada, or no_asistio.POST /api/reservations/:id/convertir-pedido
Converts aconfirmada or pendiente reservation directly into an active order in a single transaction. The reservation is marked completada and the table is set to ocupada. Returns the new order ID.
Roles: admin, mesero, cajero
ID of the waiter opening the order.
Order line items. Each must have
producto_id and cantidad.Order-level notes.
Payment method if paying at seating:
efectivo, tarjeta, qr, or transferencia.DELETE /api/reservations/:id
Permanently deletes a reservation record. Returns404 if not found.