Time & attendance
Work time, leave, schedules and holidays — log and read attendance programmatically.
Work Time
Endpoints
| 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) | Optional link to a {@see ProjectTask}. Nullable; existing rows have no link. Set by the Surface 1 picker chip and by Surface 2's close-and-log panel. The validator {@see \App\Validator\WorkTime\WorkTimeProjectTaskConsistencyConstraint} enforces that projectTask.project === workTime.project when this FK is set. On ProjectTask deletion the column is SET NULL — the time logged is preserved, the link is forgotten. |
| 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
| 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 | #4548. `Holiday` is writable directly (`holiday:create`), so it carries the same unbounded-free-text defect the request did. `max` tracks `length`. |
| 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? (#4705) |
| payrollEligible | boolean | May payroll act on this absence? (#4017) |
| 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
| 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
| 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
| 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 | Same defect, same processor, same flush (#4548). `type` is writable in the `holiday_request:create` group and nothing bounded it, so a 65-character value produced the identical SQLSTATE[22001]. Sentry only caught `description` because that is the one a user types freely. |
| description | stringnull | THE LENGTH IS THE COLUMN WIDTH, NOT A TASTE (#4548). Without it an over-long note travelled to MySQL and came back as `SQLSTATE[22001] … Data too long for column 'description'` — a fatal 500 from `HolidayRequestCreateProcessor:118`'s flush(), losing the request and telling the user nothing (Sentry PHP-SYMFONY-T7, prod). |
| 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
| 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 | THE API HAS TO ACCEPT ITS OWN OUTPUT (#4407). |
| 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? (#5068) |
Holiday Days Limit
Endpoints
| 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 (#3763). |
| holidayType | string,null (iri-reference) | |
| variant* | string | |
| allowRequestWhenUsed | boolean | NOT SERIALISED, AND THAT IS THE FIX (#4361). Do not re-add `#[Groups]`. |
| 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 (#4443). |
| vacationLimit | boolean | Is this row the ANNUAL LEAVE entitlement, as opposed to a granted balance of some other type (#4165)? |
| relatedEmployee | string,null (iri-reference) |
Holiday Days Limit Default
Endpoints
| 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 (#3763). 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 | NOT SERIALISED (#4361) — see the full reasoning on {@see HolidayDaysLimit::$allowRequestWhenUsed}. Do not re-add `#[Groups]`. |
| dateFrom | string (date-time) | |
| createdAt | string (date-time) | |
| updatedAt | string (date-time) |
Schedule Employee
Endpoints
| 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
| 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
| 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. |