Saltar al contingut principal
GET

Obtenir el contracte actiu d'un empleat

Scope:team:employees.read
https://api.holded.com/api/v2/employees/{employeeId}/contract

Returns 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

employeeIdstringobligatori

ID 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/json
object

Respostes d'error

401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
404Empleat o contracte actiu no trobatapplication/json
429Límit de sol·licituds exceditapplication/json