Time & attendance
Work time, leave, schedules and holidays — log and read attendance programmatically.
Work Time
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /employee-working-hours | Retrieves the collection of WorkTime resources. |
| POST | /employee-working-hours | Creates a WorkTime resource. |
| GET | /employee-working-hours/{id} | Retrieves a WorkTime resource. |
| PATCH | /employee-working-hours/{id} | Updates the WorkTime resource. |
| DELETE | /employee-working-hours/{id} | Removes the WorkTime resource. |
| GET | /work-times | Retrieves the collection of WorkTime resources. |
| POST | /work-times | Creates a WorkTime resource. |
| GET | /work-times/{id} | Retrieves a WorkTime resource. |
| PATCH | /work-times/{id} | Updates the WorkTime resource. |
| DELETE | /work-times/{id} | Removes the WorkTime resource. |
Schema fields
| Field | Type | Description |
|---|---|---|
| id | integer | |
| employee* | string (iri-reference) | |
| project* | string (iri-reference) | |
| date* | string (date-time) | |
| seconds* | integer | |
| description | stringnull | |
| projectTask | string,null (iri-reference) | |
| createdAt | string (date-time) | |
| updatedAt | string (date-time) | |
| deletedAt | string,null (date-time) | |
| deleted | boolean | Check if the entity has been soft deleted. |
Holiday
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /holidays | Retrieves the collection of Holiday resources. |
| POST | /holidays | Creates a Holiday resource. |
| GET | /holidays/{id} | Retrieves a Holiday resource. |
| PATCH | /holidays/{id} | Updates the Holiday resource. |
| DELETE | /holidays/{id} | Removes the Holiday resource. |
| GET | /holidays/active | Retrieves the collection of Holiday resources. |
Schema fields
| Field | Type | Description |
|---|---|---|
| id | integer | |
| type* | string | |
| employee* | string (iri-reference) | |
| manager | string (iri-reference) | |
| description | stringnull | #4548, and it is reachable two ways: written directly through `holiday:create`, and copied from the accepted request by `HolidayRequestDecider:47`. Both columns are VARCHAR(255), so bounding the request at 255 keeps that copy safe — this bounds the direct path. |
| dateFrom* | string (date-time) | |
| dateTo* | string (date-time) | |
| seconds | integernull | |
| requestedSeconds | integernull | |
| notify | boolean | Should this absence tell the employee it was created? |
| payrollEligible | boolean | May payroll act on this absence? |
| holidayRequests | array | |
| createdAt | string (date-time) | |
| updatedAt | string (date-time) | |
| deletedAt | string,null (date-time) | |
| employeeFullname | string | |
| employeeReversedFullname | string | |
| relatedEmployee | string,null (iri-reference) | |
| deleted | boolean | Check if the entity has been soft deleted. |
Schedule
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /schedules | Retrieves the collection of Schedule resources. |
| POST | /schedules | Creates a Schedule resource. |
| GET | /schedules/{id} | Retrieves a Schedule resource. |
| PATCH | /schedules/{id} | Updates the Schedule resource. |
| GET | /schedules/plan/{date} | Retrieves the collection of Schedule resources. |
Schema fields
| Field | Type | Description |
|---|---|---|
| name | string | |
| description | stringnull | |
| numberOfDays | integer | |
| regular | boolean | |
| overwriteBankHolidays | boolean | |
| scheduleRanges | array | |
| scheduleEmployees | array |
Bank Holiday
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /bank-holidays | Retrieves the collection of BankHoliday resources. |
| POST | /bank-holidays | Creates a BankHoliday resource. |
| GET | /bank-holidays/{id} | Retrieves a BankHoliday resource. |
| PATCH | /bank-holidays/{id} | Updates the BankHoliday resource. |
| DELETE | /bank-holidays/{id} | Removes the BankHoliday resource. |
| GET | /holiday-days-frees | Retrieves the collection of BankHoliday resources. |
| POST | /holiday-days-frees | Creates a BankHoliday resource. |
| GET | /holiday-days-frees/{id} | Retrieves a BankHoliday resource. |
| PATCH | /holiday-days-frees/{id} | Updates the BankHoliday resource. |
| DELETE | /holiday-days-frees/{id} | Removes the BankHoliday resource. |
Schema fields
| Field | Type | Description |
|---|---|---|
| date* | string | |
| publicNotes | stringnull | |
| yearFrom | integernull | |
| yearTo | integernull |
Holiday Request
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /holiday-requests | Retrieves the collection of HolidayRequest resources. |
| POST | /holiday-requests | Creates a HolidayRequest resource. |
| GET | /holiday-requests/{id} | Retrieves a HolidayRequest resource. |
| PATCH | /holiday-requests/{id} | Updates the HolidayRequest resource. |
| DELETE | /holiday-requests/{id} | Removes the HolidayRequest resource. |
| POST | /holiday-requests/{id}/approve | Creates a HolidayRequest resource. |
| POST | /holiday-requests/{id}/reject | Creates a HolidayRequest resource. |
Schema fields
| Field | Type | Description |
|---|---|---|
| id | integer | |
| status | string | |
| employee | string (iri-reference) | |
| holiday | string,null (iri-reference) | |
| type* | string | |
| description | stringnull | |
| dateFrom* | string (date-time) | |
| dateTo* | string (date-time) | |
| seconds | integernull | |
| requestedSeconds | integernull | |
| holidayRequestLogs | array | |
| createdAt | string (date-time) | |
| updatedAt | string (date-time) | |
| requestedAt | datetime |
Holiday Type
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /holiday-types | Retrieves the collection of HolidayType resources. |
| POST | /holiday-types | Creates a HolidayType resource. |
| GET | /holiday-types/{id} | Retrieves a HolidayType resource. |
| PATCH | /holiday-types/{id} | Updates the HolidayType resource. |
Schema fields
| Field | Type | Description |
|---|---|---|
| status | string | |
| name* | string | |
| color | string | |
| descriptionRequired | boolean | |
| icon | stringnull | |
| reducesWorkingTime | boolean | Does an absence of this type reduce the month's expected working hours? |
| requiresApproval | boolean | Does an absence of this type have to be approved by somebody? |
Holiday Days Limit
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /holiday-days-limits | Retrieves the collection of HolidayDaysLimit resources. |
| POST | /holiday-days-limits | Creates a HolidayDaysLimit resource. |
| GET | /holiday-days-limits/{id} | Retrieves a HolidayDaysLimit resource. |
| PATCH | /holiday-days-limits/{id} | Updates the HolidayDaysLimit resource. |
| DELETE | /holiday-days-limits/{id} | Removes the HolidayDaysLimit resource. |
Schema fields
| Field | Type | Description |
|---|---|---|
| id | integer | |
| employee* | string (iri-reference) | |
| seconds* | integer | Leave allowance in SECONDS, not whole days. |
| holidayType | string,null (iri-reference) | |
| variant* | string | |
| allowRequestWhenUsed | boolean | |
| dateFrom | string (date-time) | |
| notes | stringnull | |
| createdAt | string (date-time) | |
| updatedAt | string (date-time) | |
| notApplicableReason | stringnull | Why this entitlement will not take effect yet, or NULL if it will. |
| vacationLimit | boolean | Is this row the ANNUAL LEAVE entitlement, as opposed to a granted balance of some other type? |
| relatedEmployee | string,null (iri-reference) |
Holiday Days Limit Default
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /holiday-days-limit-defaults | Retrieves the collection of HolidayDaysLimitDefault resources. |
| POST | /holiday-days-limit-defaults | Creates a HolidayDaysLimitDefault resource. |
| GET | /holiday-days-limit-defaults/{id} | Retrieves a HolidayDaysLimitDefault resource. |
| PATCH | /holiday-days-limit-defaults/{id} | Updates the HolidayDaysLimitDefault resource. |
| DELETE | /holiday-days-limit-defaults/{id} | Removes the HolidayDaysLimitDefault resource. |
Schema fields
| Field | Type | Description |
|---|---|---|
| id | string | |
| holidayType | string (iri-reference) | |
| seconds* | integer | Default leave allowance in SECONDS, not whole days. This entity moves with `HolidayDaysLimit` rather than after it: both are returned through the same line in `HolidaysHelper::getHolidayDaysLimit()`, so leaving one in days would put two units on one code path. |
| variant* | string | |
| allowRequestWhenUsed | boolean | |
| dateFrom | string (date-time) | |
| createdAt | string (date-time) | |
| updatedAt | string (date-time) |
Schedule Employee
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /schedule-employees | Retrieves the collection of ScheduleEmployee resources. |
| POST | /schedule-employees | Creates a ScheduleEmployee resource. |
| GET | /schedule-employees/{id} | Retrieves a ScheduleEmployee resource. |
| PATCH | /schedule-employees/{id} | Updates the ScheduleEmployee resource. |
| DELETE | /schedule-employees/{id} | Removes the ScheduleEmployee resource. |
Schema fields
| Field | Type | Description |
|---|---|---|
| employee | string (iri-reference) | |
| schedule | string (iri-reference) | |
| dateFrom | string (date-time) | |
| dateTo | string,null (date-time) | |
| type | string | |
| notifiedAt | string,null (date-time) |
Schedule Range
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /schedule-ranges | Retrieves the collection of ScheduleRange resources. |
| POST | /schedule-ranges | Creates a ScheduleRange resource. |
| GET | /schedule-ranges/{id} | Retrieves a ScheduleRange resource. |
| PATCH | /schedule-ranges/{id} | Updates the ScheduleRange resource. |
| DELETE | /schedule-ranges/{id} | Removes the ScheduleRange resource. |
Schema fields
| Field | Type | Description |
|---|---|---|
| id | string | |
| schedule | object | |
| day | integer | |
| timeFrom | integer | |
| timeTo | integer | |
| name | stringnull |
Delegation
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /delegations | Retrieves the collection of Delegation resources. |
| POST | /delegations | Creates a Delegation resource. |
| GET | /delegations/{id} | Retrieves a Delegation resource. |
| PATCH | /delegations/{id} | Updates the Delegation resource. |
| DELETE | /delegations/{id} | Removes the Delegation resource. |
Schema fields
| Field | Type | Description |
|---|---|---|
| id | integer | |
| employee* | string (iri-reference) | |
| project | string,null (iri-reference) | Nullable: a historical trip may name no project, and it must still be recorded. |
| projectTask | string,null (iri-reference) | |
| dateFrom* | string (date-time) | |
| dateTo* | string (date-time) | |
| seconds | integernull | Optional: the source history carries days, not hours. |
| description | stringnull | |
| createdAt | string (date-time) | |
| updatedAt | string (date-time) | |
| deletedAt | string,null (date-time) | |
| days | integer | Calendar days covered, INCLUSIVE — a trip that starts and ends on the same day is one day, not zero. This is the unit the travel analytics report, because the source history counts days rather than hours. |
| deleted | boolean | Check if the entity has been soft deleted. |