> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hr-easy.nlead.ch/llms.txt
> Use this file to discover all available pages before exploring further.

# List the days in a window that cost less than a full vacation day.

> Cantonal and federal public holidays in [from, to]; for a caller who follows the school calendar, the cantonal school-holiday ranges expanded to one entry per day; and any Betriebsferien day the caller's manager approved them to work through. Every entry means the same thing: **the day costs `isHalfDay ? 0.5 : 0` vacation days, and any other working weekday costs 1**. Combined with `EmployeeOverviewDTO.workingWeekdays` that rule reproduces the server-authoritative `LeaveRequestDTO.totalDays` exactly. Note that a plain Betriebsferien day is deliberately absent — it consumes a full vacation day (NLE-928) — and that a school holiday inside a company closure is absent for the same reason.



## OpenAPI

````yaml /api-reference/portal.v1.json get /api/v1/portal/holidays
openapi: 3.0.3
info:
  title: Swiss HR Easy — Employee Portal API
  version: 1.0.0
  description: >-
    Versioned contract for the employee self-service portal endpoints consumed
    by the mobile app. Generated from Zod schemas — do not edit by hand (run
    `npm run gen:openapi`).
servers:
  - url: https://{tenantHost}
    description: >-
      Per-tenant deployment host. Swiss HR Easy is single-tenant, so each
      customer install serves this contract from its own host.
security: []
tags:
  - name: profile
    description: Employee profile overview and entitlements.
  - name: leave
    description: Employee leave balances and requests.
  - name: time
    description: Employee time tracking and weekly summaries.
  - name: sick-leave
    description: Employee sick-leave reports and summaries.
  - name: payslips
    description: Employee payslips and deduction breakdowns.
  - name: compensation
    description: The caller's compensation role, salary band and placement rationale.
  - name: auth
    description: Current-session retrieval and logout for the mobile app.
  - name: holidays
    description: >-
      The days behind the vacation day count that cost less than a full day:
      public holidays, school holidays, and Betriebsferien days the caller was
      approved to work through.
paths:
  /api/v1/portal/holidays:
    get:
      tags:
        - holidays
      summary: List the days in a window that cost less than a full vacation day.
      description: >-
        Cantonal and federal public holidays in [from, to]; for a caller who
        follows the school calendar, the cantonal school-holiday ranges expanded
        to one entry per day; and any Betriebsferien day the caller's manager
        approved them to work through. Every entry means the same thing: **the
        day costs `isHalfDay ? 0.5 : 0` vacation days, and any other working
        weekday costs 1**. Combined with `EmployeeOverviewDTO.workingWeekdays`
        that rule reproduces the server-authoritative
        `LeaveRequestDTO.totalDays` exactly. Note that a plain Betriebsferien
        day is deliberately absent — it consumes a full vacation day (NLE-928) —
        and that a school holiday inside a company closure is absent for the
        same reason.
      operationId: listHolidays
      parameters:
        - name: canton
          in: query
          required: false
          description: >-
            Two-letter canton code. Defaults to the caller's own canton. Federal
            holidays are returned regardless of the canton.
          schema:
            type: string
        - name: from
          in: query
          required: true
          description: First calendar day of the window, inclusive (YYYY-MM-DD).
          schema:
            type: string
        - name: to
          in: query
          required: true
          description: >-
            Last calendar day of the window, inclusive (YYYY-MM-DD). Must be on
            or after `from`, and the window must not span more than 400 days.
          schema:
            type: string
      responses:
        '200':
          description: The holidays in the requested window, ordered by date.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - data
                additionalProperties: false
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/HolidayDTO'
        '400':
          description: The window or canton parameters are invalid.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '401':
          description: The caller is not authenticated.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '403':
          description: The caller's alumni access window has expired.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '404':
          description: No employee record is linked to the caller's account.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
components:
  schemas:
    HolidayDTO:
      type: object
      properties:
        date:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
        name:
          type: string
        type:
          type: string
          enum:
            - public
            - school
            - closure
        isHalfDay:
          type: boolean
      required:
        - date
        - name
        - type
        - isHalfDay
      additionalProperties: false

````