Breathe HR Holidays API

The Holidays API from Breathe HR — 2 operation(s) for holidays.

OpenAPI Specification

breathe-hr-holidays-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Breathe HR REST Absences Holidays API
  description: Breathe HR is a UK SMB HRIS. The REST API exposes employees, absences, holidays, sicknesses, and account resources as JSON over HTTP. Requests authenticate with an X-API-KEY header containing the per-account token generated under Configure > API Settings.
  version: v1
  contact:
    name: Breathe HR Developer
    url: https://developer.breathehr.com/
servers:
- url: https://api.breathehr.com/v1
  description: Production
- url: https://api.sandbox.breathehr.com/v1
  description: Sandbox
security:
- ApiKeyAuth: []
tags:
- name: Holidays
paths:
  /holidays:
    get:
      summary: List holiday requests
      operationId: listHolidays
      tags:
      - Holidays
      parameters:
      - name: page
        in: query
        schema:
          type: integer
          default: 1
      - name: per_page
        in: query
        schema:
          type: integer
          default: 50
      - name: employee_id
        in: query
        schema:
          type: integer
      responses:
        '200':
          description: Holidays
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Holiday'
    post:
      summary: Create a holiday request
      operationId: createHoliday
      tags:
      - Holidays
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HolidayInput'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Holiday'
  /holidays/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Get a holiday request
      operationId: getHoliday
      tags:
      - Holidays
      responses:
        '200':
          description: Holiday
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Holiday'
    put:
      summary: Update a holiday request
      operationId: updateHoliday
      tags:
      - Holidays
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HolidayInput'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Holiday'
components:
  schemas:
    Holiday:
      type: object
      properties:
        id:
          type: integer
        employee_id:
          type: integer
        start_date:
          type: string
          format: date
        end_date:
          type: string
          format: date
        half_start:
          type: boolean
        half_end:
          type: boolean
        status:
          type: string
          enum:
          - pending
          - authorised
          - declined
          - cancelled
        days:
          type: number
    HolidayInput:
      type: object
      required:
      - employee_id
      - start_date
      - end_date
      properties:
        employee_id:
          type: integer
        start_date:
          type: string
          format: date
        end_date:
          type: string
          format: date
        half_start:
          type: boolean
        half_end:
          type: boolean
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY