---
title: "Undo payroll run (verwijderen loonrun)"
method: POST
path: "/v2/providers/employers/payrolladministrations/payrollruns/{payrollrunId}/undo"
tags: ["Undo payroll run"]
---

# Undo payroll run (verwijderen loonrun)

`POST /v2/providers/employers/payrolladministrations/payrollruns/{payrollrunId}/undo`

__Activity name :__ <a href="https://developer.loket.nl/Activities/UndoPayrollRunByPayrollRunId" target="_blank">UndoPayrollRunByPayrollRunId</a> This is a controller endpoint to perform an action.<br><br>In the older Loket GUI this specific action is referred to as 'Verwijderen loonrun' If this action is performed successfully then the payroll run will be 'deleted' in the sense that its results will be undone. Please note that situations where an approved payroll run would have to be 'undone' should be generally be avoided. Preferably any mistakes or consistencies should be picked out at an earlier stage in the payroll process.<br><br>This action may only be performed successfully of the following requirements are met;<br><br>* The payroll run is the very last payroll run that has been approved within this payroll administration<br>* It is not possible to undo a  payroll run if there is currently a payroll run with status 0  (to be processed) or 1 (awaiting approval) within the payroll administation.<br>* Additionally, no related (external) information should still be present for the given payroll run. This will be validated by the endpoint.<br><br>__Metadata :__  Possible options for fields of the type 'metadata' can be acquired (GET) by adding `/metadata` to the POST URL.<br><br>__Defaults :__ Defaults GET endpoint is available for this controller endpoint at the path `.../payrolladministrations/{payrollAdministrationId}/payrollruns/undo/defaults`.

## Path parameters

- `payrollrunId` string, uuid, required

## Headers

- `Authorization` string, required
- `Accept` string, required

## Response `201`

Created

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/loket-acc/apis/loket-api.md) · [All operations](https://skmtc.net/loket-acc/apis/loket-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loket-acc/loket-api/revisions/b32a42be97f7/schema)
