The Dashboard API provides aggregated business metrics and stock alert management for the Ferromax ERP back-office. Every endpoint in this group is restricted to theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/DragonesMagicos/ferromax_v0.8/llms.txt
Use this file to discover all available pages before exploring further.
ADMIN role — requests authenticated with an EMPLEADO or CLIENTE token will receive 403 Forbidden. All dates and timestamps are serialized in ISO 8601 format using the America/Argentina/Buenos_Aires timezone.
KPI Summary
GET /api/dashboard/resumen
Returns a snapshot of the key business indicators computed for the current calendar day (midnight → midnight, Argentine time). Authentication: Bearer JWT —ADMIN role required.
Total revenue from completed sales today, in ARS.
Number of completed sale transactions processed today.
Count of active products whose current stock is at or below their configured minimum threshold.
Number of customer orders currently in
PENDIENTE or CONFIRMADO state.Cash-only revenue for today — sum of completed sales paid with
EFECTIVO.7-Day Sales Chart
GET /api/dashboard/ventas-semana
Returns daily sales totals for the last 7 days, ordered from oldest to most recent (day −6 → today). Each entry represents one full calendar day in Argentine time. Days with no completed sales returnnull for total.
Authentication: Bearer JWT — ADMIN role required.
Ordered array of 7 objects, one per day.
The calendar date for this entry, e.g.
"2024-06-10".Total revenue from completed sales on this date.
null if no sales were recorded.Weekends with no activity return
null for total rather than 0. Chart components should treat null as zero when rendering.Recent Transactions
GET /api/dashboard/transacciones
Returns the 10 most recent sale records, regardless of status, ordered by date descending. Used to populate the “Últimas Transacciones” table on the dashboard home page. Authentication: Bearer JWT —ADMIN role required.
Array of up to 10 sale records.
Unique sale identifier.
Timestamp when the sale was created, including UTC offset, e.g.
"2024-06-10T14:23:05-03:00".Total monetary value of the sale.
Sale status. One of:
COMPLETADA, ANULADA, PENDIENTE.Payment method. One of:
EFECTIVO, DEBITO, CREDITO, MERCADOPAGO.Full name (
nombre + apellido) of the employee who processed the sale.Number of distinct line items in the sale.
Sale origin channel. One of:
POS (in-store sale by an ADMIN or EMPLEADO), WEB (online order by a CLIENTE).Stock Alerts
Stock alerts are generated automatically when a product’sstockActual falls to or below its stockMinimo. The following endpoints allow admins to monitor and dismiss these alerts.
GET /api/alertas
Returns all unread stock alerts. This is the count reflected in the badge on the dashboard sidebar. Authentication: Bearer JWT —ADMIN role required.
Array of unread alert objects. Empty array
[] if no unread alerts exist.Unique alert identifier.
Display name of the product that triggered the alert.
The product’s stock level at the time the alert was generated.
The configured minimum stock threshold for this product.
Alert severity.
"SIN_STOCK" when stockActual is 0; "STOCK_BAJO" otherwise.Timestamp when the alert was created.
false for all results returned by this endpoint (by definition, only unread alerts are returned).GET /api/alertas/todas
Returns all stock alerts created within the last 30 days, both read and unread. Used by the alert history panel. Authentication: Bearer JWT —ADMIN role required.
Response shape is identical to GET /api/alertas. The lida field will be true for previously dismissed alerts.
PUT /api/alertas//leer
Marks a single stock alert as read. The frontendAlertaStockPanel calls this when the admin clicks the checkmark button on an individual alert card.
Authentication: Bearer JWT — ADMIN role required.
The numeric ID of the alert to mark as read.
AlertaStockDTO with lida: true.
PUT /api/alertas/leer-todas
Marks all currently unread alerts as read in a single operation. Returns a count of how many alerts were updated. Authentication: Bearer JWT —ADMIN role required.
The number of alerts that were transitioned from unread to read.
0 if there were no unread alerts.