The Reports API provides two analytical views of restaurant activity. The summary endpoint (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/teofilobetancourt/Restaurant-Equis/llms.txt
Use this file to discover all available pages before exploring further.
/api/reportes/resumen) computes a fixed set of business KPIs by comparing the current 30-day window against the preceding 30-day window, giving management an at-a-glance performance snapshot. The orders report endpoint (/api/reportes/pedidos) offers a filterable, time-bounded view of the full order history, suitable for building data tables and export flows in the dashboard.
All time calculations are performed in UTC using
datetime.utcnow(). Ensure your frontend converts timestamps to the appropriate local timezone for display.30-Day KPI Summary
How Each Metric Is Computed
| Metric | Computation |
|---|---|
total_pedidos | COUNT(pedido.num_ticket) where fecha_creacion >= now - 30 days |
ingresos_brutos | SUM(factura.total) joined to orders in the current 30-day window |
tiempo_promedio_seg | Average elapsed seconds from fecha_creacion to now for all orders in state listo or entregado in the current 30-day window |
pct_cambio_pedidos | (current_count - previous_count) / previous_count × 100, rounded to 1 decimal. Returns 100.0 if previous count was 0 and current count is positive; 0.0 if both are 0 |
pct_cambio_ingresos | Same percentage formula applied to ingresos_brutos values |
Response
Total number of orders created in the current 30-day window.
Sum of all invoice totals (
factura.total) linked to orders in the current 30-day window. Represents gross revenue including IVA.Average time in seconds from order creation to the current moment, calculated only over orders whose
estado_orden is listo or entregado within the current 30-day window. Returns 0.0 if no qualifying orders exist.Percentage change in order count from the preceding 30-day period to the current 30-day period. Positive values indicate growth; negative values indicate a decline. Rounded to 1 decimal place.
Percentage change in gross revenue from the preceding 30-day period to the current 30-day period. Rounded to 1 decimal place.
Example response
Filterable Order History
num_ticket descending (most recent first). Each element of the returned array is the same order object shape produced by GET /api/ordenes — including computed subtotal, iva, total, Estatus_Orden, and nested items.
Query Parameters
Filters results to orders matching the given status. Accepted values:
The special value
| Value | Meaning |
|---|---|
recibido | Order received, not yet in preparation |
preparando | Order currently being prepared in the kitchen |
listo | Order ready for pickup or delivery |
entregado | Order delivered to the customer |
Todos (capital T) is treated the same as omitting the parameter — all statuses are returned. Values are normalised to lowercase before comparison.Restricts results to orders created within the selected time window. Accepted values:
Omitting this parameter defaults to the last 30 days (same as
| Value | Window |
|---|---|
hoy | From midnight UTC today to the current moment |
semana | From exactly 7 days ago (UTC) to the current moment |
mes | From exactly 30 days ago (UTC) to the current moment |
mes).Response
Returns an array of order objects. Each object has the same shape as the response fromGET /api/ordenes:
Alias for
num_ticket.Unique ticket number of the order.
UTC timestamp of order creation.
Name of the customer who placed the order.
Customer national ID.
Customer phone number.
Alias for
tipo_pedido. One of mesa, pickup, delivery.Order fulfillment type.
Alias for
id_mesa. Table number for dine-in orders; null for pickup/delivery orders.Table number for
mesa-type orders; null for pickup/delivery. Canonical DB column name.Alias for
direccion_envio. Delivery address; null for non-delivery orders.Delivery address used when
tipo_pedido is delivery; null otherwise. Canonical DB column name.Line items in this order. Each element contains
id_producto, id_plato, nombre, cantidad, precio_unitario, and subtotal.Sum of all line-item subtotals before tax.
16% IVA computed as
subtotal × 0.16.subtotal + iva.Capitalized display label, e.g.
"Listo".Lowercase machine-readable status, e.g.
"listo".Example response (single item)