{"openapi":"3.1.0","info":{"title":"Hubhus Dentist API","version":"1","description":"REST API for reading and writing a clinic's data.\n\n**Authentication:** `Authorization: Bearer hh_live_…`. Tokens are created on Admin → API by users with the permission api:manage. Each token belongs to one clinic, carries scopes (`<resource>:read`, `<resource>:write`, `patients:cpr`) and expires after at most 365 days. Revoked or expired tokens get 401 immediately.\n\n**Paging:** `limit` (1–500, default 100) and `cursor` (the `next_cursor` of the previous page). Rows are ordered by id.\n\n**Sync:** `since` returns records created or changed at or after the time (append-only records: created/signed). Store the time you start a sync and pass it next time.\n\n**Limits:** 120 requests per minute per token (429 with Retry-After). All responses are `Cache-Control: no-store`. A clinic whose free trial has ended is read-only: writes return 403, reads and export keep working."},"servers":[{"url":"/","description":"This installation"}],"security":[{"bearer":[]}],"tags":[{"name":"Patients"},{"name":"Bookings"},{"name":"Journal"},{"name":"Finance"},{"name":"HR"},{"name":"Clinic"},{"name":"Export","description":"Bulk export and this document"}],"paths":{"/api/public/v1/patients":{"get":{"operationId":"list_patients","tags":["Patients"],"summary":"List patients","description":"Patient records. `cpr` is masked (DDMMYY-****) unless the token has patients:cpr; writes of `cpr` are validated for the clinic's country and stored encrypted.\n\nScope: `patients:read` (or `patients:write`). Add `patients:cpr` to receive full CPR numbers.","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Patients"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"create_patients","tags":["Patients"],"summary":"Create patients","description":"Scope: `patients:write`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientsCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Patients"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/patients/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_patients","tags":["Patients"],"summary":"Get one patients","description":"Scope: `patients:read` (or `patients:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Patients"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"update_patients","tags":["Patients"],"summary":"Update patients","description":"Scope: `patients:write`. Only the fields sent are changed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientsUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Patients"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/bookings":{"get":{"operationId":"list_bookings","tags":["Bookings"],"summary":"List bookings","description":"Appointments. Create and move only through POST /bookings and /bookings/{id}/reschedule (same availability check as staff booking). PATCH allows status, note, patient_id and locale.\n\nScope: `bookings:read` (or `bookings:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Bookings"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"create_bookings","tags":["Bookings"],"summary":"Create a booking","description":"Scope: `bookings:write`. Re-runs the same availability check as staff booking; the database blocks double booking.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingCreate"}}}},"responses":{"201":{"description":"Created; `data.booking_items` lists the services","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Bookings"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"description":"The time is no longer free","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/bookings/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_bookings","tags":["Bookings"],"summary":"Get one bookings","description":"Scope: `bookings:read` (or `bookings:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Bookings"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"update_bookings","tags":["Bookings"],"summary":"Update bookings","description":"Scope: `bookings:write`. Only the fields sent are changed. Times and resources cannot be patched; use POST /api/public/v1/bookings/{id}/reschedule.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingsUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Bookings"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/services":{"get":{"operationId":"list_services","tags":["Bookings"],"summary":"List services","description":"Bookable services with duration and price.\n\nScope: `services:read` (or `services:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Services"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"create_services","tags":["Bookings"],"summary":"Create services","description":"Scope: `services:write`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServicesCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Services"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/services/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_services","tags":["Bookings"],"summary":"Get one services","description":"Scope: `services:read` (or `services:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Services"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"update_services","tags":["Bookings"],"summary":"Update services","description":"Scope: `services:write`. Only the fields sent are changed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServicesUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Services"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/staff":{"get":{"operationId":"list_staff","tags":["Bookings"],"summary":"List staff","description":"Practitioners and assistants.\n\nScope: `staff:read` (or `staff:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Staff"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"create_staff","tags":["Bookings"],"summary":"Create staff","description":"Scope: `staff:write`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Staff"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/staff/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_staff","tags":["Bookings"],"summary":"Get one staff","description":"Scope: `staff:read` (or `staff:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Staff"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"update_staff","tags":["Bookings"],"summary":"Update staff","description":"Scope: `staff:write`. Only the fields sent are changed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Staff"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/chairs":{"get":{"operationId":"list_chairs","tags":["Bookings"],"summary":"List chairs","description":"Treatment rooms / chairs.\n\nScope: `chairs:read` (or `chairs:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Chairs"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"create_chairs","tags":["Bookings"],"summary":"Create chairs","description":"Scope: `chairs:write`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChairsCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Chairs"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/chairs/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_chairs","tags":["Bookings"],"summary":"Get one chairs","description":"Scope: `chairs:read` (or `chairs:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Chairs"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"update_chairs","tags":["Bookings"],"summary":"Update chairs","description":"Scope: `chairs:write`. Only the fields sent are changed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChairsUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Chairs"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/journal-notes":{"get":{"operationId":"list_journal-notes","tags":["Journal"],"summary":"List journal-notes","description":"Clinical notes. Append-only: a correction is a new note pointing to the old one. NOR templates are validated (required sections, consent).\n\nScope: `journal-notes:read` (or `journal-notes:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/JournalNotes"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"create_journal-notes","tags":["Journal"],"summary":"Create journal-notes","description":"Scope: `journal-notes:write`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalNotesCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/JournalNotes"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/journal-notes/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_journal-notes","tags":["Journal"],"summary":"Get one journal-notes","description":"Scope: `journal-notes:read` (or `journal-notes:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/JournalNotes"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/treatment-plans":{"get":{"operationId":"list_treatment-plans","tags":["Journal"],"summary":"List treatment-plans","description":"Treatment plans and their status.\n\nScope: `treatment-plans:read` (or `treatment-plans:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TreatmentPlans"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"create_treatment-plans","tags":["Journal"],"summary":"Create treatment-plans","description":"Scope: `treatment-plans:write`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TreatmentPlansCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/TreatmentPlans"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/treatment-plans/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_treatment-plans","tags":["Journal"],"summary":"Get one treatment-plans","description":"Scope: `treatment-plans:read` (or `treatment-plans:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/TreatmentPlans"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"update_treatment-plans","tags":["Journal"],"summary":"Update treatment-plans","description":"Scope: `treatment-plans:write`. Only the fields sent are changed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TreatmentPlansUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/TreatmentPlans"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/charges":{"get":{"operationId":"list_charges","tags":["Finance"],"summary":"List charges","description":"Services registered on a patient (price, subsidy, third-party share). Only unpaid charges can change; closed months are locked.\n\nScope: `charges:read` (or `charges:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Charges"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"create_charges","tags":["Finance"],"summary":"Create charges","description":"Scope: `charges:write`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChargesCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Charges"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/charges/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_charges","tags":["Finance"],"summary":"Get one charges","description":"Scope: `charges:read` (or `charges:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Charges"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/payments":{"get":{"operationId":"list_payments","tags":["Finance"],"summary":"List payments","description":"Payments registered at the front desk. Read-only.\n\nScope: `payments:read` (or `payments:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Payments"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/payments/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_payments","tags":["Finance"],"summary":"Get one payments","description":"Scope: `payments:read` (or `payments:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Payments"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/recalls":{"get":{"operationId":"list_recalls","tags":["Bookings"],"summary":"List recalls","description":"Recall schedule per patient (check-up intervals).\n\nScope: `recalls:read` (or `recalls:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Recalls"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"create_recalls","tags":["Bookings"],"summary":"Create recalls","description":"Scope: `recalls:write`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallsCreate"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Recalls"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/recalls/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_recalls","tags":["Bookings"],"summary":"Get one recalls","description":"Scope: `recalls:read` (or `recalls:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Recalls"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"update_recalls","tags":["Bookings"],"summary":"Update recalls","description":"Scope: `recalls:write`. Only the fields sent are changed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecallsUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Recalls"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/waitlist":{"get":{"operationId":"list_waitlist","tags":["Bookings"],"summary":"List waitlist","description":"Patients waiting for an earlier time.\n\nScope: `waitlist:read` (or `waitlist:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Waitlist"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/waitlist/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_waitlist","tags":["Bookings"],"summary":"Get one waitlist","description":"Scope: `waitlist:read` (or `waitlist:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Waitlist"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/callback-requests":{"get":{"operationId":"list_callback-requests","tags":["Bookings"],"summary":"List callback-requests","description":"Call-back requests submitted by patients on the booking page.\n\nScope: `callback-requests:read` (or `callback-requests:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CallbackRequests"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/callback-requests/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_callback-requests","tags":["Bookings"],"summary":"Get one callback-requests","description":"Scope: `callback-requests:read` (or `callback-requests:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CallbackRequests"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"update_callback-requests","tags":["Bookings"],"summary":"Update callback-requests","description":"Scope: `callback-requests:write`. Only the fields sent are changed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackRequestsUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/CallbackRequests"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/booking-items":{"get":{"operationId":"list_booking-items","tags":["Bookings"],"summary":"List booking-items","description":"Services on a booking with the price snapshotted at booking time.\n\nScope: `booking-items:read` (or `booking-items:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BookingItems"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/booking-items/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_booking-items","tags":["Bookings"],"summary":"Get one booking-items","description":"Scope: `booking-items:read` (or `booking-items:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/BookingItems"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/treatment-plan-items":{"get":{"operationId":"list_treatment-plan-items","tags":["Journal"],"summary":"List treatment-plan-items","description":"Lines of a treatment plan.\n\nScope: `treatment-plan-items:read` (or `treatment-plan-items:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TreatmentPlanItems"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/treatment-plan-items/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_treatment-plan-items","tags":["Journal"],"summary":"Get one treatment-plan-items","description":"Scope: `treatment-plan-items:read` (or `treatment-plan-items:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/TreatmentPlanItems"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/tooth-findings":{"get":{"operationId":"list_tooth-findings","tags":["Journal"],"summary":"List tooth-findings","description":"Tooth chart findings per tooth and surface.\n\nScope: `tooth-findings:read` (or `tooth-findings:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ToothFindings"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/tooth-findings/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_tooth-findings","tags":["Journal"],"summary":"Get one tooth-findings","description":"Scope: `tooth-findings:read` (or `tooth-findings:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/ToothFindings"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/perio-charts":{"get":{"operationId":"list_perio-charts","tags":["Journal"],"summary":"List perio-charts","description":"Periodontal charts (6 sites per tooth, bleeding, mobility). Append-only.\n\nScope: `perio-charts:read` (or `perio-charts:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PerioCharts"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/perio-charts/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_perio-charts","tags":["Journal"],"summary":"Get one perio-charts","description":"Scope: `perio-charts:read` (or `perio-charts:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/PerioCharts"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/medical":{"get":{"operationId":"list_medical","tags":["Patients"],"summary":"List medical","description":"Medical history (anamnesis) versions. Append-only.\n\nScope: `medical:read` (or `medical:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Medical"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/medical/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_medical","tags":["Patients"],"summary":"Get one medical","description":"Scope: `medical:read` (or `medical:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Medical"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/consents":{"get":{"operationId":"list_consents","tags":["Patients"],"summary":"List consents","description":"Signed treatment-plan consents with plan snapshot and SHA-256 hash. Append-only.\n\nScope: `consents:read` (or `consents:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Consents"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/consents/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_consents","tags":["Patients"],"summary":"Get one consents","description":"Scope: `consents:read` (or `consents:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Consents"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/images":{"get":{"operationId":"list_images","tags":["Journal"],"summary":"List images","description":"X-ray and photo metadata. Files themselves are not served through the API.\n\nScope: `images:read` (or `images:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Images"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/images/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_images","tags":["Journal"],"summary":"Get one images","description":"Scope: `images:read` (or `images:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Images"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/payment-allocations":{"get":{"operationId":"list_payment-allocations","tags":["Finance"],"summary":"List payment-allocations","description":"Which charges each payment covers.\n\nScope: `payment-allocations:read` (or `payment-allocations:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentAllocations"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/payment-allocations/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_payment-allocations","tags":["Finance"],"summary":"Get one payment-allocations","description":"Scope: `payment-allocations:read` (or `payment-allocations:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/PaymentAllocations"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/invoices":{"get":{"operationId":"list_invoices","tags":["Finance"],"summary":"List invoices","description":"Payer invoices and credit notes with sequential numbers. Immutable.\n\nScope: `invoices:read` (or `invoices:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoices"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/invoices/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_invoices","tags":["Finance"],"summary":"Get one invoices","description":"Scope: `invoices:read` (or `invoices:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Invoices"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/time-entries":{"get":{"operationId":"list_time-entries","tags":["HR"],"summary":"List time-entries","description":"Registered working time.\n\nScope: `time-entries:read` (or `time-entries:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TimeEntries"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/time-entries/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_time-entries","tags":["HR"],"summary":"Get one time-entries","description":"Scope: `time-entries:read` (or `time-entries:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/TimeEntries"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/absences":{"get":{"operationId":"list_absences","tags":["HR"],"summary":"List absences","description":"Holidays, sickness and other absence.\n\nScope: `absences:read` (or `absences:write`).","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"One page, ordered by id","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Absences"}},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Pass as `cursor` for the next page; null on the last page"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/absences/{id}":{"parameters":[{"$ref":"#/components/parameters/id"}],"get":{"operationId":"get_absences","tags":["HR"],"summary":"Get one absences","description":"Scope: `absences:read` (or `absences:write`).","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Absences"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/clinic":{"get":{"operationId":"get_clinic","tags":["Clinic"],"summary":"Get clinic","description":"The token's own clinic: name, address, country, currency, time zone.\n\nScope: `clinic:read` (or `clinic:write`).","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Clinic"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/availability":{"get":{"operationId":"get_availability","tags":["Bookings"],"summary":"Free start times","description":"Scope: `bookings:read`.","parameters":[{"name":"serviceIds","in":"query","required":true,"description":"Comma-separated service ids (1–5)","schema":{"type":"string"}},{"name":"fromDate","in":"query","required":true,"description":"First clinic-local date, YYYY-MM-DD","schema":{"type":"string","format":"date"}},{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":14,"default":7}},{"name":"patientType","in":"query","schema":{"type":"string","enum":["new","existing"],"default":"existing"}},{"name":"preferredStaffId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"excludeBookingId","in":"query","description":"When moving a booking: its own times count as free (use with POST /bookings/{id}/reschedule)","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Free times per day","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Availability"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/bookings/{id}/reschedule":{"parameters":[{"$ref":"#/components/parameters/id"}],"post":{"operationId":"reschedule_bookings","tags":["Bookings"],"summary":"Move a booking","description":"Scope: `bookings:write`. Cancels the old booking (cancelled by clinic) and creates the new one in a single transaction: if the new time is taken, the original booking is unchanged. The booking's own times count as free, so it can move by e.g. 15 minutes; patient link, language and referral follow the new booking.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reschedule"}}}},"responses":{"200":{"description":"The new booking; `replaces` is the cancelled booking's id","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Bookings"},"replaces":{"type":"string","format":"uuid"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"description":"The time is not free","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/export":{"get":{"operationId":"export","tags":["Export"],"summary":"Bulk export (NDJSON)","description":"Streams every record the token can read, one JSON object per line: `{type:'meta'}`, `{type:'record',resource,data}`, `{type:'summary',resource,count}` per resource and a final `{type:'end',count}`. **A missing end line means the export was interrupted** – retry. Same masking as the list endpoints; counts as one request.","parameters":[{"name":"resources","in":"query","description":"Comma-separated resource names; default = every readable resource","schema":{"type":"string"}},{"$ref":"#/components/parameters/since"}],"responses":{"200":{"description":"NDJSON stream","content":{"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/public/v1/openapi":{"get":{"operationId":"openapi","tags":["Export"],"summary":"This document","security":[],"responses":{"200":{"description":"OpenAPI 3.1 JSON"}}}}},"webhooks":{"booking.created":{"post":{"summary":"booking.created","description":"Sent as JSON to the clinic's https endpoint. Verify `X-Hubhus-Signature: sha256=<hex>` = HMAC-SHA256 of the raw body with the endpoint secret. Answer 2xx within 10 s; other answers are retried after 1, 4, 9 and 16 minutes (5 attempts). Redirects are not followed.","parameters":[{"name":"X-Hubhus-Event","in":"header","schema":{"type":"string"}},{"name":"X-Hubhus-Delivery","in":"header","schema":{"type":"string"}},{"name":"X-Hubhus-Signature","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"booking.cancelled":{"post":{"summary":"booking.cancelled","description":"Sent as JSON to the clinic's https endpoint. Verify `X-Hubhus-Signature: sha256=<hex>` = HMAC-SHA256 of the raw body with the endpoint secret. Answer 2xx within 10 s; other answers are retried after 1, 4, 9 and 16 minutes (5 attempts). Redirects are not followed.","parameters":[{"name":"X-Hubhus-Event","in":"header","schema":{"type":"string"}},{"name":"X-Hubhus-Delivery","in":"header","schema":{"type":"string"}},{"name":"X-Hubhus-Signature","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"booking.rescheduled":{"post":{"summary":"booking.rescheduled","description":"Sent as JSON to the clinic's https endpoint. Verify `X-Hubhus-Signature: sha256=<hex>` = HMAC-SHA256 of the raw body with the endpoint secret. Answer 2xx within 10 s; other answers are retried after 1, 4, 9 and 16 minutes (5 attempts). Redirects are not followed.","parameters":[{"name":"X-Hubhus-Event","in":"header","schema":{"type":"string"}},{"name":"X-Hubhus-Delivery","in":"header","schema":{"type":"string"}},{"name":"X-Hubhus-Signature","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"booking.attended":{"post":{"summary":"booking.attended","description":"Sent as JSON to the clinic's https endpoint. Verify `X-Hubhus-Signature: sha256=<hex>` = HMAC-SHA256 of the raw body with the endpoint secret. Answer 2xx within 10 s; other answers are retried after 1, 4, 9 and 16 minutes (5 attempts). Redirects are not followed.","parameters":[{"name":"X-Hubhus-Event","in":"header","schema":{"type":"string"}},{"name":"X-Hubhus-Delivery","in":"header","schema":{"type":"string"}},{"name":"X-Hubhus-Signature","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"booking.no_show":{"post":{"summary":"booking.no_show","description":"Sent as JSON to the clinic's https endpoint. Verify `X-Hubhus-Signature: sha256=<hex>` = HMAC-SHA256 of the raw body with the endpoint secret. Answer 2xx within 10 s; other answers are retried after 1, 4, 9 and 16 minutes (5 attempts). Redirects are not followed.","parameters":[{"name":"X-Hubhus-Event","in":"header","schema":{"type":"string"}},{"name":"X-Hubhus-Delivery","in":"header","schema":{"type":"string"}},{"name":"X-Hubhus-Signature","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"hh_live_…"}},"parameters":{"id":{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},"limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},"cursor":{"name":"cursor","in":"query","description":"next_cursor from the previous page","schema":{"type":"string","format":"uuid"}},"since":{"name":"since","in":"query","description":"ISO 8601 with offset, e.g. 2026-10-01T00:00:00Z","schema":{"type":"string","format":"date-time"}}},"responses":{"E400":{"description":"Invalid input (query, body, id or reference to another clinic)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E401":{"description":"Missing, unknown, expired or revoked token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E403":{"description":"Missing scope, IP not allowed, or clinic read-only","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E404":{"description":"Not found in the token's clinic","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E409":{"description":"Conflict (duplicate CPR or other unique value)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable reason"}}},"Patients":{"type":"object","properties":{"address":{"type":["string","null"]},"archived":{"type":"boolean"},"birth_date":{"type":["string","null"],"format":"date"},"clinic_id":{"type":["string","null"],"format":"uuid"},"consents":{"description":"Any JSON value"},"created_at":{"type":"string","format":"date-time"},"email":{"type":"string"},"external_ref":{"type":["string","null"]},"gp_name":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"insurance_group":{"type":"string"},"name":{"type":"string"},"note":{"type":["string","null"]},"phone":{"type":"string"},"relative_name":{"type":["string","null"]},"relative_phone":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"},"cpr":{"type":["string","null"],"description":"Masked (DDMMYY-****) unless the token has patients:cpr; full reveals are logged."}}},"PatientsCreate":{"type":"object","properties":{"address":{"type":["string","null"]},"archived":{"type":"boolean"},"birth_date":{"type":["string","null"],"format":"date"},"consents":{"description":"Any JSON value"},"email":{"type":"string"},"external_ref":{"type":["string","null"]},"gp_name":{"type":["string","null"]},"insurance_group":{"type":"string"},"name":{"type":"string"},"note":{"type":["string","null"]},"phone":{"type":"string"},"relative_name":{"type":["string","null"]},"relative_phone":{"type":["string","null"]},"cpr":{"type":["string","null"],"description":"Masked (DDMMYY-****) unless the token has patients:cpr; full reveals are logged."}}},"PatientsUpdate":{"type":"object","properties":{"address":{"type":["string","null"]},"archived":{"type":"boolean"},"birth_date":{"type":["string","null"],"format":"date"},"consents":{"description":"Any JSON value"},"email":{"type":"string"},"external_ref":{"type":["string","null"]},"gp_name":{"type":["string","null"]},"insurance_group":{"type":"string"},"name":{"type":"string"},"note":{"type":["string","null"]},"phone":{"type":"string"},"relative_name":{"type":["string","null"]},"relative_phone":{"type":["string","null"]},"cpr":{"type":["string","null"],"description":"Masked (DDMMYY-****) unless the token has patients:cpr; full reveals are logged."}}},"Bookings":{"type":"object","properties":{"acute":{"type":"boolean"},"cancelled_at":{"type":["string","null"],"format":"date-time"},"cancelled_by":{"type":["string","null"]},"chair_id":{"type":["string","null"],"format":"uuid"},"clinic_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"lead_staff_id":{"type":["string","null"],"format":"uuid"},"locale":{"type":"string"},"marker_id":{"type":["string","null"],"format":"uuid"},"morning_reminder_sent_at":{"type":["string","null"],"format":"date-time"},"nervous":{"type":"boolean"},"note":{"type":["string","null"]},"patient_email":{"type":"string"},"patient_id":{"type":["string","null"],"format":"uuid"},"patient_name":{"type":"string"},"patient_phone":{"type":"string"},"patient_type":{"type":"string"},"referral_code":{"type":["string","null"]},"reminder_sent_at":{"type":["string","null"],"format":"date-time"},"source":{"type":"string"},"starts_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["confirmed","attended","no_show","cancelled"]},"updated_at":{"type":"string","format":"date-time"}}},"BookingsUpdate":{"type":"object","properties":{"status":{"type":"string","enum":["confirmed","attended","no_show","cancelled"]},"note":{"type":["string","null"]},"patient_id":{"type":["string","null"],"format":"uuid"},"locale":{"type":"string"}}},"Services":{"type":"object","properties":{"active":{"type":"boolean"},"allowed_chair_ids":{"type":["array","null"],"items":{"type":"string"}},"buffer_after":{"type":"number"},"calendar_color":{"type":"string"},"clinic_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"duration_existing":{"type":"number"},"duration_new":{"type":"number"},"expected_price_dkk":{"type":["number","null"]},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"online":{"type":"boolean"},"price_from":{"type":["string","null"]},"sort_order":{"type":"number"},"translations":{"description":"Any JSON value"},"updated_at":{"type":"string","format":"date-time"}}},"ServicesCreate":{"type":"object","properties":{"active":{"type":"boolean"},"allowed_chair_ids":{"type":["array","null"],"items":{"type":"string"}},"buffer_after":{"type":"number"},"calendar_color":{"type":"string"},"description":{"type":["string","null"]},"duration_existing":{"type":"number"},"duration_new":{"type":"number"},"expected_price_dkk":{"type":["number","null"]},"name":{"type":"string"},"online":{"type":"boolean"},"price_from":{"type":["string","null"]},"sort_order":{"type":"number"},"translations":{"description":"Any JSON value"}}},"ServicesUpdate":{"type":"object","properties":{"active":{"type":"boolean"},"allowed_chair_ids":{"type":["array","null"],"items":{"type":"string"}},"buffer_after":{"type":"number"},"calendar_color":{"type":"string"},"description":{"type":["string","null"]},"duration_existing":{"type":"number"},"duration_new":{"type":"number"},"expected_price_dkk":{"type":["number","null"]},"name":{"type":"string"},"online":{"type":"boolean"},"price_from":{"type":["string","null"]},"sort_order":{"type":"number"},"translations":{"description":"Any JSON value"}}},"Staff":{"type":"object","properties":{"active":{"type":"boolean"},"authorization_id":{"type":["string","null"],"format":"uuid"},"bookable_online":{"type":"boolean"},"clinic_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"role":{"type":"string","enum":["dentist","hygienist","assistant"]},"sort_order":{"type":"number"},"title":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":["string","null"],"format":"uuid"}}},"StaffCreate":{"type":"object","properties":{"active":{"type":"boolean"},"authorization_id":{"type":["string","null"],"format":"uuid"},"bookable_online":{"type":"boolean"},"name":{"type":"string"},"role":{"type":"string","enum":["dentist","hygienist","assistant"]},"sort_order":{"type":"number"},"title":{"type":["string","null"]},"user_id":{"type":["string","null"],"format":"uuid"}}},"StaffUpdate":{"type":"object","properties":{"active":{"type":"boolean"},"authorization_id":{"type":["string","null"],"format":"uuid"},"bookable_online":{"type":"boolean"},"name":{"type":"string"},"role":{"type":"string","enum":["dentist","hygienist","assistant"]},"sort_order":{"type":"number"},"title":{"type":["string","null"]},"user_id":{"type":["string","null"],"format":"uuid"}}},"Chairs":{"type":"object","properties":{"active":{"type":"boolean"},"clinic_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"sort_order":{"type":"number"},"updated_at":{"type":"string","format":"date-time"}}},"ChairsCreate":{"type":"object","properties":{"active":{"type":"boolean"},"name":{"type":"string"},"sort_order":{"type":"number"}}},"ChairsUpdate":{"type":"object","properties":{"active":{"type":"boolean"},"name":{"type":"string"},"sort_order":{"type":"number"}}},"JournalNotes":{"type":"object","properties":{"author_email":{"type":"string"},"body":{"type":"string"},"booking_id":{"type":["string","null"],"format":"uuid"},"clinic_id":{"type":["string","null"],"format":"uuid"},"correction_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":["string","null"]},"entry_date":{"type":"string","format":"date"},"id":{"type":"string","format":"uuid"},"import_key":{"type":["string","null"]},"imported_author":{"type":["string","null"]},"imported_source":{"type":["string","null"]},"patient_id":{"type":"string","format":"uuid"},"plan_id":{"type":["string","null"],"format":"uuid"},"sections":{"description":"Any JSON value"},"supersedes_id":{"type":["string","null"],"format":"uuid"},"teeth":{"type":"array","items":{"type":"number"}},"template":{"type":"string"},"title":{"type":"string"}}},"JournalNotesCreate":{"type":"object","properties":{"body":{"type":"string"},"booking_id":{"type":["string","null"],"format":"uuid"},"correction_reason":{"type":["string","null"]},"entry_date":{"type":"string","format":"date"},"patient_id":{"type":"string","format":"uuid"},"plan_id":{"type":["string","null"],"format":"uuid"},"sections":{"description":"Any JSON value"},"teeth":{"type":"array","items":{"type":"number"}},"template":{"type":"string"},"title":{"type":"string"}}},"TreatmentPlans":{"type":"object","properties":{"accepted_at":{"type":["string","null"],"format":"date-time"},"clinic_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"note":{"type":["string","null"]},"patient_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"title":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"TreatmentPlansCreate":{"type":"object","properties":{"accepted_at":{"type":["string","null"],"format":"date-time"},"note":{"type":["string","null"]},"patient_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"title":{"type":"string"}}},"TreatmentPlansUpdate":{"type":"object","properties":{"accepted_at":{"type":["string","null"],"format":"date-time"},"note":{"type":["string","null"]},"patient_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"title":{"type":"string"}}},"Charges":{"type":"object","properties":{"booking_id":{"type":["string","null"],"format":"uuid"},"clinic_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":["string","null"]},"description":{"type":"string"},"id":{"type":"string","format":"uuid"},"patient_id":{"type":"string","format":"uuid"},"performed_on":{"type":"string","format":"date"},"plan_item_id":{"type":["string","null"],"format":"uuid"},"price_dkk":{"type":"number"},"service_id":{"type":["string","null"],"format":"uuid"},"staff_id":{"type":["string","null"],"format":"uuid"},"status":{"type":"string"},"subsidy_dkk":{"type":"number"},"third_party_dkk":{"type":"number"},"third_party_invoice_id":{"type":["string","null"],"format":"uuid"},"third_party_payer":{"type":["string","null"]},"third_party_ref":{"type":["string","null"]},"third_party_status":{"type":"string"},"tooth":{"type":["number","null"]},"updated_at":{"type":"string","format":"date-time"},"void_reason":{"type":["string","null"]},"voided_at":{"type":["string","null"],"format":"date-time"}}},"ChargesCreate":{"type":"object","properties":{"booking_id":{"type":["string","null"],"format":"uuid"},"description":{"type":"string"},"patient_id":{"type":"string","format":"uuid"},"performed_on":{"type":"string","format":"date"},"plan_item_id":{"type":["string","null"],"format":"uuid"},"price_dkk":{"type":"number"},"service_id":{"type":["string","null"],"format":"uuid"},"staff_id":{"type":["string","null"],"format":"uuid"},"status":{"type":"string"},"subsidy_dkk":{"type":"number"},"third_party_dkk":{"type":"number"},"third_party_invoice_id":{"type":["string","null"],"format":"uuid"},"third_party_payer":{"type":["string","null"]},"third_party_ref":{"type":["string","null"]},"third_party_status":{"type":"string"},"tooth":{"type":["number","null"]},"void_reason":{"type":["string","null"]},"voided_at":{"type":["string","null"],"format":"date-time"}}},"Payments":{"type":"object","properties":{"amount_dkk":{"type":"number"},"clinic_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"method":{"type":"string"},"note":{"type":["string","null"]},"patient_id":{"type":"string","format":"uuid"},"reverse_reason":{"type":["string","null"]},"reversed_at":{"type":["string","null"],"format":"date-time"},"reversed_by":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"}}},"Recalls":{"type":"object","properties":{"clinic_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"interval_months":{"type":"number"},"last_action_at":{"type":["string","null"],"format":"date-time"},"last_booking_id":{"type":["string","null"],"format":"uuid"},"locale":{"type":"string"},"mode":{"type":"string"},"next_due_date":{"type":"string","format":"date"},"patient_email":{"type":"string"},"patient_name":{"type":"string"},"patient_phone":{"type":"string"},"preferred_staff_id":{"type":["string","null"],"format":"uuid"},"service_id":{"type":"string","format":"uuid"},"stage":{"type":"string"},"status":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"RecallsCreate":{"type":"object","properties":{"interval_months":{"type":"number"},"last_action_at":{"type":["string","null"],"format":"date-time"},"last_booking_id":{"type":["string","null"],"format":"uuid"},"locale":{"type":"string"},"mode":{"type":"string"},"next_due_date":{"type":"string","format":"date"},"patient_email":{"type":"string"},"patient_name":{"type":"string"},"patient_phone":{"type":"string"},"preferred_staff_id":{"type":["string","null"],"format":"uuid"},"service_id":{"type":"string","format":"uuid"},"stage":{"type":"string"},"status":{"type":"string"}}},"RecallsUpdate":{"type":"object","properties":{"interval_months":{"type":"number"},"last_action_at":{"type":["string","null"],"format":"date-time"},"last_booking_id":{"type":["string","null"],"format":"uuid"},"locale":{"type":"string"},"mode":{"type":"string"},"next_due_date":{"type":"string","format":"date"},"patient_email":{"type":"string"},"patient_name":{"type":"string"},"patient_phone":{"type":"string"},"preferred_staff_id":{"type":["string","null"],"format":"uuid"},"service_id":{"type":"string","format":"uuid"},"stage":{"type":"string"},"status":{"type":"string"}}},"Waitlist":{"type":"object","properties":{"booking_id":{"type":"string","format":"uuid"},"clinic_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"earlier_slot_at":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"notified_at":{"type":["string","null"],"format":"date-time"},"status":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"CallbackRequests":{"type":"object","properties":{"clinic_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"handled_at":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"locale":{"type":"string"},"name":{"type":"string"},"nervous":{"type":"boolean"},"page":{"type":["string","null"]},"phone":{"type":"string"},"preferred_time":{"type":"string"},"status":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"CallbackRequestsUpdate":{"type":"object","properties":{"handled_at":{"type":["string","null"],"format":"date-time"},"locale":{"type":"string"},"name":{"type":"string"},"nervous":{"type":"boolean"},"page":{"type":["string","null"]},"phone":{"type":"string"},"preferred_time":{"type":"string"},"status":{"type":"string"}}},"BookingItems":{"type":"object","properties":{"booking_id":{"type":"string","format":"uuid"},"campaign_id":{"type":["string","null"],"format":"uuid"},"clinic_id":{"type":["string","null"],"format":"uuid"},"duration_minutes":{"type":"number"},"id":{"type":"string","format":"uuid"},"position":{"type":"number"},"price_dkk":{"type":["number","null"]},"service_id":{"type":["string","null"],"format":"uuid"},"service_name":{"type":"string"}}},"TreatmentPlanItems":{"type":"object","properties":{"clinic_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"description":{"type":"string"},"finding_id":{"type":["string","null"],"format":"uuid"},"id":{"type":"string","format":"uuid"},"option_group":{"type":["string","null"]},"plan_id":{"type":"string","format":"uuid"},"position":{"type":"number"},"price_dkk":{"type":"number"},"service_id":{"type":["string","null"],"format":"uuid"},"status":{"type":"string"},"subsidy_dkk":{"type":"number"},"tooth":{"type":["number","null"]},"updated_at":{"type":"string","format":"date-time"}}},"ToothFindings":{"type":"object","properties":{"author_email":{"type":"string"},"clinic_id":{"type":["string","null"],"format":"uuid"},"code":{"type":"string"},"created_by":{"type":["string","null"]},"done_at":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"note":{"type":["string","null"]},"patient_id":{"type":"string","format":"uuid"},"recorded_at":{"type":"string","format":"date-time"},"removed_at":{"type":["string","null"],"format":"date-time"},"removed_reason":{"type":["string","null"]},"status":{"type":"string"},"surfaces":{"type":"array","items":{"type":"string"}},"tooth":{"type":"number"},"updated_at":{"type":"string","format":"date-time"}}},"PerioCharts":{"type":"object","properties":{"author_email":{"type":"string"},"clinic_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":["string","null"]},"data":{"description":"Any JSON value"},"id":{"type":"string","format":"uuid"},"patient_id":{"type":"string","format":"uuid"}}},"Medical":{"type":"object","properties":{"author_email":{"type":"string"},"clinic_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":["string","null"]},"data":{"description":"Any JSON value"},"id":{"type":"string","format":"uuid"},"patient_id":{"type":"string","format":"uuid"},"warnings":{"type":"array","items":{"type":"string"}}}},"Consents":{"type":"object","properties":{"clinic_id":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"},"patient_id":{"type":"string","format":"uuid"},"plan_id":{"type":"string","format":"uuid"},"plan_snapshot":{"description":"Any JSON value"},"recorded_by":{"type":["string","null"]},"signature_png":{"type":"string"},"signed_at":{"type":"string","format":"date-time"},"signer_name":{"type":"string"},"signer_relation":{"type":"string"},"snapshot_sha256":{"type":"string"}}},"Images":{"type":"object","properties":{"author_email":{"type":"string"},"clinic_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"note":{"type":["string","null"]},"patient_id":{"type":"string","format":"uuid"},"storage_path":{"type":"string"},"taken_at":{"type":"string","format":"date-time"},"tooth":{"type":["number","null"]},"updated_at":{"type":"string","format":"date-time"}}},"PaymentAllocations":{"type":"object","properties":{"amount_dkk":{"type":"number"},"charge_id":{"type":"string","format":"uuid"},"clinic_id":{"type":["string","null"],"format":"uuid"},"id":{"type":"string","format":"uuid"},"payment_id":{"type":"string","format":"uuid"}}},"Invoices":{"type":"object","properties":{"buyer":{"description":"Any JSON value"},"clinic_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":["string","null"]},"credits_invoice_id":{"type":["string","null"],"format":"uuid"},"currency":{"type":"string"},"due_on":{"type":["string","null"],"format":"date"},"id":{"type":"string","format":"uuid"},"issued_on":{"type":"string","format":"date"},"kind":{"type":"string"},"lines":{"description":"Any JSON value"},"number":{"type":"number"},"payer":{"type":"string"},"reason":{"type":["string","null"]},"seller":{"description":"Any JSON value"},"total_minor":{"type":"number"}}},"TimeEntries":{"type":"object","properties":{"break_minutes":{"type":"number"},"break_paid":{"type":"boolean"},"clinic_id":{"type":["string","null"],"format":"uuid"},"comp":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":["string","null"]},"end_at":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"},"note":{"type":["string","null"]},"source":{"type":"string"},"staff_id":{"type":"string","format":"uuid"},"start_at":{"type":"string","format":"date-time"},"status":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"work_date":{"type":"string","format":"date"}}},"Absences":{"type":"object","properties":{"block_id":{"type":["string","null"],"format":"uuid"},"clinic_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":["string","null"]},"decided_at":{"type":["string","null"],"format":"date-time"},"decided_by":{"type":["string","null"]},"from_date":{"type":"string","format":"date"},"hours":{"type":["number","null"]},"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"note":{"type":["string","null"]},"staff_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"sworn":{"type":"boolean"},"to_date":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date-time"}}},"Clinic":{"type":"object","properties":{"active":{"type":"boolean"},"address":{"type":["string","null"]},"bank_account":{"type":["string","null"]},"bank_reg":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string"},"cvr":{"type":["string","null"]},"default_locale":{"type":"string"},"email":{"type":["string","null"]},"gln":{"type":["string","null"]},"iban":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"invoice_payment_days":{"type":"number"},"is_demo":{"type":"boolean"},"log_retention_years":{"type":"number"},"name":{"type":"string"},"org_id":{"type":"string","format":"uuid"},"phone":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"privacy_url":{"type":["string","null"]},"privacy_urls":{"description":"Any JSON value"},"provider_number":{"type":["string","null"]},"slug":{"type":["string","null"]},"timezone":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}}},"BookingCreate":{"type":"object","required":["serviceIds","patientType","start","patient"],"properties":{"serviceIds":{"type":"array","minItems":1,"items":{"type":"string","format":"uuid"}},"patientType":{"type":"string","enum":["new","existing"]},"start":{"type":"string","format":"date-time","description":"An exact free start time from GET /availability (UTC or with offset)"},"preferredStaffId":{"type":["string","null"],"format":"uuid"},"patientId":{"type":"string","format":"uuid","description":"Link to an existing patient"},"nervous":{"type":"boolean"},"acute":{"type":"boolean"},"locale":{"type":"string","description":"Language for messages to the patient, e.g. da, en"},"patient":{"type":"object","required":["name","phone","email"],"properties":{"name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string","format":"email"},"note":{"type":"string"}}}}},"Reschedule":{"type":"object","required":["start"],"properties":{"start":{"type":"string","format":"date-time"},"preferredStaffId":{"type":["string","null"],"format":"uuid","description":"Omitted = same practitioner, null = anyone"}}},"Availability":{"type":"object","required":["time_zone","total_minutes","days"],"properties":{"time_zone":{"type":"string","examples":["Europe/Copenhagen"]},"total_minutes":{"type":"integer","description":"Length of the chosen services together"},"error":{"type":["string","null"],"description":"Why no times can be offered (e.g. no practitioner offers the services)"},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"Clinic-local date"},"times":{"type":"array","description":"Free start times in UTC","items":{"type":"string","format":"date-time"}}}}}}},"WebhookEvent":{"type":"object","required":["event","data","delivery"],"properties":{"event":{"type":"string","enum":["booking.created","booking.cancelled","booking.rescheduled","booking.attended","booking.no_show"]},"delivery":{"type":"string","format":"uuid","description":"Same as X-Hubhus-Delivery; use it to ignore repeats"},"data":{"type":"object","description":"No patient data – fetch the booking with GET /bookings/{id} if needed","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["confirmed","attended","no_show","cancelled"]},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"source":{"type":["string","null"]}}}}}}}}