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

# Holidays

> Get the business's defined holidays, with an optional date range filter

## Description

This endpoint returns the business's defined holidays (full-closure days or reduced-hours days). It supports an optional date range filter via the `from` and `to` parameters.

It is read-only and is automatically scoped to the company of the API Key used.

## Authentication header

<ParamField header="X-API-Key" type="string" required>
  Your Mindo API Key. Format: `mindo_xxxxxxxxxxxxxxxxxxxxxxxx`
</ParamField>

## Query parameters

<ParamField query="from" type="string">
  Start date (`YYYY-MM-DD` format, inclusive). Filters holidays with a date greater than or equal to this value.
</ParamField>

<ParamField query="to" type="string">
  End date (`YYYY-MM-DD` format, inclusive). Filters holidays with a date less than or equal to this value.
</ParamField>

## Response

Returns an **array** of holidays.

<ResponseField name="id" type="integer">
  Internal holiday ID.
</ResponseField>

<ResponseField name="company" type="integer">
  Company ID.
</ResponseField>

<ResponseField name="name" type="string">
  Holiday name.
</ResponseField>

<ResponseField name="description" type="string">
  Holiday description.
</ResponseField>

<ResponseField name="date" type="string">
  Holiday date (`YYYY-MM-DD` format).
</ResponseField>

<ResponseField name="branches" type="array">
  IDs of the branches the holiday applies to. Empty means it applies to all branches.
</ResponseField>

<ResponseField name="branchesDetail" type="array">
  Details of the branches the holiday applies to.

  <Expandable title="branchesDetail properties">
    <ResponseField name="id" type="integer">
      Internal branch ID.
    </ResponseField>

    <ResponseField name="company" type="integer">
      Company ID.
    </ResponseField>

    <ResponseField name="name" type="string">
      Branch name.
    </ResponseField>

    <ResponseField name="address" type="string">
      Branch address.
    </ResponseField>

    <ResponseField name="phone" type="string">
      Branch phone.
    </ResponseField>

    <ResponseField name="branchType" type="string">
      Branch type: `PHYSICAL` or `ONLINE`.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      Creation date (ISO 8601).
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      Last update date (ISO 8601).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="attentionTarget" type="string">
  Who the holiday applies to. Possible values: `VIRTUAL_ATTENTION` (virtual service), `BRANCH` (branch), `ALL_BRANCHES` (all branches), `ALL` (everyone).
</ResponseField>

<ResponseField name="hasCustomHours" type="boolean">
  If `true`, the holiday has reduced hours (`startTime`/`finishAt`) instead of a full closure.
</ResponseField>

<ResponseField name="startTime" type="string">
  Start time of the special hours (`HH:MM:SS` format). `null` if there are no special hours.
</ResponseField>

<ResponseField name="finishAt" type="string">
  End time of the special hours (`HH:MM:SS` format). `null` if there are no special hours.
</ResponseField>

<ResponseField name="isActive" type="boolean">
  Whether the holiday is active.
</ResponseField>

<ResponseField name="createdAt" type="string">
  Creation date (ISO 8601).
</ResponseField>

<ResponseField name="updatedAt" type="string">
  Last update date (ISO 8601).
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.mindosoftware.com/api/v1/holidays/?from=2026-01-01&to=2026-12-31" \
    -H "X-API-Key: mindo_xxxxxxxxxxxxxxxxxxxxxxxx"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.mindosoftware.com/api/v1/holidays/",
      headers={"X-API-Key": "mindo_xxxxxxxxxxxxxxxxxxxxxxxx"},
      params={"from": "2026-01-01", "to": "2026-12-31"}
  )

  data = response.json()
  print(data)
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({ from: "2026-01-01", to: "2026-12-31" });
  const response = await fetch(
    `https://api.mindosoftware.com/api/v1/holidays/?${params}`,
    {
      headers: { "X-API-Key": "mindo_xxxxxxxxxxxxxxxxxxxxxxxx" }
    }
  );

  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - OK theme={null}
  [
    {
      "id": 8,
      "company": 12,
      "name": "Año Nuevo",
      "description": "Cerrado todo el día",
      "date": "2026-01-01",
      "branches": [],
      "branchesDetail": [],
      "attentionTarget": "ALL",
      "hasCustomHours": false,
      "startTime": null,
      "finishAt": null,
      "isActive": true,
      "createdAt": "2025-12-10T14:30:00Z",
      "updatedAt": "2025-12-10T14:30:00Z"
    },
    {
      "id": 9,
      "company": 12,
      "name": "Nochebuena",
      "description": "Horario reducido",
      "date": "2026-12-24",
      "branches": [5],
      "branchesDetail": [
        {
          "id": 5,
          "company": 12,
          "name": "Casa Central",
          "address": "Av. Siempre Viva 123, Mar del Plata",
          "phone": "+54 9 223 675-0780",
          "branchType": "PHYSICAL",
          "createdAt": "2025-11-01T10:00:00Z",
          "updatedAt": "2025-11-01T10:00:00Z"
        }
      ],
      "attentionTarget": "BRANCH",
      "hasCustomHours": true,
      "startTime": "09:00:00",
      "finishAt": "13:00:00",
      "isActive": true,
      "createdAt": "2025-12-10T14:35:00Z",
      "updatedAt": "2025-12-10T14:35:00Z"
    }
  ]
  ```

  ```json 400 - Invalid date format theme={null}
  {
    "error": "Parámetro 'from' con formato de fecha inválido. Use YYYY-MM-DD."
  }
  ```

  ```json 401 - API Key not sent theme={null}
  {
    "error": "Este endpoint requiere autenticacion con API Key (header X-API-Key)"
  }
  ```
</ResponseExample>
