Organisation
Departments, workplaces, managers and the calendar that leave is counted with.
On this page
The organisation is what a person is placed in. A period of employment names a department, a workplace and a manager, and the three are read from here.
Departments and workplaces
List departments and list workplaces return the ones of your account. A request that names one that is not on the list is refused with department_not_found or workplace_not_found.
curl
curl "$RDC_BASE_URL/hr/v1/departments?limit=3" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/hr/v1/departments?limit=3`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/hr/v1/departments?limit=3',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/hr/v1/departments?limit=3');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/hr/v1/departments?limit=3");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"items": [
{
"id": "finance",
"uuid": "10faa05c-f5ce-4af1-8b70-60e8dd8d0a09",
"name": "Finance"
},
{
"id": "sales",
"uuid": "f13b928f-52ff-438b-9ca4-afab06ff9d25",
"name": "Sales"
},
{
"id": "hr",
"uuid": "2e032c69-4f13-41a3-9a02-7b164e297a04",
"name": "HR"
}
],
"nextCursor": null
} Managers
A manager is a person of your account. Someone at the top has none, and their leave is decided by the HR lead. A person is never their own manager (same_person). A team is the people who report to the same manager, with the manager; the team hint of a leave request is read from it.
The calendar
Working days are counted from the calendar: Monday to Friday, without the public holidays that fall on a fixed date in the calendar. Get the calendar returns the period the calendar is complete for and the holidays inside it. A leave request with a day outside that period is refused with outside_calendar, because its days could not be counted with certainty.
curl
curl "$RDC_BASE_URL/hr/v1/calendar" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/hr/v1/calendar`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/hr/v1/calendar',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/hr/v1/calendar');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/hr/v1/calendar");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"from": "2026-11-01",
"to": "2026-12-24",
"holidays": [
{
"date": "2026-11-30",
"name": "Saint Andrew"
},
{
"date": "2026-12-01",
"name": "National Day"
}
]
}