API Reference

/timeoff/requests

Returns a collection of your time off requests. Required scope: r_timeoff.


🚧

This particular endpoint uses r_timeoff scope, which can be enabled through the Integrations section found within the Settings menu. Account level tokens need employee_id as query parameter to work.

Results

Calling the /timeoff/requests endpoint will return a collection of all time off requests between the time frame of from_date and to_date . An example of the response follows:

{
	"requests": [
		{
			"id": "135b",
			"from_date": "2024-04-04T00:00:00.000",
			"to_date": "2024-04-12T00:00:00.000",
			"formatted_period": "04 April 2024 - 12 April 2024",
			"state": "approved",
			"requesting_total": 7,
			"timeoff_tracking_unit": "half_days",
			"half_days": [],
			"updated_by": "Dan Snow",
			"updated_at": "2024-04-04T09:58:08.724Z",
			"category_name": "Paid time off "
		},
		{
			"id": "135c",
			"from_date": "2024-05-02T00:00:00.000",
			"to_date": "2024-05-09T00:00:00.000",
			"formatted_period": "02 May 2024 - 09 May 2024",
			"state": "pending",
			"requesting_total": 4,
			"timeoff_tracking_unit": "full_days",
			"half_days": [],
			"updated_by": "Dan Snow",
			"updated_at": "2024-04-04T09:58:40.252Z",
			"category_name": "Sick leave"
		}
	]
}

Each timeoff request will have the following keys:

keytypedescription
idstringUnique identifier for the time off request
from_datestringIso date without timezone string
to_datestringIso date without timezone string
formatted_periodstringMore convenient way to display the period of the time off request
statestringAvailable states are: pending, approved, rejected and canceled
requesting_totalintegerTotal days that will be deducted from the relevant time off category pool
timeoff_tracking_unitstringfull_days or half_days
half_daysstringThe days that were counted as half day requests
updated_bystringThe full name of the time off requester
updated_atstringIso date without timezone string

half_days

keytypedescription
datestringIso date without timezone string
halfstringvalid options are first and second half of the day
Language
Authorization
Header
URL
Click Try It! to start a request and see the response here!