Overview
The Integra API provides comprehensive endpoints for managing employee attendance including shift start/end, break management, manual entries, and photo capture for verification.Starting a Shift
To start an employee’s work shift, use the/asistencia/iniciar endpoint with the employee’s information and optional photo.
Prepare the request
Create a POST request with the employee ID, unit ID, and optional photo capture.Endpoint: Required Fields:
POST /asistencia/iniciarRequest Body:empleadoId- Employee ID (required)unidadId- Unit/location ID where attendance is recorded (required)
foto- Base64 encoded photo for verificationunidadAsignadaId- Assigned unit IDhora- Time of registration (LocalTime format)
Ending a Shift
When an employee finishes their work shift, use the/asistencia/finalizar endpoint.
Prepare the end shift request
Endpoint: Fields:
POST /asistencia/finalizarRequest Body:empleadoId- Employee ID (required)unidadId- Unit ID (required)foto- Photo capture (optional)finDeposito- Boolean flag for deposit completionunidadAsignadaId- Assigned unit ID
Managing Breaks
Starting a Break
Employees can start different types of breaks (meal breaks, other breaks) during their shift.Initiate a break
Endpoint: Break Types (pausa field):
POST /asistencia/pausa/iniciarRequest Body:COMIDA- Meal breakOTRA- Other break type
Ending a Break
When the employee returns from their break, finalize it with the corresponding endpoint.Manual Attendance Entry
For corrections or backdated entries, administrators can manually register attendance records.Prepare manual entry
Endpoint: Action Types (tipoAccion):
POST /asistencia/manualRequest Body:iniciarJornada- Start shift manuallyfinalizarJornada- End shift manuallyfinalizarJornadaDeposito- End shift with depositiniciarPausa- Start break manuallyfinalizarPausa- End break manually
empleadoId- Employee IDtipoAccion- Action typehora- Time of action (LocalTime format: HH:mm:ss)observaciones- Observations/notes explaining the manual entryunidadId- Unit ID
Photo Capture Guidelines
When including photos in attendance records:- Format: Base64 encoded string
- Purpose: Employee verification and attendance validation
- Field:
fotoparameter in request body - Usage: Optional but recommended for shift start/end and breaks
Updating and Deleting Records
Update Shift Record
Endpoint:PUT /asistencia/jornada
Update an existing shift record with new information.
Update Break Record
Endpoint:PUT /asistencia/pausa
Modify break information for an employee.
Delete Shift
Endpoint:DELETE /asistencia/jornada/{id}
Delete Break
Endpoint:DELETE /asistencia/pausa/{id}
Reference
Controller:AsistenciaCommandController.java at /asistencia/controller/AsistenciaCommandController.java:1
Related DTOs:
RegistroDTO.java- Standard attendance registrationRegistroManualDTO.java- Manual attendance entryActualizarJornadaDTO.java- Update shift recordsActualizarPausaDTO.java- Update break records
Next Steps
Reports Generation
Generate attendance reports and export to Excel
Employee Management
Manage employee information and assignments