---
title: "Create a leave record for an employment"
method: POST
path: "/v2/providers/employers/employees/employments/{employmentId}/leave"
tags: ["Leave"]
---

# Create a leave record for an employment

`POST /v2/providers/employers/employees/employments/{employmentId}/leave`

## Request

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

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

Add a Leave record for an employment

## Path parameters

- `employmentId` string, uuid, required

## Headers

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

## Request body

- Leave
  - `id` string, uuid: The unique identifier of an object (GUID/UUID)
  - `numberOfUnits` number, double: The number of leave units requested
  - `unitType` object, 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` object: 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: The key for the leave type.
    - `value` string: The description for the leave type. Note that leave types can be overridden at the employer level. In these cases the description at the employer level takes precedence over the default description of the leave type.
    - `balanceExceedsYear` boolean: Indicates whether the balance at the end of the year for this leave type carries over to the next year.
  - `origin` object
    - `leavePolicy` object, nullable: The leave policy for which the record was created. Will only have a value if `meansOfCreation` indicates a leave policy `leavePolicy` is a metadata field within the employer context. Possible values can be managed by the user.
      - `id` string, uuid: The unique identifier (a GUID/UUID)
      - `value` string: The description of the leave regulation.
      - `leaveUnitType` object: The type of leave units either days or hours
        - `key` integer: The key for the leave unit Type.
        - `value` string: The description for the leave unit type
      - `accrualType` object: Indicates how leave is accrued (yearly, monthly or hourly)
        - `key` integer: The key for the `accrualType`
        - `value` string: The description for the `accrualType`
    - `meansOfCreation` object: The means of creation of the record
      - `key` integer: The key for the means of creation
      - `value` string: The description for the leave unit type
  - `comment` string, nullable
  - `relatedLeaveRequest` object, nullable: Incase that the leave record is the result of the approval of a leave request this value will be set to the ID of that leave request.
    - `id` string, uuid: The unique identifier (a GUID/UUID)
  - `relatedLeave` object, nullable: Incase two leave records are linked to a single leave request the ID of the linked leave record is returned in this field. This is done because when deleting a leave record linked to a leave request the other leave record linked to that leave request is also deleted The only functional scenario when this may occur is when a leave request is entered for leaveType 16 (Verlof). Depending on the leave balances, this might result in both a leave booking for Verlof (wettelijk) and Verlof (botenwettelijk).
    - `id` string, uuid: The unique identifier (a GUID/UUID)

## Response `201`

Created

- 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` Leave
    - `id` string, uuid: The unique identifier of an object (GUID/UUID)
    - `numberOfUnits` number, double: The number of leave units requested
    - `unitType` object, 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` object: 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: The key for the leave type.
      - `value` string: The description for the leave type. Note that leave types can be overridden at the employer level. In these cases the description at the employer level takes precedence over the default description of the leave type.
      - `balanceExceedsYear` boolean: Indicates whether the balance at the end of the year for this leave type carries over to the next year.
    - `origin` object
      - `leavePolicy` object, nullable: The leave policy for which the record was created. Will only have a value if `meansOfCreation` indicates a leave policy `leavePolicy` is a metadata field within the employer context. Possible values can be managed by the user.
        - `id` string, uuid: The unique identifier (a GUID/UUID)
        - `value` string: The description of the leave regulation.
        - `leaveUnitType` object: The type of leave units either days or hours
          - `key` integer: The key for the leave unit Type.
          - `value` string: The description for the leave unit type
        - `accrualType` object: Indicates how leave is accrued (yearly, monthly or hourly)
          - `key` integer: The key for the `accrualType`
          - `value` string: The description for the `accrualType`
      - `meansOfCreation` object: The means of creation of the record
        - `key` integer: The key for the means of creation
        - `value` string: The description for the leave unit type
    - `comment` string, nullable
    - `relatedLeaveRequest` object, nullable: Incase that the leave record is the result of the approval of a leave request this value will be set to the ID of that leave request.
      - `id` string, uuid: The unique identifier (a GUID/UUID)
    - `relatedLeave` object, nullable: Incase two leave records are linked to a single leave request the ID of the linked leave record is returned in this field. This is done because when deleting a leave record linked to a leave request the other leave record linked to that leave request is also deleted The only functional scenario when this may occur is when a leave request is entered for leaveType 16 (Verlof). Depending on the leave balances, this might result in both a leave booking for Verlof (wettelijk) and Verlof (botenwettelijk).
      - `id` string, uuid: The unique identifier (a 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)
