A leave-request is the resource that represents the state of the approval process of one or more leave resources. You can only create leave-requests containing a single leave through the Lucca API, but when created through the app, you can expect a 1-N relationship between leave-requests and leaves.

The leave-request status attribute indicates the final result in regards to the approval process.

Approval is the result of the decision-making process of one or more employees. The list of expected decision-makers is determined by the application settings.

Each expected approver makes his/her decision, which results in the creation of a leave- request-decision resource.

id
string
required

Unique identifier of this leave-request.

type
string
required
Allowed value: "leave-request"
url
string<uri>
required
status
enum<string>
default:pending
required

Describes the status of the request in regard to the approval process.

  • pending: Request has not yet been approved by all expected decision-makers.
  • approved: Request has been approved.
  • denied: Request has been denied through a denial decision.
Available options:
pending,
approved,
rejected
leaves
leave-reference · object[]
required

List of leaves this leave-request contains. Usually, a single one.

Minimum length: 1
createdAt
string<date-time-offset>
required

Read-only. UTC timestamp of the moment this object was created.

Examples:

"2023-01-23T12:45:23.1234Z"

lastUpdatedAt
string<date-time>
required

Read-only. UTC timestamp of the moment this object was last updated. Set upon creation, update or deletion of the object.

Examples:

"2023-01-23T12:45:23.1234Z"

employee
object

Reference to an employee resource.

Examples:
{
"id": "416",
"type": "employee",
"url": "https://example.ilucca.net/lucca-api/employees/416"
}
expectedApprover
object | null

Employee who is expected to take a decision regarding this leave-request. Reference to an employee resource.

Examples:
{
"id": "416",
"type": "employee",
"url": "https://example.ilucca.net/lucca-api/employees/416"
}