Llistat d'absències de tots els empleats
team:time-off.readhttps://api.holded.com/api/v2/employees/time-offsRetorna les absències, vacances i permisos de tots els empleats del compte dins del rang de dates indicat, ordenats per data d'inici descendent.
Paràmetres
Paràmetres de consulta
stringopcionalintegeropcional= 50string<date>obligatoriLímit inferior de la data d'inici del filtre (ATOM, ISO 8601 amb zona horària)
string<date>obligatoriLímit superior de la data d'inici del filtre (ATOM, ISO 8601 amb zona horària)
stringopcionalFiltra per estat de la sol·licitud
"pending""accepted""rejected""cancelled"stringopcionalFiltra per tipus d'absència (p. ex. vacances, baixa, permís)
stringopcionalFiltra per equip
Petició
import requests
url = "https://api.holded.com/api/v2/employees/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())Respostes
Resposta
{
"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
}Respostes exitoses
200Llistat d'absènciesapplication/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.
Current approval status
pendingacceptedrejectedcancelledNumber of days consumed (as a decimal string)
Opaque cursor pointing to the next page. Pass as `cursor` in the next request. Null when there is no next page.
Whether more pages are available after this one
Respostes d'error
400Sol·licitud incorrectaapplication/json401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json429Límit de sol·licituds exceditapplication/json