Update an employee's information. This can be used to mark them as a leaver. Note that once marked as a leaver the employee record will no longer be accessible under the employer.
PATCH
/employers/{employerId}/employees/{employeeId}
curl \
--request PATCH 'https://partner-api.getpenfold.dev/v4/employers/{employerId}/employees/{employeeId}' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"exitDate":"2023-12-31"}'
Request example
{
"exitDate": "2023-12-31"
}
Response examples (400)
{
"error": "validation failed",
"validationErrors": [
{
"field": "exitDate",
"message": "must be a valid date in YYYY-MM-DD format"
}
]
}
Response examples (401)
{
"error": "unauthorized"
}
Response examples (404)
{
"error": "not found"
}
Response examples (500)
{
"error": "internal server error"
}