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.
Responses
-
Successfully updated the employee's information
-
Bad request, the request is malformed or contains invalid data.
-
Unauthorized, the request requires authentication, and the provided credentials are either missing or incorrect.
-
Employee or employer not found, the specified employee_id or employer_id does not match any existing records.
PATCH
/employers/{employer_id}/employees/{employee_id}
curl \
--request PATCH 'https://payroll-api.getpenfold.dev/v4/employers/{employer_id}/employees/{employee_id}' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"exit_date":"2023-03-22"}'
Request example
{
"exit_date": "2023-03-22"
}
Response examples (400)
{
"error": "Bad request: invalid data provided.",
"validation_errors": [
{
"field": "email",
"message": "Email address is invalid."
}
]
}
Response examples (401)
{
"error": "Bad request: invalid data provided."
}
Response examples (404)
{
"error": "Bad request: invalid data provided."
}