Dashboard KPIs
Dashboard
Dashboard KPIs
Retrieve key performance indicators for admin dashboard or specific employee
GET
Dashboard KPIs
Overview
This endpoint returns key performance indicators (KPIs) for the admin dashboard. It can provide organization-wide metrics or employee-specific metrics depending on the query parameters.Authentication
Requires JWT authentication token. Admins can view organization-wide KPIs or specific employee KPIs. Employees may be restricted based on permissions.Query Parameters
Optional employee ID. If provided, returns KPIs specific to that employee. If omitted, returns organization-wide KPIs.
Response
Response status (“success”)
KPI data object
Number of requests with “Pendiente” (Pending) status. For organization-wide: total pending requests. For employee: pending requests from that employee.
Number of employees currently absent (requests approved with today’s date within the range). For employee-specific: 1 if employee is absent today, 0 otherwise.
Total vacation days approved year-to-date. For organization: sum across all employees. For employee: sum for that employee only.
Total number of active employees in the organization. Only returned for organization-wide queries (null when empleado_id is provided).
Full name of the employee. Only returned when empleado_id parameter is provided (null for organization-wide queries).
Error Responses
Internal server error
Code Examples
Organization-wide KPIs
cURL
JavaScript
Python
Employee-specific KPIs
cURL
JavaScript
Python
Example Responses
Organization-wide Response
Employee-specific Response
KPI Definitions
Pending Requests
Count of requests awaiting approval. Helps admins prioritize review workload.
Absent Today
Number of employees with approved requests covering today’s date. Useful for workforce planning.
Vacation Days YTD
Total vacation days approved since January 1st of current year. Tracks vacation utilization.
Active Employees
Current headcount of active employees. Only shown for organization-wide view.
Use Cases
Admin Dashboard
Display key metrics on admin dashboard homepage for quick overview
Workforce Planning
Monitor current absences to ensure adequate staffing levels
Employee Profile
Show employee-specific metrics on their profile page
Approval Queue
Display pending request count with link to approval interface