GET
Obtenir un registre de temps d'empleat
Scope:
team:time-tracking.readhttps://api.holded.com/api/v2/employee-times/{timeId}Recupera els detalls d'un registre de temps específic d'un empleat.
Paràmetres
Paràmetres de ruta
timeId
stringobligatoriID del registre de temps (ObjectId hexadecimal de 24 caràcters)
Petició
python
import requests
url = "https://api.holded.com/api/v2/employee-times/{timeId}"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respostes
Resposta
json
{
"id": "507f1f77bcf86cd799439011",
"employee_id": "507f1f77bcf86cd799439012",
"employee_name": "string",
"date": "2024-01-15T10:30:00Z",
"start_at": "2024-01-15T10:30:00Z",
"end_at": "2024-01-15T10:30:00Z",
"duration": 0,
"status": "string",
"approved": false,
"approved_by": "string",
"approved_at": "2024-01-15T10:30:00Z"
}Respostes exitoses
200Registre de temps d'empleat trobatapplication/jsonobject
idstringrequired
Unique identifier
employee_idstringrequired
Employee ID
employee_namestring | nullrequired
Employee display name
datestring<date-time> | nullrequired
Date of the time entry in ISO 8601
start_atstring<date-time>required
Start time in ISO 8601
end_atstring<date-time> | nullrequired
End time in ISO 8601
durationintegerrequired
Duration in seconds
statusstringrequired
Tracker status (running, done)
approvedbooleanrequired
Whether the entry is approved
approved_bystring | nullrequired
User ID who approved
approved_atstring<date-time> | nullrequired
Approval date in ISO 8601
Respostes d'error
401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json404Registre de temps no trobatapplication/json429Límit de sol·licituds exceditapplication/json