A comanda (kitchen command) is an operational ticket automatically generated alongside every order in Ordervista. Its purpose is to give kitchen staff a clear, structured view of what needs to be prepared — including the items ordered, quantities, and any special notes. Because a comanda is created in the same database transaction as its parent order, every order is guaranteed to have exactly one comanda. Operators access the Kitchen Commands screen (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ytabeloved/ordervista/llms.txt
Use this file to discover all available pages before exploring further.
/kitchen) to monitor active tickets and coordinate food preparation.
Data Model
Comandas are stored in theCOMANDAS table. Each comanda is linked by a unique foreign key to a single order in PEDIDOS, enforcing the one-comanda-per-order constraint at the database level.
COMANDAS table
| Column | Type | Description |
|---|---|---|
id_comanda | INT | Primary key |
id_pedido | INT (UNIQUE) | FK → PEDIDOS — one comanda per order |
fecha_generacion | DATETIME | Timestamp set automatically on insert (DEFAULT CURRENT_TIMESTAMP) |
observacion | VARCHAR(255) | Special instructions carried over from the order’s observacion field |
Listing Commands
Endpoint:GET /api/commandsAuth: Required — Operator or Admin role Returns all comandas joined with their associated order and customer information. Each entry in the array includes the comanda fields, the linked order header fields, customer details, an item count, and a pipe-delimited text summary of ordered items.
Viewing a Command
Endpoint:GET /api/commands/:idAuth: Required — Operator or Admin role Returns the full command detail including the order header fields and a product-level breakdown of every item to be prepared. All fields are returned at the top level — there is no nested order object. Returns
404 if the comanda does not exist.
Sample response:
Operator UI Workflow
The Kitchen Commands screen at/kitchen is designed for fast operational use:
- The operator opens
/kitchen— the frontend callsGET /api/commandsand renders a list of command tickets, each showing the order number, timestamp, customer name, and observation notes. - The operator selects a ticket to expand it — the frontend calls
GET /api/commands/:idto load the full item list for that comanda. - Kitchen staff read off the items and quantities and begin preparation.
- Once preparation is complete, the operator returns to the Orders screen (
/operator) to advance the order status to Listo (id_estado: 3).
Command Lifecycle
Comandas are created automatically and do not have their own editable status. Their lifecycle is tied to the parent order:- Created — automatically when
POST /api/ordersorPOST /api/orders/in-personis called. Theobservacionfrom the order body is copied into the comanda at this point. - Active — visible on the
/kitchenscreen while the order is in progress (statuses 1–3). - Completed — the order advances to Entregado (4). The comanda record remains in the database for historical reference but the kitchen workflow is considered done.