Join us at Fortnox App Market today!

Salary API to start supporting multiple registrations per day

Salary API attendance/absence -transactions will start supporting multiple registrations per day

In order to enable full support for several Absence and Attendance registrations on the same day a single registration can no longer be identified by EmployeeId, Date, and CauseCode. Instead both Attendance and Absence registrations will use a dedicated Id-field as an identifier.


Implications

The following endpoints are affected:

https://developer.fortnox.se/documentation/resources/attendance-transactions/
https://developer.fortnox.se/documentation/resources/absence-transactions/


Technical Details

All GET requests must accept the new Id-field in the response payload.

The GET requests for a single registration must supply only a single Id path parameter. Supplying EmployeeId, Date, and/or CauseCode will now return a list of matching registrations.

The PUT requests must supply a single Id path parameter. Supplying EmployeeId, Date, and/or CauseCode will cause an error.

The POST requests should not supply the Id field in the JSON payload. The Id will be auto generated by the application and returned in the response.

The new Id field is a string. Newly created ids will be lower case UUIDs stripped of any braces but with dashes, for example a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11. However requests may return id strings in other formats.


Example code:

{
“AbsenceTransaction”: {
“@url”: “string”,
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“EmployeeId”: “string”,
“CauseCode”: “ASK”,
“Date”: “2019-08-24”,
“Extent”: 0,
“Hours”: 0,
“HolidayEntitling”: true,
“CostCenter”: “string”,
“Project”: “string”
}
}

We are planning to release this in Q1 2022.