Saltar a contenido

Línea de Tiempo de Fichajes

GET /api/v2/timerecord/timeline

Método/Ruta: GET /api/v2/timerecord/timeline
Auth: Bearer JWT

Descripción: Obtiene la línea de tiempo del día actual con todas las entradas y salidas ordenadas cronológicamente (más reciente primero).

Params

(sin parámetros)

cURL

curl -X GET "http://localhost:7001/api/v2/timerecord/timeline" \
  -H "Authorization: Bearer <TOKEN>"

Response (200)

{
  "status": "success",
  "data": [
    {
      "fullName": "Juan López",
      "action": "exit",
      "time": "2026-01-07T14:00:00.000Z"
    },
    {
      "fullName": "Elena Ruiz",
      "action": "entry",
      "time": "2026-01-07T09:00:00.000Z"
    },
    {
      "fullName": "Pedro Sánchez",
      "action": "entry",
      "time": "2026-01-07T08:30:00.000Z"
    },
    {
      "fullName": "María García",
      "action": "entry",
      "time": "2026-01-07T08:00:00.000Z"
    }
  ]
}

Response Fields

Campo Tipo Descripción
fullName string Nombre completo del empleado
action string "entry" (entrada) o "exit" (salida)
time Date Hora del evento

Errores

Código Descripción
401 Token inválido o expirado

Notas

  • Los eventos se ordenan por hora descendente (más reciente primero)
  • Cada fichaje puede generar 1 o 2 eventos: siempre genera entrada, y si está cerrado también genera salida
  • El timezone de referencia es Europe/Madrid