A leave is a period an employee takes off work while he should otherwise be working. Employees are entitled to these either by law or by contract.
A leave references a leave-account which represents the type of leave: annual leaves, maternity, sick leave, etc... The leave-account determines:
null.The leave status indicates whether the leave resource should be considered valid (i.e. the company management gave its approval) or not.
A leave may be subject to an approval process by the management. In this case, it must be created with the "pending" status (an "approved" leave needs no further approval) which then automatically creates a leave-request for this leave.
If a leave is created with an "approved" status, then it has no leave-request, and its status may then be changed directly through a PATCH request. The only available status would then be "cancelled".
An employee may work in the morning, and take the afternoon off, and vice versa. The startPosition and
endPosition attributes represent this behavior. For example, taking the Jan. 2nd afternoon off:
{
"startsOn": "2023-01-02",
"startPosition": "secondHalfDay",
"endsOn": "2023-01-02",
"endPosition": "secondHalfDay"
}Date (only). First day (included) of this employee's leave.
Date (only). Last day (included) of this employee's leave.
Reference to an employee resource.
Reference to a leave-account resource.
{
"id": "754",
"type": "leave-account",
"url": "https://example.ilucca.net/lucca-api/leave-accounts/754"
}Does this leave start on the first half-day (often: "morning") or the second one (often: "afternoon")?
firstHalfDay, secondHalfDay Does this leave end on the first half-day (often: "morning") or the second one (often: "afternoon")?
firstHalfDay, secondHalfDay ISO 8601 formatted time interval. More about this in the documentation. Examples:
{"value": 35, "iso": "P1DT11H", "unit": "hours"}{"value": 5, "iso": "P5D", "unit": "days"}
Depending on the related leave-account, a leave may be taken in hours or in days.
This attribute sums up the duration of the leave on all of the days it covers.
Can only be written on when creating a leave in "hours" unit.{
"iso": "PT35H",
"value": 35,
"unit": "days"
}Depends on the status of this leave's related leave-request.
tentative: the leave is uncertain as it has yet to be confirmed.confirmed: the leave will definitely be taken.cancelled: the leave was finally cancelled, either through the approval workflow or by the employee.tentative, confirmed, cancelled Some leave-accounts required further details about the leave.
This is typically the case for sick leaves in France. In this case, set these details in this object.
Otherwise, you can just leave this null.