The work schedule a team works on one calendar day (ploegenschema). An employee's schedule for a day is their ShiftDeviation of that day if there is one, else their team's shift.
Label in Fledge: Ploegenschema
| URL | https://odata-api.fledge.nl/v2-8/Shifts |
|---|---|
| Key | administration_idday_numberteam_idyear |
| Administration | Rows belong to one administration: always filter on administration_id. |
| Operations | GET listGET onePOSTPATCHDELETE |
| Read licenses | BASISBASISAPP |
| Write licenses | PRODUCTIEFINANCIEELBEHEER |
| Scopes | FLEDGE_PORTAL |
Example requests
A page of rows, with only the fields you need. See Authentication for the token.
curl -G "https://odata-api.fledge.nl/v2-8/Shifts" \
--data-urlencode '$filter=administration_id eq 1' \
--data-urlencode '$select=day_number,team_id,year,date,employee_schedule_header_id' \
--data-urlencode '$top=50' \
-H "Authorization: Bearer $TOKEN"const url = new URL('https://odata-api.fledge.nl/v2-8/Shifts');
url.searchParams.set('$filter', 'administration_id eq 1');
url.searchParams.set('$select', 'day_number,team_id,year,date,employee_schedule_header_id');
url.searchParams.set('$top', '50');
const response = await fetch(url, { headers: { Authorization: `Bearer ${token}` } });
const { value } = await response.json();var url = "https://odata-api.fledge.nl/v2-8/Shifts" + "?" + string.Join("&",
"$filter=" + Uri.EscapeDataString("administration_id eq 1"),
"$select=" + Uri.EscapeDataString("day_number,team_id,year,date,employee_schedule_header_id"),
"$top=" + Uri.EscapeDataString("50"));
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var json = await http.GetStringAsync(url);One row by its key:
GET https://odata-api.fledge.nl/v2-8/Shifts(administration_id=1,day_number={day_number},team_id={team_id},year={year})Fields
| Field | Type | Description |
|---|---|---|
administration_idkey | Int32 | Administratienummer |
team_idkey | Int32 | Ploegnummer |
day_numberkey | Int32 | Dagnummer binnen jaar. The day of the year, counted from 0 (1 January); date is 1 January of year plus day_number days. |
yearkey | Int32 | Jaar (niet boekjaar) The calendar year, not the financial year. |
date | Date | Kalenderdatum The calendar date. |
employee_schedule_header_id | Int32 | Schemanummer The work schedule of that day (EmployeeScheduleHeaders); empty means none. |
Relations
Read a related row or list in the same request with $expand, and give it its own $select; a list also needs a $top.
| Navigation | Entity set | |
|---|---|---|
Administration | Administrations | one |
EmployeeScheduleHeaders | EmployeeScheduleHeaders | one |
Team | Teams | one |