GET
Obtenir el contracte actiu d'un empleat
Scope:
team:employees.readhttps://api.holded.com/api/v2/employees/{employeeId}/contractReturns all fields of the employee's active contract. Use this as the first step before updating a contract field: fetch the current data here, then send ALL fields back to the PUT endpoint modifying only what you want to change. Field names in this response match exactly the field names expected by the PUT endpoint.
Paràmetres
Paràmetres de ruta
employeeId
stringobligatoriID de l'empleat (ObjectId hexadecimal de 24 caràcters)
Petició
python
import requests
url = "https://api.holded.com/api/v2/employees/{employeeId}/contract"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respostes
Resposta
json
{}Respostes exitoses
200Dades del contracte actiuapplication/jsonobject
Respostes d'error
401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json404Empleat o contracte actiu no trobatapplication/json429Límit de sol·licituds exceditapplication/json