Absences from work, wether they are planned or not, are described in Lucca using three concepts : LeaveRequests, LeavePeriods and Leaves.
A LeaveRequest represent the request made by employees when planning time off. This resource is used for workflow purposes.
A LeavePeriod is the continuous period of absence requested by the employee or entered by HR. It is linked to a LeaveRequest if workflow applies.
A Leave is the subdivision of a LeavePeriod. There is one Leave per half-day of the LeavePeriod. Each Leave is linked to a LeaveAccount, which represent the type of leave (PTO, Sick Leave, Congés payés, RTT, etc).
There can only be one Leave per half-day. This prevents duplicates.
For Leaves expressed in hours (as opposed to Leaves in days), the duration of the Leave is stored in the value field of the Leave. The previous constraint implies that there can only be one type of Leave per half-day. This issue is solved in the next version of the API.
Has the value true when the Leave exists (for pending or confirmed LeavePeriods), or the value false when it has been deleted (for canceled or denied LeaveRequests).
Has the value true when the Leave exists (for pending or confirmed LeavePeriods), or the value false when it has been deleted (for canceled or denied LeaveRequests).
Has the value true when the Leave exists (for pending or confirmed LeavePeriods), or the value false when it has been deleted (for canceled or denied LeaveRequests).