Workflow employment

Initiate the leave request workflow for an employment

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>

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

Path parameters

employmentIdstring uuid required

The unique identifier of the employment

Headers

Authorizationstring required
Example:Bearer <TOKEN>

A valid Bearer token for authorizing the request.

Acceptstring required
Example:application/json;version=2018-01-01

The accept header is used to influence what type of output is returned and in most cases the version of the output

Request body

idstring uuid

The unique identifier of an object (GUID/UUID)

numberOfUnitsnumber double

The number of leave units requested

isAccrualboolean

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
startDatestring date

The start date of the leave requested

endDatestring date

The end date of the leave requested (last day of the leave)

submittedOnstring date-time

The time the leave request was submitted

handledTimestring date-time nullable

The date and time the leave request was handled

commentEmployeestring nullable

The comment left by the employee

commentHandlerstring nullable

The comment left by the person handling the leave request

currentlyAvailableUnitsnumber double

The number of leave units (of the leaveType for this leave request) available to the employment. This value can be negative.

startedViaWorkflowboolean

Indicates whether the leave request was started via a workflow

Example request

{
  "id": "b14acd0d-75d7-4fc8-8b22-4a3924585cab",
  "numberOfUnits": 8,
  "unitType": {
    "key": 1,
    "value": "Uren"
  },
  "startDate": "2017-11-01",
  "endDate": "2017-11-01",
  "leaveType": {
    "key": 1,
    "value": "Verlof (bovenwettelijk)"
  },
  "leaveRequestStatus": {
    "key": 9,
    "value": "Geaccepteerd"
  },
  "submittedOn": "2018-05-08T15:16:49+02:00",
  "submittedBy": {
    "id": "b14acd0d-75d7-4fc8-8b22-4a3924585cab",
    "employeeNumber": 156,
    "firstName": "Susan",
    "initials": "S.L.",
    "prefix": "van",
    "lastName": "Bergen",
    "prefixPartner": "van de",
    "lastNamePartner": "Wiel",
    "formattedName": "Wiel - van Bergen S.L. van de",
    "dateOfBirth": "1995-05-21",
    "photo": "https://api.loket.nl/v2/v2/providers/employers/employees/{employeeId}/photo/{version}"
  },
  "handledTime": "2018-05-08T15:16:49+02:00",
  "handledBy": {
    "id": "b14acd0d-75d7-4fc8-8b22-4a3924585cab",
    "initials": "ABC",
    "prefix": "de",
    "lastName": "Jong",
    "formattedName": "Jong, I"
  },
  "commentEmployee": "Vakantie naar Spanje",
  "commentHandler": "Fijne vakantie!",
  "currentlyAvailableUnits": 140,
  "startedViaWorkflow": true
}

Response

Accepted

Example response

{
  "version": {
    "resourceVersion": "2018-12-31"
  },
  "messages": [
    {
      "type": "Warning",
      "description": "<some warning>",
      "id": "904d6856-6034-4624-bcbc-886188c115c5",
      "code": 12
    }
  ],
  "content": {
    "id": "b14acd0d-75d7-4fc8-8b22-4a3924585cab"
  }
}

Changes

No recorded changes to this operation across all 6 revisions of this API.