Skip to main content

Get Attendance Report

Retrieve detailed attendance records in JSON format.

Endpoint

GET /asistencia/reporte/asistencias

Query Parameters

empleadoId
integer
Filter by specific employee ID
desde
datetime
Start date/time in ISO 8601 format (e.g., 2026-03-01T00:00:00)
hasta
datetime
End date/time in ISO 8601 format (e.g., 2026-03-31T23:59:59)
unidadId
integer
Filter by organizational unit ID
empleadoResponsableId
integer
Filter by responsible employee/manager ID
supervisorId
integer
Filter by supervisor ID
zonaId
integer
Filter by geographic zone ID
puestoId
integer
Filter by job position ID

Response

data
array
message
string
Success message: “Asistencia por empleados”

Example Request

cURL
curl -X GET "http://localhost:8081/comialex/api/integra/asistencia/reporte/asistencias?empleadoId=456&desde=2026-03-01T00:00:00&hasta=2026-03-31T23:59:59" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

{
  "data": [
    {
      "empleadoId": 456,
      "nombreCompleto": "Juan Pérez García",
      "nip": "1234",
      "puesto": "Desarrollador Senior",
      "departamento": "Tecnología",
      "asistencias": [
        {
          "id": 12345,
          "fecha": "2026-03-05",
          "entrada": "08:00:00",
          "salida": "17:00:00",
          "horasTrabajadas": "08:00:00",
          "pausas": [
            {
              "inicio": "12:00:00",
              "fin": "13:00:00",
              "duracion": "01:00:00"
            }
          ]
        },
        {
          "id": 12346,
          "fecha": "2026-03-06",
          "entrada": "08:05:00",
          "salida": "17:10:00",
          "horasTrabajadas": "08:05:00",
          "pausas": [
            {
              "inicio": "12:15:00",
              "fin": "13:15:00",
              "duracion": "01:00:00"
            }
          ]
        }
      ]
    }
  ],
  "message": "Asistencia por empleados",
  "success": true
}

Get Attendance Inconsistencies

Retrieve attendance records with issues or violations.

Endpoint

GET /asistencia/reporte/inconsistencias

Query Parameters

fechaInicio
datetime
required
Start date/time (ISO 8601)
fechaFin
datetime
required
End date/time (ISO 8601)
empleadoId
integer
Filter by specific employee ID
unidadId
integer
Filter by unit ID
zonaId
integer
Filter by zone ID
supervisorId
integer
Filter by supervisor ID

Response

data
array
message
string
Success message: “Inconsistencias de asistencia”

Example Request

cURL
curl -X GET "http://localhost:8081/comialex/api/integra/asistencia/reporte/inconsistencias?fechaInicio=2026-03-01T00:00:00&fechaFin=2026-03-31T23:59:59&unidadId=5" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

{
  "data": [
    {
      "id": 789,
      "empleadoId": 456,
      "empleadoNombre": "Juan Pérez García",
      "fecha": "2026-03-05",
      "tipo": "FALTA_SALIDA",
      "descripcion": "Registro de entrada sin salida correspondiente",
      "estado": "PENDIENTE"
    },
    {
      "id": 790,
      "empleadoId": 457,
      "empleadoNombre": "María González López",
      "fecha": "2026-03-07",
      "tipo": "HORARIO_INCORRECTO",
      "descripcion": "Entrada fuera del horario permitido",
      "estado": "JUSTIFICADO"
    }
  ],
  "message": "Inconsistencias de asistencia",
  "success": true
}

Get Monthly Summary

Retrieve a summary of attendance for a specific employee and month.

Endpoint

GET /asistencia/reporte/resumen-mes

Query Parameters

empleadoId
integer
required
Employee ID
anio
integer
Year (defaults to current year)
mes
integer
Month (1-12, defaults to current month)

Response

data
object
message
string
Success message: “Resumen de asistencia del mes”

Example Request

cURL
curl -X GET "http://localhost:8081/comialex/api/integra/asistencia/reporte/resumen-mes?empleadoId=456&anio=2026&mes=3" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

{
  "data": {
    "empleadoId": 456,
    "anio": 2026,
    "mes": 3,
    "diasLaborados": 20,
    "diasFaltados": 2,
    "horasTotales": "160:00:00",
    "promedioHorasDia": "08:00:00",
    "retardos": 3
  },
  "message": "Resumen de asistencia del mes",
  "success": true
}

Get Days Worked in Month

Retrieve the specific dates when an employee worked in a given month.

Endpoint

GET /asistencia/reporte/dias-laborados

Query Parameters

empleadoId
integer
required
Employee ID
anio
integer
required
Year (e.g., 2026)
mes
integer
required
Month (1-12, e.g., 1 = January)

Response

data
array
Array of dates (ISO 8601 format: yyyy-MM-dd) when the employee had attendance
message
string
Success message: “Días laborados en el mes”

Example Request

cURL
curl -X GET "http://localhost:8081/comialex/api/integra/asistencia/reporte/dias-laborados?empleadoId=456&anio=2026&mes=3" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

