Reading¶
All the read endpoints are GET. A key acts for an administrator, so it sees
the whole organization, within its permissions. The full list of parameters
and fields is in the Reference.
Conventions¶
- Date range:
startandstop,YYYY-MM-DD, both included, required on the lists of shifts and availabilities. A shift is in the range if it starts in it. At most 366 days: beyond that, 400invalid_range. Dates run from 2000 to 2100: outside, 400invalid_request, with the parameter infields. - Digits: dates, times and ids are written in ASCII digits (
0-9). Other Unicode digits, such as2026, get 400invalid_request. - Id filters: repeat them (
?calendar=1&calendar=2) or separate them with commas (?calendar=1,2). The ids of calendars, shift types, tasks and groups come from/organization/. - Order: fixed, stated for each list. It cannot be changed.
Pagination¶
Lists return 50 rows per page. per_page asks for up to 100, page picks the
page, from 1.
{
"count": 312,
"next": "https://1XXXX.backends.apptome.it/api/v1/shifts/?page=2&start=2026-12-01&stop=2026-12-31",
"previous": null,
"results": [ … ]
}
To read everything, follow next until it is null. A page past the last
one gets 404 not_found.
url="$APPTOME_API/shifts/?start=2026-12-01&stop=2026-12-31&per_page=100"
while [ "$url" != "null" ]; do
page=$(curl -s "$url" -H "Authorization: Bearer $APPTOME_KEY")
echo "$page" | jq -c '.results[]'
url=$(echo "$page" | jq -r '.next')
done
Organization¶
GET /organization/ · scope calendar:read
The time zone and the ids the filters take: calendars, shift types, tasks and groups, each with the name the app shows.
curl -s "$APPTOME_API/organization/" -H "Authorization: Bearer $APPTOME_KEY"
{
"timezone": "Europe/Rome",
"calendars": [{"id": 1, "name": "Emergenza 118"}, {"id": 2, "name": "Servizi secondari"}],
"shift_types": [{"id": 3, "name": "Ambulanza"}],
"tasks": [{"id": 7, "name": "Autista"}, {"id": 8, "name": "Soccorritore"}],
"groups": [{"id": 2, "name": "Squadra del sabato"}]
}
Shifts¶
GET /shifts/ · scope calendar:read
The shifts starting between start and stop, on the calendars that are not
deleted, by start.
| Parameter | |
|---|---|
start, stop |
required |
calendar |
calendar ids |
shift_type |
shift type ids |
updated_since |
only the shifts changed since this moment: see Syncing |
curl -s "$APPTOME_API/shifts/?start=2026-12-01&stop=2026-12-31&calendar=1" \
-H "Authorization: Bearer $APPTOME_KEY"
{
"id": 9120,
"name": "Ambulanza mattina",
"start": "2026-12-14T08:00:00+01:00",
"end": "2026-12-14T14:00:00+01:00",
"calendar": 1,
"shift_type": 3,
"covered": false,
"series": 455,
"note": "Meet at the base at 7:45",
"created_at": "2026-11-02T10:15:31+01:00",
"updated_at": "2026-11-20T18:02:09+01:00"
}
covered tells whether the people signed up meet the requirements of the
shift type. series is the id of the series of a repeated shift, null for a
shift on its own. note holds the shift's notes, as the app shows them: an
empty string when there are none.
GET /shifts/<id>/ returns one shift, in the same shape. An id that does not
exist, or of a deleted calendar, gets 404.
Availabilities¶
GET /availabilities/ · scope calendar:read
The approved availabilities of the shifts starting in the range: the same rows as Statistics → Availabilities in the app, for the same filters. If the organization leaves the shifts not covered out of the statistics, they are left out here too.
| Parameter | |
|---|---|
start, stop |
required |
calendar, shift_type |
as for shifts |
task |
task ids; without it, every task not excluded from the statistics |
person |
person ids |
group |
group ids: the people in them |
type |
available, unavailable, to_call_back, no_answer; all when absent |
updated_since |
see Syncing |
curl -s "$APPTOME_API/availabilities/?start=2026-12-01&stop=2026-12-31&type=available" \
-H "Authorization: Bearer $APPTOME_KEY"
{
"id": 50211,
"shift": 9120,
"person": {"id": 340, "first_name": "Marta", "last_name": "Conti", "role": "volunteer"},
"task": 7,
"type": "available",
"start": "2026-12-14T08:00:00+01:00",
"end": "2026-12-14T11:00:00+01:00",
"duration_minutes": 180,
"employee": false,
"certified": false,
"created_at": "2026-11-15T09:12:44+01:00",
"updated_at": "2026-11-15T09:12:44+01:00"
}
start and end are the actual times: the shift's, or the person's own for a
partial availability.
Hours and shifts summary¶
GET /availabilities/summary/ · scope statistics:read
Shifts and minutes of the available availabilities, added up by person,
calendar, shift type or task. The same filters as /availabilities/ (without
type and updated_since), plus group_by: person (when absent),
calendar, shift_type, task, repeatable.
curl -s "$APPTOME_API/availabilities/summary/?start=2026-01-01&stop=2026-12-31&group_by=person&group_by=task" \
-H "Authorization: Bearer $APPTOME_KEY"
{
"person": {"id": 340, "first_name": "Marta", "last_name": "Conti", "role": "volunteer"},
"calendar": null,
"shift_type": null,
"task": 7,
"shifts": 41,
"minutes": 14280
}
The fields not grouped by are null. Time is in minutes.
People¶
GET /people/ · scope people:read
The people of the registry, by last name.
| Parameter | |
|---|---|
search |
words that must all appear in the first or last name |
task |
people who can cover at least one of these tasks |
group |
people in at least one of these groups |
updated_since |
see Syncing |
curl -s "$APPTOME_API/people/?search=conti" -H "Authorization: Bearer $APPTOME_KEY"
{
"id": 340,
"first_name": "Marta",
"last_name": "Conti",
"role": "volunteer",
"tasks": [7, 8],
"groups": [2],
"created_at": null,
"updated_at": "2026-10-03T12:00:41+02:00"
}
tasks includes the inherited tasks. role is one of member, volunteer,
employee, freelancer, community_service, civic_service.
Syncing¶
To keep a copy up to date without reading everything every time:
- First load without
updated_since. Rows that have not changed since the change history exists have anullupdated_atand come only this way. - Every following round, with
updated_sinceset to the largestupdated_atreceived, minus a few minutes. The changed rows arrive: upsert them byid. - The rows to drop, from the
deletedlists with the sameupdated_since:/shifts/deleted/,/availabilities/deleted/,/people/deleted/. Each row is{"id", "deleted_at"}: drop thatidfrom your copy.
since='2026-11-20T18:00:00+01:00'
curl -s -G "$APPTOME_API/shifts/" -H "Authorization: Bearer $APPTOME_KEY" \
--data-urlencode "start=2026-11-01" --data-urlencode "stop=2027-01-31" \
--data-urlencode "updated_since=$since"
curl -s -G "$APPTOME_API/shifts/deleted/" -H "Authorization: Bearer $APPTOME_KEY" \
--data-urlencode "updated_since=$since"
Why a few minutes earlier. updated_at is the moment a change is saved,
not the moment it becomes visible. A long change, started before your read
and finished after it, carries an updated_at older than rows you have
already received: restarting exactly from the last value would miss it. With
a margin of a few minutes some rows arrive twice, and upserting them by id
does no harm.
Other rules:
updated_sinceis an ISO 8601 date and time, in the years 2000-2100 as the other dates. With an offset (+01:00) it is converted to the organization's time zone, without one it is read in it. In an address the+must be encoded (%2B):curl -G --data-urlencodedoes it for you.- On shifts and availabilities the
start/stoprange stays required: pick the window of dates you care about. - The
deletedlists take onlyupdated_sinceand also include rows that still exist but left the list: the shifts of a deleted calendar, the availabilities no longer approved, the people removed from the registry.deleted_atis when they left. - A change of a person's name moves the person's
updated_at, not their availabilities': to have up-to-date names, sync/people/too.
Excel export¶
GET /availabilities/xlsx/ · scope statistics:read
The same file the app downloads from Statistics → Availabilities for
the same filters: a sheet per calendar and, last, a sheet with the parameters
used. Parameters as /availabilities/, without type and updated_since.
curl -s -G "$APPTOME_API/availabilities/xlsx/" -H "Authorization: Bearer $APPTOME_KEY" \
--data-urlencode "start=2026-01-01" --data-urlencode "stop=2026-12-31" \
-o availabilities-2026.xlsx
The file comes with Content-Disposition: attachment;
filename="export_disponibilita__2026-01-01__2026-12-31.xlsx". Errors stay
JSON: check the HTTP status before saving the file. Every export counts
against the export limits: 1 per minute and 5 per day per organization.