niiko/developers

Ciita · scheduling v1 read-only

ciita.agenda_get

Reads the appointments of today, this week, next week or this month: how many per status and the first 15 with day, time in the workspace time zone, client, resource and status. Books nothing.

Last updated

POST /api/v1/reads/ciita.agenda_get
Token scope
ciita.agenda_get@1
Workspace permission
api.ciita.agenda_get off by default
Who reads
The person behind the token, with their role. Someone who leaves the workspace stops reading.
Three permissions

A token with that scope, the workspace owner having switched the read on, and the person's role seeing it in the product. None of them is enough alone. OAuth only →

Request

fieldtyperules
period"today" | "this_week" | "next_week" | "this_month"optional

Response — output when status is done

fieldtyperules
period"today" | "this_week" | "next_week" | "this_month"required
todaystringrequired^\d{4}-\d{2}-\d{2}$
periodStartstringrequired^\d{4}-\d{2}-\d{2}$
periodEndstringrequired^\d{4}-\d{2}-\d{2}$
timeZonestringrequired
appointmentsintegerrequired≥ 0
byStatusmap<string, unknown>required
totalIsMinimumbooleanrequired
firstobject[]required

first[]

fieldtyperules
datestringrequired^\d{4}-\d{2}-\d{2}$
timestringrequired^\d{2}:\d{2}$
clientstring | nullrequired
resourcestring | nullrequired
statusstringrequired

Example

# Reads take an OAuth access token, not an API key, and no idempotency key: reading changes nothing.
curl -X POST https://niiko.org/api/v1/reads/ciita.agenda_get \
  -H "Authorization: Bearer $NIIKO_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
# 200 → done · 4xx → refused, with a named reason

Why it may refuse

Each reason names who can fix it and how; detail.message, when present, says what to do. Refusals & HTTP codes →

invalid_inputrole_forbiddengrant_offreads_need_a_person

In the clients

@vorluno/niiko-sdkniiko.getAgenda()
niiko (Python)niiko.get_agenda() from 0.3.0 · not on the registry yet
niiko-cliniiko read ciita.agenda_get
n8n-nodes-niikoNo reads: the node holds a key, and reading needs a person through OAuth.
niiko-mcp-serverciita_agenda_get readOnlyHint

History