Update Employee
PUT services/api/v1/employees/{employee_id}
Updates an existing employee.
Parameters
Parameter | Type | Description |
---|---|---|
employee_id | string | The ID of the employee. |
Request Body
- Example
- Schema
{
"email": "john.doe@privatemail.com",
"company_email": "john.doe@companymail.org",
"first_name": "John",
"last_name": "Doe",
"phone": "+39 1234567890",
"language": "en",
"gender": "male",
"employee_status_id": "1",
"location_id": "123",
"department_id": "321",
"photo_url": "https://www.onboard.org/assets/images/logo/onboard_logo_RGB-340.png",
...
}
Attribute | Type | Required | Description |
---|---|---|---|
id | string | readonly | Encoded employee id. |
created_at | string | readonly | Employee creation date. |
updated_at | string | readonly | Employee last updated at. |
language | string | false | Language of the employee as ISO 639-1 code. By default the language will be set to the preferred language of the business. |
employee_status_id | string | false | Employee status id. |
location_id | string | readonly | Employee location id. |
department_id | string | readonly | Employee department id. |
has_active_employee_job | boolean | readonly | Describes if employee currently has an active employee job at the business. |
has_active_or_future_employee_job | boolean | readonly | Describes if employee currently has an active employee job or will have one in the future. |
first_employee_job_from | timestamp | readonly | The start date of the employees first employee job. |
first_employee_job_to | timestamp | readonly | The end date of the employees first employee job. |
last_employee_job_from | timestamp | readonly | The start date of the employees last employee job (can be in the future). |
last_employee_job_to | timestamp | readonly | The end date of the employees last employee job (can be in the future). |
current_employee_job_from | timestamp | readonly | The start date of the employees current employee job. |
current_employee_job_to | timestamp | readonly | The end date of the employees current job. |
current_or_last_employee_job_from | timestamp | readonly | The start date of the employees current or last employee job (if employee has no active job, but has one in the future, this can be a future date). |
current_or_last_employee_job_to | timestamp | readonly | The end of the employees current or last employee job. |
Note that the fields above are only the fixed fields. All custom fields are provided by the Employee Fields API endpoint.
Response
The updated employee.
- Example
- Schema
{
"id": "7bBJMyz2",
"email": "john.doe@privatemail.com",
"company_email": "john.doe@companymail.org",
"first_name": "John",
"last_name": "Doe",
"phone": "+39 1234567890",
"created_at": "2023-12-31T09:32:31.262Z",
"updated_at": "2024-01-01T11:53:55.662Z",
"language": "en",
"gender": "male",
"employee_status_id": "1",
"location_id": "123",
"department_id": "321",
"photo_url": "https://www.onboard.org/assets/images/logo/onboard_logo_RGB-340.png",
...
}
Attribute | Type | Required | Description |
---|---|---|---|
id | string | readonly | Encoded employee id. |
created_at | string | readonly | Employee creation date. |
updated_at | string | readonly | Employee last updated at. |
language | string | false | Language of the employee as ISO 639-1 code. By default the language will be set to the preferred language of the business. |
employee_status_id | string | false | Employee status id. |
location_id | string | readonly | Employee location id. |
department_id | string | readonly | Employee department id. |
has_active_employee_job | boolean | readonly | Describes if employee currently has an active employee job at the business. |
has_active_or_future_employee_job | boolean | readonly | Describes if employee currently has an active employee job or will have one in the future. |
first_employee_job_from | timestamp | readonly | The start date of the employees first employee job. |
first_employee_job_to | timestamp | readonly | The end date of the employees first employee job. |
last_employee_job_from | timestamp | readonly | The start date of the employees last employee job (can be in the future). |
last_employee_job_to | timestamp | readonly | The end date of the employees last employee job (can be in the future). |
current_employee_job_from | timestamp | readonly | The start date of the employees current employee job. |
current_employee_job_to | timestamp | readonly | The end date of the employees current job. |
current_or_last_employee_job_from | timestamp | readonly | The start date of the employees current or last employee job (if employee has no active job, but has one in the future, this can be a future date). |
current_or_last_employee_job_to | timestamp | readonly | The end of the employees current or last employee job. |
Note that the fields above are only the fixed fields. All custom fields are provided by the Employee Fields API endpoint.
Unprocessable Entitiy.
Example:
{
"email": ["This field is mandatory."],
"birthday": ["This field is invalid."]
}