Saltar al contenido principal
GET

Listado de ausencias de un empleado

Scope:team:time-off.read
https://api.holded.com/api/v2/employees/{employeeId}/time-offs

Devuelve las ausencias, vacaciones y permisos de un empleado dentro del rango de fechas indicado, ordenadas por fecha de inicio descendente.

Parámetros

Parámetros de ruta

employeeIdstringobligatorio

ID del empleado (ObjectId hexadecimal de 24 caracteres)

Parámetros de consulta

cursorstringopcional
limitintegeropcional= 50
start_date_fromstring<date>obligatorio

Límite inferior de la fecha de inicio del filtro (ATOM, ISO 8601 con zona horaria)

start_date_tostring<date>obligatorio

Límite superior de la fecha de inicio del filtro (ATOM, ISO 8601 con zona horaria)

statusstringopcional

Filtra por estado de la solicitud

"pending""accepted""rejected""cancelled"
time_off_type_idstringopcional

Filtra por tipo de ausencia (p. ej. vacaciones, baja, permiso)

Petición

python
import requests

url = "https://api.holded.com/api/v2/employees/507f1f77bcf86cd799439012/time-offs?cursor=value&limit=50&start_date_from=2026-01-01"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())

Respuestas

Respuesta

json
{
  "items": [
    {
      "id": "507f1f77bcf86cd799439011",
      "employee_id": "507f1f77bcf86cd799439012",
      "time_off_type_id": "507f1f77bcf86cd799439013",
      "time_off_type_name": "Vacation",
      "start_date": "2026-06-01",
      "end_date": "2026-06-05",
      "status": "pending",
      "days": "5"
    }
  ],
  "cursor": "string",
  "has_more": true
}

Respuestas exitosas

200Listado de ausenciasapplication/json
object
items[]object[]
idstring

Unique identifier of the time off request

employee_idstring | null

Identifier of the employee. Null when assigned to a workplace.

time_off_type_idstring | null

Identifier of the time off type

time_off_type_namestring | null

Name of the time off type

start_datestring<date>

Start date of the absence (YYYY-MM-DD, Europe/Madrid)

end_datestring<date> | null

End date of the absence (YYYY-MM-DD, Europe/Madrid). Null for single-day requests.

statusstring | null

Current approval status

Enum:pendingacceptedrejectedcancelled
daysstring

Number of days consumed (as a decimal string)

cursorstring | null

Opaque cursor pointing to the next page. Pass as `cursor` in the next request. Null when there is no next page.

has_moreboolean

Whether more pages are available after this one

Respuestas de error

400Solicitud incorrectaapplication/json
401API key inválida o no proporcionadaapplication/json
403Permisos insuficientesapplication/json
404Empleado no encontradoapplication/json
429Límite de solicitudes excedidoapplication/json