Час та відвідування
Робочий час, відпустки, графіки та свята — логуйте та читайте відвідування програмно.
Робочий час
Endpoints
| GET | /employee-working-hours | Отримує колекцію ресурсів WorkTime. |
| POST | /employee-working-hours | Створює ресурс WorkTime. |
| GET | /employee-working-hours/{id} | Отримує ресурс WorkTime. |
| PATCH | /employee-working-hours/{id} | Оновлює ресурс WorkTime. |
| DELETE | /employee-working-hours/{id} | Видаляє ресурс WorkTime. |
| GET | /work-times | Отримує колекцію ресурсів WorkTime. |
| POST | /work-times | Створює ресурс WorkTime. |
| GET | /work-times/{id} | Отримує ресурс WorkTime. |
| PATCH | /work-times/{id} | Оновлює ресурс WorkTime. |
| DELETE | /work-times/{id} | Видаляє ресурс WorkTime. |
Поля схеми
| Поле | Тип | Опис |
|---|---|---|
| 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. |
Свято
Endpoints
| GET | /holidays | Отримує колекцію ресурсів Holiday. |
| POST | /holidays | Створює ресурс Holiday. |
| GET | /holidays/{id} | Отримує ресурс Holiday. |
| PATCH | /holidays/{id} | Оновлює ресурс Holiday. |
| DELETE | /holidays/{id} | Видаляє ресурс Holiday. |
| GET | /holidays/active | Отримує колекцію ресурсів Holiday. |
Поля схеми
| Поле | Тип | Опис |
|---|---|---|
| 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. |
Графік
Endpoints
| GET | /schedules | Отримує колекцію ресурсів Schedule. |
| POST | /schedules | Створює ресурс Schedule. |
| GET | /schedules/{id} | Отримує ресурс Schedule. |
| PATCH | /schedules/{id} | Оновлює ресурс Schedule. |
| GET | /schedules/plan/{date} | Отримує колекцію ресурсів Schedule. |
Поля схеми
| Поле | Тип | Опис |
|---|---|---|
| name | string | |
| description | stringnull | |
| numberOfDays | integer | |
| regular | boolean | |
| overwriteBankHolidays | boolean | |
| scheduleRanges | array | |
| scheduleEmployees | array |
Офіційне свято
Endpoints
| GET | /bank-holidays | Отримує колекцію ресурсів BankHoliday. |
| POST | /bank-holidays | Створює ресурс BankHoliday. |
| GET | /bank-holidays/{id} | Отримує ресурс BankHoliday. |
| PATCH | /bank-holidays/{id} | Оновлює ресурс BankHoliday. |
| DELETE | /bank-holidays/{id} | Видаляє ресурс BankHoliday. |
| GET | /holiday-days-frees | Отримує колекцію ресурсів BankHoliday. |
| POST | /holiday-days-frees | Створює ресурс BankHoliday. |
| GET | /holiday-days-frees/{id} | Отримує ресурс BankHoliday. |
| PATCH | /holiday-days-frees/{id} | Оновлює ресурс BankHoliday. |
| DELETE | /holiday-days-frees/{id} | Видаляє ресурс BankHoliday. |
Поля схеми
| Поле | Тип | Опис |
|---|---|---|
| date* | string | |
| publicNotes | stringnull | |
| yearFrom | integernull | |
| yearTo | integernull |
Заявка на відпустку
Endpoints
| GET | /holiday-requests | Отримує колекцію ресурсів HolidayRequest. |
| POST | /holiday-requests | Створює ресурс HolidayRequest. |
| GET | /holiday-requests/{id} | Отримує ресурс HolidayRequest. |
| PATCH | /holiday-requests/{id} | Оновлює ресурс HolidayRequest. |
| DELETE | /holiday-requests/{id} | Видаляє ресурс HolidayRequest. |
| POST | /holiday-requests/{id}/approve | Створює ресурс HolidayRequest. |
| POST | /holiday-requests/{id}/reject | Створює ресурс HolidayRequest. |
Поля схеми
| Поле | Тип | Опис |
|---|---|---|
| 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 |
Тип відпустки
Endpoints
| GET | /holiday-types | Отримує колекцію ресурсів HolidayType. |
| POST | /holiday-types | Створює ресурс HolidayType. |
| GET | /holiday-types/{id} | Отримує ресурс HolidayType. |
| PATCH | /holiday-types/{id} | Оновлює ресурс HolidayType. |
Поля схеми
| Поле | Тип | Опис |
|---|---|---|
| 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) |
Ліміт днів відпустки
Endpoints
| GET | /holiday-days-limits | Отримує колекцію ресурсів HolidayDaysLimit. |
| POST | /holiday-days-limits | Створює ресурс HolidayDaysLimit. |
| GET | /holiday-days-limits/{id} | Отримує ресурс HolidayDaysLimit. |
| PATCH | /holiday-days-limits/{id} | Оновлює ресурс HolidayDaysLimit. |
| DELETE | /holiday-days-limits/{id} | Видаляє ресурс HolidayDaysLimit. |
Поля схеми
| Поле | Тип | Опис |
|---|---|---|
| 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) |
Ліміт днів відпустки за замовчуванням
Endpoints
| GET | /holiday-days-limit-defaults | Отримує колекцію ресурсів HolidayDaysLimitDefault. |
| POST | /holiday-days-limit-defaults | Створює ресурс HolidayDaysLimitDefault. |
| GET | /holiday-days-limit-defaults/{id} | Отримує ресурс HolidayDaysLimitDefault. |
| PATCH | /holiday-days-limit-defaults/{id} | Оновлює ресурс HolidayDaysLimitDefault. |
| DELETE | /holiday-days-limit-defaults/{id} | Видаляє ресурс HolidayDaysLimitDefault. |
Поля схеми
| Поле | Тип | Опис |
|---|---|---|
| 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) |
Графік співробітника
Endpoints
| GET | /schedule-employees | Отримує колекцію ресурсів ScheduleEmployee. |
| POST | /schedule-employees | Створює ресурс ScheduleEmployee. |
| GET | /schedule-employees/{id} | Отримує ресурс ScheduleEmployee. |
| PATCH | /schedule-employees/{id} | Оновлює ресурс ScheduleEmployee. |
| DELETE | /schedule-employees/{id} | Видаляє ресурс ScheduleEmployee. |
Поля схеми
| Поле | Тип | Опис |
|---|---|---|
| employee | string (iri-reference) | |
| schedule | string (iri-reference) | |
| dateFrom | string (date-time) | |
| dateTo | string,null (date-time) | |
| type | string | |
| notifiedAt | string,null (date-time) |
Діапазон графіка
Endpoints
| GET | /schedule-ranges | Отримує колекцію ресурсів ScheduleRange. |
| POST | /schedule-ranges | Створює ресурс ScheduleRange. |
| GET | /schedule-ranges/{id} | Отримує ресурс ScheduleRange. |
| PATCH | /schedule-ranges/{id} | Оновлює ресурс ScheduleRange. |
| DELETE | /schedule-ranges/{id} | Видаляє ресурс ScheduleRange. |
Поля схеми
| Поле | Тип | Опис |
|---|---|---|
| id | string | |
| schedule | object | |
| day | integer | |
| timeFrom | integer | |
| timeTo | integer | |
| name | stringnull |
Відрядження
Endpoints
| GET | /delegations | Отримує колекцію ресурсів Delegation. |
| POST | /delegations | Створює ресурс Delegation. |
| GET | /delegations/{id} | Отримує ресурс Delegation. |
| PATCH | /delegations/{id} | Оновлює ресурс Delegation. |
| DELETE | /delegations/{id} | Видаляє ресурс Delegation. |
Поля схеми
| Поле | Тип | Опис |
|---|---|---|
| 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. |