The dashboard endpoint aggregates data from four stored procedures into a single response object. The frontend calls this once on page load to populate the KPI cards, the weekly bar chart, the stock alert list, and the recent-transactions table.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/15aozzz/Lab-Nova-Salud/llms.txt
Use this file to discover all available pages before exploring further.
This endpoint requires a valid JWT in the
Authorization: Bearer <token> header.GET /api/dashboard/resumen
Returns a consolidated summary of pharmacy activity. Internally executes four stored procedures in sequence —sp_dashboard_kpis, sp_dashboard_ventas_semana, sp_dashboard_alertas, and sp_dashboard_ultimos_comprobantes — and combines their results into a single JSON object.
Parameters
No parameters required.Response
200 OKToday’s key performance indicators. Produced by
sp_dashboard_kpis.Aggregated daily sales for the last 7 days. Produced by
sp_dashboard_ventas_semana. Used to render the weekly bar chart.Products currently at or below their minimum stock threshold. Produced by
sp_dashboard_alertas. An empty array means no products are running low.The most recent sales vouchers issued. Produced by
sp_dashboard_ultimos_comprobantes.Errors
| Status | Condition | Body |
|---|---|---|
500 | Any stored procedure fails | { "error": "Error al obtener resumen del dashboard" } |
Because all four stored procedures run sequentially in a single request, a failure in any one of them returns a
500 for the entire response. Individual procedure errors are logged server-side.Example
Response