Saltar al contingut principal
GET

Obtenir un empleat per ID

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

Recupera tots els detalls d'un empleat específic pel seu identificador únic.

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}"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())

Respostes

Resposta

json
{
  "id": "507f1f77bcf86cd799439011",
  "holded_user_id": "string",
  "name": "string",
  "last_name": "string",
  "full_name": "string",
  "date_of_birth": "string",
  "nationality": "string",
  "social_security_number": "string",
  "academic_level": "string",
  "languages": [
    "string"
  ],
  "main_language": "string",
  "code": "string",
  "gender": "string",
  "email": "string",
  "secondary_email": "string",
  "phone": "string",
  "mobile": "string",
  "address": {
    "address": "string",
    "city": "string",
    "postal_code": "string",
    "province": "string",
    "country": "string"
  },
  "team_ids": [
    "string"
  ],
  "workplace_id": "string",
  "iban": "string",
  "notes": "string",
  "current_contract": {
    "id": "string",
    "type": "string",
    "start_date": "2024-01-15",
    "end_date": "2024-01-15",
    "job_title": "string",
    "schedule_hours": 0,
    "schedule_mode": "string",
    "working_days": [
      "string"
    ],
    "salary": "30000.00",
    "salary_interval": "string",
    "salary_payments": 0,
    "salary_extra": [
      {}
    ]
  },
  "reporting_to": "string",
  "time_off_supervisors": [
    "string"
  ],
  "time_off_policy_id": "string",
  "terminated": 0,
  "terminated_type": "string",
  "terminated_reason": "string",
  "fiscal_residence": false,
  "fiscal_address": {
    "id_number": "string",
    "address": "string",
    "city": "string",
    "postal_code": "string",
    "province": "string",
    "country": "string",
    "deadline": "string",
    "city_of_birth": "string",
    "country_of_birth": "string"
  },
  "job_title": "string",
  "tags": [
    "string"
  ],
  "company_phone": "string",
  "custom_fields": [
    {}
  ],
  "payroll_accounts": {
    "es_nomina": {
      "salary": "507f1f77bcf86cd799439012",
      "tax": null,
      "companytax": null,
      "retention": null,
      "result": "507f1f77bcf86cd799439013"
    }
  }
}

Respostes exitoses

200Empleat trobatapplication/json
object
idstringrequired

Unique identifier

holded_user_idstring | nullrequired

Linked Holded user ID

namestringrequired

First name

last_namestringrequired

Last name

full_namestringrequired

Full name (first name + last name). Use this field to search or filter employees by name.

date_of_birthstring | nullrequired

Date of birth

nationalitystringrequired

Nationality code

social_security_numberstringrequired

Social security number

academic_levelstringrequired

Academic level

languages[]string[]required

Languages spoken

main_languagestringrequired

Main language code

codestringrequired

Employee code

genderstringrequired

Gender

emailstringrequired

Primary email

secondary_emailstringrequired

Secondary email

phonestring | nullrequired

Phone number

mobilestring | nullrequired

Mobile number

addressobjectrequired

Employee address

addressstring

Street address

citystring

City

postal_codestring

Postal code

provincestring

Province or state

countrystring

Country code

team_ids[]string[]required

Team IDs

workplace_idstringrequired

Workplace ID

ibanstringrequired

IBAN

notesstringrequired

Notes

current_contractobject | nullrequired

Current employment contract

idstring

Contract ID

typestring

Contract type

start_datestring<date> | null

Start date in ISO 8601 format (YYYY-MM-DD)

end_datestring<date> | null

End date in ISO 8601 format (YYYY-MM-DD)

job_titlestring

Job title

schedule_hoursinteger | null

Schedule hours per week

schedule_modestring

Schedule mode

working_days[]string[]

Working days

salarystring | null

Salary amount as a decimal string

salary_intervalstring

Salary interval (monthly, yearly)

salary_paymentsinteger | null

Number of salary payments per year

salary_extra[]object[]

Extra salary components

reporting_tostring | nullrequired

Reporting-to employee ID

time_off_supervisors[]string[]required

Time-off supervisor IDs

time_off_policy_idstring | nullrequired

Time-off policy ID

terminatedinteger | nullrequired

Termination timestamp

terminated_typestring | nullrequired

Termination type

terminated_reasonstring | nullrequired

Termination reason

fiscal_residenceboolean | nullrequired

Fiscal residence flag

fiscal_addressobjectrequired

Fiscal address for tax purposes

id_numberstring

Tax identification number

addressstring

Street address

citystring

City

postal_codestring

Postal code

provincestring

Province or state

countrystring

Country code

deadlinestring

Deadline

city_of_birthstring

City of birth

country_of_birthstring

Country of birth

job_titlestringrequired

Job title

tags[]string[]required

Tags

company_phonestringrequired

Company phone

custom_fields[]object[]required

Custom fields

payroll_accountsobjectrequired

Per-scheme payroll accounting account IDs, empty when none are configured. Keys are scheme identifiers; each maps line types (salary, tax, companytax, retention, result) to accounting account IDs. The `result` account is the top-level accounting_account_id for a salary record. When populated, takes precedence over the salary-record form data defaults.

Respostes d'error

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