> ## Documentation Index
> Fetch the complete documentation index at: https://developers.lucca.fr/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a leave request by id

> Retrieve a single Leave Request by its unique identifier.



## OpenAPI

````yaml /openapi-specs/timmi-absences-v3.yaml get /api/v3/leaveRequests/{id}
openapi: 3.1.0
info:
  title: Lucca Absences API
  version: '1.0'
  description: Welcome on the documentation for Lucca Absences API.
  contact:
    name: API Support
    url: https://support.lucca.fr
    email: contact@luccasoftware.com
  license:
    name: Unlicensed
    url: https://www.luccasoftware.com
servers:
  - url: https://{host}
    description: Your Lucca account URL.
    variables:
      host:
        default: example.ilucca.net
        description: >-
          The URL of your dedicated Lucca account: `{account}.{env}.{region}`.


          Account reflects your company name. Env indicates the environment.
          Region depends on your server location.


          **Please, use your test or sandbox environments (and not your
          production env.) for testing purposes.**


          Environments:

          - `ilucca`: production environment for customers.

          - `ilucca-test`: test environment for customers.

          - `ilucca-demo`: demo environment for prospects.


          Regions:

          - `.ch` for Swiss located accounts.

          - `.net` for the others.


          Regarding sandboxes, the pattern differs:
          `https://{account}-{sandboxName}.sandbox.{server}.luccasoftware.com`,
          where:

          - `{sandboxName}` is automatically generated upon creation.

          - `{server}` may be "eu1", "eu2" or "ch1".
security: []
tags:
  - name: Leaves
    description: Absences taken on a given day
  - name: Leave Requests
    description: Workflow object for submiting an absence.
  - name: Imports
    description: Absences imports
  - name: SickLeaveCertificates
    description: >-
      Complementary data for certain leave types in order to comply with French
      law.
paths:
  /api/v3/leaveRequests/{id}:
    parameters:
      - $ref: '#/components/parameters/Authorization'
      - schema:
          type: string
        name: id
        description: ID of the leave-request.
        in: path
        required: true
    get:
      tags:
        - Leave Requests
      summary: Get a leave request by id
      description: Retrieve a single Leave Request by its unique identifier.
      operationId: get-leaveRequests-leaveRequestId
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/LeaveRequest'
              examples: {}
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '500':
          description: Internal Server Error
components:
  parameters:
    Authorization:
      name: Authorization
      required: true
      description: 'API key. Value must be formatted like so: `lucca application={api_key}`.'
      in: header
      schema:
        type: string
  schemas:
    LeaveRequest:
      title: The LeaveRequest resource
      type: object
      examples: []
      x-tags:
        - Leave Requests
      properties:
        id:
          type: integer
          description: Unique identifier for the LeaveRequest
        leavePeriodId:
          format: date-time
          type: integer
          description: Unique identifier for the attached LeavePeriod
        leavePeriod:
          $ref: '#/components/schemas/LeavePeriod'
        status:
          type: number
          enum:
            - 0
            - 2
            - 3
            - 4
            - 5
          description: |
            Status of the Leave request. Can be : 

            0 = PENDING_APPROVAL

            2 = APPROVED

            3 = DENIED

            4 = CANCELLED

            5 = CANCELLATION_PENDING
        creationDate:
          type: string
          format: date-time
          description: Time at which the object was created
        nextApproverId:
          type:
            - 'null'
            - integer
          description: Unique identifier for the next approver
        cancellationUserId:
          type:
            - 'null'
            - integer
          description: Unique identifier for the user that cancelled the Leave Request
        cancellationDate:
          type:
            - 'null'
            - string
          format: date-time
          description: Time at which the object was cancelled
        isActive:
          type: boolean
          description: >-
            Has the value `true` for acitve Leave Request or the value `false`
            for cancelled Leave Request
        approvals:
          type: array
          items:
            $ref: '#/components/schemas/LeaveRequestApproval'
        cancellationRequests:
          type: array
          items:
            $ref: '#/components/schemas/CancellationRequest'
    LeavePeriod:
      title: The LeavePeriod resource
      type: object
      examples: []
      x-tags:
        - Leave Requests
      properties:
        id:
          type: number
          description: Unique identifier for the LeavePeriod
        ownerId:
          type: number
          description: 'Unique identifier for the user '
        isConfirmed:
          type: boolean
          description: >-
            Has the value `true` for approved LeavePeriod or the value `false`
            for LeavePeriod pending approval
        confirmationDate:
          type:
            - 'null'
            - string
          format: date-time
          description: Time at which the LeavePeriod was approved
        attachmentId:
          type:
            - 'null'
            - string
          description: Unique identifier for the attached document
        leaves:
          type: array
          items:
            type: object
            description: Leave objects
        logs:
          type: array
          items:
            $ref: '#/components/schemas/LeavePeriodLog'
    LeaveRequestApproval:
      title: The LeaveRequestApproval resource
      type: object
      description: '## Fields'
      examples: []
      x-tags:
        - Leave Requests
      properties:
        id:
          type: integer
          description: Unique identifier for the LeaveRequestApproval
        date:
          type: string
          format: date-time
        approverId:
          type: number
          description: Unique identifier for the approver
        substitutedApproverId:
          type:
            - 'null'
            - number
          enum:
            - 0
            - 2
            - 3
            - 4
            - 5
          description: |
            0 = PENDING_APPROVAL

            2 = APPROVED

            3 = DENIED

            4 = CANCELLED

            5 = CANCELLATION_PENDING
        approved:
          type: boolean
          description: >-
            Has the value `true` for approved LeaveRequest or the value `false`
            for LeaveRequest pending approval
        comment:
          type: string
          description: Comments
    CancellationRequest:
      title: The CancellationRequest resource
      x-tags:
        - Leave Requests
      type: object
      description: '## Fields'
      examples: []
      properties:
        id:
          type: integer
        authorId:
          type: integer
        comment:
          type: string
        rank:
          type: number
          enum:
            - 0
            - 2
            - 3
            - 4
            - 5
          description: |
            0 = PENDING_APPROVAL

            2 = APPROVED

            3 = DENIED

            4 = CANCELLED

            5 = CANCELLATION_PENDING
        approved:
          type: boolean
        creationDate:
          type: string
          format: date-time
        nextApproverId:
          type:
            - 'null'
            - number
        isActive:
          type: boolean
    LeavePeriodLog:
      title: The LeavePeriodLog resource
      type: object
      description: '## Fields'
      properties:
        id:
          type: integer
        date:
          type: string
          format: date-time
        comment:
          type: string
        status:
          type: number
          enum:
            - 0
            - 2
            - 3
            - 4
            - 5
          description: |
            - 0 = PENDING_APPROVAL
            - 2 = APPROVED
            - 3 = DENIED
            - 4 = CANCELLED
            - 5 = CANCELLATION_PENDING

````