Start Shift
curl --request POST \
--url https://api.example.com/asistencia/iniciar \
--header 'Content-Type: application/json' \
--data '
{
"empleadoId": 123,
"unidadId": 123,
"foto": "<string>",
"unidadAsignadaId": 123,
"hora": "<string>"
}
'{
"success": true,
"data": null,
"message": "<string>"
}Attendance
Start Shift
Initiates a work shift for an employee
POST
/
asistencia
/
iniciar
Start Shift
curl --request POST \
--url https://api.example.com/asistencia/iniciar \
--header 'Content-Type: application/json' \
--data '
{
"empleadoId": 123,
"unidadId": 123,
"foto": "<string>",
"unidadAsignadaId": 123,
"hora": "<string>"
}
'{
"success": true,
"data": null,
"message": "<string>"
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/exon-reyes/integra-backend/llms.txt
Use this file to discover all available pages before exploring further.
Overview
This endpoint registers the start of an employee’s work shift. It captures the employee’s photo, location (unit), and timestamp to mark the beginning of their workday.Request Body
The unique identifier of the employee starting their shift
The ID of the unit/location where the employee is starting their shift
Base64-encoded photo of the employee for attendance verification (optional)
The ID of the employee’s assigned unit (optional)
Custom time for shift start in HH:mm:ss format (optional). If not provided, current time is used
Response
Indicates whether the operation was successful
No data is returned for this endpoint
Confirmation message: “Jornada iniciada”
Example Request
cURL
curl -X POST https://api.integra.com/asistencia/iniciar \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"empleadoId": 123,
"unidadId": 5,
"foto": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
"unidadAsignadaId": 5,
"hora": "08:00:00"
}'
Response Example
Success Response
{
"success": true,
"data": null,
"message": "Jornada iniciada"
}
Error Response
{
"success": false,
"message": "El ID del empleado no puede ser nulo"
}
Business Rules
- An employee cannot start a shift if they already have an active shift in progress
- The
empleadoIdandunidadIdare mandatory fields - If
horais not provided, the system uses the current server time - The photo field is optional but recommended for attendance verification
- Unit validation ensures the employee is starting their shift at a valid location
⌘I