List leave requests (never a sick request)
curl --request GET \
--url https://api.v3.andteam.com/v1/leave-requests \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.v3.andteam.com/v1/leave-requests"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.v3.andteam.com/v1/leave-requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.v3.andteam.com/v1/leave-requests"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": [
{
"id": "<string>",
"employeeId": "<string>",
"companyId": "<string>",
"leaveTypeId": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"partOfDay": "am",
"amount": 123,
"unit": "days",
"status": "awaiting_approval",
"decidedAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"detail": "<string>"
}
],
"fields": [
"<string>"
],
"existingId": "<string>",
"step": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"detail": "<string>"
}
],
"fields": [
"<string>"
],
"existingId": "<string>",
"step": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"detail": "<string>"
}
],
"fields": [
"<string>"
],
"existingId": "<string>",
"step": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"detail": "<string>"
}
],
"fields": [
"<string>"
],
"existingId": "<string>",
"step": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"detail": "<string>"
}
],
"fields": [
"<string>"
],
"existingId": "<string>",
"step": "<string>"
}Leave
List leave requests (never a sick request)
Needs the Leave field group. Filter by employee_id, status or company_id. Never the note or a decline reason. A sick request is never returned: it reaches receivers only as an approved absence on /time-off.
GET
/
leave-requests
List leave requests (never a sick request)
curl --request GET \
--url https://api.v3.andteam.com/v1/leave-requests \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.v3.andteam.com/v1/leave-requests"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.v3.andteam.com/v1/leave-requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.v3.andteam.com/v1/leave-requests"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": [
{
"id": "<string>",
"employeeId": "<string>",
"companyId": "<string>",
"leaveTypeId": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"partOfDay": "am",
"amount": 123,
"unit": "days",
"status": "awaiting_approval",
"decidedAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"detail": "<string>"
}
],
"fields": [
"<string>"
],
"existingId": "<string>",
"step": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"detail": "<string>"
}
],
"fields": [
"<string>"
],
"existingId": "<string>",
"step": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"detail": "<string>"
}
],
"fields": [
"<string>"
],
"existingId": "<string>",
"step": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"detail": "<string>"
}
],
"fields": [
"<string>"
],
"existingId": "<string>",
"step": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"detail": "<string>"
}
],
"fields": [
"<string>"
],
"existingId": "<string>",
"step": "<string>"
}Authorizations
apiKeyoauth
Authorization: Bearer atk_live_… (a sandbox's keys are atk_test_…). Created in the API keys section of the Integrations settings; the secret is shown once.
Query Parameters
Page size, 1 to 500. Default 100.
Required range:
1 <= x <= 500The next_cursor of the previous page.
Only records changed after this instant (ISO 8601).
One of the key's companies.
Only this person's requests.
One status.
Available options:
awaiting_approval, approved, declined, withdrawn