improved
Employee API: added status field
almost 2 years ago by Public API Support
Added the feature to set/update Employee's Status.
We also added the feature to set/update Employee Status using the Public API on the POST
and PATCH
endpoints.
Include the status
in the request body with the value that you wish to set, one of: "active", "onboarding", "leave", "inactive"
.
Notes:
- If the
status
field is not in the request body, the value will not be affected. - If the
status
to be assigned is not recognized, an error response with status 422 will be returned. - In the
POST
method (creation of an Employee),status
is usually determined based on thehire_date
. If you don't supplystatus
, it stays like that. If you supplystatus
, it will override the value determined based on thehire_date
. - In the
PATCH
method (update of an Employee),hire_date
will not cause automatic update of thestatus
field. This is the old behavior and it remains unchanged.
For more details, check the documentation on how to create or update an employee using the Public API.