Vai al contenuto

Riferimento delle API

Questa pagina è generata dallo schema OpenAPI del backend con make api-reference: non va modificata a mano. Le descrizioni dei campi e dei parametri sono quelle dello schema, in inglese.

  • Lo schema completo, da importare in Postman, Insomnia o in un generatore di client: openapi.yml (OpenAPI 3.0.3, AppToMe API 1).
  • Per autenticazione, limiti, errori e sincronizzazione vedi la guida.

Endpoint

GET /api/v1/me/

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

Any valid key.

Risposte

Stato Contenuto Descrizione
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.

Risposte

Stato Contenuto Descrizione
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.

Parametri

Nome Dove Tipo Obbligatorio Descrizione
calendar query array di 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 di integer no Shift type ids (see /organization/). Repeat for more than one.
start query string (date) sì First day of the range, YYYY-MM-DD, included. Shifts are matched by their start.
stop query string (date) sì 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.

Risposte

Stato Contenuto Descrizione
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.

Parametri

Nome Dove Tipo Obbligatorio Descrizione
Idempotency-Key intestazione 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.

Corpo della richiesta (application/json): ShiftCreate

Risposte

Stato Contenuto Descrizione
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.

Parametri

Nome Dove Tipo Obbligatorio Descrizione
id percorso integer sì Shift id.

Risposte

Stato Contenuto Descrizione
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.

Parametri

Nome Dove Tipo Obbligatorio Descrizione
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 percorso integer sì 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).

Corpo della richiesta (application/json): PatchedShiftUpdate

Risposte

Stato Contenuto Descrizione
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.

Parametri

Nome Dove Tipo Obbligatorio Descrizione
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 percorso integer sì 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.

Risposte

Stato Contenuto Descrizione
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.

Parametri

Nome Dove Tipo Obbligatorio Descrizione
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) sì 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.

Risposte

Stato Contenuto Descrizione
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.

Parametri

Nome Dove Tipo Obbligatorio Descrizione
Idempotency-Key intestazione 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 percorso integer sì Shift id.

Corpo della richiesta (application/json): SignUp

Risposte

Stato Contenuto Descrizione
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.

Parametri

Nome Dove Tipo Obbligatorio Descrizione
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 percorso integer sì Shift id.

Risposte

Stato Contenuto Descrizione
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.

Parametri

Nome Dove Tipo Obbligatorio Descrizione
Idempotency-Key intestazione 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 percorso integer sì Shift id.

Corpo della richiesta (application/json): Assignment

Risposte

Stato Contenuto Descrizione
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.

Parametri

Nome Dove Tipo Obbligatorio Descrizione
calendar query array di integer no Calendar ids (see /organization/). Repeat for more than one.
group query array di 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 di integer no Person ids. Repeat for more than one.
shift_type query array di integer no Shift type ids (see /organization/). Repeat for more than one.
start query string (date) sì First day of the range, YYYY-MM-DD, included. Shifts are matched by their start.
stop query string (date) sì Last day of the range, YYYY-MM-DD, included. At most 366 days after start.
task query array di integer no Task ids (see /organization/). Without it, every task not excluded from the statistics. Repeat for more than one.
type query array di 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.

Risposte

Stato Contenuto Descrizione
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.

Parametri

Nome Dove Tipo Obbligatorio Descrizione
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 percorso integer sì Availability id.

Risposte

Stato Contenuto Descrizione
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.

Parametri

Nome Dove Tipo Obbligatorio Descrizione
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) sì 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.

Risposte

Stato Contenuto Descrizione
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.

Parametri

Nome Dove Tipo Obbligatorio Descrizione
calendar query array di integer no Calendar ids (see /organization/). Repeat for more than one.
group query array di integer no Group ids (see /organization/): people in at least one of them. Repeat for more than one.
group_by query array di 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 di integer no Person ids. Repeat for more than one.
shift_type query array di integer no Shift type ids (see /organization/). Repeat for more than one.
start query string (date) sì First day of the range, YYYY-MM-DD, included. Shifts are matched by their start.
stop query string (date) sì Last day of the range, YYYY-MM-DD, included. At most 366 days after start.
task query array di integer no Task ids (see /organization/). Without it, every task not excluded from the statistics. Repeat for more than one.

Risposte

Stato Contenuto Descrizione
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.

Risposte

Stato Contenuto Descrizione
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.

Parametri

Nome Dove Tipo Obbligatorio Descrizione
group query array di 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 di 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.

Risposte

Stato Contenuto Descrizione
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.

Parametri

Nome Dove Tipo Obbligatorio Descrizione
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) sì 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.

Risposte

Stato Contenuto Descrizione
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.

Oggetti

Assignment

Campo Tipo Obbligatorio Descrizione
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 sì The person to put on the shift (see /people/).
task integer sì 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

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

AvailabilityDryRun

Campo Tipo Obbligatorio Descrizione
dry_run boolean sì Always true: nothing was saved and nobody was told.
availability AvailabilityPreview sì The availability as the write would leave it.
warnings array di Warning sì What the write would do that is worth knowing.

AvailabilityOrDryRun

Uno di questi oggetti: Availability, AvailabilityDryRun

AvailabilityPreview

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

Deleted

