> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.crehana.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.crehana.com/_mcp/server.

# List Time Off Requests

GET https://www.crehana.com/api/v5/rest/org/{organization_slug}/timeoff/requests/

Returns the time off requests of the organization — vacations, leaves and permissions — paginated and filterable. Each item includes the dates, amount, status and comment of the request, the requesting user (with their position) and the policy it belongs to. The full configuration of each policy is available in the policies endpoint.

Reference: https://developer.crehana.com/api-reference/endpoints/time-off/get-timeoff-requests

## Authentication

- `Api-Key` header (required) — API key of the organization. Always sent together with the `Secret-Access` header.

## Servers

- `https://www.crehana.com` (Production, default)
- `https://qa.creha.co` (QA)

## Request

### Path parameters

- `organization_slug` (string, required)

### Query parameters

- `keyword` (string, optional) — Free-text search across the requests.
- `status` (list of enum, optional) — Filter by request status. Repeat the parameter to pass several values.
  - Allowed values: `APPROVED`, `DENIED`, `IN_PROGRESS`
- `policy_ids` (list of string, optional) — Filter by time off policy id. Repeat the parameter to pass several ids.
- `policy_type_ids` (list of string, optional) — Filter by policy type id. Repeat the parameter to pass several ids.
- `centralized_user_ids` (list of string, optional) — Filter by user id (centralized user id). Repeat the parameter to pass several ids.
- `email` (string, optional) — Filter by the email of the requesting user. Exact match, case insensitive.
- `date_from` (date, optional) — Start of the date range (inclusive). Format: YYYY-MM-DD.
- `date_to` (date, optional) — End of the date range (inclusive). Format: YYYY-MM-DD.
- `specific_date` (date, optional) — Return requests active on this exact date. Format: YYYY-MM-DD.
- `order_by` (enum, optional) — Sort order for the results.
  - Allowed values: `ORDER_BY_AZ`, `ORDER_BY_ZA`, `ORDER_BY_CREATED_AT`, `ORDER_BY_START_DATE_ASC`, `ORDER_BY_START_DATE_DESC`, `ORDER_BY_END_DATE_ASC`, `ORDER_BY_END_DATE_DESC`
- `limit` (integer, optional) — Results per page (1-50).
- `offset` (integer, optional) — Number of results to skip (zero-based).

## Response

### 200

Time off requests page

- `results` (list of TimeoffRequestListItem, required)
- `total` (integer, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `message` (string, required)
- `errors` (list of string, required)
- `datetime` (string, optional)

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### TimeoffRequestListItem

A time off request of the organization, with its user and policy.

- `id` (string, required)
- `start_date` (string, optional)
- `end_date` (string, optional)
- `value` (double, optional)
- `status` (string, optional)
- `comment` (string, optional)
- `user` (TimeoffRequestListUser, optional) — Requesting user, as the listing reports it.
- `policy` (TimeoffRequestListPolicy, optional) — Policy the request belongs to; the full policy lives in ``GET /policies/``.

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### TimeoffRequestListUser

Requesting user, as the listing reports it.

- `user_id` (string, optional)
- `firstname` (string, optional)
- `lastname` (string, optional)
- `email` (string, optional)
- `username` (string, optional)
- `position` (TimeoffRequestListPosition, optional) — Job position of the requesting user.

### TimeoffRequestListPolicy

Policy the request belongs to; the full policy lives in ``GET /policies/``.

- `policy_id` (string, optional)
- `name` (string, optional)
- `is_active` (boolean, optional)

### ValidationErrorLocItems

### TimeoffRequestListPosition

Job position of the requesting user.

- `position_id` (integer, optional)
- `position_name` (string, optional)

## Examples

**Response**

```json
{
  "results": [
    {
      "id": "string",
      "start_date": "string",
      "end_date": "string",
      "value": 1.1,
      "status": "string",
      "comment": "string",
      "user": {
        "user_id": "string",
        "firstname": "string",
        "lastname": "string",
        "email": "string",
        "username": "string",
        "position": {
          "position_id": 1,
          "position_name": "string"
        }
      },
      "policy": {
        "policy_id": "string",
        "name": "string",
        "is_active": true
      }
    }
  ],
  "total": 1
}
```

**SDK Code**

```python
import requests

url = "https://www.crehana.com/api/v5/rest/org/organization_slug/timeoff/requests/"

headers = {
    "Secret-Access": "Secret-Access",
    "Api-Key": "<apiKey>"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://www.crehana.com/api/v5/rest/org/organization_slug/timeoff/requests/';
const options = {
  method: 'GET',
  headers: {'Secret-Access': 'Secret-Access', 'Api-Key': '<apiKey>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://www.crehana.com/api/v5/rest/org/organization_slug/timeoff/requests/"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Secret-Access", "Secret-Access")
	req.Header.Add("Api-Key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://www.crehana.com/api/v5/rest/org/organization_slug/timeoff/requests/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Secret-Access"] = 'Secret-Access'
request["Api-Key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://www.crehana.com/api/v5/rest/org/organization_slug/timeoff/requests/")
  .header("Secret-Access", "Secret-Access")
  .header("Api-Key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://www.crehana.com/api/v5/rest/org/organization_slug/timeoff/requests/', [
  'headers' => [
    'Api-Key' => '<apiKey>',
    'Secret-Access' => 'Secret-Access',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://www.crehana.com/api/v5/rest/org/organization_slug/timeoff/requests/");
var request = new RestRequest(Method.GET);
request.AddHeader("Secret-Access", "Secret-Access");
request.AddHeader("Api-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Secret-Access": "Secret-Access",
  "Api-Key": "<apiKey>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://www.crehana.com/api/v5/rest/org/organization_slug/timeoff/requests/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```