Skip to content

API reference

This page is generated from the backend's OpenAPI schema by make api-reference: do not edit it by hand.

  • The full schema, to import into Postman, Insomnia or a client generator: openapi.yml (OpenAPI 3.0.3, AppToMe API 1).
  • For authentication, limits, errors and syncing see the guide.

Endpoints

GET /api/v1/me/

Who the key acts for, its scopes and the organization's active modules.

Any valid key.

Responses

Status Content Description
200 Me
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

GET /api/v1/organization/

The organization's time zone and the ids the filters take: calendars, shift types, tasks and groups.

Scope: calendar:read.

Responses

Status Content Description
200 Organization
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

GET /api/v1/shifts/

The shifts starting in the range, on the calendars that are not deleted, by start.

Scope: calendar:read.

Parameters

Name In Type Required Description
calendar query array of integer no Calendar ids (see /organization/). Repeat for more than one.
page query integer no Page number, from 1.
per_page query integer no Rows per page: 50 by default, at most 100.
shift_type query array of integer no Shift type ids (see /organization/). Repeat for more than one.
start query string (date) yes First day of the range, YYYY-MM-DD, included. Shifts are matched by their start.
stop query string (date) yes Last day of the range, YYYY-MM-DD, included. At most 366 days after start.
updated_since query string (date-time) no Only the rows changed at or after this moment (ISO 8601, e.g. 2026-03-01T08:00:00+01:00). Pass the largest updated_at you received. Rows not changed since the change history exists have no updated_at and are left out.

Responses

Status Content Description
200 PaginatedShiftList
400 Error A parameter is not valid (invalid_request, invalid_range).
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

POST /api/v1/shifts/

Creates a shift, as the app's new-shift form does, or a series of them with repeat: 201 with the shift (the first of a series). Who the app would tell is told: with notify_candidates, everyone who can take part. With dry_run, 200 and what it would do.

Scope: calendar:write.

Parameters

Name In Type Required Description
Idempotency-Key header string no Any string of 1 to 255 printable characters, new for each write: the same request sent again with it within 24 hours gets the first response (with Idempotent-Replayed: true) and is not done twice. Ignored on a dry run.
dry_run query boolean no true: check the write as the real one and answer what it would do, without saving anything or telling anyone.

Request body (application/json): ShiftCreate

Responses

Status Content Description
200 ShiftDryRun
201 Shift
400 Error A parameter or a field is not valid (invalid_request, with fields).
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
409 Error The calendar refuses the change now (not_allowed, with reason), the key's user has no person (no_person), or a request with the same Idempotency-Key is still running (idempotency_in_progress).
422 Error The Idempotency-Key was used for a different request (idempotency_key_reused).
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

GET /api/v1/shifts/{id}/

One shift.

Scope: calendar:read.

Parameters

Name In Type Required Description
id path integer yes Shift id.

Responses

Status Content Description
200 Shift
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
404 Error No such object.
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

PATCH /api/v1/shifts/{id}/

Changes the fields sent, as the app's shift form does: 200 with the shift. Moving it tells the people on it, as in the app. With dry_run, 200 with dry_run and the warnings.

Scope: calendar:write.

Parameters

Name In Type Required Description
dry_run query boolean no true: check the write as the real one and answer what it would do, without saving anything or telling anyone.
id path integer yes Shift id.
scope query following | single no single (default): this shift; if it is in a series, it leaves it, as in the app. following: it and the following ones of its series (name, type, times, note, vehicles; not the days nor the calendar).

Request body (application/json): PatchedShiftUpdate

Responses

Status Content Description
200 ShiftOrDryRun
400 Error A parameter or a field is not valid (invalid_request, with fields).
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
404 Error No such object.
409 Error The calendar refuses the change now (not_allowed, with reason), the key's user has no person (no_person), or a request with the same Idempotency-Key is still running (idempotency_in_progress).
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

DELETE /api/v1/shifts/{id}/

Deletes the shift, or the following ones of its series: 200 with their ids. The people on them are told, as in the app.

Scope: calendar:write.

Parameters

Name In Type Required Description
dry_run query boolean no true: check the write as the real one and answer what it would do, without saving anything or telling anyone.
id path integer yes Shift id.
scope query following | single no single (default): this shift. following: it and the following ones of its series. The whole series cannot be deleted from here.

