Skip to main content

Overview

The Reports API provides comprehensive attendance reporting capabilities, including detailed attendance records, inconsistencies, monthly summaries, and Excel exports. Reports can be filtered by employee, unit, zone, position, and supervisor.

Report Types

Attendance Reports

Detailed attendance records showing clock-in/clock-out times, breaks, and total hours worked. Available in:
  • JSON format: For programmatic access and web display
  • Excel format: For detailed analysis with nested break information

Inconsistency Reports

Identify attendance issues such as:
  • Missing clock-out times
  • Overlapping shifts
  • Excessive break times
  • Schedule violations

Monthly Summaries

Aggregate attendance data for a specific month:
  • Total days worked
  • Days absent
  • Average hours per day
  • Tardiness count

Absence Reports

Identify employees without attendance records in a given date range, grouped by date.

Base URL

All report endpoints are prefixed with:
/comialex/api/integra/asistencia/reporte

Authentication

All report endpoints require JWT authentication. Include the Bearer token in the Authorization header:
Authorization: Bearer YOUR_JWT_TOKEN
See Authentication for details on obtaining and using tokens.

Common Filtering Parameters

Most report endpoints support the following filters:
ParameterTypeDescription
empleadoIdintegerFilter by specific employee
unidadIdintegerFilter by organizational unit
zonaIdintegerFilter by geographic zone
puestoIdintegerFilter by job position
supervisorIdintegerFilter by supervisor
desdedatetimeStart date/time (ISO 8601)
hastadatetimeEnd date/time (ISO 8601)

Date Range Examples

# Single day
desde=2026-03-01T00:00:00
hasta=2026-03-01T23:59:59

# Week
desde=2026-03-01T00:00:00
hasta=2026-03-07T23:59:59

# Month
desde=2026-03-01T00:00:00
hasta=2026-03-31T23:59:59

Response Format

JSON report endpoints return data in the standard ResponseData wrapper:
{
  "data": <report_data>,
  "message": "Success message",
  "success": true,
  "timestamp": 1709644800000
}
Excel endpoints return binary file data with appropriate headers for download.

Performance Considerations

Large Reports: Reports covering long date ranges or many employees can be computationally expensive. Consider:
  • Limiting date ranges to necessary periods
  • Using pagination where available
  • Generating reports during off-peak hours
  • Implementing client-side caching
  • Date Range: Maximum 90 days for detailed reports
  • Employee Count: Filter by unit/zone when possible
  • Excel Exports: Use for analysis, not real-time display

Report Data Structure

EmpleadoReporte (Employee Report)

{
  "empleadoId": 456,
  "nombreCompleto": "Juan Pérez García",
  "nip": "1234",
  "puesto": "Desarrollador Senior",
  "asistencias": [
    {
      "fecha": "2026-03-05",
      "entrada": "08:00:00",
      "salida": "17:00:00",
      "horasTrabajadas": "09:00:00",
      "pausas": [
        {
          "inicio": "12:00:00",
          "fin": "13:00:00",
          "duracion": "01:00:00"
        }
      ]
    }
  ]
}

Inconsistency (Incidencia)

{
  "id": 789,
  "empleadoId": 456,
  "fecha": "2026-03-05",
  "tipo": "FALTA_SALIDA",
  "descripcion": "Registro de entrada sin salida",
  "estado": "PENDIENTE"
}

Next Steps

Attendance Reports

Generate detailed attendance reports

Excel Export

Export reports to Excel format

Attendance System

Learn about attendance tracking

Build docs developers (and LLMs) love