Obtener una ausencia por ID
team:time-off.readhttps://api.holded.com/api/v2/employees/{employeeId}/time-offs/{timeOffId}Recupera los detalles completos de una ausencia específica del empleado.
Parámetros
Parámetros de ruta
stringobligatorioID del empleado (ObjectId hexadecimal de 24 caracteres)
stringobligatorioID de la ausencia (ObjectId hexadecimal de 24 caracteres)
Petición
import requests
url = "https://api.holded.com/api/v2/employees/507f1f77bcf86cd799439012/time-offs/507f1f77bcf86cd799439011"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respuestas
Respuesta
{
"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",
"day_period": "full_day",
"status": "pending",
"days": "5",
"description": "Summer holidays",
"reason": null,
"start_hour": "09:00",
"end_hour": "13:00",
"num_hours": "4",
"attachments": [
{}
]
}Respuestas exitosas
200Ausencia encontradaapplication/jsonUnique identifier of the time off request
Identifier of the employee. Null when assigned to a workplace.
Identifier of the time off type
Name of the time off type
Start date of the absence (YYYY-MM-DD, Europe/Madrid)
End date of the absence (YYYY-MM-DD, Europe/Madrid). Null for single-day requests.
Half-day granularity for single-day requests
morningafternoonfull_dayhourlyCurrent approval status
pendingacceptedrejectedcancelledNumber of days consumed (as a decimal string)
Free-form note attached to the request
Rejection or cancellation reason
Start time for HOURS-granularity absences (HH:MM, Europe/Madrid)
End time for HOURS-granularity absences (HH:MM, Europe/Madrid)
Total hours duration for HOURS-granularity absences
Attached files (currently always empty)
Respuestas de error
401API key inválida o no proporcionadaapplication/json403Permisos insuficientesapplication/json404Ausencia no encontradaapplication/json429Límite de solicitudes excedidoapplication/json