Responses

Status Content Description
200 DeletedShiftsResult
400 Error A parameter or a field is not valid (invalid_request, with fields).
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
404 Error No such object.
409 Error The calendar refuses the change now (not_allowed, with reason), the key's user has no person (no_person), or a request with the same Idempotency-Key is still running (idempotency_in_progress).
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

GET /api/v1/shifts/deleted/

Shifts deleted since updated_since, or on a calendar deleted since. Drop them from a copy kept with /shifts/?updated_since=.

Scope: calendar:read.

Parameters

Name In Type Required Description
page query integer no Page number, from 1.
per_page query integer no Rows per page: 50 by default, at most 100.
updated_since query string (date-time) yes Only the rows changed at or after this moment (ISO 8601, e.g. 2026-03-01T08:00:00+01:00). Pass the largest updated_at you received. Rows not changed since the change history exists have no updated_at and are left out.

Responses

Status Content Description
200 PaginatedDeletedList
400 Error A parameter is not valid (invalid_request, invalid_range).
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

POST /api/v1/shifts/{id}/signup/

Signs the key's user up for the shift with a task, as the app's «I'm available»: 200 with the availability. The task is one the app offers the user: a requirement of the shift, not hidden, that they have, with room left; another is a 400 on task. It may wait for the staff's approval, as in the app; the people on overlapping shifts leave them. The calendar's notification rules tell the staff. With dry_run, 200 with dry_run, the availability and the warnings.

Scope: calendar:write.

Parameters

Name In Type Required Description
Idempotency-Key header string no Any string of 1 to 255 printable characters, new for each write: the same request sent again with it within 24 hours gets the first response (with Idempotent-Replayed: true) and is not done twice. Ignored on a dry run.
dry_run query boolean no true: check the write as the real one and answer what it would do, without saving anything or telling anyone.
id path integer yes Shift id.

Request body (application/json): SignUp

Responses

Status Content Description
200 AvailabilityOrDryRun
400 Error A parameter or a field is not valid (invalid_request, with fields).
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
404 Error No such object.
409 Error The calendar refuses the change now (not_allowed, with reason), the key's user has no person (no_person), or a request with the same Idempotency-Key is still running (idempotency_in_progress).
422 Error The Idempotency-Key was used for a different request (idempotency_key_reused).
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

DELETE /api/v1/shifts/{id}/signup/

The key's user withdraws from the shift: 200 with the availability, now unavailable. The calendar's notification rules tell the staff.

Scope: calendar:write.

Parameters

Name In Type Required Description
dry_run query boolean no true: check the write as the real one and answer what it would do, without saving anything or telling anyone.
id path integer yes Shift id.

Responses

Status Content Description
200 AvailabilityOrDryRun
400 Error A parameter or a field is not valid (invalid_request, with fields).
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
404 Error No such object.
409 Error The calendar refuses the change now (not_allowed, with reason), the key's user has no person (no_person), or a request with the same Idempotency-Key is still running (idempotency_in_progress).
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

POST /api/v1/shifts/{id}/assignments/

Puts a person on the shift with a task, as the staff do in the app: approves a pending availability, or changes its task. The task is a requirement of the shift that the person has (a 400 on task otherwise); a pending availability is approved with its own task. 200 with the availability. The person is told, as in the app; their overlapping shifts lose them. With dry_run, 200 with dry_run, the availability and the warnings.

Scope: calendar:write.

Parameters

Name In Type Required Description
Idempotency-Key header string no Any string of 1 to 255 printable characters, new for each write: the same request sent again with it within 24 hours gets the first response (with Idempotent-Replayed: true) and is not done twice. Ignored on a dry run.
dry_run query boolean no true: check the write as the real one and answer what it would do, without saving anything or telling anyone.
id path integer yes Shift id.

Request body (application/json): Assignment

Responses

Status Content Description
200 AvailabilityOrDryRun
400 Error A parameter or a field is not valid (invalid_request, with fields).
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
404 Error No such object.
409 Error The calendar refuses the change now (not_allowed, with reason), the key's user has no person (no_person), or a request with the same Idempotency-Key is still running (idempotency_in_progress).
422 Error The Idempotency-Key was used for a different request (idempotency_key_reused).
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

GET /api/v1/availabilities/

