# Mark multiple employees as leavers in a single request **POST /employers/{employer_id}/leavers** 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. ## Servers - https://payroll-api.getpenfold.dev/v4: https://payroll-api.getpenfold.dev/v4 () ## Authentication methods - O auth2 client credentials ## Parameters ### Path parameters - **employer_id** (string) ### Body: application/json (array[object]) - **employee_id** (string) Employee to mark as a leaver. - **exit_date** (string(date)) Employment end date for this employee (YYYY-MM-DD). ## Responses ### 200 Batch leaver request processed. #### Body: application/json (object) - **succeeded** (array[string]) Employee ids successfully marked as leavers. - **failed** (array[object]) Employees that could not be processed. The overall request still returns 200. ### 400 Bad request, the request is malformed or contains invalid data. #### Body: application/json (object) - **error** (string) A descriptive error message. - **validation_errors** (array[object]) ### 401 Unauthorized, the request requires authentication, and the provided credentials are either missing or incorrect. #### Body: application/json (object) - **error** (string) A descriptive error message. ### 404 Employer not found, the specified employer_id does not match any existing employer. #### Body: application/json (object) - **error** (string) A descriptive error message. [Powered by Bump.sh](https://bump.sh)