Skip to main content

GET /api/dashboard

Returns a flat map of KPI counters useful for building a summary dashboard. This endpoint does not use the ApiResponse<T> wrapper — it returns the map directly. The date window for “expiring soon” is the next 7 days from the current server date.

Response fields

caducados
number
Count of inventory records whose fechaCaducidad is before today (already expired).
porCaducar
number
Count of inventory records whose fechaCaducidad falls within the next 7 days.
inventarioTotal
number
Sum of the cantidad column across all inventory records.
recepcionesCedis
number
Total number of CEDIS reception records in the database.
recepcionesProveedor
number
Total number of supplier reception records in the database.
rpcPendientes
number
Count of RPC control records where pendienteRetorno is true.

Example request

curl -X GET http://localhost:8080/api/dashboard

Example response

{
  "caducados": 5,
  "porCaducar": 12,
  "inventarioTotal": 1340,
  "recepcionesCedis": 28,
  "recepcionesProveedor": 14,
  "rpcPendientes": 3
}