The approved availabilities of the shifts starting in the range: what Statistics -> Availabilities lists. With the organization's setting, the shifts not covered are left out, as in the app.

Scope: calendar:read.

Parameters

Name In Type Required Description
calendar query array of integer no Calendar ids (see /organization/). Repeat for more than one.
group query array of integer no Group ids (see /organization/): people in at least one of them. Repeat for more than one.
page query integer no Page number, from 1.
per_page query integer no Rows per page: 50 by default, at most 100.
person query array of integer no Person ids. Repeat for more than one.
shift_type query array of integer no Shift type ids (see /organization/). Repeat for more than one.
start query string (date) yes First day of the range, YYYY-MM-DD, included. Shifts are matched by their start.
stop query string (date) yes Last day of the range, YYYY-MM-DD, included. At most 366 days after start.
task query array of integer no Task ids (see /organization/). Without it, every task not excluded from the statistics. Repeat for more than one.
type query array of available | no_answer | to_call_back | unavailable no Availability types. Repeat for more than one; all of them when absent.
updated_since query string (date-time) no Only the rows changed at or after this moment (ISO 8601, e.g. 2026-03-01T08:00:00+01:00). Pass the largest updated_at you received. Rows not changed since the change history exists have no updated_at and are left out.

Responses

Status Content Description
200 PaginatedAvailabilityList
400 Error A parameter is not valid (invalid_request, invalid_range).
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

DELETE /api/v1/availabilities/{id}/

Takes the person off the shift, as the staff do in the app: the availability stays, as unavailable (200, with it). The person is told, as in the app.

Scope: calendar:write.

Parameters

Name In Type Required Description
dry_run query boolean no true: check the write as the real one and answer what it would do, without saving anything or telling anyone.
id path integer yes Availability id.

Responses

Status Content Description
200 AvailabilityOrDryRun
400 Error A parameter or a field is not valid (invalid_request, with fields).
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
404 Error No such object.
409 Error The calendar refuses the change now (not_allowed, with reason), the key's user has no person (no_person), or a request with the same Idempotency-Key is still running (idempotency_in_progress).
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

GET /api/v1/availabilities/deleted/

Availabilities deleted since updated_since, or no longer listed (not approved any more, their shift or calendar deleted or left out).

Scope: calendar:read.

Parameters

Name In Type Required Description
page query integer no Page number, from 1.
per_page query integer no Rows per page: 50 by default, at most 100.
updated_since query string (date-time) yes Only the rows changed at or after this moment (ISO 8601, e.g. 2026-03-01T08:00:00+01:00). Pass the largest updated_at you received. Rows not changed since the change history exists have no updated_at and are left out.

Responses

Status Content Description
200 PaginatedDeletedList
400 Error A parameter is not valid (invalid_request, invalid_range).
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

GET /api/v1/availabilities/summary/

Shifts and minutes of the available people, from the same rows as /availabilities/, added up by person, calendar, shift type or task.

Scope: statistics:read.

Parameters

Name In Type Required Description
calendar query array of integer no Calendar ids (see /organization/). Repeat for more than one.
group query array of integer no Group ids (see /organization/): people in at least one of them. Repeat for more than one.
group_by query array of calendar | person | shift_type | task no What a row adds up: any of person, calendar, shift_type, task. Repeat for more than one; by person when absent.
page query integer no Page number, from 1.
per_page query integer no Rows per page: 50 by default, at most 100.
person query array of integer no Person ids. Repeat for more than one.
shift_type query array of integer no Shift type ids (see /organization/). Repeat for more than one.
start query string (date) yes First day of the range, YYYY-MM-DD, included. Shifts are matched by their start.
stop query string (date) yes Last day of the range, YYYY-MM-DD, included. At most 366 days after start.
task query array of integer no Task ids (see /organization/). Without it, every task not excluded from the statistics. Repeat for more than one.

Responses

Status Content Description
200 PaginatedSummaryList
400 Error A parameter is not valid (invalid_request, invalid_range).
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

GET /api/v1/availabilities/xlsx/

The Excel of Statistics -> Availabilities, the same file the app downloads for the same filters (a sheet per calendar, the parameters last). An export: it counts against the export limits.

Scope: statistics:read.

Responses

Status Content Description
200 file (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) The Excel file.
400 Error A parameter is not valid (invalid_request, invalid_range).
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

