---
title: "Change the status of leave requests"
method: PATCH
path: "/v2/providers/employers/employees/employments/leaverequests"
tags: ["Leave request"]
---

# Change the status of leave requests

`PATCH /v2/providers/employers/employees/employments/leaverequests`

## Request

- Base URL: `https://api.loket.nl`
- URL: `https://api.loket.nl/v2/providers/employers/employees/employments/leaverequests`
- Auth: none required

__Activity name :__ <a href="https://developer.loket.nl/Activities/PatchLeaveRequestsByLeaveRequestIds" target="_blank">PatchLeaveRequestsByLeaveRequestIds</a>

This endpoints changes the status of the list of leave requests provided in the request body to the provided status. The leave requests are processed one by one. The leave requests that had no error's will be commited to the database  while those with an error will be skipped.  If an error occured the service will return a 400 bad request with a message explaining what error occured for what ID (GUID).  The leave requests that where processed successfully will not be returned in te response.

This endpoint can be used by provider, employer and employee users. Provider and employer users are able to accept, reject or reopen leave requests depending on the status of the request. Employee users are only able to revoke a submitted leave request.

## Headers

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

## Request body

- LeaveRequestPatch[]
  - `id` string, uuid, required: The unique identifier (a GUID/UUID)
  - `action` 'accept' | 'reject' | 'reopen' | 'revoke', required: The action to perform on the leave request resulting in a change of `leaveRequestStatus` The following transitions are possible per status * leaveRequestStatus = (1)submitted -> accept, reject or revoke(by employee) * leaveRequestStatus = (9)accepted -> revoke or reopen(by employee) * leaveRequestStatus = (3)rejected -> submitted * leaveRequestStatus = (10) accepted with revoke request -> accept of reject

## Response `200`

OK

- object: a warning indacateds that the given payload is valide, however take notice of the warning this might ifluence behavour.
  - `version` Version
    - `obsoleteDate` string, date, nullable: The date (can be null) on which the `resourceVersion` is no longer supported/available
    - `resourceVersion` string, date: The resource version of the object in the response
  - `messages` object[]
    - `type` string: Indication of the type of message. See [the general documentation for more information](./#section/Response/Messages)
    - `description` string: Describes the message
    - `id` string, uuid, nullable: In some cases when the message may relate to a specific entity, or specific group of entities, this field provides the identifier of that entity
    - `code` integer: Identifying code for the message
    - `properties` string[]: An array that can contain additional information
  - `content` object

## Other responses

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

---

[API](https://skmtc.dev/loket/apis/loket-api.md) - [All operations](https://skmtc.dev/loket/apis/loket-api/llms.txt) - [OpenAPI document](https://skmtc.dev/loket/apis/loket-api/revisions/32170564148f?raw)
