---
title: "List leaves"
method: GET
path: "/api/v3/leaves"
tags: ["Leaves"]
---

# List leaves

`GET /api/v3/leaves`

Retrieve a list of approved leaves for one or several users on a given period.

You MUST filter out results both on a date-range as well as a set of employees through the following query parameters.

In regards to employees filtering, you may:
  - either retrieve Leaves of a set of specific **employees**: `?leavePeriod.ownerId=5,6,7`
  - or retrieve Leaves of employees working in a set of specific **departments**: `?leavePeriod.owner.departmentId=3,4,5`
  - or retrieve Leaves of employees working in a set of specific **establishments**: `?leavePeriod.owner.legalEntityId=1,2,3`

The `date` query parameter can operate comparisons with a given date value:
  - `?date=2021-01-01`: strict equality.
  - `?date=since,2021-01-01`: greater than or equal.
  - `?date=until,2021-01-01`: lower than or equal.
  - `?date=between,2021-01-01,2021-01-31`: comprised between two dates.

## Query parameters

- `paging` string, required
- `leaveAccountId` integer[]
- `date` string, required
- `leavePeriod.ownerId` integer[]
- `leavePeriod.owner.departmentId` integer[]
- `leavePeriod.owner.legalEntityId` integer[]

## Response `200`

OK

- object
  - `data` object
    - `items` Leave[]
      - `id` string, required — Unique identifier for the Leave
      - `date` string, date, 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
      - `leaveAccount` LeaveAccount — **LeaveAccounts** are the type of absences that can be selected by the user ## Fields
        - `id` integer — Unique identifier for the LeaveAccount
        - `name` string — Name of the LeaveAccount
      - `leavePeriodId` integer, required — Unique identifier for the attached LeavePeriod
      - `leavePeriod` LeavePeriod
        - `id` number — Unique identifier for the LeavePeriod
        - `ownerId` number — Unique identifier for the user
        - `isConfirmed` boolean — Has the value `true` for approved LeavePeriod or the value `false` for LeavePeriod pending approval
        - `confirmationDate` string, date-time, nullable — Time at which the LeavePeriod was approved
        - `attachmentId` string, nullable — Unique identifier for the attached document
        - `leaves` object[]
        - `logs` LeavePeriodLog[]
          - `id` integer
          - `date` string, date-time
          - `comment` string
          - `status` 0 | 2 | 3 | 4 | 5 — - 0 = PENDING_APPROVAL - 2 = APPROVED - 3 = DENIED - 4 = CANCELLED - 5 = CANCELLATION_PENDING
      - `value` string, duration, nullable — Leave duration in hours
      - `creationDate` string, date-time — 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, date-time, nullable — Time at which the request was canceled
      - `cancellationUserId` integer, nullable — Unique identifier for the user who canceled the request
      - `comment` string — Comments

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/luccasoftware/apis/lucca-expenses.md) · [All operations](https://skmtc.net/luccasoftware/apis/lucca-expenses/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/luccasoftware/lucca-expenses/revisions/110f9897756c/schema)