Campo Tipo Obbligatorio Descrizione
id integer sì Id of a row to drop.
deleted_at string (date-time) sì When it was deleted, or when it left the list (a deleted calendar, a person removed).

DeletedShiftsResult

Campo Tipo Obbligatorio Descrizione
dry_run boolean sì True when nothing was deleted: the ids are those that would be.
deleted array di integer sì Ids of the shifts deleted, by start: one, or the following ones of the series with scope=following.

Error

Campo Tipo Obbligatorio Descrizione
error ErrorDetail sì What went wrong.

ErrorDetail

Campo Tipo Obbligatorio Descrizione
code string sì 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 sì 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

Campo Tipo Obbligatorio Descrizione
user MeUser sì Who the key acts for.
key MeKey sì The key of this request.
active_modules array di string sì Modules active for the organization.

MeKey

Campo Tipo Obbligatorio Descrizione
name string sì Name given to the key.
prefix string sì First characters of the key, the only part shown again.
scopes array di string sì Scopes of the key.
expires_at string (date-time) sì When the key stops working.

MeUser

Campo Tipo Obbligatorio Descrizione
id integer sì User id.
email string (email) sì Email of the user the key acts for.
person PersonRef, null sì The user's person, null if there is none.

Named

Campo Tipo Obbligatorio Descrizione
id integer sì Id, stable: use it in the filters.
name string sì Name, as the app shows it.

Organization

Campo Tipo Obbligatorio Descrizione
timezone string sì IANA time zone of the organization: the dates of the filters are read in it.
calendars array di Named sì Calendars, in the order of the app.
shift_types array di Named sì Shift types, by priority.
tasks array di Named sì Tasks, by name.
groups array di Named sì Groups of people, by name.

PaginatedAvailabilityList

Campo Tipo Obbligatorio Descrizione
count integer sì 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 di Availability sì The rows of this page.

PaginatedDeletedList

Campo Tipo Obbligatorio Descrizione
count integer sì 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 di Deleted sì The rows of this page.

PaginatedPersonList

Campo Tipo Obbligatorio Descrizione
count integer sì 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 di Person sì The rows of this page.

PaginatedShiftList

Campo Tipo Obbligatorio Descrizione
count integer sì 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 di Shift sì The rows of this page.

PaginatedSummaryList

Campo Tipo Obbligatorio Descrizione
count integer sì 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 di Summary sì 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.

Campo Tipo Obbligatorio Descrizione
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 di integer no Ids of the vehicles on the shift. On a change, the whole list.

Person

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

PersonRef

Campo Tipo Obbligatorio Descrizione
id integer sì Person id.
first_name string sì First name.
last_name string sì Last name.
role civic_service | community_service | employee | freelancer | member | volunteer sì Role in the organization.

Shift

Campo Tipo Obbligatorio Descrizione
id integer sì Shift id.
name string sì Name of the shift.
start string (date-time) sì Start.
end string (date-time) sì End.
calendar integer sì Calendar id.
shift_type integer, null sì Shift type id, null if none.
covered boolean sì Whether the people signed up meet the requirements of the shift.
series integer, null sì Id of the series the shift belongs to (a repeated shift), null for a shift on its own.
note string sì Notes of the shift, as the app shows them; empty when there are none.
created_at string (date-time), null sì When the row was created; null for rows older than the change history.
updated_at string (date-time), null sì 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.

Campo Tipo Obbligatorio Descrizione
name string no Name of the shift.
calendar integer sì Calendar id (see /organization/).
shift_type integer sì Shift type id (see /organization/).
start string (date-time) sì 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) sì End, as start: after it, at most 60 days later.
note string no Notes, shown on the shift. At most 2000 characters.
vehicles array di 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

Campo Tipo Obbligatorio Descrizione
dry_run boolean sì Always true: nothing was saved and nobody was told.
preview ShiftPreview sì The shift as the write would leave it.
warnings array di Warning sì What the write would do that is worth knowing.

ShiftOrDryRun

Uno di questi oggetti: Shift, ShiftDryRun

ShiftPreview

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

Campo Tipo Obbligatorio Descrizione
id integer, null sì Shift id: null when the write would create it.
name string sì Name of the shift.
start string (date-time) sì Start.
end string (date-time) sì End.
calendar integer sì Calendar id.
shift_type integer, null sì Shift type id, null if none.
occurrences integer sì 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 di string (date) no A new series only: the days of its shifts, the first 100 at most.

ShiftRepeat

Campo Tipo Obbligatorio Descrizione
until string (date) sì 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 di 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 di 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

Campo Tipo Obbligatorio Descrizione
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 sì The task the key's user covers on the shift (see /organization/).

Summary

Campo Tipo Obbligatorio Descrizione
person PersonRef, null sì The person; null unless grouped by person.
calendar integer, null sì Calendar id; null unless grouped by calendar.
shift_type integer, null sì Shift type id; null unless grouped by shift_type, or for shifts without a type.
task integer, null sì Task id; null unless grouped by task.
shifts integer sì Number of distinct shifts.
minutes integer sì Total time, in minutes.

Warning

Campo Tipo Obbligatorio Descrizione
code string sì 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 sì Explanation for a person, in the language of the request.
shifts array di integer no With busy_elsewhere: the shifts the person is taken off.