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

# Get User Leaves

> Gets user leaves for specified users with pagination support.



## OpenAPI

````yaml /api-reference/openapi.json get /user/leaves
openapi: 3.1.0
info:
  title: COR API
  description: >-
    The COR API lets you integrate with projectcor.com applications using simple
    HTTP methods, in either XML or JSON formats, making this an ideal API for
    developing integrations with other softwares, external clients or mobile
    applications
  version: 1.0.0
servers:
  - url: https://api.projectcor.com/v1
    description: Production server
security:
  - bearerAuth: []
paths:
  /user/leaves:
    get:
      tags:
        - User Leaves
      summary: Get User Leaves
      description: Gets user leaves for specified users with pagination support.
      parameters:
        - name: usersId
          in: query
          required: true
          schema:
            type: integer
          description: User ID to get leaves for
          example: 8555
        - name: offset
          in: query
          schema:
            type: integer
            default: 1
          description: Pagination offset
          example: 1
        - name: size
          in: query
          schema:
            type: integer
            default: 10
          description: Number of results per page
          example: 10
      responses:
        '200':
          description: List of leaves with their associated leave types
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Leave'
              example:
                - id: 14050
                  user_id: 8555
                  company_id: 2336
                  leave_type_id: 1498
                  start: '2024-10-18T03:00:00.000Z'
                  end: '2024-10-18T03:30:00.000Z'
                  created_at: '2024-10-21 14:19:01'
                  updated_at: '2024-10-21 14:19:23'
                  deleted_at: null
                  all_day: false
                  leaveType:
                    id: 1498
                    name: Custom Leave
                    type_code: UL1498
                    company_id: 2336
                    created_at: '2024-10-21 14:18:36'
                    updated_at: '2024-10-21 14:18:36'
                    deleted_at: null
                    icon_name: Futbol
                - id: 10030
                  user_id: 8555
                  company_id: 2336
                  leave_type_id: 12
                  start: '2024-08-29T13:00:00.000Z'
                  end: '2024-08-29T15:00:00.000Z'
                  created_at: '2024-08-29 13:44:13'
                  updated_at: '2024-08-29 13:44:13'
                  deleted_at: null
                  all_day: false
                  leaveType:
                    id: 12
                    name: flexday
                    type_code: UL12
                    company_id: null
                    created_at: '2022-09-14 12:09:10'
                    updated_at: '2024-07-15 17:16:56'
                    deleted_at: null
                    icon_name: Loveseat
components:
  schemas:
    Leave:
      type: object
      properties:
        id:
          type: integer
        user_id:
          type: integer
        company_id:
          type: integer
        leave_type_id:
          type: integer
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
          nullable: true
        all_day:
          type: boolean
        leaveType:
          $ref: '#/components/schemas/LeaveType'
    LeaveType:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        type_code:
          type: string
        company_id:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
          nullable: true
        icon_name:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````