---
title: "Initiate the leave request workflow for an employment"
method: POST
path: "/v2/providers/employers/employees/employments/{employmentId}/workflow/InitiateLeaveRequest"
tags: ["Workflow employment"]
---

# Initiate the leave request workflow for an employment

`POST /v2/providers/employers/employees/employments/{employmentId}/workflow/InitiateLeaveRequest`

## Request

- Base URL: `https://api.loket.nl`
- URL: `https://api.loket.nl/v2/providers/employers/employees/employments/{employmentId}/workflow/InitiateLeaveRequest`
- Auth: none required

__Activity name:__ <a href="https://developer.loket.nl/Activities/PostInitiateLeaveRequestWorkflowByEmploymentId" target="_blank">PostInitiateLeaveRequestWorkflowByEmploymentId</a><br>  <br><br>Allows the user to trigger a workflow to start a leave request for an employment. The workflow may require the change to be approved.<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 :__ none<br>

## Path parameters

- `employmentId` string, uuid, required

## Headers

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

## Request body

- LeaveRequest
  - `id` string, uuid: The unique identifier of an object (GUID/UUID)
  - `numberOfUnits` number, double: The number of leave units requested
  - `unitType` UnitType, nullable: If known indicates what the unit type (hours or days) is for `numberOfUnits`. Otherwise the field will be null.
    - `key` integer: The key for the unit type
    - `value` string: The description for the unit type
  - `isAccrual` boolean: Indicates whether the request is for accrual of leave. - false will result in a reduction of the employee's leave entitlement - true will result in an increase of the employee's leave entitlement
  - `startDate` string, date: The start date of the leave requested
  - `endDate` string, date: The end date of the leave requested (last day of the leave)
  - `leaveType` LeaveType: The type of leave requested by the employee `leaveType` is a metadata field within the employer context. Possible values can be managed by the user.
    - `key` integer
    - `value` string
  - `leaveRequestStatus` LeaveRequestStatus: The current status of the leave request The leave request status is changed by using the PATCH endpoint (not the PUT). The following transitions are possible * 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
    - `key` integer
    - `value` string
  - `submittedOn` string, date-time: The time the leave request was submitted
  - `submittedBy` EmployeeBasic
    - `id` string, uuid: The unique identifier of an object (GUID/UUID)
    - `employeeNumber` integer: The employee number to uniquely identify a employee within a employer.
    - `firstName` string, nullable: The first name of the employee
    - `initials` string: The initials of the employee
    - `prefix` string, nullable: The prefix of the employee
    - `lastName` string: The last name of the employee
    - `prefixPartner` string, nullable: The prefix of the partner of the employee
    - `lastNamePartner` string, nullable: The last name of the partner of the employee
    - `formattedName` string: Formatted name of the employee based on the value of `howToFormatLastName`
    - `dateOfBirth` string, date: The date of birth
    - `photo` string, url, nullable: A photo of the employee to use as a avatar/profile picture. The last part of the returned endpoint is the version of the logo this allows users to cache the image. Changing the value of the version will not influence the output.
  - `handledTime` string, date-time, nullable: The date and time the leave request was handled
  - `handledBy` HandledBy, nullable
    - `id` string, uuid: The unique identifier of an object (GUID/UUID)
    - `initials` string: The initials of the user
    - `prefix` string, nullable: The prefix of the user
    - `lastName` string: The last name of the user
    - `formattedName` string: preformated user name for displaying. <lastname>", "<initials>" "<prefix>
  - `commentEmployee` string, nullable: The comment left by the employee
  - `commentHandler` string, nullable: The comment left by the person handling the leave request
  - `currentlyAvailableUnits` number, double: The number of leave units (of the leaveType for this leave request) available to the employment. This value can be negative.
  - `startedViaWorkflow` boolean: Indicates whether the leave request was started via a workflow

## Response `202`

Accepted

- 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
    - `id` string, uuid: The unique identifier of an object (GUID/UUID)

## 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)
