Skip to main content
GET
/
api
/
v1
/
persons
/
{personId}
/
absences
cURL
curl --request GET \
  --url https://api.example.com/api/v1/persons/{personId}/absences
import requests

url = "https://api.example.com/api/v1/persons/{personId}/absences"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/api/v1/persons/{personId}/absences', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/persons/{personId}/absences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://api.example.com/api/v1/persons/{personId}/absences"

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

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/persons/{personId}/absences")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/v1/persons/{personId}/absences")

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

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
[
  {
    "id": "<string>",
    "personId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "startDate": "2023-12-25",
    "endDate": "2023-12-25",
    "amount": 123,
    "key": "<string>"
  }
]
This endpoint only works if your environment has been updated to BDERest version 63.11.20 or higher. If you are unsure of your BDERest version, you can check it in the Platform under Administration > Time & Security > Status.
Our time management system supports absences in a highly flexible manner. Any booking key can be recorded as an absence, provided it is configured accordingly (See Time Booking Keys > presenceEffect). Therefore, there are no fixed types of absence. Furthermore, we are currently unable to distinguish between vacation and sick leave. Both are classified as absences.

Path Parameters

personId
string
required

Query Parameters

from
string<date>

Filter for all absences that start on this day, or that have started but are not ended before this date. Imagine a calendar, this is the first day on which you start collecting all ongoing and newly started absences.

to
string<date>

Filter for all absences starting on or before this date. They may continue afterwards.

modifiedSince
string<date-time>

Only absences that have changed since this date.

Response

200 - application/json

OK

id
string
personId
string<uuid>
startDate
string<date>

First day of this absence.

endDate
string<date>

Last day of this absence.

amount
number<double>

Amount of time this absence takes. Depending on the configuration, this could, for example, exclude all weekends from the calendar days.

key
string