Vacation Tracker Docs
API ReferenceLeaves

Get list of leaves between two dates

This API method returns a list of leaves between two dates.

GET
/v1/leaves

Authorization

apiKeyAuth
x-api-key<token>

In: header

Query Parameters

startDate*string

date in YYYY-MM-DD format.

Format2023-02-03
endDate*string

date in YYYY-MM-DD format, cant be before the startDate.

Format2023-03-03
nextToken?string

The nextToken returned by the previous API call.

limit?string

a number of users to return, between 25 and 500, default is 300. If the filters are provided, they'll be applied after the limit. The number of returned users might be less than the provided limit.

status?string

leave request status, by default 'APPROVED'

Value in"APPROVED" | "OPEN" | "DENIED" | "CANCELLED" | "EXPIRED" | "DELETED"
expand?string

expand leave request

Value in"user" | "approver" | "leaveType"

Response Body

application/json

curl -X GET "https://api.vacationtracker.io/v1/leaves?startDate=string&endDate=string"
{
  "status": "ok",
  "nextToken": "next-token",
  "data": [
    {
      "id": "leaveRequest-cfe5d39b-f1f0-45aa-85cd-ce93e637a262",
      "userId": "user-63b17e97-d38b-4586-8498-bb4f5d2e2c14",
      "approverId": "user-63b17e97-d38b-4586-8498-bb4f5d2e2c14",
      "autoApproved": false,
      "durationCalendarDays": 1,
      "durationWorkingDays": 1,
      "startDate": "2022-11-08",
      "endDate": "2022-11-08",
      "isFullDayLeave": true,
      "startHour": 0,
      "endHour": 0,
      "startMinute": 0,
      "endMinute": 0,
      "leaveTypeId": "leaveType-fcc1e5c5-ba93-479d-bd58-8f860ba10615",
      "locationId": "location-79c77ac8-e5bf-479f-9488-648a58379ff1",
      "departmentId": "team-0a21c25e-6925-4a5b-90ee-ecf82096c4f6",
      "status": "APPROVED",
      "createdAt": "2022-11-07T16:29:40.062Z",
      "leaveType": {
        "id": "88681ca1-4a47-4e4d-bc35-ffff86c0f54e",
        "name": "Team B",
        "color": "FF0000",
        "isActive": true
      },
      "user": {
        "id": "user-cfe5d39b-f1f0-45aa-85cd-ce93e637a262",
        "name": "Jomh Chao",
        "email": "johnchao@chaochao.com",
        "isAdmin": false,
        "locationId": "location-79c77ac8-e5bf-479f-9488-648a58379ff1",
        "departmentId": "team-0a21c25e-6925-4a5b-90ee-ecf82096c4f6",
        "labels": [
          "contractor"
        ],
        "status": "ACTIVE",
        "employeeId": "uuid-id",
        "startDate": "2022-11-08",
        "endDate": "2022-11-08",
        "location": {
          "id": "locations-6ca89536-be55-42c5-8e52-c5c4215afb9f",
          "name": "Los Angeles",
          "timezone": "America/Los_Angeles",
          "isDefault": false,
          "createdAt": "2022-08-22T15:00:00.000Z"
        },
        "department": {
          "id": "teams-969f8429-7dc3-48a1-96b1-6049a99dda06",
          "name": "Dev Team",
          "isDefault": false,
          "createdAt": "2022-08-22T15:00:00.000Z"
        },
        "holidays": [
          {
            "year": 2025,
            "holidays": [
              {
                "id": "h-12345",
                "name": "Christmas Day",
                "date": "2025-12-25",
                "isHalfDay": false
              }
            ]
          }
        ]
      },
      "approver": {
        "id": "user-cfe5d39b-f1f0-45aa-85cd-ce93e637a262",
        "name": "Jomh Chao",
        "email": "johnchao@chaochao.com",
        "isAdmin": false,
        "locationId": "location-79c77ac8-e5bf-479f-9488-648a58379ff1",
        "departmentId": "team-0a21c25e-6925-4a5b-90ee-ecf82096c4f6",
        "labels": [
          "contractor"
        ],
        "status": "ACTIVE",
        "employeeId": "uuid-id",
        "startDate": "2022-11-08",
        "endDate": "2022-11-08",
        "location": {
          "id": "locations-6ca89536-be55-42c5-8e52-c5c4215afb9f",
          "name": "Los Angeles",
          "timezone": "America/Los_Angeles",
          "isDefault": false,
          "createdAt": "2022-08-22T15:00:00.000Z"
        },
        "department": {
          "id": "teams-969f8429-7dc3-48a1-96b1-6049a99dda06",
          "name": "Dev Team",
          "isDefault": false,
          "createdAt": "2022-08-22T15:00:00.000Z"
        },
        "holidays": [
          {
            "year": 2025,
            "holidays": [
              {
                "id": "h-12345",
                "name": "Christmas Day",
                "date": "2025-12-25",
                "isHalfDay": false
              }
            ]
          }
        ]
      }
    }
  ]
}
Empty