# An employee's vacation

`GET https://api.fiscalisto.com/v1/employees/{id}/vacations`

The vacation days for each year of service (article 76 of the LFT: 12 the first, two more each year up to 20 and then two more every five), those they took (the vacation days on their stamped receipts, taken from the oldest year they have left), until when to give them (six months after the anniversary, article 81) and when they expire (a year later, article 516). pending_days are those from completed years that haven't expired: the ones the settlement pays.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | The object's id. |
| `as_of` | query |  | The day of the balance (YYYY-MM-DD); today by default, or their last day if they already left. |

## With the TypeScript SDK

```ts
import { Fiscalisto } from "fiscalisto";

// La llave viene de FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const employeeVacations = await fiscalisto.employees.vacations("id");
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

# La llave viene de FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

employee_vacations = fiscalisto.employees.vacations("id")
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$employeeVacations = $fiscalisto->employees->vacations('id');
```

## With the .NET SDK

```csharp
using Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var employeeVacations = await fiscalisto.Employees.VacationsAsync("id");
```

## With the Go SDK

```go
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// La llave viene de FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	employeeVacations, err := client.Employees.Vacations(ctx, "id", nil)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *employeeVacations)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var employeeVacations = fiscalisto.employees().vacations("id");
System.out.println(employeeVacations);
```

## Response 200

OK.

A `EmployeeVacations` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"employee_vacations"` | yes | What kind of object it is («invoice», «customer»…). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `employee` | string | yes | The employee (emp_…). |
| `as_of` | string | yes | The balance date. |
| `pending_days` | number | yes | The days from completed years of service they have left that haven't lapsed: the ones the final settlement pays. |
| `current_year` | object | yes | The current year of service. |
| `current_year.year` | integer | yes | Its number: 1 for the first year of service. (from -9007199254740991 to 9007199254740991) |
| `current_year.completes_on` | string | yes | Their anniversary. |
| `current_year.days` | number | yes | The days they are entitled to when they complete it. |
| `current_year.taken_in_advance` | number | yes | The ones they already took in advance. |
| `current_year.accrued_days` | number | yes | Their proportional part as of the balance date, minus what was taken in advance. |
| `years` | array of object | yes | Each completed year of service, from oldest to newest. |
| `years[].year` | integer | yes | The year of service; 0 is the balance from before Fiscalisto. (from -9007199254740991 to 9007199254740991) |
| `years[].owed_from` | string | yes | The anniversary that completes it. |
| `years[].days` | number | yes | The days they are entitled to (article 76). |
| `years[].taken_days` | number | yes | The ones already taken. |
| `years[].remaining_days` | number | yes | The ones left. |
| `years[].grant_by` | string | yes | The last day to give them (article 81). |
| `years[].prescribes_on` | string | yes | The day they lapse (article 516). |
| `years[].status` | `taken`, `pending`, `late`, `prescribed` | yes | taken, enjoyed; pending, still to enjoy; late, the deadline to give them passed and they haven't lapsed; prescribed, lapsed. |
| `opening` | object or null | yes | The balance from before Fiscalisto, or null. |
| `opening.date` | string | yes | The opening balance date. |
| `opening.pending_days` | number | yes | Those from completed years. |
| `opening.taken_days` | number | yes | Those taken in the current year. |
| `taken` | array of object | yes | The vacation days on their stamped receipts. |
| `taken[].date` | string | yes | The end of the receipt's period. |
| `taken[].days` | number | yes | The vacation days it paid. |

```json
{
  "object": "employee_vacations",
  "livemode": false,
  "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
  "as_of": "2026-11-20",
  "pending_days": 9,
  "current_year": {
    "year": 4,
    "completes_on": "2027-01-10",
    "days": 18,
    "taken_in_advance": 0,
    "accrued_days": 15.53
  },
  "years": [
    {
      "year": 1,
      "owed_from": "2024-01-10",
      "days": 12,
      "taken_days": 12,
      "remaining_days": 0,
      "grant_by": "2024-07-09",
      "prescribes_on": "2025-07-10",
      "status": "taken"
    },
    {
      "year": 2,
      "owed_from": "2025-01-10",
      "days": 14,
      "taken_days": 14,
      "remaining_days": 0,
      "grant_by": "2025-07-09",
      "prescribes_on": "2026-07-10",
      "status": "taken"
    },
    {
      "year": 3,
      "owed_from": "2026-01-10",
      "days": 16,
      "taken_days": 7,
      "remaining_days": 9,
      "grant_by": "2026-07-09",
      "prescribes_on": "2027-07-10",
      "status": "late"
    }
  ],
  "opening": null,
  "taken": [
    {
      "date": "2024-04-15",
      "days": 12
    },
    {
      "date": "2025-04-15",
      "days": 14
    },
    {
      "date": "2026-03-31",
      "days": 7
    }
  ]
}
```

## Errors

- `feature_not_in_plan` (403): Live, this part of the API (inventario, portal de proveedores, pedidos, comprobación de gastos) follows the empresa's plan, as in the app: it comes with Operaciones (added to any paid plan; included in Corporativo). The books (the /v1/accounting routes except DIOT, cross checks, IVA refunds and fixed assets) come with Contabilidad (added to Independiente, Emprendedor or Negocio; included in Despacho and Corporativo): without it, changing the books answers this error, and reading them works only up to the last month it had it. Add either in Ajustes › Plan y pagos; test mode has everything.
- `issuer_archived` (400): The issuer is archived and no longer stamps. Its documents can still be read and canceled.
- `issuer_linked_empresa` (403): That issuer is an empresa of the app connected to your account: through the API it only offers its Portal de proveedores (/v1/portal_suppliers and /v1/supplier_invoices) and, once someone who may pay suppliers and change Configurar pagos turned them on, its supplier payouts (/v1/payouts and /v1/payroll_payouts). It also stops when whoever connected it (or turned its payouts on) no longer has that permission in the empresa: message_es says which. Do everything else in the app.
- `issuer_missing` (404): There is no such issuer in the account (or it belongs to the other mode).
- `issuer_not_allowed` (403): This key can't use that issuer.
- `issuer_required` (400): The account has several issuers and the request doesn't say which: send `issuer` (iss_…).
- `livemode_mismatch` (400): The object belongs to the other mode: an fk_test_ key only sees test data and an fk_live_ key only live data.
- `resource_missing` (404): There's no object with that id (or it belongs to another issuer or the other mode).

Plus those of any call (key, fields, limits): https://fiscalisto.com/en/docs/api/errores.md.