{
  "data": [
    "2026-03-01",
    "2026-03-02",
    "2026-03-03",
    "2026-03-05",
    "2026-03-06",
    "2026-03-09",
    "2026-03-10"
  ],
  "message": "Días laborados en el mes",
  "success": true
}
Use this endpoint to build calendar views showing which days an employee worked.

Get Employees Without Attendance

Retrieve employees who did not register attendance in a date range, grouped by date.

Endpoint

GET /asistencia/reporte/empleados-sin-asistencia

Query Parameters

fechaInicio
datetime
required
Start date/time (ISO 8601)
fechaFin
datetime
required
End date/time (ISO 8601)
unidadId
integer
Filter by unit ID
puestoId
integer
Filter by position ID
zonaId
integer
Filter by zone ID
supervisorId
integer
Filter by supervisor ID

Response

data
array
message
string
Success message: “Inasistencias agrupadas por fecha”

Example Request

cURL
curl -X GET "http://localhost:8081/comialex/api/integra/asistencia/reporte/empleados-sin-asistencia?fechaInicio=2026-03-01T00:00:00&fechaFin=2026-03-07T23:59:59&unidadId=5" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

{
  "data": [
    {
      "fecha": "2026-03-05",
      "empleados": [
        {
          "id": 458,
          "nombreCompleto": "Carlos Ramírez Torres",
          "nip": "5678",
          "puesto": "Analista"
        },
        {
          "id": 459,
          "nombreCompleto": "Laura Martínez Cruz",
          "nip": "9012",
          "puesto": "Diseñadora"
        }
      ]
    },
    {
      "fecha": "2026-03-06",
      "empleados": [
        {
          "id": 460,
          "nombreCompleto": "Pedro Sánchez López",
          "nip": "3456",
          "puesto": "Supervisor"
        }
      ]
    }
  ],
  "message": "Inasistencias agrupadas por fecha",
  "success": true
}
This report only includes employees who were expected to work (based on their schedules) but did not register attendance.

Get Compensation Report

Retrieve compensation time records for employees who clocked in early or stayed late beyond their scheduled hours.

Query Parameters

inicio
string
required
Start date for the report (yyyy-MM-dd format)
fin
string
required
End date for the report (yyyy-MM-dd format)
empleadoId
integer
Filter by specific employee ID
unidadId
integer
Filter by unit ID

Example Request

cURL
curl -X GET "https://api.integra.example/opentime/compensaciones?inicio=2026-03-01&fin=2026-03-31&unidadId=5" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

{
  "data": [
    {
      "empleadoId": 1234,
      "nombreEmpleado": "Juan Pérez",
      "fecha": "2026-03-05",
      "horaLlegada": "07:45:00",
      "horaInicio": "08:00:00",
      "horaSalida": "17:15:00",
      "horaFin": "17:00:00",
      "compensacionInicio": "00:15:00",
      "compensacionFin": "00:15:00",
      "totalCompensacion": "00:30:00"
    }
  ],
  "message": "Compensaciones",
  "success": true
}

Export Compensation Report to Excel

Export the compensation report as an Excel file for payroll processing.

Query Parameters

Same parameters as the JSON compensation report endpoint.

Example Request

cURL
curl -X GET "https://api.integra.example/opentime/compensaciones/excel?inicio=2026-03-01&fin=2026-03-31" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  --output compensaciones.xlsx

Response

Returns an Excel file (.xlsx) with the following columns:
  • Employee ID
  • Employee Name
  • Date
  • Arrival Time
  • Scheduled Start
  • Departure Time
  • Scheduled End
  • Early Arrival Compensation
  • Late Departure Compensation
  • Total Compensation Time

Get Attendance with Incidents

Retrieve attendance records filtered by specific incident types (late arrivals, early departures, missed punches, etc.).

Query Parameters

inicio
string
required
Start date (yyyy-MM-dd format)
fin
string
required
End date (yyyy-MM-dd format)
empleadoId
integer
Filter by employee ID
unidadId
integer
Filter by unit ID
tipoIncidencia
string
Filter by incident type (e.g., “RETARDO”, “FALTA”, “SALIDA_ANTICIPADA”)

Example Request

cURL
curl -X GET "https://api.integra.example/asistencia/incidencia?inicio=2026-03-01&fin=2026-03-07&tipoIncidencia=RETARDO" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

{
  "data": {
    "registros": [
      {
        "empleadoId": 1234,
        "nombreEmpleado": "María García",
        "fecha": "2026-03-03",
        "horaLlegada": "08:15:00",
        "horaSalida": "17:00:00",
        "incidencia": "RETARDO",
        "minutosRetardo": 15,
        "observaciones": "Tráfico"
      }
    ],
    "totalIncidencias": 1
  },
  "message": "Reporte de asistencia generado",
  "success": true
}
This endpoint is useful for identifying patterns in attendance issues and generating disciplinary reports.

Build docs developers (and LLMs) love