POST Part-Time Absence

Updated by Victor Jespersen

Api-docs for RC: https://api-rc.quinyx.com/v2/docs (select "schedule" definition)

Api-docs: https://api.quinyx.com/v2/docs (select "schedule" definition)

Base URL can be found on links above for both environments. The remainder of this article should be considered a complement to the above Open API documentation.

Path properties

POST /groups/{groupId}/part-time

Posting part-time absence for domain group

  • groupId - Group id for the Quinyx unit you want to POST data for. Note that if you input a section id, said section's parent id will be applied.
Query parameters
  • overlapAbsences = Optional. This is when there’s an absence already and you should choose what to do with it. Depends on Allow overlapping absences unit setting. Inputting true will Overlap any existing absence (note that true will throw a warning if the above-mentioned setting is set to false). Inputting false will Replace any existing. If omitted, false will be applied. Note that Quinyx supports a maximum of two overlapping absences.
  • ignoreOverridableValidations = Optional. This controls whether, when validations are thrown, the absence is created despite the warnings (true) or not (false). Note that this parameter only applies to overridable warnings - for warnings that aren’t overridable, the same warning will be thrown again (until appropriate action is taken). If omitted, false will be applied.
  • absenceRate = Supports integers with four decimals, from 0,0001 to 99,9999.
  • absenceRateDirection = This parameter looks to the "shiftInThisPeriod" value of the request body (see below).
    • If "FROM_START" is selected, then whichever value is applied for the shiftsInThisPeriod field will apply to the beginning of the shift - the rest of the shift will be kept.
    • If "FROM_END" is selected, then whichever value is applied for the shiftsInThisPeriod field will apply to the end of the shift - the rest of the shift will be kept.
    • If "WHOLE_SHIFT" is selected, then the entire shift will be kept.
  • splitType = Inputting Day vs Shift determines how the absence percentage is applied.
Request body
  • absenceTypeId
  • employeeId
Note that you'll need to use our Mapping API to convert/map any external system's employee ID to their Quinyx one.
  • begin
  • end
  • employeeAttested = Optional value. If the agreement setting auto attest for absences is true, and employeeAttested is omitted, then true will be applied. If said agreement setting is false, and employeeAttested is omitted, then false will be applied.
  • managerAttested = Optional value. If the agreement setting auto attest for absences is true, and managerAttested is omitted, then true will be applied. If said agreement setting is false, and employeeAttested is omitted, then false will be applied.
  • absenceScheduleId = Optional. If omitted, and the absence type used uses a default absence schedule, that absenceScheduleId will be applied.
  • shiftsInThisPeriod = Optional. If omitted, the current value of the “Absence type affects schedule” setting (unassign/delete) of the absence type selected in absenceTypeId will be applied.
  • managerComment

Possible validation errors

Key

Meaning

Overridable

INVALID_ABSENCE_TYPE_OR_ABSENCE_SCHEDULE

This error will be returned at the time of fetching shifts for the request as a result of any of the following reasons: 

  • Not all leave reasons belong to same customer.
  • Not all absence schedules belong to same customer.

No

INACTIVE_EMPLOYEE

You cannot add absence(s) when an employee's employment has ended

No

INVALID_EMPLOYEE

You can't add absence to an employee that doesn't have a role

No

START_MUST_BE_BEFORE_END

Start time of absence needs to be before its end time

No

GROUP_NOT_RESTAURANT_OR_SECTION

You can only create an absence on unit level, so this validation will be returned if you’ve submitted a district id or domain id as opposed to a unit id.

No

ABSENCE_LONGER_THAN_24_MONTH

An absence is not allowed to be longer than 24 months

No

LEAVE_PUNCH_EXISTS

There are unapproved punches in this leave period which will be partly or fully deleted

Yes

PUNCH_APPROVED_AND_NOT_TRANSFERRED_TO_PAYROLL

There are approved punches during this leave period that are not transferred to payroll

No

SALARY_PERIOD_LOCKED

Schedule period is locked

No

SHIFT_ALREADY_TRANSFERRED_TO_PAYROLL

The shift cannot be changed, it has already been transferred to payroll

No

EGENMELDING_FAIL_EGENMELDING_DAYS_USED_UP

All self-certified sick leave days has already been used

No

EGENMELDING_FAIL_AGP_USED_UP

Self-certified sick days can only be utilized within the employer period

No

LEAVEAPP_PRECEEDING_LEAVE_WITHOUT_WORK

No work time has been registered following the preceding absence

No

LEAVEAPP_MAX_TWO_OVERLAPPING_ABSENCE_IN_PERIOD

Quinyx supports no more than two overlapping absences

No

LEAVEAPP_OVERLAPPING_ABSENCE_IN_PERIOD

Overlapping absence in period, absence rejected

No

PUNCH_ALREADY_TRANSFERED_TO_PAYROL

Action could not be performed as data within the selected period has been transferred to payroll

No

LEAVE_SHIFT_ALREADY_TRANSFERRED_TO_PAYROLL

Action could not be performed as data within the selected period has been transferred to payroll

No

LEAVE_MAX_OCCASIONS

Max occasions per absence type

No

LEAVE_MAX_DAYS_IN_PERIOD

Max leave days for the period has been reached

No

LEAVE_MAX_CONSECUTIVE_DAYS

Max consecutive days has been reached

No

LEAVE_MIN_DAYS_BETWEEN

Less than minimum allowed days between absence occasions

No

NO_ROLE_ON_ABSENCE_SCHEDULE_SHIFT

Absence schedule shift is on group on which employee doesn't have a role

No

MISSING_AGREEMENT

You can't add absence to an employee that doesn't have a valid agreement

No

LEAVEAPP_NOT_ATTESTABLE_BY_MANAGER

Absence not attestable by manager

No

LEAVEAPP_NOT_ATTESTABLE_BY_EMPLOYEE

Absence not attestable by employee

No

INVALID_LEAVE_REASON

Absence type id not valid for this domain.

No

INVALID_ABSENCE_SCHEDULE

Absence schedule id not valid for this domain.

No

ACCRUAL_BALANCE_EXCEEDED

This employee’s Time Tracker balance is lower than that needed for the absence you’re attempting to create. This validation being run/returned is subject to configuration.

Note that the validation object contains a field called “Text” which in turn contains the name of the TimeTracker that’s not containing the needed absence balance.

No

Invalid absenceRateDirection and splitType combination

If the “splitType” query parameter is set to Day in combination with the absenceRateDirection field being set to “WHOLE_SHIFT”, this error message will display due to the incompatibility of these values for these two fields.

No


How Did We Do?