Attendance
Attendance
Section titled “Attendance”Registro de fichajes de entrada y salida con validación de geolocalización.
POST /api/companies/{companyId}/attendance/v1/check-in
Section titled “POST /api/companies/{companyId}/attendance/v1/check-in”Registrar entrada
Ficha entrada usando QR. Si el dispositivo envía coordenadas GPS, se valida contra la geocerca de la ubicación.
Parámetros
Section titled “Parámetros”| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
companyId | string | ✅ |
Request Body (requerido ✅)
Section titled “Request Body (requerido ✅)”{ "token": "00000000-0000-0000-0000-000000000000", "deviceLatitude": 0, "deviceLongitude": 0, "deviceAccuracyMeters": 0 }Respuestas
Section titled “Respuestas”Entrada registrada
{ "id": "00000000-0000-0000-0000-000000000000", "type": "CHECK_IN", "method": "QR_FIXED", "locationName": "locationName", "timestamp": "2024-01-15T10:00:00Z", "verifiedGeoMatch": true, "success": true, "message": "message" }POST /api/companies/{companyId}/attendance/v1/check-out
Section titled “POST /api/companies/{companyId}/attendance/v1/check-out”Registrar salida
Salida registrada
Parámetros
Section titled “Parámetros”| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
companyId | string | ✅ |
Request Body (requerido ✅)
Section titled “Request Body (requerido ✅)”{ "token": "00000000-0000-0000-0000-000000000000", "deviceLatitude": 0, "deviceLongitude": 0, "deviceAccuracyMeters": 0 }Respuestas
Section titled “Respuestas”Salida registrada
{ "id": "00000000-0000-0000-0000-000000000000", "type": "CHECK_IN", "method": "QR_FIXED", "locationName": "locationName", "timestamp": "2024-01-15T10:00:00Z", "verifiedGeoMatch": true, "success": true, "message": "message" }GET /api/companies/{companyId}/attendance/v1/me/{employeeId}
Section titled “GET /api/companies/{companyId}/attendance/v1/me/{employeeId}”Historial personal de fichajes
Lista de fichajes
Parámetros
Section titled “Parámetros”| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
companyId | string | ✅ | |
employeeId | string | ✅ | |
days | string | ❌ |
Respuestas
Section titled “Respuestas”Historial de fichajes del empleado
{ "id": "00000000-0000-0000-0000-000000000000", "type": "CHECK_IN", "method": "QR_FIXED", "locationName": "locationName", "timestamp": "2024-01-15T10:00:00Z", "verifiedGeoMatch": true }GET /api/companies/{companyId}/attendance/v1
Section titled “GET /api/companies/{companyId}/attendance/v1”Historial de fichajes de la empresa
Lista de fichajes
Parámetros
Section titled “Parámetros”| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
companyId | string | ✅ | |
days | string | ❌ |
Respuestas
Section titled “Respuestas”Historial de fichajes de la empresa
{ "id": "00000000-0000-0000-0000-000000000000", "type": "CHECK_IN", "method": "QR_FIXED", "locationName": "locationName", "timestamp": "2024-01-15T10:00:00Z", "verifiedGeoMatch": true }Schemas
Section titled “Schemas”CheckInRequest
Section titled “CheckInRequest”| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
token | string (uuid) | ❌ | Token del QR escaneado |
deviceLatitude | number (double) | ❌ | GPS del dispositivo |
deviceLongitude | number (double) | ❌ | |
deviceAccuracyMeters | number (double) | ❌ | Precisión reportada por el GPS |
CheckInResponse
Section titled “CheckInResponse”| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
id | string (uuid) | ❌ | |
type | AttendanceType | ❌ | |
method | AttendanceMethod | ❌ | |
locationName | string | ❌ | |
timestamp | string (date-time) | ❌ | |
verifiedGeoMatch | boolean | ❌ | Si la ubicación del dispositivo coincide con la geocerca |
success | boolean | ❌ | |
message | string | ❌ |
AttendanceResponse
Section titled “AttendanceResponse”| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
id | string (uuid) | ❌ | |
type | AttendanceType | ❌ | |
method | AttendanceMethod | ❌ | |
locationName | string | ❌ | |
timestamp | string (date-time) | ❌ | |
verifiedGeoMatch | boolean | ❌ |