API-Referenz
Alle Routen, die ein API-Zugang aufrufen darf, mit Recht, Parametern und Feldern.
Diese Seite entsteht aus denselben Angaben, mit denen der Server prüft, was ein API-Zugang darf. Was hier fehlt, beantwortet der Server einem API-Zugang mit 403 token_route_not_allowed.
Die vollständige Beschreibung mit allen Schemas: openapi.json. Für KI-Assistenten: llms.txt.
Patienten
GET /v1/patients
Find patients in the practice system by name or birthdate (TT.MM.JJJJ). It finds people; it does not list or count all patients (pvs_sql_query does, where offered)
Recht: Patienten suchen und lesen. Operation: search_patients.
Parameter:
q(Query): Last or first name (or its start), birth date (14.03.1951, 14.3.51, 14031951 or 1951-03-14), or a name and a birth date; at least 2 charactersrefs(Query): Instead of q: these patients by ref, in this order; a ref the practice system no longer has is left outlimit(Query): At most this many, best first: those whose last or first name starts with q; total says how many matched
GET /v1/patients/by-phone
Find the one patient with this phone number
Recht: Patienten suchen und lesen. Operation: find_patient_by_phone.
Parameter:
phone(Query, Pflicht)
GET /v1/patients/{ref}
Get a patient's record: demographics, insurance and card read
Recht: Patienten suchen und lesen. Operation: get_patient.
Parameter:
ref(Pfad, Pflicht)
GET /v1/patients/{ref}/medications
Get a patient's medication plan and what can be ordered today
Recht: Patienten suchen und lesen. Operation: get_medication_plan.
Parameter:
ref(Pfad, Pflicht)fresh(Query): Ask the practice system now instead of the cache, which may be minutes old: only right after the plan was changed or approved there, not on every read, as it costs a round trip to the practice
GET /v1/patients/{ref}/history
Read or search a patient's case file, newest first: the messages, calls, documents, forms and internal notes of all their tickets, interleaved with the Kartei entries the practice wrote in the PVS (kind casefile: text group, text, author). q searches all of it; use it to find out what happened or to answer questions about the patient
Recht: Patienten suchen und lesen. Operation: patient_history.
Parameter:
ref(Pfad, Pflicht)q(Query): Search the messages, call summaries, documents, notes and Kartei entries (German full text)cursor(Query): next_cursor of the previous pagelimit(Query)
GET /v1/patients/{ref}/appointments
Get a patient's booked appointments and the earliest free slots, optionally for one visit reason; without one, what each calendar takes next. For more free times of a type use get_slots
Recht: Patienten suchen und lesen. Operation: get_appointments.
Parameter:
ref(Pfad, Pflicht)reason(Query): Only free slots for this visit reason, by id or namelimit(Query): The earliest this many free slots; 0 only the booked ones, without asking for free slots
Vorgänge
POST /v1/tickets/{id}/replies
Reply to a ticket's patient on its channel (email, SMS, chat, portal) or another of theirs
Recht: Antworten senden und Aktionen vorschlagen, am Standort des Vorgangs. Operation: reply_ticket. Schreibt: mit Idempotency-Key-Header sicher wiederholbar.
Parameter:
expected_seq(Query, Pflicht)id(Pfad, Pflicht)
Felder im Body:
attachments(array): Uploaded files: in the portal conversation as they are, and among the patient's documents therebcc(array)body(string, Pflicht): Final text, empty only with attachments or a form; snippets are rendered by POST /snippets/rendercc(array)channel(string, Pflicht): chat: into the portal, with a notice without its text where they have no account yet (GET /tickets/{id}/chat-route); email or SMS only on a ticket without a patient that came that way, SMS to the number of a call without one, or either to the address a guest's form gave (GET /tickets/{id}/chat-route direct); kim: on a ticket that came by KIM, to its sender's KIM address, text only (409 kim_off, kim_incomplete or kim_product_id_missing while it cannot go)confirm(boolean): Chat with a notice, which invites the patient to the portal, to an address not on their record (GET /tickets/{id}/chat-route invite confirm): staff confirm that whoever holds it gets the patient's portal access; else 409 invite_unconfirmed. Email or SMS to a guest form's address staff have not written to on the ticket yet (direct confirm): staff confirm that the reply goes there; else 409 direct_unconfirmedform(string): A form (its key) for the ticket's patient to fill in: its link on its own line below the text, else alone; the answers join the ticketfrom(string): Email: the mailbox to send from (GET /mailboxes/senders); default the location'slibrary(array): Documents of the practice's library (library_documents) to give the patient in the portalmentions(array): Colleagues mentioned in the body as @[member_id], as in a note; each gets the ticket in their "mentioned me" view, the patient reads their namesnippet_key(string)subject(string): Email; defaults to Re: and the ticket titleto(string): Email or SMS; defaults to the ticket's contact
GET /v1/tickets
List or search tickets in the caller's locations, newest first. Filter like a saved view or apply one with view_id; q finds a ticket number (T-2039) or searches title, summary and message text
Recht: Vorgänge lesen, anlegen und bearbeiten. Operation: list_tickets.
Parameter:
status(Query)location_ids(Query)team_ids(Query)assignee(Query): me, none or member IDs; several match any of themcategory(Query)priority(Query)channel(Query)mentioned_me(Query): Only tickets where the caller was mentionedsnoozed(Query): Only snoozed tickets; without it snoozed tickets are left outilka_failed(Query): Only tickets Ilka gave up (mark_ticket_failed)patient_ref(Query): Only the tickets of this patientperiod(Query): Only tickets created or closed (period_on) in this window of days, in the practice's time zoneperiod_on(Query): What period, from and until apply to: when the ticket came in, or was closed. Default closed when status is only closed, else createdfrom(Query): With or without until: first day of the windowuntil(Query): Last day of the window, includedscope(Query): The inbox's scope: mine is assigned to the caller or one of their teams, unassigned has neither a person nor a team; all, or leaving it out, lists every ticket the other filters matchupdated_before(Query): Only tickets last changed before this time: the closed ones older than the live tickets shapeq(Query): A ticket number (T-2039), or full-text search (German stemming) over title, summary and the text of messages, documents and commentsview_id(Query): Apply this saved view's filter; filter parameters given here replace its fieldscursor(Query): next_cursor of the previous pagelimit(Query)
GET /v1/tickets/{id}
Read a ticket by its id (not its number: list_tickets q=T-2039 finds that) with its full activity (events, oldest first), its subtasks and the caller's mention
Recht: Vorgänge lesen, anlegen und bearbeiten, am Standort des Vorgangs. Operation: get_ticket.
Parameter:
id(Pfad, Pflicht)
POST /v1/tickets
Create a ticket by hand: a call taken, someone at the counter or an internal to-do, with its status, priority, category, team and assignee
Recht: Vorgänge lesen, anlegen und bearbeiten. Operation: create_ticket. Schreibt: mit Idempotency-Key-Header sicher wiederholbar.
Felder im Body:
assignee_id(string): needs tickets.assign; a bot only from someone who may use it (Ilka: ai.use; a personal bot: its member)category(TicketCategory)contact(string): Who called or came by: a name or a phone numberdescription(string): Shown under the title, like the summary of an incoming ticketlocation_id(string, Pflicht)priority(TicketPriority)source(string, Pflicht): A call staff took, someone at the counter, or the practice's own to-dostatus(TicketStatus)team_id(string): needs tickets.assigntitle(string, Pflicht)
PATCH /v1/tickets/{id}
Change a ticket's title, summary, status, priority, category, location, team, assignee or unread marker
Recht: Vorgänge lesen, anlegen und bearbeiten. Operation: update_ticket. Schreibt: mit Idempotency-Key-Header sicher wiederholbar.
Parameter:
id(Pfad, Pflicht)
Felder im Body:
assignee_id(string): null clears; needs tickets.assign; a bot only from someone who may use it (Ilka: ai.use; a personal bot: its member)category(TicketCategory)location_id(string): Needs tickets.read at the old and the new locationpriority(TicketPriority)snoozed_until(string): null wakes the ticket nowstatus(TicketStatus)summary(string): The text under the title; the analysis keeps one a person wroteteam_id(string): null clears; needs tickets.assigntitle(string)unread(boolean): false also marks the caller's mentions on the ticket as seen
POST /v1/tickets/{id}/comments
Add an internal comment to a ticket, optionally mentioning members
Recht: Vorgänge lesen, anlegen und bearbeiten, am Standort des Vorgangs. Operation: add_comment. Schreibt: mit Idempotency-Key-Header sicher wiederholbar.
Parameter:
id(Pfad, Pflicht)
Felder im Body:
body(string): Its text; a note of files alone may have nonefiles(array): The member's own uploads (POST /files), attached to the ticket with the notementions(array): Member IDs; each gets the ticket in their "mentioned me" view, unread
Aktionen in der Praxissoftware
GET /v1/actions
List the practice-system actions with the JSON Schema of each one's input, for POST /actions/{name}/runs
Recht: keines (jeder API-Zugang). Operation: list_actions.
POST /v1/actions/{name}/runs
Propose a practice-system action for a ticket's patient (book_appointment in a built-in calendar also for a ticket without one, booking its contact): order_medication, order_freetext_medication, order_referral, book_appointment, cancel_appointment, write_casefile (the ticket's summary into the patient record) or file_document (one of the ticket's attachments into the patient record, where the practice system imports from a folder); each input's schema is in GET /actions. The practice's policy decides whether staff must approve it
Recht: Antworten senden und Aktionen vorschlagen. Operation: propose_action_run. Schreibt: mit Idempotency-Key-Header sicher wiederholbar.
Parameter:
name(Pfad, Pflicht): order_medication, order_freetext_medication, order_referral, book_appointment, cancel_appointment, write_casefile or file_document
Felder im Body:
input(, Pflicht): The action's input, see its schemapatient_ref(string, Pflicht): The ticket's patient; empty for a ticket without one: book_appointment then books its contact (guest) in a built-in calendar, order_freetext_medication can be drafted without a patient but cannot execute until linked; other actions return 409 patient_requiredrequest_id(string): Detected request this proposal resolves; must belong to the current analysisticket_id(string, Pflicht)
GET /v1/actions/{name}/options
List the choices for an action's input: orderable medications, visit reasons and free slots, upcoming appointments, or record text groups. 404 when the practice system lacks the action
Recht: Patienten suchen und lesen. Operation: get_action_options.
Parameter:
name(Pfad, Pflicht)patient_ref(Query): Empty for a guest: book_appointment in a built-in calendar, order_freetext_medication can be drafted without a patient but cannot execute until linked; other actions return 409 patient_requiredticket_id(Query): The ticket the run will be on: only what may be booked or cancelled at its locationpartial(Query): JSON object of the input chosen so far, e.g. {"reason_id":"impfung","calendar_id":"kaya"}. book_appointment also takes from and until (YYYY-MM-DD, at most six weeks) for the slots of those days; without them, the first five days with slots
GET /v1/medication-orders/ways
How the practice's software takes medication orders: by itself, by the agent on a practice computer, or by hand
Recht: Vorgänge lesen, anlegen und bearbeiten. Operation: order_ways.
Termine
GET /v1/calendar
The practice's calendars visible to the caller for the practice days from to until (at most 6 weeks): where appointments live (source), each calendar with its location, appointment types, opening times, breaks and the holidays and closures of its location; with a practice system as the source also its appointments, read live. get_calendar_appointments lists what calendars hold, of either source
Recht: Kalender lesen. Operation: get_calendar.
Parameter:
from(Query): First practice day, YYYY-MM-DD; default todayuntil(Query): Last practice day; default a week from fromfresh(Query): Ask the practice system now instead of the cache
GET /v1/calendar/slots
The next free appointments of a type, without a patient: in the calendars named (or at a location, or all the caller sees) that take it, from a practice day on; a built-in calendar's slot honours its hours, breaks, windows, absences, capacity, buffers and the type's needs, and names the room or device each need takes. A location with no calendar of a need's pool has no slots for the type: say why and look at other locations. A practice system's rules for a patient apply when the booking is proposed
Recht: Kalender lesen. Operation: get_slots.
Parameter:
type_id(Query, Pflicht): The appointment type, or a practice system's visit reasoncalendar_ids(Query): Only these calendars; default every one the caller sees that takes the typelocation_id(Query): Only the calendars at this locationfrom(Query): First practice day, YYYY-MM-DD; default todayuntil(Query): Last practice day, at most 41 days after from; default 13 days after fromlimit(Query): The earliest this many
GET /v1/calendar/appointments
What calendars hold on the practice days from to until (at most 6 weeks): each appointment, the part of one a room or device holds for it, and blocked time (absences, maintenance), earliest first, with its patient_ref or who comes, in the calendars named (or at a location, or all the caller sees). For a doctor's day, how full a location is, or who comes when; built-in calendars and a practice system's, read live
Recht: Kalender lesen. Operation: get_calendar_appointments.
Parameter:
calendar_ids(Query): Only these calendars; default every one the caller seeslocation_id(Query): Only the calendars at this locationfrom(Query): First practice day, YYYY-MM-DD; default todayuntil(Query): Last practice day, at most 41 days after from; default a week from fromlimit(Query): The earliest this many
POST /v1/appointments
Book an appointment, with the further calendars its type needs, or block time (kind block: an absence such as vacation, one row over all its days) in a built-in calendar. Staff may book outside hours, breaks and windows, but not into a block or past capacity: 409 appointments_no_overlap. A block may cover booked appointments: they stay booked, to be moved
Recht: Termine buchen und absagen. Operation: create_appointment. Schreibt: mit Idempotency-Key-Header sicher wiederholbar.
Felder im Body:
calendar_id(string, Pflicht)contact(string): An online type's (video appointment's): the email address or mobile number the patient gets its link at; default their own. Required when the patient has neither, or for someone not a known patientemail(string): Who comes, when not a known patient: their email addressends_at(string, Pflicht): Within a day of starts_at for an appointment; a block (an absence) may span dayskind(string)parts(array): The calendar to take for each of the type's needs, in their order; empty or missing: the first free one of its pool. Parts move and cancel with the appointmentpatient_ref(string): The patient in the practice systemphone(string): Who comes, when not a known patient: their phone numberstarts_at(string, Pflicht)take_over(boolean): Book over what patients reserve in forms (409 slot_reserved): their reservations end, their forms say sotitle(string): Who comes, when not a known patient, or why time is blockedtype_id(string): An appointment type the calendar takes
PATCH /v1/appointments/{id}
Move, resize or change a built-in appointment; 409 appointments_no_overlap when the time is booked or blocked. An appointment of a Terminkette whose move breaks the gap to another of its appointments is 409 chain_window: then chain=shift moves its later ones by as much, chain=only moves it alone
Recht: Termine buchen und absagen. Operation: update_appointment. Schreibt: mit Idempotency-Key-Header sicher wiederholbar.
Parameter:
id(Pfad, Pflicht)expected_updated_at(Query): updated_at as the caller last saw it: 409 appointment_changed if it changed since, so a drag never overwrites an edit made meanwhilechain(Query): An appointment of a Terminkette: shift moves its later appointments by as much, keeping the gaps; only moves it alone though a gap breaks. Without it a broken gap is 409 chain_window
Felder im Body:
calendar_id(string, Pflicht)contact(string): An online type's (video appointment's): the email address or mobile number the patient gets its link at; default their own. Required when the patient has neither, or for someone not a known patientemail(string): Who comes, when not a known patient: their email addressends_at(string, Pflicht): Within a day of starts_at for an appointment; a block (an absence) may span dayskind(string)parts(array): The calendar to take for each of the type's needs, in their order; empty or missing: the first free one of its pool. Parts move and cancel with the appointmentpatient_ref(string): The patient in the practice systemphone(string): Who comes, when not a known patient: their phone numberstarts_at(string, Pflicht)take_over(boolean): Book over what patients reserve in forms (409 slot_reserved): their reservations end, their forms say sotitle(string): Who comes, when not a known patient, or why time is blockedtype_id(string): An appointment type the calendar takes
POST /v1/appointments/{id}/cancel
Cancel a built-in appointment or blocked time; chain=true cancels the rest of its Terminkette too and stops its run
Recht: Termine buchen und absagen. Operation: cancel_appointment. Schreibt: mit Idempotency-Key-Header sicher wiederholbar.
Parameter:
id(Pfad, Pflicht)chain(Query): An appointment of a Terminkette: cancel its other upcoming appointments too and stop its run