GET /api/v1/people/

The people of the registry, by last name.

Scope: people:read.

Parameters

Name In Type Required Description
group query array of integer no Group ids (see /organization/): people in at least one of them. Repeat for more than one.
page query integer no Page number, from 1.
per_page query integer no Rows per page: 50 by default, at most 100.
search query string no Words that must all appear in the first or the last name.
task query array of integer no Task ids (see /organization/): people who can cover at least one of them. Repeat for more than one.
updated_since query string (date-time) no Only the rows changed at or after this moment (ISO 8601, e.g. 2026-03-01T08:00:00+01:00). Pass the largest updated_at you received. Rows not changed since the change history exists have no updated_at and are left out.

Responses

Status Content Description
200 PaginatedPersonList
400 Error A parameter is not valid (invalid_request, invalid_range).
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

GET /api/v1/people/deleted/

People deleted or removed from the registry since updated_since.

Scope: people:read.

Parameters

Name In Type Required Description
page query integer no Page number, from 1.
per_page query integer no Rows per page: 50 by default, at most 100.
updated_since query string (date-time) yes Only the rows changed at or after this moment (ISO 8601, e.g. 2026-03-01T08:00:00+01:00). Pass the largest updated_at you received. Rows not changed since the change history exists have no updated_at and are left out.

Responses

Status Content Description
200 PaginatedDeletedList
400 Error A parameter is not valid (invalid_request, invalid_range).
401 Error No key, or a key that is not valid, expired, or of an inactive user.
402 Error The organization is on the lite plan.
403 Error The scope is missing, the author is no longer a superuser, or the module is not active.
429 Error A limit or the included usage is reached: wait for Retry-After.
503 Error The organization settings cannot be read right now: retry in a minute.

Objects

Assignment

Field Type Required Description
start string (date-time) no Partial availability: from when, within the shift. Only on calendars that take partial availabilities, and on shifts shorter than 24 hours.
end string (date-time) no Partial availability: until when, as start.
note string no Note on the availability. Left as it is when absent. At most 2000 characters.
person integer yes The person to put on the shift (see /people/).
task integer yes The task the person covers (see /organization/).
employee boolean no On the shift as an employee. Left as it is when absent, false for a new availability.

Availability

Field Type Required Description
id integer yes Availability id.
shift integer yes Shift id.
person PersonRef yes The person.
task integer, null yes Task the person covers, null if none.
type available | no_answer | to_call_back | unavailable yes Kind of availability.
start string (date-time) yes Actual start: the shift's, or the person's own for a partial availability.
end string (date-time) yes Actual end, as start.
duration_minutes integer yes From start to end, in minutes.
employee boolean yes Covered as an employee.
certified boolean yes Certified by the staff.
created_at string (date-time), null yes When the row was created; null for rows older than the change history.
updated_at string (date-time), null yes When the row last changed; null when it has not changed since the change history exists. The value to pass as updated_since.

AvailabilityDryRun

Field Type Required Description
dry_run boolean yes Always true: nothing was saved and nobody was told.
availability AvailabilityPreview yes The availability as the write would leave it.
warnings array of Warning yes What the write would do that is worth knowing.

AvailabilityOrDryRun

One of these objects: Availability, AvailabilityDryRun

AvailabilityPreview

