Mark multiple employees as leavers in a single request. Idempotent per employee:
if employment has already ended, that employee appears in failed rather than
causing a 4xx on the whole request.
Emits an Employment webhook with action Ended and initiated_by Partner for
each succeeded id. At most 100 entries per request. Each employee_id must appear
at most once in the request body.
Unexpected per-employee processing errors also appear in failed; retry those ids
idempotently or verify employee status via GET.
Responses
-
Batch leaver request processed.
-
Bad request, the request is malformed or contains invalid data.
-
Unauthorized, the request requires authentication, and the provided credentials are either missing or incorrect.
-
Employer not found, the specified employer_id does not match any existing employer.
curl \
--request POST 'https://payroll-api.getpenfold.dev/v4/employers/{employer_id}/leavers' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '[{"employee_id":"string","exit_date":"2026-06-30"}]'
[
{
"employee_id": "string",
"exit_date": "2026-06-30"
}
]
{
"succeeded": [
"string"
],
"failed": [
{
"employee_id": "string",
"error": "string"
}
]
}
{
"error": "Bad request: invalid data provided.",
"validation_errors": [
{
"field": "email",
"message": "Email address is invalid."
}
]
}
{
"error": "Bad request: invalid data provided."
}
{
"error": "Bad request: invalid data provided."
}