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

# Preview Holidays for a Category

> Preview the upcoming holidays in a given category before creating a subscription, so users can see exactly which dates will be blocked.



## OpenAPI

````yaml GET /holidays/preview
openapi: 3.0.0
info:
  title: Zeeg Public API
  description: >-
    Zeeg public API documentation.


    ## Authentication

    All endpoints require a Bearer token. You can generate an API token from
    [your Zeeg dashboard](https://app.zeeg.me/account/settings/api-access).


    Each token is scoped to specific permissions (e.g. `events:read`,
    `webhooks:write`). Make sure your token has the required scopes for the
    endpoints you want to use.


    ## Recommended Headers

    We recommend including the `Accept: application/json` header in all API
    requests to ensure you receive JSON responses.
  version: 2.0.0
  x-logo:
    url: https://app.zeeg.me/img/logo-dark.2ca83593.svg
    backgroundColor: '#f7f7f9'
    altText: zeeg
  contact:
    name: Zeeg Support
    email: support@zeeg.me
    url: https://zeeg.me/en/contact
  license:
    name: Proprietary
    url: https://zeeg.me/en/legal/terms
  termsOfService: https://zeeg.me/en/legal/terms
servers:
  - url: https://api.zeeg.me/v2
    description: Production
security:
  - bearer: []
tags:
  - name: Scheduled Events
    description: Management of events scheduled via Zeeg
  - name: Scheduling Pages
    description: Scheduling pages information and management
  - name: Availability Schedule
    description: Read and change availability for users
  - name: Webhooks
    description: Webhooks management
  - name: Notes
    description: Notes for scheduled events
  - name: Workspaces & Teams
    description: Workspace users and team member management
  - name: AI Agent
    description: AI Agent integration endpoints
  - name: Payloads
    description: Webhook payload schemas
  - name: CRM - Objects
    description: >-
      Discover the schema of CRM objects (standard and custom) including all
      attribute definitions
  - name: CRM - Companies
    description: Create, read, update, and delete CRM company records
  - name: CRM - People
    description: Create, read, update, and delete CRM person records
paths:
  /holidays/preview:
    get:
      tags:
        - Availability Schedule
      summary: Preview holidays for a category
      description: >-
        Returns the holidays that would block a user's availability if they
        subscribed to a given category.


        Use this before calling `POST /holidays/subscriptions` to show the user
        exactly which dates will be marked unavailable, and to let them pick
        `excludedHolidayKeys`.


        When `year` is omitted, the response contains the next occurrence of
        each holiday across a multi-year window — `nextDate` carries that future
        date and may differ from `date`. When `year` is supplied, only that
        calendar year is returned and `nextDate` is omitted (it would be
        identical to `date`).
      operationId: get-holidays-preview
      parameters:
        - schema:
            type: string
            maxLength: 30
            example: DE
          in: query
          name: categoryKey
          required: true
          description: >-
            Country or region key from `/holidays/categories` (e.g. `DE`,
            `DE-BY`).
        - schema:
            type: integer
            minimum: 2000
            maximum: 2100
            example: 2026
          in: query
          name: year
          description: >-
            Restrict the preview to a single calendar year. Omit for a
            multi-year preview that surfaces each holiday's next occurrence.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - collection
                properties:
                  collection:
                    type: array
                    description: Holidays that fall in the requested category.
                    items:
                      type: object
                      required:
                        - key
                        - name
                        - date
                      properties:
                        key:
                          type: string
                          description: Stable holiday identifier (e.g. `christmas-day`).
                        name:
                          type: string
                        date:
                          type: string
                          format: date
                          description: Holiday date.
                        nextDate:
                          type: string
                          format: date
                          description: >-
                            Next future occurrence of this holiday. Present only
                            on multi-year previews where it differs from `date`.
              examples:
                Multi-year preview for Germany:
                  value:
                    collection:
                      - key: new-year
                        name: New Year's Day
                        date: '2026-01-01'
                        nextDate: '2027-01-01'
                      - key: christmas-day
                        name: Christmas Day
                        date: '2026-12-25'
                        nextDate: '2027-12-25'
                Single-year preview:
                  value:
                    collection:
                      - key: new-year
                        name: New Year's Day
                        date: '2026-01-01'
                      - key: christmas-day
                        name: Christmas Day
                        date: '2026-12-25'
        '401':
          $ref: '#/components/responses/401'
        '404':
          description: Holiday category not found.
          content:
            application/json:
              examples:
                Unknown category:
                  value:
                    success: false
                    status: 404
                    message: Holiday category not found.
        '422':
          description: Validation error.
          content:
            application/json:
              examples:
                Missing categoryKey:
                  value:
                    message: The category key field is required.
                    errors:
                      categoryKey:
                        - The category key field is required.
      security:
        - bearer: []
components:
  responses:
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Unauthenticated.
          examples:
            Unauthenticated:
              value:
                message: Unauthenticated.
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: ''

````