get https://{subdomain}.workable.com/spi/v3/timeoff/requests
Returns a collection of your time off requests. Required scope: r_timeoff.
This particular endpoint usesr_timeoffscope, which can be enabled through the Integrations section found within the Settings menu. Account level tokens needemployee_idas 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:
| key | type | description |
|---|---|---|
| id | string | Unique identifier for the time off request |
| from_date | string | Iso date without timezone string |
| to_date | string | Iso date without timezone string |
| formatted_period | string | More convenient way to display the period of the time off request |
| state | string | Available states are: pending, approved, rejected and canceled |
| requesting_total | integer | Total days that will be deducted from the relevant time off category pool |
| timeoff_tracking_unit | string | full_days or half_days |
| half_days | string | The days that were counted as half day requests |
| updated_by | string | The full name of the time off requester |
| updated_at | string | Iso date without timezone string |
half_days
| key | type | description |
|---|---|---|
| date | string | Iso date without timezone string |
| half | string | valid options are first and second half of the day |