Field Type Required Description
id integer, null yes Availability id: always null in a dry run, which saves no row (the write may save the person's row anew).
shift integer yes Shift id.
person PersonRef yes The person.
task integer, null yes Task the person covers, null if none.
type available | no_answer | to_call_back | unavailable yes Kind of availability.
start string (date-time) yes Actual start: the shift's, or the person's own for a partial availability.
end string (date-time) yes Actual end, as start.
duration_minutes integer yes From start to end, in minutes.
employee boolean yes Covered as an employee.
certified boolean yes Certified by the staff.
created_at string (date-time), null yes When the row was created; null for rows older than the change history.
updated_at string (date-time), null yes When the row last changed; null when it has not changed since the change history exists. The value to pass as updated_since.

Deleted

Field Type Required Description
id integer yes Id of a row to drop.
deleted_at string (date-time) yes When it was deleted, or when it left the list (a deleted calendar, a person removed).

DeletedShiftsResult

Field Type Required Description
dry_run boolean yes True when nothing was deleted: the ids are those that would be.
deleted array of integer yes Ids of the shifts deleted, by start: one, or the following ones of the series with scope=following.

Error

Field Type Required Description
error ErrorDetail yes What went wrong.

ErrorDetail

Field Type Required Description
code string yes Stable code: invalid_key, expired_key, inactive_user, not_superuser, missing_scope, module_not_active, plan_required, service_unavailable, rate_limited, quota_exceeded, invalid_request, invalid_range, not_found, method_not_allowed, forbidden, server_error; on the writes also not_allowed, no_person, idempotency_in_progress, idempotency_key_reused.
message string yes Explanation for a person, in the language of the request.
fields object no Errors by parameter or field, when they are not valid. non_field_errors: those of the request as a whole.
reason string no With not_allowed: why, in the calendar's terms (past_shift, current_shift, too_close_to_add, too_close_to_delete, too_far_to_add, too_close_to_change, add_not_allowed, delete_not_allowed).

Me

Field Type Required Description
user MeUser yes Who the key acts for.
key MeKey yes The key of this request.
active_modules array of string yes Modules active for the organization.

MeKey

Field Type Required Description
name string yes Name given to the key.
prefix string yes First characters of the key, the only part shown again.
scopes array of string yes Scopes of the key.
expires_at string (date-time) yes When the key stops working.

MeUser

Field Type Required Description
id integer yes User id.
email string (email) yes Email of the user the key acts for.
person PersonRef, null yes The user's person, null if there is none.

Named

Field Type Required Description
id integer yes Id, stable: use it in the filters.
name string yes Name, as the app shows it.

Organization

Field Type Required Description
timezone string yes IANA time zone of the organization: the dates of the filters are read in it.
calendars array of Named yes Calendars, in the order of the app.
shift_types array of Named yes Shift types, by priority.
tasks array of Named yes Tasks, by name.
groups array of Named yes Groups of people, by name.

PaginatedAvailabilityList

Field Type Required Description
count integer yes Rows in all pages.
next string (uri), null no Address of the next page, null on the last one.
previous string (uri), null no Address of the previous page, null on the first one.
results array of Availability yes The rows of this page.

PaginatedDeletedList

Field Type Required Description
count integer yes Rows in all pages.
next string (uri), null no Address of the next page, null on the last one.
previous string (uri), null no Address of the previous page, null on the first one.
results array of Deleted yes The rows of this page.

PaginatedPersonList

Field Type Required Description
count integer yes Rows in all pages.
next string (uri), null no Address of the next page, null on the last one.
previous string (uri), null no Address of the previous page, null on the first one.
results array of Person yes The rows of this page.

PaginatedShiftList

Field Type Required Description
count integer yes Rows in all pages.
next string (uri), null no Address of the next page, null on the last one.
previous string (uri), null no Address of the previous page, null on the first one.
results array of Shift yes The rows of this page.

PaginatedSummaryList

Field Type Required Description
count integer yes Rows in all pages.
next string (uri), null no Address of the next page, null on the last one.
previous string (uri), null no Address of the previous page, null on the first one.
results array of Summary yes The rows of this page.

PatchedShiftUpdate

Every field is optional: only the ones sent change. repeat and notify_candidates are of a new shift only: on a change, 400.

Field Type Required Description
name string no Name of the shift.
calendar integer no Calendar id (see /organization/).
shift_type integer no Shift type id (see /organization/).
start string (date-time) no Start, ISO 8601. With an offset it is converted to the organization's time zone, without one it is read in it.
end string (date-time) no End, as start: after it, at most 60 days later.
note string no Notes, shown on the shift. At most 2000 characters.
vehicles array of integer no Ids of the vehicles on the shift. On a change, the whole list.

Person

Field Type Required Description
id integer yes Person id.
first_name string yes First name.
last_name string yes Last name.
role civic_service | community_service | employee | freelancer | member | volunteer yes Role in the organization.
tasks array of integer yes Ids of the tasks the person can cover, the inherited ones included.
groups array of integer yes Ids of the groups the person belongs to.
created_at string (date-time), null yes When the row was created; null for rows older than the change history.
updated_at string (date-time), null yes When the row last changed; null when it has not changed since the change history exists. The value to pass as updated_since.

PersonRef

Field Type Required Description
id integer yes Person id.
first_name string yes First name.
last_name string yes Last name.
role civic_service | community_service | employee | freelancer | member | volunteer yes Role in the organization.

Shift

Field Type Required Description
id integer yes Shift id.
name string yes Name of the shift.
start string (date-time) yes Start.
end string (date-time) yes End.
calendar integer yes Calendar id.
shift_type integer, null yes Shift type id, null if none.
covered boolean yes Whether the people signed up meet the requirements of the shift.
series integer, null yes Id of the series the shift belongs to (a repeated shift), null for a shift on its own.
note string yes Notes of the shift, as the app shows them; empty when there are none.
created_at string (date-time), null yes When the row was created; null for rows older than the change history.
updated_at string (date-time), null yes When the row last changed; null when it has not changed since the change history exists. The value to pass as updated_since.

ShiftCreate

The fields of a shift as the app's form takes them.

Field Type Required Description
name string no Name of the shift.
calendar integer yes Calendar id (see /organization/).
shift_type integer yes Shift type id (see /organization/).
start string (date-time) yes Start, ISO 8601. With an offset it is converted to the organization's time zone, without one it is read in it.
end string (date-time) yes End, as start: after it, at most 60 days later.
note string no Notes, shown on the shift. At most 2000 characters.
vehicles array of integer no Ids of the vehicles on the shift. On a change, the whole list.
repeat ShiftRepeat no Repeat the shift: a series, from start to until. Each shift of it is created as the first one.
notify_candidates boolean no Tell everyone who can take part in the shift that it is open, as the app's option does. Not with repeat.

ShiftDryRun

Field Type Required Description
dry_run boolean yes Always true: nothing was saved and nobody was told.
preview ShiftPreview yes The shift as the write would leave it.
warnings array of Warning yes What the write would do that is worth knowing.

ShiftOrDryRun

One of these objects: Shift, ShiftDryRun

ShiftPreview

The shift as the write would leave it, checked as the real write.

Field Type Required Description
id integer, null yes Shift id: null when the write would create it.
name string yes Name of the shift.
start string (date-time) yes Start.
end string (date-time) yes End.
calendar integer yes Calendar id.
shift_type integer, null yes Shift type id, null if none.
occurrences integer yes Shifts the write creates or changes: 1, or those of the series. For a new series an upper bound: a day whose shift fails the checks (a vehicle busy that day) is skipped when saving.
dates array of string (date) no A new series only: the days of its shifts, the first 100 at most.

ShiftRepeat

Field Type Required Description
until string (date) yes Last day a shift of the series can fall on, YYYY-MM-DD: not before the start, not beyond the first of January five years from now.
every_days integer no Days from one shift to the next: 1 for every day, 7 for every week; at most 3660.
on array of monday | tuesday | wednesday | thursday | friday | saturday | sunday | working_day | day_before_holiday | holiday | every_day no The days a shift falls on: week days (monday...sunday), working_day, day_before_holiday, holiday, or every_day (the default).
except_on array of monday | tuesday | wednesday | thursday | friday | saturday | sunday | working_day | day_before_holiday | holiday no The days skipped even when on takes them, with the same names.

SignUp

Field Type Required Description
start string (date-time) no Partial availability: from when, within the shift. Only on calendars that take partial availabilities, and on shifts shorter than 24 hours.
end string (date-time) no Partial availability: until when, as start.
note string no Note on the availability. Left as it is when absent. At most 2000 characters.
task integer yes The task the key's user covers on the shift (see /organization/).

Summary

Field Type Required Description
person PersonRef, null yes The person; null unless grouped by person.
calendar integer, null yes Calendar id; null unless grouped by calendar.
shift_type integer, null yes Shift type id; null unless grouped by shift_type, or for shifts without a type.
task integer, null yes Task id; null unless grouped by task.
shifts integer yes Number of distinct shifts.
minutes integer yes Total time, in minutes.

Warning

Field Type Required Description
code string yes past_shift (the shift has started or is over), pending_approval (the availability waits for the staff's approval), busy_elsewhere (the person leaves the overlapping shifts in shifts), leaves_series (the shift is taken out of its series).
message string yes Explanation for a person, in the language of the request.
shifts array of integer no With busy_elsewhere: the shifts the person is taken off.