Vacation Tracker Docs
API Reference

REST API

Vacation Tracker REST API reference for programmatic access to company data.

The Vacation Tracker REST API gives you read-only access to your company's data: departments, locations, labels, leave types, leaves, and users.

Base URL

https://api.vacationtracker.io/v1

Authentication

All API requests require an API key passed in the x-api-key header:

curl https://api.vacationtracker.io/v1/departments \
  -H "x-api-key: your-api-key"

To obtain an API key, contact your Vacation Tracker administrator or reach out to dev@vacationtracker.io.

Response format

A successful call returns HTTP 200 with:

{
  "status": "ok",
  "data": [...]
}

The /v1/leaves and /v1/users endpoints may also include a top-level nextToken field. See Pagination below.

Errors

Use the HTTP status code as the source of truth. The body explains what went wrong.

StatusWhenBody
400 Bad RequestA query parameter is missing or invalid (for example, startDate is required but absent).{ "status": "error", "message": "..." }
403 ForbiddenThe x-api-key header is missing, the key is not recognized, or the key is not authorized to access this resource.{ "message": "Forbidden" } for missing/unrecognized keys; { "status": "error", "message": "..." } for authorization failures.
404 Not FoundThe requested path does not exist.{ "message": "..." }
500 Internal Server ErrorAn unexpected server-side error. Safe to retry with exponential backoff.{ "status": "error", "message": "..." }

Two error envelopes exist. Requests rejected before reaching the endpoint (missing/unknown API key, unknown path) return the simpler { "message": "..." } shape. Requests that reach the endpoint return { "status": "error", "message": "..." }. Either way, the HTTP status is non-2xx, so always branch on the status code rather than on status === "error".

Pagination

The /v1/leaves and /v1/users endpoints support pagination via nextToken and limit parameters. If the response includes a nextToken field, pass it as a query parameter in the next request to fetch the next page.

curl "https://api.vacationtracker.io/v1/users?limit=100&nextToken=abc123" \
  -H "x-api-key: your-api-key"

Available endpoints

EndpointDescription
GET /v1/departmentsList all active departments
GET /v1/locationsList all active locations
GET /v1/labelsList all active labels
GET /v1/leave-typesList all leave types
GET /v1/leavesList leaves between two dates
GET /v1/usersList users with optional filters

On this page