Tempo e Assiduidade
Horário de trabalho, licenças, escalas e feriados — registre e leia assiduidade programaticamente.
Horário de Trabalho
Endpoints
| GET | /employee-working-hours | Recupera a coleção de recursos WorkTime. |
| POST | /employee-working-hours | Cria um recurso WorkTime. |
| GET | /employee-working-hours/{id} | Recupera um recurso WorkTime. |
| PATCH | /employee-working-hours/{id} | Atualiza o recurso WorkTime. |
| DELETE | /employee-working-hours/{id} | Remove o recurso WorkTime. |
| GET | /work-times | Recupera a coleção de recursos WorkTime. |
| POST | /work-times | Cria um recurso WorkTime. |
| GET | /work-times/{id} | Recupera um recurso WorkTime. |
| PATCH | /work-times/{id} | Atualiza o recurso WorkTime. |
| DELETE | /work-times/{id} | Remove o recurso WorkTime. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| 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. |
Feriado
Endpoints
| GET | /holidays | Recupera a coleção de recursos Holiday. |
| POST | /holidays | Cria um recurso Holiday. |
| GET | /holidays/{id} | Recupera um recurso Holiday. |
| PATCH | /holidays/{id} | Atualiza o recurso Holiday. |
| DELETE | /holidays/{id} | Remove o recurso Holiday. |
| GET | /holidays/active | Recupera a coleção de recursos Holiday. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| 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. |
Escala
Endpoints
| GET | /schedules | Recupera a coleção de recursos Schedule. |
| POST | /schedules | Cria um recurso Schedule. |
| GET | /schedules/{id} | Recupera um recurso Schedule. |
| PATCH | /schedules/{id} | Atualiza o recurso Schedule. |
| GET | /schedules/plan/{date} | Recupera a coleção de recursos Schedule. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| name | string | |
| description | stringnull | |
| numberOfDays | integer | |
| regular | boolean | |
| overwriteBankHolidays | boolean | |
| scheduleRanges | array | |
| scheduleEmployees | array |
Feriado Bancário
Endpoints
| GET | /bank-holidays | Recupera a coleção de recursos BankHoliday. |
| POST | /bank-holidays | Cria um recurso BankHoliday. |
| GET | /bank-holidays/{id} | Recupera um recurso BankHoliday. |
| PATCH | /bank-holidays/{id} | Atualiza o recurso BankHoliday. |
| DELETE | /bank-holidays/{id} | Remove o recurso BankHoliday. |
| GET | /holiday-days-frees | Recupera a coleção de recursos BankHoliday. |
| POST | /holiday-days-frees | Cria um recurso BankHoliday. |
| GET | /holiday-days-frees/{id} | Recupera um recurso BankHoliday. |
| PATCH | /holiday-days-frees/{id} | Atualiza o recurso BankHoliday. |
| DELETE | /holiday-days-frees/{id} | Remove o recurso BankHoliday. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| date* | string | |
| publicNotes | stringnull | |
| yearFrom | integernull | |
| yearTo | integernull |
Pedido de Férias
Endpoints
| GET | /holiday-requests | Recupera a coleção de recursos HolidayRequest. |
| POST | /holiday-requests | Cria um recurso HolidayRequest. |
| GET | /holiday-requests/{id} | Recupera um recurso HolidayRequest. |
| PATCH | /holiday-requests/{id} | Atualiza o recurso HolidayRequest. |
| DELETE | /holiday-requests/{id} | Remove o recurso HolidayRequest. |
| POST | /holiday-requests/{id}/approve | Cria um recurso HolidayRequest. |
| POST | /holiday-requests/{id}/reject | Cria um recurso HolidayRequest. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| 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 |
Tipo de Férias
Endpoints
| GET | /holiday-types | Recupera a coleção de recursos HolidayType. |
| POST | /holiday-types | Cria um recurso HolidayType. |
| GET | /holiday-types/{id} | Recupera um recurso HolidayType. |
| PATCH | /holiday-types/{id} | Atualiza o recurso HolidayType. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| 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) |
Limite de Dias de Férias
Endpoints
| GET | /holiday-days-limits | Recupera a coleção de recursos HolidayDaysLimit. |
| POST | /holiday-days-limits | Cria um recurso HolidayDaysLimit. |
| GET | /holiday-days-limits/{id} | Recupera um recurso HolidayDaysLimit. |
| PATCH | /holiday-days-limits/{id} | Atualiza o recurso HolidayDaysLimit. |
| DELETE | /holiday-days-limits/{id} | Remove o recurso HolidayDaysLimit. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| 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) |
Limite Padrão de Dias de Férias
Endpoints
| GET | /holiday-days-limit-defaults | Recupera a coleção de recursos HolidayDaysLimitDefault. |
| POST | /holiday-days-limit-defaults | Cria um recurso HolidayDaysLimitDefault. |
| GET | /holiday-days-limit-defaults/{id} | Recupera um recurso HolidayDaysLimitDefault. |
| PATCH | /holiday-days-limit-defaults/{id} | Atualiza o recurso HolidayDaysLimitDefault. |
| DELETE | /holiday-days-limit-defaults/{id} | Remove o recurso HolidayDaysLimitDefault. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| 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) |
Colaborador do Horário
Endpoints
| GET | /schedule-employees | Recupera a coleção de recursos ScheduleEmployee. |
| POST | /schedule-employees | Cria um recurso ScheduleEmployee. |
| GET | /schedule-employees/{id} | Recupera um recurso ScheduleEmployee. |
| PATCH | /schedule-employees/{id} | Atualiza o recurso ScheduleEmployee. |
| DELETE | /schedule-employees/{id} | Remove o recurso ScheduleEmployee. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| employee | string (iri-reference) | |
| schedule | string (iri-reference) | |
| dateFrom | string (date-time) | |
| dateTo | string,null (date-time) | |
| type | string | |
| notifiedAt | string,null (date-time) |
Intervalo de Horário
Endpoints
| GET | /schedule-ranges | Recupera a coleção de recursos ScheduleRange. |
| POST | /schedule-ranges | Cria um recurso ScheduleRange. |
| GET | /schedule-ranges/{id} | Recupera um recurso ScheduleRange. |
| PATCH | /schedule-ranges/{id} | Atualiza o recurso ScheduleRange. |
| DELETE | /schedule-ranges/{id} | Remove o recurso ScheduleRange. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| id | string | |
| schedule | object | |
| day | integer | |
| timeFrom | integer | |
| timeTo | integer | |
| name | stringnull |
Deslocação em serviço
Endpoints
| GET | /delegations | Recupera a coleção de recursos Delegation. |
| POST | /delegations | Cria um recurso Delegation. |
| GET | /delegations/{id} | Recupera um recurso Delegation. |
| PATCH | /delegations/{id} | Atualiza o recurso Delegation. |
| DELETE | /delegations/{id} | Remove o recurso Delegation. |
Campos de schema
| Campo | Tipo | Descrição |
|---|---|---|
| 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. |