> ## 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 Leave Types

> Retrieves a paginated list of default and custom leave types for your company. By default, responses are paginated with 20 items per page.



## OpenAPI

````yaml /api-reference/openapi.json get /company/leaves-types
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:
  /company/leaves-types:
    get:
      tags:
        - User Leaves
      summary: Get Leave Types
      description: >-
        Retrieves a paginated list of default and custom leave types for your
        company. By default, responses are paginated with 20 items per page.
      parameters:
        - name: page
          in: query
          schema:
            type:
              - integer
              - boolean
            default: 1
          description: 'Page number (default: 1). Set to `false` to disable pagination.'
        - name: perPage
          in: query
          schema:
            type: integer
            default: 20
          description: 'Number of items per page (default: 20).'
      responses:
        '200':
          description: Paginated list of leave types
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedLeaveTypesResponse'
              example:
                total: 2
                perPage: 20
                page: 1
                lastPage: 1
                data:
                  - id: 111
                    name: Custom leave
                    type_code: CODE
                    company_id: 111
                    created_at: '2024-12-06T13:02:53.000Z'
                    updated_at: '2024-12-06T13:02:53.000Z'
                    deleted_at: null
                    icon_name: icon name
                  - id: 12
                    name: flexday
                    type_code: UL12
                    company_id: null
                    created_at: '2022-09-14T12:09:10.000Z'
                    updated_at: '2024-07-15T17:16:56.000Z'
                    deleted_at: null
                    icon_name: Loveseat
components:
  schemas:
    PaginatedLeaveTypesResponse:
      type: object
      description: Paginated response for leave types list
      properties:
        total:
          type:
            - string
            - integer
          description: Total number of leave types
        perPage:
          type: integer
          description: Number of items per page
        page:
          type: integer
          description: Current page number
        lastPage:
          type: integer
          description: Last available page number
        data:
          type: array
          description: Array of leave types for the current page
          items:
            $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

````