The Commands API exposes theDocumentation 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.
COMANDAS table — kitchen tickets that are automatically generated when an order is placed. A comanda groups an order’s full detail (items, quantities, notes) into a single record that kitchen staff can read from a display or printed slip. Both endpoints are read-only and restricted to Administrator (role 1) and Operator (role 2) users; customers cannot access this resource. All requests require a valid JWT in the Authorization header.
GET /api/commands
Returns all kitchen commands in the system, each joined with its parent order, customer, and a summarised item list. Use this endpoint to power a kitchen display or a live ticket queue in the operator panel. Auth required: Yes — role1 (Admin) or 2 (Operator)
Response
Array of flatCOMANDAS rows joined with order, customer, and item data.
Unique kitchen command identifier (primary key of
COMANDAS).The order this command belongs to. One-to-one: each order produces exactly one comanda.
ISO 8601 datetime the command was generated.
Kitchen note carried over from the order (e.g.
"Sin cebolla").Current status code of the parent order (
1–4).Order type of the parent order (
1 = Delivery, 2 = Retiro, 3 = Consumo Local).Total value of the parent order.
ISO 8601 datetime the parent order was placed.
Full name of the customer who placed the order.
Email address of the customer who placed the order.
Count of distinct line items in the order.
Pipe-separated summary of all line items (e.g.
"2x Hamburguesa Clásica||1x Papas Fritas").Error responses
| Status | mensaje |
|---|---|
401 | Unauthorized — missing or invalid token |
403 | Forbidden — insufficient role |
500 | "Error al obtener las comandas" |
GET /api/commands/:id
Returns a single kitchen command with full order detail, including every product line item. Returns404 if no command with the given ID exists.
Auth required: Yes — role 1 (Admin) or 2 (Operator)
Path parameters
The numeric ID of the kitchen command (
id_comanda) to retrieve.Response
A flat object with the comanda’s own fields, the parent order’s summary fields, customer info, and anitems array.
Unique kitchen command identifier.
Parent order ID.
ISO 8601 datetime the command was generated.
Kitchen note for this command.
Current status code of the parent order (
1–4).Order type of the parent order (
1 = Delivery, 2 = Retiro, 3 = Consumo Local).Total value of the parent order.
ISO 8601 datetime the parent order was placed.
Full name of the customer who placed the order.
Email address of the customer who placed the order.
Line items for the order. Each entry contains
id_detalle, id_producto, nombre, descripcion, cantidad, precio_unitario, and subtotal.Sample response
Error responses
| Status | mensaje |
|---|---|
401 | Unauthorized — missing or invalid token |
403 | Forbidden — insufficient role |
404 | "Comanda no encontrada" |
500 | "Error al obtener el detalle de la comanda" |