API Reference
REST API
Vacation Tracker REST API reference for programmatic access to company data.
The Vacation Tracker REST API provides read-only access to your company's data, including departments, locations, labels, leave types, leaves, and users.
Base URL
https://api.vacationtracker.io/v1Authentication
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
All endpoints return JSON responses with this structure:
{
"status": "ok",
"data": [...]
}On error:
{
"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
| Endpoint | Description |
|---|---|
GET /v1/departments | List all active departments |
GET /v1/locations | List all active locations |
GET /v1/labels | List all active labels |
GET /v1/leave-types | List all leave types |
GET /v1/leaves | List leaves between two dates |
GET /v1/users | List users with optional filters |