Initiate payroll run

Initiate payroll run (verlonen)

Activity name : <a href="https://developer.loket.nl/Activities/PostInitiatePayrollRunByPayrollAdministrationId" target="_blank">PostInitiatePayrollRunByPayrollAdministrationId</a> This is a controller endpoint to perform an action.<br><br>In the older Loket GUI this specific action is referred to as respectively 'Verlonen' / 'Verlonen periode zonder personeel' / 'Verlonen voorgaande jaren' . If this action is performed successfully then the payroll run will be created with status 0 and will be cued for further processing. The further processing depends on the input parameters and the payroll configuration in the given situation. After the initiated run has been picked up and processed by the background process, then the status of the run will be changed accordingly.<br><br>This action may be performed for all payroll periods that are available for the payroll administration AND that meet one of the following requirements;<br><br>If typeOfInitiation = 'regular' (Verlonen);<br>* The very last payroll period for which an approved payroll run (status = 9) is available. Within the active year of payrolling. (This would functionally be a so-called 'correction' run)<br>* The very first payroll period in time that does not yet have an approved payroll run (i.e. last payroll period with approved run + 1). Within the active year of payrolling, if available<br>* The provided year may be a maximum of 7 years in the past (based on current datetime)<br><br>If typeOfInitiation = 'withoutEmploymentData' (Verlonen zonder personeel);<br>* The very first payroll period in time that does not yet have an approved payroll run (i.e. last payroll period with approved run + 1). Within the active year of payrolling<br>* Please note that if this type is selected then the following fields must ALL be set to null; sendEmailToEmployee, textPaySlip, textTariffPaySlip, textPayment, emailAdressPayrollRunStarted, emailFinishedPayrollRun<br><br>If typeOfInitiation = 'previousYear' (Verlonen voorgaande jaren);<br>* The very last payroll period for which an approved payroll run (status = 9) is available. Within the given year of payrolling. (This would functionally be a so-called 'correction' run)<br>* The very first payroll period in time that does not yet have an approved payroll run (i.e. last payroll period with approved run + 1). Within the given year of payrolling, if available<br>* The provided year may be a maximum of 7 years in the past (based on current datetime)<br><br><br>In general;<br>* It is not possible to initiate a new payroll run if there is currently a payroll run with status 0 (to be processed) or 1 (awaiting approval) within the payroll administation.<br><br><br>Metadata : No metadata endpoint available for this controller endpoint.<br><br>Defaults : Defaults endpoint is available for this controller endpoint by adding /defaults. Also, an endpoint is available to retrieve initiation values for a specific period.

post/v2/providers/employers/payrolladministrations/{payrollAdministrationId}/payrollruns/initiate

Request

  • Base URL
    https://api.loket.nl
  • URL
    https://api.loket.nl/v2/providers/employers/payrolladministrations/{payrollAdministrationId}/payrollruns/initiate
  • Auth
    none required

Path parameters

payrollAdministrationIdstring uuid required

The unique identifier of an administration

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)

textPaySlipstring nullable

An optional text provided by an authorized user that will be displayed on the pay slip.

textPaymentstring nullable

An optional text provided by an authorized user that will be displayed as a description for the payment.

requestTimestring date-time

The time at which the payroll run was requested by the user

processingFinishedTimestring date-time nullable

Date-time when the calculations of the wages was finished

approvalTimestring date-time nullable

The time at which the payroll run was approved by the user

sequenceNumberinteger nullable

An incremental number with a payrolling year to uniquely identify a payroll run. Null can be returned for those runs that dont contain "wages".

textTariffPaySlipstring nullable

An additional text to be displayed on the tariff payslip.

availableForEmployeeDatestring date nullable

The date on which the pay slips will be available to employees.

sendEmailToEmployeeboolean nullable

Indicates whether an email should be sent to the employees when the pay slip is available to them. NULL will be seen as false

sequenceNumberApprovedinteger nullable

An incremental number with a payrolling year to uniquely identify an approved payroll run.

removeTimestring date-time nullable

The time at which the pay roll run was removed.

Example request

{
  "id": "b14acd0d-75d7-4fc8-8b22-4a3924585cab",
  "payrollPeriod": {
    "year": 2023,
    "periodNumber": 2
  },
  "payrollRunStatus": {
    "key": 9,
    "value": "Verloning goedgekeurd."
  },
  "requestTime": "2018-05-08T15:16:49+02:00",
  "processingFinishedTime": "2018-05-08T15:16:49+02:00",
  "approvalTime": "2018-05-08T15:16:49+02:00",
  "sequenceNumber": 1,
  "availableForEmployeeDate": "2018-05-08",
  "requestedBy": {
    "id": "b14acd0d-75d7-4fc8-8b22-4a3924585cab",
    "initials": "I",
    "prefix": "de",
    "lastName": "Jong",
    "formattedName": "Jong, I"
  },
  "approvedBy": {
    "id": "b14acd0d-75d7-4fc8-8b22-4a3924585cab",
    "initials": "I",
    "prefix": "de",
    "lastName": "Jong",
    "formattedName": "Jong, I"
  },
  "removeTime": "2018-05-08T15:16:49+02:00",
  "removedBy": {
    "id": "b14acd0d-75d7-4fc8-8b22-4a3924585cab",
    "initials": "I",
    "prefix": "de",
    "lastName": "Jong",
    "formattedName": "Jong, I"
  },
  "methodOfCreation": {
    "key": 2,
    "value": "Individueel"
  },
  "errorsAndWarnings": {
    "hasWarnings": true
  },
  "payrollTaxReturnPeriod": {
    "year": 2023,
    "periodNumber": 2
  },
  "initiationParameters": {
    "emailAddressPayrollRunStarted": "info@loket.nl",
    "emailAddressPayrollRunFinished": "info@loket.nl"
  }
}

Response

Accepted

Example response

{
  "content": {
    "id": "b14acd0d-75d7-4fc8-8b22-4a3924585cab"
  }
}

Changes

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