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.

id
string
required

Unique identifier for the Leave

date
string
required

Date of the leave in ISO format yyyy-mm-dd

isAm
boolean
required

Has the value true for morning or the value false for afternoon

leaveAccountId
integer
required

Unique identifier for the attached LeaveAccount

leavePeriodId
integer
required

Unique identifier for the attached LeavePeriod

leaveAccount
object

LeaveAccounts are the type of absences that can be selected by the user

Fields

leavePeriod
object
value
string | null

Leave duration in hours

creationDate
string

Time at which the object was created

isActive
boolean

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).

cancellationDate
string | null

Time at which the request was canceled

cancellationUserId
integer | null

Unique identifier for the user who canceled the request

comment
string

Comments