{"openapi":"3.1.0","info":{"title":"Vetrics Clinic REST API","version":"1.7.0","description":"Released partner contract 1.7.0. Operations that exist only on a newer hub build are omitted until that version is on clinic main. Authenticate with a scoped API key from Settings → API Keys. Send requests to the clinic host that issued the key, not to the documentation host. Browser cross-origin access is not supported for /api/v1; use server-side clients. Platform/VM routes (lead ingest, agent) are excluded. SOAP note bodies require the opt-in soap:read and soap:write scopes. Delivery notes for webhooks: { event, timestamp, data }; headers: Content-Type: application/json, X-Webhook-Event: <event name>, X-Webhook-Signature: <hmac-sha256 hex of raw body>."},"servers":[{"url":"https://{clinicHost}","description":"Clinic host that issued the API key. Requests use /api/v1 on that host. api.vetrics.co serves documentation only.","variables":{"clinicHost":{"default":"your-clinic.vetrics.co","description":"Clinic application hostname, without a scheme or path."}}}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"ovpm_","description":"Scoped API key from Settings → API Keys. Send as Authorization: Bearer <key> or X-API-Key. Rate limit: 600 requests/minute per key (X-RateLimit-* headers)."}},"schemas":{"ApiError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable error message."},"code":{"type":"string","description":"Machine-readable error code when applicable."},"fields":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Field-level validation errors (HTTP 400)."}},"required":["message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"listClientsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Client UUID."},"first_name":{"type":"string","description":"Client given name."},"last_name":{"type":"string","description":"Client family name."},"email":{"type":"string","nullable":true,"description":"Primary email, or null if unset."},"phone":{"type":"string","nullable":true,"description":"Primary phone, or null if unset."},"address":{"type":"string","nullable":true,"description":"Street address line."},"city":{"type":"string","nullable":true,"description":"City / town."},"state":{"type":"string","nullable":true,"description":"County / state / region."},"zip":{"type":"string","nullable":true,"description":"Postal / ZIP code."},"preferred_contact_method":{"type":"string","nullable":true,"description":"Preferred contact channel (phone, email, sms, portal)."},"notes":{"type":"string","nullable":true,"description":"Free-text practice notes about the client (non-clinical)."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","first_name","last_name","email","phone","address","city","state","zip","preferred_contact_method","notes","created_at","updated_at"],"additionalProperties":false},"description":"Page of results."},"pagination":{"type":"object","properties":{"limit":{"type":"integer","description":"Page size applied to this response."},"offset":{"type":"integer","description":"Offset applied to this response."},"total":{"type":"integer","description":"Total matching rows (not just this page)."}},"required":["limit","offset","total"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"createClientResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Client UUID."},"first_name":{"type":"string","description":"Client given name."},"last_name":{"type":"string","description":"Client family name."},"email":{"type":"string","nullable":true,"description":"Primary email, or null if unset."},"phone":{"type":"string","nullable":true,"description":"Primary phone, or null if unset."},"address":{"type":"string","nullable":true,"description":"Street address line."},"city":{"type":"string","nullable":true,"description":"City / town."},"state":{"type":"string","nullable":true,"description":"County / state / region."},"zip":{"type":"string","nullable":true,"description":"Postal / ZIP code."},"preferred_contact_method":{"type":"string","nullable":true,"description":"Preferred contact channel (phone, email, sms, portal)."},"notes":{"type":"string","nullable":true,"description":"Free-text practice notes about the client (non-clinical)."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","first_name","last_name","email","phone","address","city","state","zip","preferred_contact_method","notes","created_at","updated_at"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createClientRequest":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"description":"Client given name."},"last_name":{"type":"string","minLength":1,"description":"Client family name."},"email":{"type":"string","format":"email","description":"Primary email."},"phone":{"type":"string","description":"Primary phone."},"caller_phone":{"type":"string","maxLength":32,"description":"Caller phone. ATJOO must match one existing client before changing that client."},"address":{"type":"string","description":"Street address."},"city":{"type":"string","description":"City / town."},"state":{"type":"string","description":"County / state / region."},"zip":{"type":"string","description":"Postal / ZIP code."},"preferred_contact_method":{"type":"string","enum":["phone","email","sms","portal"],"description":"Explicit preferred channel override. Null/omit follows the engagement persona when set.","nullable":true},"notes":{"type":"string","description":"Free-text client notes."}},"required":["first_name","last_name"],"additionalProperties":false},"getClientResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Client UUID."},"first_name":{"type":"string","description":"Client given name."},"last_name":{"type":"string","description":"Client family name."},"email":{"type":"string","nullable":true,"description":"Primary email, or null if unset."},"phone":{"type":"string","nullable":true,"description":"Primary phone, or null if unset."},"address":{"type":"string","nullable":true,"description":"Street address line."},"city":{"type":"string","nullable":true,"description":"City / town."},"state":{"type":"string","nullable":true,"description":"County / state / region."},"zip":{"type":"string","nullable":true,"description":"Postal / ZIP code."},"preferred_contact_method":{"type":"string","nullable":true,"description":"Preferred contact channel (phone, email, sms, portal)."},"notes":{"type":"string","nullable":true,"description":"Free-text practice notes about the client (non-clinical)."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","first_name","last_name","email","phone","address","city","state","zip","preferred_contact_method","notes","created_at","updated_at"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"updateClientResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Client UUID."},"first_name":{"type":"string","description":"Client given name."},"last_name":{"type":"string","description":"Client family name."},"email":{"type":"string","nullable":true,"description":"Primary email, or null if unset."},"phone":{"type":"string","nullable":true,"description":"Primary phone, or null if unset."},"address":{"type":"string","nullable":true,"description":"Street address line."},"city":{"type":"string","nullable":true,"description":"City / town."},"state":{"type":"string","nullable":true,"description":"County / state / region."},"zip":{"type":"string","nullable":true,"description":"Postal / ZIP code."},"preferred_contact_method":{"type":"string","nullable":true,"description":"Preferred contact channel (phone, email, sms, portal)."},"notes":{"type":"string","nullable":true,"description":"Free-text practice notes about the client (non-clinical)."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","first_name","last_name","email","phone","address","city","state","zip","preferred_contact_method","notes","created_at","updated_at"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"updateClientRequest":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"description":"Client given name."},"last_name":{"type":"string","minLength":1,"description":"Client family name."},"email":{"type":"string","format":"email","description":"Primary email."},"phone":{"type":"string","description":"Primary phone."},"caller_phone":{"type":"string","maxLength":32,"description":"Caller phone. ATJOO must match one existing client before changing that client."},"address":{"type":"string","description":"Street address."},"city":{"type":"string","description":"City / town."},"state":{"type":"string","description":"County / state / region."},"zip":{"type":"string","description":"Postal / ZIP code."},"preferred_contact_method":{"type":"string","enum":["phone","email","sms","portal"],"description":"Explicit preferred channel override. Null/omit follows the engagement persona when set.","nullable":true},"notes":{"type":"string","description":"Free-text client notes."}},"additionalProperties":false},"listPatientsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Patient UUID."},"client_id":{"type":"string","format":"uuid","description":"Owning client UUID."},"name":{"type":"string","description":"Patient name."},"species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Patient species in the public API vocabulary."},"breed":{"type":"string","nullable":true,"description":"Breed label, if known."},"sex":{"type":"string","enum":["male","female","unknown"],"description":"Biological sex. Neutered status is a separate boolean."},"neutered":{"type":"boolean","nullable":true,"description":"Whether the patient is neutered/spayed; null if unknown."},"date_of_birth":{"type":"string","nullable":true,"description":"Date of birth (YYYY-MM-DD) when known."},"color":{"type":"string","nullable":true,"description":"Coat / colour description."},"microchip_number":{"type":"string","nullable":true,"description":"Microchip identifier when recorded."},"status":{"type":"string","enum":["active","inactive","deceased","transferred"],"description":"Patient record status."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","client_id","name","species","breed","sex","neutered","date_of_birth","color","microchip_number","status","created_at","updated_at"],"additionalProperties":false},"description":"Page of results."},"pagination":{"type":"object","properties":{"limit":{"type":"integer","description":"Page size applied to this response."},"offset":{"type":"integer","description":"Offset applied to this response."},"total":{"type":"integer","description":"Total matching rows (not just this page)."}},"required":["limit","offset","total"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"createPatientResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Patient UUID."},"client_id":{"type":"string","format":"uuid","description":"Owning client UUID."},"name":{"type":"string","description":"Patient name."},"species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Patient species in the public API vocabulary."},"breed":{"type":"string","nullable":true,"description":"Breed label, if known."},"sex":{"type":"string","enum":["male","female","unknown"],"description":"Biological sex. Neutered status is a separate boolean."},"neutered":{"type":"boolean","nullable":true,"description":"Whether the patient is neutered/spayed; null if unknown."},"date_of_birth":{"type":"string","nullable":true,"description":"Date of birth (YYYY-MM-DD) when known."},"color":{"type":"string","nullable":true,"description":"Coat / colour description."},"microchip_number":{"type":"string","nullable":true,"description":"Microchip identifier when recorded."},"status":{"type":"string","enum":["active","inactive","deceased","transferred"],"description":"Patient record status."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","client_id","name","species","breed","sex","neutered","date_of_birth","color","microchip_number","status","created_at","updated_at"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createPatientRequest":{"type":"object","properties":{"client_id":{"type":"string","format":"uuid","description":"Owning client UUID."},"name":{"type":"string","minLength":1,"description":"Patient name."},"species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Patient species in the public API vocabulary."},"breed":{"type":"string","description":"Breed label."},"sex":{"type":"string","enum":["male","female","unknown"],"description":"Biological sex. Neutered status is a separate boolean."},"neutered":{"type":"boolean","description":"Neutered/spayed flag."},"date_of_birth":{"type":"string","description":"Date of birth YYYY-MM-DD."},"color":{"type":"string","description":"Coat / colour."},"microchip_number":{"type":"string","description":"Microchip identifier."},"caller_phone":{"type":"string","maxLength":32,"description":"Caller phone. ATJOO must match the owning client before creating or changing the patient."},"status":{"type":"string","enum":["active","inactive","deceased","transferred"],"description":"Patient status. Defaults to active."}},"required":["client_id","name","species"],"additionalProperties":false},"getPatientResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Patient UUID."},"client_id":{"type":"string","format":"uuid","description":"Owning client UUID."},"name":{"type":"string","description":"Patient name."},"species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Patient species in the public API vocabulary."},"breed":{"type":"string","nullable":true,"description":"Breed label, if known."},"sex":{"type":"string","enum":["male","female","unknown"],"description":"Biological sex. Neutered status is a separate boolean."},"neutered":{"type":"boolean","nullable":true,"description":"Whether the patient is neutered/spayed; null if unknown."},"date_of_birth":{"type":"string","nullable":true,"description":"Date of birth (YYYY-MM-DD) when known."},"color":{"type":"string","nullable":true,"description":"Coat / colour description."},"microchip_number":{"type":"string","nullable":true,"description":"Microchip identifier when recorded."},"status":{"type":"string","enum":["active","inactive","deceased","transferred"],"description":"Patient record status."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","client_id","name","species","breed","sex","neutered","date_of_birth","color","microchip_number","status","created_at","updated_at"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"updatePatientResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Patient UUID."},"client_id":{"type":"string","format":"uuid","description":"Owning client UUID."},"name":{"type":"string","description":"Patient name."},"species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Patient species in the public API vocabulary."},"breed":{"type":"string","nullable":true,"description":"Breed label, if known."},"sex":{"type":"string","enum":["male","female","unknown"],"description":"Biological sex. Neutered status is a separate boolean."},"neutered":{"type":"boolean","nullable":true,"description":"Whether the patient is neutered/spayed; null if unknown."},"date_of_birth":{"type":"string","nullable":true,"description":"Date of birth (YYYY-MM-DD) when known."},"color":{"type":"string","nullable":true,"description":"Coat / colour description."},"microchip_number":{"type":"string","nullable":true,"description":"Microchip identifier when recorded."},"status":{"type":"string","enum":["active","inactive","deceased","transferred"],"description":"Patient record status."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","client_id","name","species","breed","sex","neutered","date_of_birth","color","microchip_number","status","created_at","updated_at"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"updatePatientRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Patient name."},"species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Patient species in the public API vocabulary."},"breed":{"type":"string","description":"Breed label."},"sex":{"type":"string","enum":["male","female","unknown"],"description":"Biological sex. Neutered status is a separate boolean."},"neutered":{"type":"boolean","description":"Neutered/spayed flag."},"date_of_birth":{"type":"string","description":"Date of birth YYYY-MM-DD."},"color":{"type":"string","description":"Coat / colour."},"microchip_number":{"type":"string","description":"Microchip identifier."},"caller_phone":{"type":"string","maxLength":32,"description":"Caller phone. ATJOO must match the owning client before creating or changing the patient."},"status":{"type":"string","enum":["active","inactive","deceased","transferred"],"description":"Patient status. Defaults to active."},"client_id":{"type":"string","format":"uuid","description":"Reassign owning client UUID."}},"additionalProperties":false},"listAppointmentsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Appointment UUID."},"start_time":{"type":"string","description":"UTC ISO-8601 start time."},"end_time":{"type":"string","description":"UTC ISO-8601 end time."},"status":{"type":"string","enum":["requested","scheduled","confirmed","checked_in","in_exam","checked_out","no_show","cancelled"],"description":"Appointment lifecycle status."},"client_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary client UUID when set."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary patient UUID when set."},"doctor_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary clinician / doctor UUID."},"doctor_name":{"type":"string","nullable":true,"description":"Assigned clinician display name when included."},"patient_name":{"type":"string","nullable":true,"description":"Primary patient name when included."},"patient_species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Primary patient species when included.","nullable":true},"patient_breed":{"type":"string","nullable":true,"description":"Primary patient breed when included."},"patient_sex":{"type":"string","enum":["male","female","unknown"],"description":"Primary patient sex when included.","nullable":true},"patient_neutered":{"type":"boolean","nullable":true,"description":"Whether the primary patient is neutered, when included."},"patient_date_of_birth":{"type":"string","nullable":true,"description":"Primary patient date of birth when included."},"patient_weight_kg":{"type":"string","nullable":true,"description":"Primary patient latest weight in kilograms, when included."},"patient_weight_recorded_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 time of the primary patient latest weight, when included."},"client_first_name":{"type":"string","nullable":true,"description":"Primary client given name when included."},"client_last_name":{"type":"string","nullable":true,"description":"Primary client family name when included."},"additional_staff_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Additional staff UUIDs; never includes doctor_id."},"equipment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Allocated equipment UUIDs."},"patients":{"type":"array","items":{"type":"object","properties":{"patient_id":{"type":"string","format":"uuid","description":"Attached patient UUID."},"billing_client_id":{"type":"string","format":"uuid","description":"Client billed for this patient on the appointment."},"is_primary":{"type":"boolean","description":"Whether this is the primary patient."},"attendance_status":{"type":"string","enum":["scheduled","cancelled","no_show","attended_untreated"],"description":"Per-patient attendance status."},"name":{"type":"string","nullable":true,"description":"Patient name when included."},"species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Patient species when included.","nullable":true},"breed":{"type":"string","nullable":true,"description":"Patient breed when included."},"sex":{"type":"string","enum":["male","female","unknown"],"description":"Patient sex when included.","nullable":true},"neutered":{"type":"boolean","nullable":true,"description":"Whether the patient is neutered, when included."},"date_of_birth":{"type":"string","nullable":true,"description":"Patient date of birth when included."},"weight_kg":{"type":"string","nullable":true,"description":"Latest recorded weight in kilograms, when included."},"weight_recorded_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 time of the latest weight, when included."},"client_first_name":{"type":"string","nullable":true,"description":"Billing client given name when included."},"client_last_name":{"type":"string","nullable":true,"description":"Billing client family name when included."}},"required":["patient_id","billing_client_id","is_primary","attendance_status"],"additionalProperties":false},"description":"Attached patients including the primary."},"type_id":{"type":"string","format":"uuid","nullable":true,"description":"Appointment type UUID."},"room_id":{"type":"string","format":"uuid","nullable":true,"description":"Room UUID when allocated."},"notes":{"type":"string","nullable":true,"description":"Appointment notes (scheduling context, not SOAP)."},"entity_version":{"type":"integer","minimum":0,"description":"Optimistic concurrency token. Required on PATCH."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","start_time","end_time","status","client_id","patient_id","doctor_id","additional_staff_ids","equipment_ids","patients","type_id","room_id","notes","entity_version","created_at","updated_at"],"additionalProperties":false},"description":"Page of results."},"pagination":{"type":"object","properties":{"limit":{"type":"integer","description":"Page size applied to this response."},"offset":{"type":"integer","description":"Offset applied to this response."},"total":{"type":"integer","description":"Total matching rows (not just this page)."}},"required":["limit","offset","total"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"createAppointmentResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Appointment UUID."},"start_time":{"type":"string","description":"UTC ISO-8601 start time."},"end_time":{"type":"string","description":"UTC ISO-8601 end time."},"status":{"type":"string","enum":["requested","scheduled","confirmed","checked_in","in_exam","checked_out","no_show","cancelled"],"description":"Appointment lifecycle status."},"client_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary client UUID when set."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary patient UUID when set."},"doctor_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary clinician / doctor UUID."},"doctor_name":{"type":"string","nullable":true,"description":"Assigned clinician display name when included."},"patient_name":{"type":"string","nullable":true,"description":"Primary patient name when included."},"patient_species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Primary patient species when included.","nullable":true},"patient_breed":{"type":"string","nullable":true,"description":"Primary patient breed when included."},"patient_sex":{"type":"string","enum":["male","female","unknown"],"description":"Primary patient sex when included.","nullable":true},"patient_neutered":{"type":"boolean","nullable":true,"description":"Whether the primary patient is neutered, when included."},"patient_date_of_birth":{"type":"string","nullable":true,"description":"Primary patient date of birth when included."},"patient_weight_kg":{"type":"string","nullable":true,"description":"Primary patient latest weight in kilograms, when included."},"patient_weight_recorded_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 time of the primary patient latest weight, when included."},"client_first_name":{"type":"string","nullable":true,"description":"Primary client given name when included."},"client_last_name":{"type":"string","nullable":true,"description":"Primary client family name when included."},"additional_staff_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Additional staff UUIDs; never includes doctor_id."},"equipment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Allocated equipment UUIDs."},"patients":{"type":"array","items":{"type":"object","properties":{"patient_id":{"type":"string","format":"uuid","description":"Attached patient UUID."},"billing_client_id":{"type":"string","format":"uuid","description":"Client billed for this patient on the appointment."},"is_primary":{"type":"boolean","description":"Whether this is the primary patient."},"attendance_status":{"type":"string","enum":["scheduled","cancelled","no_show","attended_untreated"],"description":"Per-patient attendance status."},"name":{"type":"string","nullable":true,"description":"Patient name when included."},"species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Patient species when included.","nullable":true},"breed":{"type":"string","nullable":true,"description":"Patient breed when included."},"sex":{"type":"string","enum":["male","female","unknown"],"description":"Patient sex when included.","nullable":true},"neutered":{"type":"boolean","nullable":true,"description":"Whether the patient is neutered, when included."},"date_of_birth":{"type":"string","nullable":true,"description":"Patient date of birth when included."},"weight_kg":{"type":"string","nullable":true,"description":"Latest recorded weight in kilograms, when included."},"weight_recorded_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 time of the latest weight, when included."},"client_first_name":{"type":"string","nullable":true,"description":"Billing client given name when included."},"client_last_name":{"type":"string","nullable":true,"description":"Billing client family name when included."}},"required":["patient_id","billing_client_id","is_primary","attendance_status"],"additionalProperties":false},"description":"Attached patients including the primary."},"type_id":{"type":"string","format":"uuid","nullable":true,"description":"Appointment type UUID."},"room_id":{"type":"string","format":"uuid","nullable":true,"description":"Room UUID when allocated."},"notes":{"type":"string","nullable":true,"description":"Appointment notes (scheduling context, not SOAP)."},"entity_version":{"type":"integer","minimum":0,"description":"Optimistic concurrency token. Required on PATCH."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","start_time","end_time","status","client_id","patient_id","doctor_id","additional_staff_ids","equipment_ids","patients","type_id","room_id","notes","entity_version","created_at","updated_at"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createAppointmentRequest":{"type":"object","properties":{"start_time":{"type":"string","format":"date-time","description":"UTC ISO-8601 start with offset."},"end_time":{"type":"string","format":"date-time","description":"UTC ISO-8601 end with offset. Must be after start_time."},"client_id":{"type":"string","format":"uuid","description":"Primary client UUID."},"patient_id":{"type":"string","format":"uuid","description":"Primary patient UUID."},"doctor_id":{"type":"string","format":"uuid","description":"Primary clinician UUID."},"additional_staff_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Additional staff UUIDs."},"type_id":{"type":"string","format":"uuid","description":"Appointment type UUID."},"room_id":{"type":"string","format":"uuid","description":"Room UUID."},"notes":{"type":"string","description":"Appointment notes."},"caller_phone":{"type":"string","maxLength":32,"description":"Caller phone. Required for ATJOO when the booking is for an existing client. A phone match is not proof of authority for other records."},"equipment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Equipment UUIDs to allocate."},"patients":{"type":"array","items":{"type":"object","properties":{"patient_id":{"type":"string","format":"uuid","description":"Patient UUID."},"billing_client_id":{"type":"string","format":"uuid","description":"Billing client for this patient; must be the owner."},"is_primary":{"type":"boolean","description":"Mark as primary patient."}},"required":["patient_id","billing_client_id"],"additionalProperties":false},"description":"Multi-patient attachment list."}},"required":["start_time","end_time"],"additionalProperties":false},"getAppointmentResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Appointment UUID."},"start_time":{"type":"string","description":"UTC ISO-8601 start time."},"end_time":{"type":"string","description":"UTC ISO-8601 end time."},"status":{"type":"string","enum":["requested","scheduled","confirmed","checked_in","in_exam","checked_out","no_show","cancelled"],"description":"Appointment lifecycle status."},"client_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary client UUID when set."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary patient UUID when set."},"doctor_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary clinician / doctor UUID."},"doctor_name":{"type":"string","nullable":true,"description":"Assigned clinician display name when included."},"patient_name":{"type":"string","nullable":true,"description":"Primary patient name when included."},"patient_species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Primary patient species when included.","nullable":true},"patient_breed":{"type":"string","nullable":true,"description":"Primary patient breed when included."},"patient_sex":{"type":"string","enum":["male","female","unknown"],"description":"Primary patient sex when included.","nullable":true},"patient_neutered":{"type":"boolean","nullable":true,"description":"Whether the primary patient is neutered, when included."},"patient_date_of_birth":{"type":"string","nullable":true,"description":"Primary patient date of birth when included."},"patient_weight_kg":{"type":"string","nullable":true,"description":"Primary patient latest weight in kilograms, when included."},"patient_weight_recorded_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 time of the primary patient latest weight, when included."},"client_first_name":{"type":"string","nullable":true,"description":"Primary client given name when included."},"client_last_name":{"type":"string","nullable":true,"description":"Primary client family name when included."},"additional_staff_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Additional staff UUIDs; never includes doctor_id."},"equipment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Allocated equipment UUIDs."},"patients":{"type":"array","items":{"type":"object","properties":{"patient_id":{"type":"string","format":"uuid","description":"Attached patient UUID."},"billing_client_id":{"type":"string","format":"uuid","description":"Client billed for this patient on the appointment."},"is_primary":{"type":"boolean","description":"Whether this is the primary patient."},"attendance_status":{"type":"string","enum":["scheduled","cancelled","no_show","attended_untreated"],"description":"Per-patient attendance status."},"name":{"type":"string","nullable":true,"description":"Patient name when included."},"species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Patient species when included.","nullable":true},"breed":{"type":"string","nullable":true,"description":"Patient breed when included."},"sex":{"type":"string","enum":["male","female","unknown"],"description":"Patient sex when included.","nullable":true},"neutered":{"type":"boolean","nullable":true,"description":"Whether the patient is neutered, when included."},"date_of_birth":{"type":"string","nullable":true,"description":"Patient date of birth when included."},"weight_kg":{"type":"string","nullable":true,"description":"Latest recorded weight in kilograms, when included."},"weight_recorded_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 time of the latest weight, when included."},"client_first_name":{"type":"string","nullable":true,"description":"Billing client given name when included."},"client_last_name":{"type":"string","nullable":true,"description":"Billing client family name when included."}},"required":["patient_id","billing_client_id","is_primary","attendance_status"],"additionalProperties":false},"description":"Attached patients including the primary."},"type_id":{"type":"string","format":"uuid","nullable":true,"description":"Appointment type UUID."},"room_id":{"type":"string","format":"uuid","nullable":true,"description":"Room UUID when allocated."},"notes":{"type":"string","nullable":true,"description":"Appointment notes (scheduling context, not SOAP)."},"entity_version":{"type":"integer","minimum":0,"description":"Optimistic concurrency token. Required on PATCH."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","start_time","end_time","status","client_id","patient_id","doctor_id","additional_staff_ids","equipment_ids","patients","type_id","room_id","notes","entity_version","created_at","updated_at"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"submitAppointmentSoapResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"consultation_id":{"type":"string","format":"uuid","description":"Consultation that holds the draft."},"note_id":{"type":"string","format":"uuid","description":"SOAP note id. Stable across resends of the same provider note."},"status":{"type":"string","enum":["draft"],"description":"The note is unsigned."},"entity_version":{"type":"integer","description":"Optimistic concurrency token after this write."},"recorded_by":{"type":"string","enum":["integration"],"description":"The draft was written by the integration."}},"required":["consultation_id","note_id","status","entity_version","recorded_by"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"submitAppointmentSoapRequest":{"type":"object","properties":{"provider_note_id":{"type":"string","minLength":1,"maxLength":128,"description":"Stable PawfectNotes note id. Required on every submit and resend."},"subjective":{"type":"string","description":"Subjective section. Clinical HTML."},"objective":{"type":"string","description":"Objective section. Clinical HTML."},"assessment":{"type":"string","description":"Assessment section. Clinical HTML."},"plan":{"type":"string","description":"Plan section. Clinical HTML."}},"required":["provider_note_id","subjective","objective","assessment","plan"],"additionalProperties":false},"updateAppointmentResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Appointment UUID."},"start_time":{"type":"string","description":"UTC ISO-8601 start time."},"end_time":{"type":"string","description":"UTC ISO-8601 end time."},"status":{"type":"string","enum":["requested","scheduled","confirmed","checked_in","in_exam","checked_out","no_show","cancelled"],"description":"Appointment lifecycle status."},"client_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary client UUID when set."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary patient UUID when set."},"doctor_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary clinician / doctor UUID."},"doctor_name":{"type":"string","nullable":true,"description":"Assigned clinician display name when included."},"patient_name":{"type":"string","nullable":true,"description":"Primary patient name when included."},"patient_species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Primary patient species when included.","nullable":true},"patient_breed":{"type":"string","nullable":true,"description":"Primary patient breed when included."},"patient_sex":{"type":"string","enum":["male","female","unknown"],"description":"Primary patient sex when included.","nullable":true},"patient_neutered":{"type":"boolean","nullable":true,"description":"Whether the primary patient is neutered, when included."},"patient_date_of_birth":{"type":"string","nullable":true,"description":"Primary patient date of birth when included."},"patient_weight_kg":{"type":"string","nullable":true,"description":"Primary patient latest weight in kilograms, when included."},"patient_weight_recorded_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 time of the primary patient latest weight, when included."},"client_first_name":{"type":"string","nullable":true,"description":"Primary client given name when included."},"client_last_name":{"type":"string","nullable":true,"description":"Primary client family name when included."},"additional_staff_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Additional staff UUIDs; never includes doctor_id."},"equipment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Allocated equipment UUIDs."},"patients":{"type":"array","items":{"type":"object","properties":{"patient_id":{"type":"string","format":"uuid","description":"Attached patient UUID."},"billing_client_id":{"type":"string","format":"uuid","description":"Client billed for this patient on the appointment."},"is_primary":{"type":"boolean","description":"Whether this is the primary patient."},"attendance_status":{"type":"string","enum":["scheduled","cancelled","no_show","attended_untreated"],"description":"Per-patient attendance status."},"name":{"type":"string","nullable":true,"description":"Patient name when included."},"species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Patient species when included.","nullable":true},"breed":{"type":"string","nullable":true,"description":"Patient breed when included."},"sex":{"type":"string","enum":["male","female","unknown"],"description":"Patient sex when included.","nullable":true},"neutered":{"type":"boolean","nullable":true,"description":"Whether the patient is neutered, when included."},"date_of_birth":{"type":"string","nullable":true,"description":"Patient date of birth when included."},"weight_kg":{"type":"string","nullable":true,"description":"Latest recorded weight in kilograms, when included."},"weight_recorded_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 time of the latest weight, when included."},"client_first_name":{"type":"string","nullable":true,"description":"Billing client given name when included."},"client_last_name":{"type":"string","nullable":true,"description":"Billing client family name when included."}},"required":["patient_id","billing_client_id","is_primary","attendance_status"],"additionalProperties":false},"description":"Attached patients including the primary."},"type_id":{"type":"string","format":"uuid","nullable":true,"description":"Appointment type UUID."},"room_id":{"type":"string","format":"uuid","nullable":true,"description":"Room UUID when allocated."},"notes":{"type":"string","nullable":true,"description":"Appointment notes (scheduling context, not SOAP)."},"entity_version":{"type":"integer","minimum":0,"description":"Optimistic concurrency token. Required on PATCH."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","start_time","end_time","status","client_id","patient_id","doctor_id","additional_staff_ids","equipment_ids","patients","type_id","room_id","notes","entity_version","created_at","updated_at"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"updateAppointmentRequest":{"type":"object","properties":{"start_time":{"type":"string","format":"date-time","description":"UTC ISO-8601 start with offset."},"end_time":{"type":"string","format":"date-time","description":"UTC ISO-8601 end with offset."},"client_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary client UUID."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary patient UUID."},"doctor_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary clinician UUID."},"additional_staff_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Additional staff UUIDs."},"type_id":{"type":"string","format":"uuid","nullable":true,"description":"Appointment type UUID."},"room_id":{"type":"string","format":"uuid","nullable":true,"description":"Room UUID."},"notes":{"type":"string","nullable":true,"description":"Appointment notes."},"caller_phone":{"type":"string","maxLength":32,"description":"Caller phone. ATJOO must send a number that matches one client before changing that client's booking."},"equipment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Equipment UUIDs."},"patients":{"type":"array","items":{"type":"object","properties":{"patient_id":{"type":"string","format":"uuid","description":"Patient UUID."},"billing_client_id":{"type":"string","format":"uuid","description":"Billing client for this patient."},"is_primary":{"type":"boolean","description":"Mark as primary."}},"required":["patient_id","billing_client_id"],"additionalProperties":false},"description":"Replacement multi-patient attachment list."},"entity_version":{"type":"integer","minimum":0,"description":"Optimistic concurrency token. Required on PATCH (428 when omitted)."}},"additionalProperties":false},"updateAppointmentStatusResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Appointment UUID."},"start_time":{"type":"string","description":"UTC ISO-8601 start time."},"end_time":{"type":"string","description":"UTC ISO-8601 end time."},"status":{"type":"string","enum":["requested","scheduled","confirmed","checked_in","in_exam","checked_out","no_show","cancelled"],"description":"Appointment lifecycle status."},"client_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary client UUID when set."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary patient UUID when set."},"doctor_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary clinician / doctor UUID."},"doctor_name":{"type":"string","nullable":true,"description":"Assigned clinician display name when included."},"patient_name":{"type":"string","nullable":true,"description":"Primary patient name when included."},"patient_species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Primary patient species when included.","nullable":true},"patient_breed":{"type":"string","nullable":true,"description":"Primary patient breed when included."},"patient_sex":{"type":"string","enum":["male","female","unknown"],"description":"Primary patient sex when included.","nullable":true},"patient_neutered":{"type":"boolean","nullable":true,"description":"Whether the primary patient is neutered, when included."},"patient_date_of_birth":{"type":"string","nullable":true,"description":"Primary patient date of birth when included."},"patient_weight_kg":{"type":"string","nullable":true,"description":"Primary patient latest weight in kilograms, when included."},"patient_weight_recorded_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 time of the primary patient latest weight, when included."},"client_first_name":{"type":"string","nullable":true,"description":"Primary client given name when included."},"client_last_name":{"type":"string","nullable":true,"description":"Primary client family name when included."},"additional_staff_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Additional staff UUIDs; never includes doctor_id."},"equipment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Allocated equipment UUIDs."},"patients":{"type":"array","items":{"type":"object","properties":{"patient_id":{"type":"string","format":"uuid","description":"Attached patient UUID."},"billing_client_id":{"type":"string","format":"uuid","description":"Client billed for this patient on the appointment."},"is_primary":{"type":"boolean","description":"Whether this is the primary patient."},"attendance_status":{"type":"string","enum":["scheduled","cancelled","no_show","attended_untreated"],"description":"Per-patient attendance status."},"name":{"type":"string","nullable":true,"description":"Patient name when included."},"species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Patient species when included.","nullable":true},"breed":{"type":"string","nullable":true,"description":"Patient breed when included."},"sex":{"type":"string","enum":["male","female","unknown"],"description":"Patient sex when included.","nullable":true},"neutered":{"type":"boolean","nullable":true,"description":"Whether the patient is neutered, when included."},"date_of_birth":{"type":"string","nullable":true,"description":"Patient date of birth when included."},"weight_kg":{"type":"string","nullable":true,"description":"Latest recorded weight in kilograms, when included."},"weight_recorded_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 time of the latest weight, when included."},"client_first_name":{"type":"string","nullable":true,"description":"Billing client given name when included."},"client_last_name":{"type":"string","nullable":true,"description":"Billing client family name when included."}},"required":["patient_id","billing_client_id","is_primary","attendance_status"],"additionalProperties":false},"description":"Attached patients including the primary."},"type_id":{"type":"string","format":"uuid","nullable":true,"description":"Appointment type UUID."},"room_id":{"type":"string","format":"uuid","nullable":true,"description":"Room UUID when allocated."},"notes":{"type":"string","nullable":true,"description":"Appointment notes (scheduling context, not SOAP)."},"entity_version":{"type":"integer","minimum":0,"description":"Optimistic concurrency token. Required on PATCH."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","start_time","end_time","status","client_id","patient_id","doctor_id","additional_staff_ids","equipment_ids","patients","type_id","room_id","notes","entity_version","created_at","updated_at"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"updateAppointmentStatusRequest":{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","confirmed","checked_in","in_exam","checked_out","no_show","cancelled"],"description":"Target appointment status."},"caller_phone":{"type":"string","maxLength":32,"description":"Caller phone. ATJOO must send a number that matches one client before changing that appointment."}},"required":["status"],"additionalProperties":false},"listAppointmentTypesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Appointment type UUID."},"name":{"type":"string","description":"Display name."},"duration_minutes":{"type":"integer","description":"Default duration in minutes."},"color":{"type":"string","nullable":true,"description":"Calendar colour hex/token when set."},"allow_online_booking":{"type":"boolean","description":"Whether this type is available for online booking."}},"required":["id","name","duration_minutes","color","allow_online_booking"],"additionalProperties":false},"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"listDoctorsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Staff / doctor UUID."},"name":{"type":"string","nullable":true,"description":"Display name only. Email and other staff PII are not exposed."}},"required":["id","name"],"additionalProperties":false},"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"listRoomsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Room UUID."},"name":{"type":"string","description":"Room display name."},"type":{"type":"string","description":"Room type (exam, surgery, treatment, etc.)."}},"required":["id","name","type"],"additionalProperties":false},"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"getAvailabilityResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","description":"UTC ISO-8601 slot start."},"end":{"type":"string","description":"UTC ISO-8601 slot end."},"available":{"type":"boolean","description":"Whether the slot is free."},"reason":{"type":"string","enum":["clinician","room","both"],"nullable":true,"description":"When unavailable, which resource blocks the slot."}},"required":["start","end","available","reason"],"additionalProperties":false},"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"getPracticeProfileResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"phone":{"type":"string","nullable":true},"timezone":{"type":"string"},"address_line1":{"type":"string","nullable":true},"address_line2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"postcode":{"type":"string","nullable":true},"country":{"type":"string"},"website":{"type":"string","nullable":true},"opening_hours":{"type":"array","items":{"type":"object","properties":{"day_of_week":{"type":"integer","description":"0 Sunday through 6 Saturday."},"is_closed":{"type":"boolean"},"open_time":{"type":"string","nullable":true},"close_time":{"type":"string","nullable":true}},"required":["day_of_week","is_closed","open_time","close_time"],"additionalProperties":false}}},"required":["id","name","phone","timezone","address_line1","address_line2","city","region","postcode","country","website","opening_hours"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"lookupClientsByPhoneResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Client UUID."},"first_name":{"type":"string","description":"Client given name."},"last_name":{"type":"string","description":"Client family name."},"email":{"type":"string","nullable":true,"description":"Primary email, or null if unset."},"phone":{"type":"string","nullable":true,"description":"Primary phone, or null if unset."},"address":{"type":"string","nullable":true,"description":"Street address line."},"city":{"type":"string","nullable":true,"description":"City / town."},"state":{"type":"string","nullable":true,"description":"County / state / region."},"zip":{"type":"string","nullable":true,"description":"Postal / ZIP code."},"preferred_contact_method":{"type":"string","nullable":true,"description":"Preferred contact channel (phone, email, sms, portal)."},"notes":{"type":"string","nullable":true,"description":"Free-text practice notes about the client (non-clinical)."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","first_name","last_name","email","phone","address","city","state","zip","preferred_contact_method","notes","created_at","updated_at"],"additionalProperties":false}},"match":{"type":"object","properties":{"method":{"type":"string","enum":["phone"]},"assurance":{"type":"string","enum":["unverified"]},"outcome":{"type":"string","enum":["none","unique","ambiguous"]},"escalation":{"type":"string"}},"required":["method","assurance","outcome","escalation"],"additionalProperties":false}},"required":["data","match"],"additionalProperties":false},"listDiarySlotsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"clinician_id":{"type":"string","format":"uuid"},"available":{"type":"boolean","enum":[true]}},"required":["start","end","clinician_id","available"],"additionalProperties":false},"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"listStaffScheduleResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"clinician_id":{"type":"string","format":"uuid"},"display_name":{"type":"string"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}},"required":["clinician_id","display_name","start","end"],"additionalProperties":false},"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"listInvoicesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Invoice UUID."},"client_id":{"type":"string","format":"uuid","description":"Billed client UUID."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Related patient UUID when set."},"appointment_id":{"type":"string","format":"uuid","nullable":true,"description":"Related appointment UUID when set."},"status":{"type":"string","description":"Invoice status (e.g. draft, open, paid)."},"currency":{"type":"string","description":"ISO currency code."},"subtotal":{"type":"string","description":"Subtotal as a decimal string."},"tax":{"type":"string","description":"Tax total as a decimal string."},"total":{"type":"string","description":"Grand total as a decimal string."},"paid_amount":{"type":"string","description":"Amount paid as a decimal string."},"due_date":{"type":"string","nullable":true,"description":"Due date when set."},"paid_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 paid timestamp when fully paid."},"is_estimate":{"type":"boolean","description":"True when this record is an estimate."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","client_id","patient_id","appointment_id","status","currency","subtotal","tax","total","paid_amount","due_date","paid_at","is_estimate","created_at","updated_at"],"additionalProperties":false},"description":"Page of results."},"pagination":{"type":"object","properties":{"limit":{"type":"integer","description":"Page size applied to this response."},"offset":{"type":"integer","description":"Offset applied to this response."},"total":{"type":"integer","description":"Total matching rows (not just this page)."}},"required":["limit","offset","total"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"getInvoiceResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Invoice UUID."},"client_id":{"type":"string","format":"uuid","description":"Billed client UUID."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Related patient UUID when set."},"appointment_id":{"type":"string","format":"uuid","nullable":true,"description":"Related appointment UUID when set."},"status":{"type":"string","description":"Invoice status (e.g. draft, open, paid)."},"currency":{"type":"string","description":"ISO currency code."},"subtotal":{"type":"string","description":"Subtotal as a decimal string."},"tax":{"type":"string","description":"Tax total as a decimal string."},"total":{"type":"string","description":"Grand total as a decimal string."},"paid_amount":{"type":"string","description":"Amount paid as a decimal string."},"due_date":{"type":"string","nullable":true,"description":"Due date when set."},"paid_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 paid timestamp when fully paid."},"is_estimate":{"type":"boolean","description":"True when this record is an estimate."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","client_id","patient_id","appointment_id","status","currency","subtotal","tax","total","paid_amount","due_date","paid_at","is_estimate","created_at","updated_at"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"getSoapNoteResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"SOAP note UUID. Null when the consultation has no note yet."},"consultation_id":{"type":"string","format":"uuid","description":"Consultation UUID."},"patient_id":{"type":"string","format":"uuid","description":"Patient UUID."},"status":{"type":"string","enum":["draft","finalized","amended"],"nullable":true,"description":"Note lifecycle status. Null when no note exists yet."},"subjective":{"type":"string","nullable":true,"description":"Subjective section. Clinical HTML. Null when no note exists yet."},"objective":{"type":"string","nullable":true,"description":"Objective section. Clinical HTML. Null when no note exists yet."},"assessment":{"type":"string","nullable":true,"description":"Assessment section. Clinical HTML. Null when no note exists yet."},"plan":{"type":"string","nullable":true,"description":"Plan section. Clinical HTML. Null when no note exists yet."},"entity_version":{"type":"integer","description":"Optimistic concurrency token. 0 when no note exists yet. Required on PUT."},"updated_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 last-update timestamp. Null when no note exists yet."},"recorded_by":{"type":"string","enum":["staff","integration"],"description":"Whether a staff user or an integration recorded the current body."},"api_key_id":{"type":"string","format":"uuid","nullable":true,"description":"API key that last wrote the draft. Null for staff-authored notes."}},"required":["id","consultation_id","patient_id","status","subjective","objective","assessment","plan","entity_version","updated_at","recorded_by","api_key_id"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"replaceSoapNoteResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"description":"SOAP note UUID. Null when the consultation has no note yet."},"consultation_id":{"type":"string","format":"uuid","description":"Consultation UUID."},"patient_id":{"type":"string","format":"uuid","description":"Patient UUID."},"status":{"type":"string","enum":["draft","finalized","amended"],"nullable":true,"description":"Note lifecycle status. Null when no note exists yet."},"subjective":{"type":"string","nullable":true,"description":"Subjective section. Clinical HTML. Null when no note exists yet."},"objective":{"type":"string","nullable":true,"description":"Objective section. Clinical HTML. Null when no note exists yet."},"assessment":{"type":"string","nullable":true,"description":"Assessment section. Clinical HTML. Null when no note exists yet."},"plan":{"type":"string","nullable":true,"description":"Plan section. Clinical HTML. Null when no note exists yet."},"entity_version":{"type":"integer","description":"Optimistic concurrency token. 0 when no note exists yet. Required on PUT."},"updated_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 last-update timestamp. Null when no note exists yet."},"recorded_by":{"type":"string","enum":["staff","integration"],"description":"Whether a staff user or an integration recorded the current body."},"api_key_id":{"type":"string","format":"uuid","nullable":true,"description":"API key that last wrote the draft. Null for staff-authored notes."}},"required":["id","consultation_id","patient_id","status","subjective","objective","assessment","plan","entity_version","updated_at","recorded_by","api_key_id"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"replaceSoapNoteRequest":{"type":"object","properties":{"subjective":{"type":"string","description":"Replacement subjective section. Clinical HTML."},"objective":{"type":"string","description":"Replacement objective section. Clinical HTML."},"assessment":{"type":"string","description":"Replacement assessment section. Clinical HTML."},"plan":{"type":"string","description":"Replacement plan section. Clinical HTML."},"entity_version":{"type":"integer","minimum":0,"description":"Optimistic concurrency token from GET. Required on PUT (428 when omitted). 0 creates the first draft."}},"required":["subjective","objective","assessment","plan"],"additionalProperties":false},"listVaccinationsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Vaccination record UUID."},"patient_id":{"type":"string","format":"uuid","description":"Patient UUID."},"vaccine_name":{"type":"string","description":"Vaccine product / name."},"lot_number":{"type":"string","nullable":true,"description":"Lot number when recorded."},"manufacturer":{"type":"string","nullable":true,"description":"Manufacturer when recorded."},"administered_at":{"type":"string","description":"UTC ISO-8601 administration time."},"next_due_date":{"type":"string","nullable":true,"description":"Next due date (YYYY-MM-DD) when set."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."}},"required":["id","patient_id","vaccine_name","lot_number","manufacturer","administered_at","next_due_date","created_at"],"additionalProperties":false},"description":"Page of results."},"pagination":{"type":"object","properties":{"limit":{"type":"integer","description":"Page size applied to this response."},"offset":{"type":"integer","description":"Offset applied to this response."},"total":{"type":"integer","description":"Total matching rows (not just this page)."}},"required":["limit","offset","total"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"listPrescriptionsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Prescription UUID."},"patient_id":{"type":"string","format":"uuid","description":"Patient UUID."},"medication_name":{"type":"string","description":"Medication name."},"dosage":{"type":"string","description":"Dosage instructions summary."},"frequency":{"type":"string","description":"Dosing frequency."},"status":{"type":"string","description":"Prescription status."},"instructions":{"type":"string","nullable":true,"description":"Additional dispensing / owner instructions."},"start_date":{"type":"string","description":"Start date."},"end_date":{"type":"string","nullable":true,"description":"End date when set."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."}},"required":["id","patient_id","medication_name","dosage","frequency","status","instructions","start_date","end_date","created_at"],"additionalProperties":false},"description":"Page of results."},"pagination":{"type":"object","properties":{"limit":{"type":"integer","description":"Page size applied to this response."},"offset":{"type":"integer","description":"Offset applied to this response."},"total":{"type":"integer","description":"Total matching rows (not just this page)."}},"required":["limit","offset","total"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"listDocumentsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Document UUID."},"title":{"type":"string","nullable":true,"description":"Document title."},"document_type":{"type":"string","description":"Document type discriminator."},"status":{"type":"string","description":"Document status."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Related patient UUID when set."},"client_id":{"type":"string","format":"uuid","nullable":true,"description":"Related client UUID when set."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","title","document_type","status","patient_id","client_id","created_at","updated_at"],"additionalProperties":false},"description":"Page of results."},"pagination":{"type":"object","properties":{"limit":{"type":"integer","description":"Page size applied to this response."},"offset":{"type":"integer","description":"Offset applied to this response."},"total":{"type":"integer","description":"Total matching rows (not just this page)."}},"required":["limit","offset","total"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"getDocumentResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Document UUID."},"title":{"type":"string","nullable":true,"description":"Document title."},"document_type":{"type":"string","description":"Document type discriminator."},"status":{"type":"string","description":"Document status."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Related patient UUID when set."},"client_id":{"type":"string","format":"uuid","nullable":true,"description":"Related client UUID when set."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","title","document_type","status","patient_id","client_id","created_at","updated_at"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"listInventoryResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Product / inventory item UUID."},"name":{"type":"string","description":"Product display name."},"sku":{"type":"string","nullable":true,"description":"SKU when set."},"category":{"type":"string","nullable":true,"description":"Product category."},"unit_price":{"type":"string","description":"Unit sell price as a decimal string."},"stock_quantity":{"type":"number","description":"On-hand quantity."},"reorder_point":{"type":"number","nullable":true,"description":"Reorder threshold when configured."},"controlled_drug":{"type":"boolean","description":"Whether the product is a controlled drug. Register detail is not exposed."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","name","sku","category","unit_price","stock_quantity","reorder_point","controlled_drug","created_at","updated_at"],"additionalProperties":false},"description":"Page of results."},"pagination":{"type":"object","properties":{"limit":{"type":"integer","description":"Page size applied to this response."},"offset":{"type":"integer","description":"Offset applied to this response."},"total":{"type":"integer","description":"Total matching rows (not just this page)."}},"required":["limit","offset","total"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"listWaitlistResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Waitlist entry UUID."},"client_id":{"type":"string","format":"uuid","description":"Client UUID."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Patient UUID when set."},"type_id":{"type":"string","format":"uuid","nullable":true,"description":"Desired appointment type UUID."},"status":{"type":"string","enum":["waiting","scheduled","cancelled"],"description":"Waitlist entry status."},"preferred_from":{"type":"string","nullable":true,"description":"Preferred window start when set."},"preferred_to":{"type":"string","nullable":true,"description":"Preferred window end when set."},"notes":{"type":"string","nullable":true,"description":"Waitlist notes."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","client_id","patient_id","type_id","status","preferred_from","preferred_to","notes","created_at","updated_at"],"additionalProperties":false},"description":"Page of results."},"pagination":{"type":"object","properties":{"limit":{"type":"integer","description":"Page size applied to this response."},"offset":{"type":"integer","description":"Offset applied to this response."},"total":{"type":"integer","description":"Total matching rows (not just this page)."}},"required":["limit","offset","total"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"listRemindersResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Reminder send UUID."},"client_id":{"type":"string","format":"uuid","description":"Client UUID."},"patient_id":{"type":"string","format":"uuid","description":"Patient UUID."},"channel":{"type":"string","description":"Delivery channel."},"status":{"type":"string","description":"Send status."},"due_date":{"type":"string","description":"Clinical due date associated with the reminder."},"scheduled_for":{"type":"string","description":"When the send was scheduled."},"sent_at":{"type":"string","nullable":true,"description":"When the reminder was sent, if sent."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."}},"required":["id","client_id","patient_id","channel","status","due_date","scheduled_for","sent_at","created_at"],"additionalProperties":false},"description":"Page of results."},"pagination":{"type":"object","properties":{"limit":{"type":"integer","description":"Page size applied to this response."},"offset":{"type":"integer","description":"Offset applied to this response."},"total":{"type":"integer","description":"Total matching rows (not just this page)."}},"required":["limit","offset","total"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"listTasksResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Task UUID."},"title":{"type":"string","description":"Task title."},"description":{"type":"string","nullable":true,"description":"Task description."},"priority":{"type":"string","description":"Priority label."},"status":{"type":"string","nullable":true,"description":"Task status when present."},"assignee_id":{"type":"string","format":"uuid","nullable":true,"description":"Assignee staff UUID when set."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Related patient UUID when set."},"client_id":{"type":"string","format":"uuid","nullable":true,"description":"Related client UUID when set."},"account_id":{"type":"string","format":"uuid","nullable":true,"description":"CRM account UUID when set."},"contact_id":{"type":"string","format":"uuid","nullable":true,"description":"CRM contact UUID when set."},"due_at":{"type":"string","nullable":true,"description":"Due timestamp when set."},"completed_at":{"type":"string","nullable":true,"description":"Completion timestamp when set."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","title","description","priority","assignee_id","patient_id","client_id","due_at","completed_at","created_at","updated_at"],"additionalProperties":false},"description":"Page of results."},"pagination":{"type":"object","properties":{"limit":{"type":"integer","description":"Page size applied to this response."},"offset":{"type":"integer","description":"Offset applied to this response."},"total":{"type":"integer","description":"Total matching rows (not just this page)."}},"required":["limit","offset","total"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"listImagingWorklistResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Imaging request UUID."},"accessionNumber":{"type":"string","nullable":true,"description":"Accession number when assigned."},"status":{"type":"string","description":"Imaging request status."},"modality":{"type":"string","description":"DICOM modality code for the PACS gateway."},"priority":{"type":"string","description":"DICOM priority code."},"scheduledAt":{"type":"string","nullable":true,"description":"UTC ISO-8601 scheduled acquisition time."},"requestedAt":{"type":"string","nullable":true,"description":"UTC ISO-8601 request time."},"startedAt":{"type":"string","nullable":true,"description":"UTC ISO-8601 start time when present (detail only)."},"completedAt":{"type":"string","nullable":true,"description":"UTC ISO-8601 completion time when present (detail only)."},"reportedAt":{"type":"string","nullable":true,"description":"UTC ISO-8601 reported time when present (detail only)."},"bodyRegion":{"type":"string","nullable":true,"description":"Body region."},"clinicalIndication":{"type":"string","nullable":true,"description":"Clinical indication for the study."},"notes":{"type":"string","nullable":true,"description":"Request notes."},"dicomStudyInstanceUid":{"type":"string","nullable":true,"description":"DICOM Study Instance UID when present (detail only)."},"dicomSeriesInstanceUid":{"type":"string","nullable":true,"description":"DICOM Series Instance UID when present (detail only)."},"patient":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Patient UUID."},"name":{"type":"string","description":"Patient name."},"species":{"type":"string","nullable":true,"description":"Internal species code."}},"required":["id","name","species"],"additionalProperties":false,"description":"Patient summary for the modality worklist."},"owner":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Client UUID."},"name":{"type":"string","description":"Client display name."}},"required":["id","name"],"additionalProperties":false,"description":"Owner / client summary."}},"required":["id","accessionNumber","status","modality","priority","scheduledAt","requestedAt","bodyRegion","clinicalIndication","notes","patient","owner"],"additionalProperties":false},"description":"Page of results."},"pagination":{"type":"object","properties":{"limit":{"type":"integer","description":"Page size applied to this response."},"offset":{"type":"integer","description":"Offset applied to this response."},"total":{"type":"integer","description":"Total matching rows (not just this page)."}},"required":["limit","offset","total"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"getImagingWorklistItemResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Imaging request UUID."},"accessionNumber":{"type":"string","nullable":true,"description":"Accession number when assigned."},"status":{"type":"string","description":"Imaging request status."},"modality":{"type":"string","description":"DICOM modality code for the PACS gateway."},"priority":{"type":"string","description":"DICOM priority code."},"scheduledAt":{"type":"string","nullable":true,"description":"UTC ISO-8601 scheduled acquisition time."},"requestedAt":{"type":"string","nullable":true,"description":"UTC ISO-8601 request time."},"startedAt":{"type":"string","nullable":true,"description":"UTC ISO-8601 start time when present (detail only)."},"completedAt":{"type":"string","nullable":true,"description":"UTC ISO-8601 completion time when present (detail only)."},"reportedAt":{"type":"string","nullable":true,"description":"UTC ISO-8601 reported time when present (detail only)."},"bodyRegion":{"type":"string","nullable":true,"description":"Body region."},"clinicalIndication":{"type":"string","nullable":true,"description":"Clinical indication for the study."},"notes":{"type":"string","nullable":true,"description":"Request notes."},"dicomStudyInstanceUid":{"type":"string","nullable":true,"description":"DICOM Study Instance UID when present (detail only)."},"dicomSeriesInstanceUid":{"type":"string","nullable":true,"description":"DICOM Series Instance UID when present (detail only)."},"patient":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Patient UUID."},"name":{"type":"string","description":"Patient name."},"species":{"type":"string","nullable":true,"description":"Internal species code."}},"required":["id","name","species"],"additionalProperties":false,"description":"Patient summary for the modality worklist."},"owner":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Client UUID."},"name":{"type":"string","description":"Client display name."}},"required":["id","name"],"additionalProperties":false,"description":"Owner / client summary."}},"required":["id","accessionNumber","status","modality","priority","scheduledAt","requestedAt","bodyRegion","clinicalIndication","notes","patient","owner"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"updateImagingWorklistStatusResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Imaging request UUID."},"patient_id":{"type":"string","format":"uuid","description":"Patient UUID."},"client_id":{"type":"string","format":"uuid","description":"Client UUID."},"status":{"type":"string","description":"Imaging request status."},"modality":{"type":"string","description":"Imaging modality code."},"priority":{"type":"string","description":"Priority (routine, urgent)."},"accession_number":{"type":"string","nullable":true,"description":"Accession number when assigned."},"body_region":{"type":"string","nullable":true,"description":"Body region."},"clinical_indication":{"type":"string","nullable":true,"description":"Structured clinical indication text for the request."},"scheduled_at":{"type":"string","nullable":true,"description":"Scheduled acquisition time when set."},"completed_at":{"type":"string","nullable":true,"description":"Completion timestamp when set."},"external_report_url":{"type":"string","nullable":true,"description":"External report URL when available."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","patient_id","client_id","status","modality","priority","accession_number","body_region","clinical_indication","scheduled_at","completed_at","external_report_url","created_at","updated_at"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"updateImagingWorklistStatusRequest":{"type":"object","properties":{"status":{"type":"string","enum":["in_progress","completed"],"description":"New imaging request status from the modality integration."},"dicomStudyInstanceUid":{"type":"string","maxLength":128,"description":"DICOM Study Instance UID."},"dicomSeriesInstanceUid":{"type":"string","maxLength":128,"description":"DICOM Series Instance UID."},"completedAt":{"type":"string","format":"date-time","description":"Completion timestamp when status is completed."}},"required":["status"],"additionalProperties":false},"listImagingRequestsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Imaging request UUID."},"patient_id":{"type":"string","format":"uuid","description":"Patient UUID."},"client_id":{"type":"string","format":"uuid","description":"Client UUID."},"status":{"type":"string","description":"Imaging request status."},"modality":{"type":"string","description":"Imaging modality code."},"priority":{"type":"string","description":"Priority (routine, urgent)."},"accession_number":{"type":"string","nullable":true,"description":"Accession number when assigned."},"body_region":{"type":"string","nullable":true,"description":"Body region."},"clinical_indication":{"type":"string","nullable":true,"description":"Structured clinical indication text for the request."},"scheduled_at":{"type":"string","nullable":true,"description":"Scheduled acquisition time when set."},"completed_at":{"type":"string","nullable":true,"description":"Completion timestamp when set."},"external_report_url":{"type":"string","nullable":true,"description":"External report URL when available."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","patient_id","client_id","status","modality","priority","accession_number","body_region","clinical_indication","scheduled_at","completed_at","external_report_url","created_at","updated_at"],"additionalProperties":false},"description":"Page of results."},"pagination":{"type":"object","properties":{"limit":{"type":"integer","description":"Page size applied to this response."},"offset":{"type":"integer","description":"Offset applied to this response."},"total":{"type":"integer","description":"Total matching rows (not just this page)."}},"required":["limit","offset","total"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"createImagingRequestResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Imaging request UUID."},"patient_id":{"type":"string","format":"uuid","description":"Patient UUID."},"client_id":{"type":"string","format":"uuid","description":"Client UUID."},"status":{"type":"string","description":"Imaging request status."},"modality":{"type":"string","description":"Imaging modality code."},"priority":{"type":"string","description":"Priority (routine, urgent)."},"accession_number":{"type":"string","nullable":true,"description":"Accession number when assigned."},"body_region":{"type":"string","nullable":true,"description":"Body region."},"clinical_indication":{"type":"string","nullable":true,"description":"Structured clinical indication text for the request."},"scheduled_at":{"type":"string","nullable":true,"description":"Scheduled acquisition time when set."},"completed_at":{"type":"string","nullable":true,"description":"Completion timestamp when set."},"external_report_url":{"type":"string","nullable":true,"description":"External report URL when available."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","patient_id","client_id","status","modality","priority","accession_number","body_region","clinical_indication","scheduled_at","completed_at","external_report_url","created_at","updated_at"],"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createImagingRequestRequest":{"type":"object","properties":{"patient_id":{"type":"string","format":"uuid","description":"Patient UUID."},"client_id":{"type":"string","format":"uuid","description":"Client UUID."},"modality":{"type":"string","enum":["dx","cr","us","ct","mr","dental_xray","ot","other"],"description":"Imaging modality."},"priority":{"type":"string","enum":["routine","urgent"],"description":"Priority. Defaults to routine."},"body_region":{"type":"string","maxLength":255,"description":"Body region."},"clinical_indication":{"type":"string","maxLength":4000,"description":"Clinical indication for the study."},"notes":{"type":"string","maxLength":4000,"description":"Request notes."},"appointment_id":{"type":"string","format":"uuid","description":"Related appointment UUID."},"scheduled_at":{"type":"string","format":"date-time","description":"Scheduled acquisition time."}},"required":["patient_id","client_id","modality"],"additionalProperties":false},"listConsultationsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"getConsultationMetaResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"listVitalsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createVitalResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createVitalRequest":{"type":"object","properties":{"temperature_c":{"type":"number","description":"Temperature in Celsius."},"heart_rate_bpm":{"type":"integer","description":"Heart rate."},"respiratory_rate_bpm":{"type":"integer","description":"Respiratory rate."},"weight_kg":{"type":"string","description":"Weight in kilograms."}},"additionalProperties":false},"listLabsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createLabResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createLabRequest":{"type":"object","properties":{"test_name":{"type":"string","minLength":1,"description":"Test name."},"result_value":{"type":"string","description":"Result value."},"unit":{"type":"string","description":"Result unit."}},"required":["test_name"],"additionalProperties":false},"listDiagnosesResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createDiagnosisResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createDiagnosisRequest":{"type":"object","properties":{"consultation_id":{"type":"string","format":"uuid","description":"Consultation UUID."},"description":{"type":"string","minLength":1,"description":"Diagnosis or problem text."},"status":{"type":"string","enum":["active","resolved","chronic"],"description":"Problem status."}},"required":["consultation_id","description"],"additionalProperties":false},"listProblemsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createProblemResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createProblemRequest":{"type":"object","properties":{"consultation_id":{"type":"string","format":"uuid","description":"Consultation UUID."},"description":{"type":"string","minLength":1,"description":"Diagnosis or problem text."},"status":{"type":"string","enum":["active","resolved","chronic"],"description":"Problem status."}},"required":["consultation_id","description"],"additionalProperties":false},"listProceduresResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createProcedureResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createProcedureRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Procedure name."},"description":{"type":"string","description":"Procedure description."}},"required":["name"],"additionalProperties":false},"listAnaesthesiaResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createAnaesthesiaDraftResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createAnaesthesiaDraftRequest":{"type":"object","properties":{"consultation_id":{"type":"string","format":"uuid","description":"Consultation UUID."},"asa_classification":{"type":"string","enum":["I","II","III","IV","V"],"description":"ASA class."}},"required":["consultation_id"],"additionalProperties":false},"listConsentsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createConsentDraftResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createConsentDraftRequest":{"type":"object","properties":{"consultation_id":{"type":"string","format":"uuid","description":"Consultation UUID."},"title":{"type":"string","minLength":1,"description":"Consent title."},"procedure_name":{"type":"string","minLength":1,"description":"Procedure name."},"consent_category":{"type":"string","enum":["surgical","anaesthetic","dental","euthanasia","routine","acknowledgement"],"description":"Consent category."}},"required":["consultation_id","title","procedure_name","consent_category"],"additionalProperties":false},"listTreatmentsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createTreatmentResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createTreatmentRequest":{"type":"object","properties":{"description":{"type":"string","minLength":1,"description":"Treatment description."},"quantity":{"type":"number","exclusiveMinimum":true,"minimum":0,"description":"Quantity."},"unit_amount":{"type":"string","description":"Unit amount."}},"required":["description","quantity","unit_amount"],"additionalProperties":false},"getHomeSheetResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"listWeightsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"listAllergiesResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createAllergyResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createAllergyRequest":{"type":"object","properties":{"allergen":{"type":"string","minLength":1,"description":"Allergen."},"reaction":{"type":"string","description":"Reaction."}},"required":["allergen"],"additionalProperties":false},"listInvoiceLinesResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"listPaymentsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"listEstimatesResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createEstimateResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createEstimateRequest":{"type":"object","properties":{"client_id":{"type":"string","format":"uuid","description":"Client UUID."}},"required":["client_id"],"additionalProperties":false},"sendEstimateDraftResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"sendEstimateDraftRequest":{"type":"object","properties":{},"additionalProperties":false,"description":"No request fields."},"sendReminderResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"sendReminderRequest":{"type":"object","properties":{"client_id":{"type":"string","format":"uuid","description":"Client UUID."},"subject":{"type":"string","minLength":1,"description":"Subject."},"body":{"type":"string","minLength":1,"description":"Message body."},"purpose":{"type":"string","enum":["marketing","transactional","clinical","billing"],"description":"Consent purpose."}},"required":["client_id","subject","body","purpose"],"additionalProperties":false},"listPetPlansResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"listPurchaseOrdersResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createPurchaseOrderResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createPurchaseOrderRequest":{"type":"object","properties":{"supplier_id":{"type":"string","format":"uuid","description":"Supplier UUID."}},"required":["supplier_id"],"additionalProperties":false},"submitPurchaseOrderResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"submitPurchaseOrderRequest":{"type":"object","properties":{},"additionalProperties":false,"description":"No request fields."},"postGoodsReceiptResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"postGoodsReceiptRequest":{"type":"object","properties":{},"additionalProperties":false,"description":"No request fields."},"listCdRegistersResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"listCdEntriesResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"getDocumentContentResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"listCommunicationsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createVaccinationRecordResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createVaccinationRecordRequest":{"type":"object","properties":{"vaccine_name":{"type":"string","minLength":1,"description":"Vaccine name."},"product_id":{"type":"string","format":"uuid","description":"Product UUID. Present only when billing."},"service_id":{"type":"string","format":"uuid","description":"Service UUID. Present only when billing."},"next_due_date":{"type":"string","description":"Next due date YYYY-MM-DD."}},"required":["vaccine_name"],"additionalProperties":false},"updateInventoryCatalogueResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"updateInventoryCatalogueRequest":{"type":"object","properties":{"name":{"type":"string","description":"Product name."},"sku":{"type":"string","description":"SKU."},"unit_price":{"type":"string","description":"Sell price."}},"additionalProperties":false},"moveInventoryResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"moveInventoryRequest":{"type":"object","properties":{"quantity":{"type":"number","exclusiveMinimum":true,"minimum":0,"description":"Quantity in base units."},"unit":{"type":"string","minLength":1,"description":"Base unit."}},"required":["quantity","unit"],"additionalProperties":false},"createTaskResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"createTaskRequest":{"type":"object","properties":{"type_id":{"type":"string","format":"uuid","description":"Work item type UUID."},"stage_id":{"type":"string","format":"uuid","description":"Stage UUID."},"title":{"type":"string","minLength":1,"description":"Task title."},"assignee_id":{"type":"string","format":"uuid","description":"Assignee. Not the creator."}},"required":["type_id","stage_id","title"],"additionalProperties":false},"finaliseInvoiceResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"finaliseInvoiceRequest":{"type":"object","properties":{},"additionalProperties":false,"description":"No request fields."},"sendMessageResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Resource UUID when the row exists."}},"additionalProperties":false,"description":"Resource payload."}},"required":["data"],"additionalProperties":false},"sendMessageRequest":{"type":"object","properties":{"client_id":{"type":"string","format":"uuid","description":"Client UUID."},"subject":{"type":"string","minLength":1,"description":"Subject."},"body":{"type":"string","minLength":1,"description":"Message body."},"purpose":{"type":"string","enum":["marketing","transactional","clinical","billing"],"description":"Consent purpose."}},"required":["client_id","subject","body","purpose"],"additionalProperties":false},"Webhook_appointment_created":{"type":"object","properties":{"event":{"type":"string","enum":["appointment.created"]},"timestamp":{"type":"string","description":"UTC ISO-8601 delivery timestamp generated at send time."},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Appointment UUID."},"start_time":{"type":"string","description":"UTC ISO-8601 start time."},"end_time":{"type":"string","description":"UTC ISO-8601 end time."},"status":{"type":"string","enum":["requested","scheduled","confirmed","checked_in","in_exam","checked_out","no_show","cancelled"],"description":"Appointment lifecycle status."},"client_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary client UUID when set."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary patient UUID when set."},"doctor_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary clinician / doctor UUID."},"doctor_name":{"type":"string","nullable":true,"description":"Assigned clinician display name when included."},"patient_name":{"type":"string","nullable":true,"description":"Primary patient name when included."},"patient_species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Primary patient species when included.","nullable":true},"patient_breed":{"type":"string","nullable":true,"description":"Primary patient breed when included."},"patient_sex":{"type":"string","enum":["male","female","unknown"],"description":"Primary patient sex when included.","nullable":true},"patient_neutered":{"type":"boolean","nullable":true,"description":"Whether the primary patient is neutered, when included."},"patient_date_of_birth":{"type":"string","nullable":true,"description":"Primary patient date of birth when included."},"patient_weight_kg":{"type":"string","nullable":true,"description":"Primary patient latest weight in kilograms, when included."},"patient_weight_recorded_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 time of the primary patient latest weight, when included."},"client_first_name":{"type":"string","nullable":true,"description":"Primary client given name when included."},"client_last_name":{"type":"string","nullable":true,"description":"Primary client family name when included."},"additional_staff_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Additional staff UUIDs; never includes doctor_id."},"equipment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Allocated equipment UUIDs."},"patients":{"type":"array","items":{"type":"object","properties":{"patient_id":{"type":"string","format":"uuid","description":"Attached patient UUID."},"billing_client_id":{"type":"string","format":"uuid","description":"Client billed for this patient on the appointment."},"is_primary":{"type":"boolean","description":"Whether this is the primary patient."},"attendance_status":{"type":"string","enum":["scheduled","cancelled","no_show","attended_untreated"],"description":"Per-patient attendance status."},"name":{"type":"string","nullable":true,"description":"Patient name when included."},"species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Patient species when included.","nullable":true},"breed":{"type":"string","nullable":true,"description":"Patient breed when included."},"sex":{"type":"string","enum":["male","female","unknown"],"description":"Patient sex when included.","nullable":true},"neutered":{"type":"boolean","nullable":true,"description":"Whether the patient is neutered, when included."},"date_of_birth":{"type":"string","nullable":true,"description":"Patient date of birth when included."},"weight_kg":{"type":"string","nullable":true,"description":"Latest recorded weight in kilograms, when included."},"weight_recorded_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 time of the latest weight, when included."},"client_first_name":{"type":"string","nullable":true,"description":"Billing client given name when included."},"client_last_name":{"type":"string","nullable":true,"description":"Billing client family name when included."}},"required":["patient_id","billing_client_id","is_primary","attendance_status"],"additionalProperties":false},"description":"Attached patients including the primary."},"type_id":{"type":"string","format":"uuid","nullable":true,"description":"Appointment type UUID."},"room_id":{"type":"string","format":"uuid","nullable":true,"description":"Room UUID when allocated."},"notes":{"type":"string","nullable":true,"description":"Appointment notes (scheduling context, not SOAP)."},"entity_version":{"type":"integer","minimum":0,"description":"Optimistic concurrency token. Required on PATCH."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","start_time","end_time","status","client_id","patient_id","doctor_id","additional_staff_ids","equipment_ids","patients","type_id","room_id","notes","entity_version","created_at","updated_at"],"additionalProperties":false}},"required":["event","timestamp","data"],"additionalProperties":false},"Webhook_appointment_updated":{"type":"object","properties":{"event":{"type":"string","enum":["appointment.updated"]},"timestamp":{"type":"string","description":"UTC ISO-8601 delivery timestamp generated at send time."},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Appointment UUID."},"start_time":{"type":"string","description":"UTC ISO-8601 start time."},"end_time":{"type":"string","description":"UTC ISO-8601 end time."},"status":{"type":"string","enum":["requested","scheduled","confirmed","checked_in","in_exam","checked_out","no_show","cancelled"],"description":"Appointment lifecycle status."},"client_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary client UUID when set."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary patient UUID when set."},"doctor_id":{"type":"string","format":"uuid","nullable":true,"description":"Primary clinician / doctor UUID."},"doctor_name":{"type":"string","nullable":true,"description":"Assigned clinician display name when included."},"patient_name":{"type":"string","nullable":true,"description":"Primary patient name when included."},"patient_species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Primary patient species when included.","nullable":true},"patient_breed":{"type":"string","nullable":true,"description":"Primary patient breed when included."},"patient_sex":{"type":"string","enum":["male","female","unknown"],"description":"Primary patient sex when included.","nullable":true},"patient_neutered":{"type":"boolean","nullable":true,"description":"Whether the primary patient is neutered, when included."},"patient_date_of_birth":{"type":"string","nullable":true,"description":"Primary patient date of birth when included."},"patient_weight_kg":{"type":"string","nullable":true,"description":"Primary patient latest weight in kilograms, when included."},"patient_weight_recorded_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 time of the primary patient latest weight, when included."},"client_first_name":{"type":"string","nullable":true,"description":"Primary client given name when included."},"client_last_name":{"type":"string","nullable":true,"description":"Primary client family name when included."},"additional_staff_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Additional staff UUIDs; never includes doctor_id."},"equipment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Allocated equipment UUIDs."},"patients":{"type":"array","items":{"type":"object","properties":{"patient_id":{"type":"string","format":"uuid","description":"Attached patient UUID."},"billing_client_id":{"type":"string","format":"uuid","description":"Client billed for this patient on the appointment."},"is_primary":{"type":"boolean","description":"Whether this is the primary patient."},"attendance_status":{"type":"string","enum":["scheduled","cancelled","no_show","attended_untreated"],"description":"Per-patient attendance status."},"name":{"type":"string","nullable":true,"description":"Patient name when included."},"species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Patient species when included.","nullable":true},"breed":{"type":"string","nullable":true,"description":"Patient breed when included."},"sex":{"type":"string","enum":["male","female","unknown"],"description":"Patient sex when included.","nullable":true},"neutered":{"type":"boolean","nullable":true,"description":"Whether the patient is neutered, when included."},"date_of_birth":{"type":"string","nullable":true,"description":"Patient date of birth when included."},"weight_kg":{"type":"string","nullable":true,"description":"Latest recorded weight in kilograms, when included."},"weight_recorded_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 time of the latest weight, when included."},"client_first_name":{"type":"string","nullable":true,"description":"Billing client given name when included."},"client_last_name":{"type":"string","nullable":true,"description":"Billing client family name when included."}},"required":["patient_id","billing_client_id","is_primary","attendance_status"],"additionalProperties":false},"description":"Attached patients including the primary."},"type_id":{"type":"string","format":"uuid","nullable":true,"description":"Appointment type UUID."},"room_id":{"type":"string","format":"uuid","nullable":true,"description":"Room UUID when allocated."},"notes":{"type":"string","nullable":true,"description":"Appointment notes (scheduling context, not SOAP)."},"entity_version":{"type":"integer","minimum":0,"description":"Optimistic concurrency token. Required on PATCH."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","start_time","end_time","status","client_id","patient_id","doctor_id","additional_staff_ids","equipment_ids","patients","type_id","room_id","notes","entity_version","created_at","updated_at"],"additionalProperties":false}},"required":["event","timestamp","data"],"additionalProperties":false},"Webhook_appointment_status_changed":{"type":"object","properties":{"event":{"type":"string","enum":["appointment.status_changed"]},"timestamp":{"type":"string","description":"UTC ISO-8601 delivery timestamp generated at send time."},"data":{"type":"object","additionalProperties":{},"description":"Event-specific payload object."}},"required":["event","timestamp","data"],"additionalProperties":false},"Webhook_patient_created":{"type":"object","properties":{"event":{"type":"string","enum":["patient.created"]},"timestamp":{"type":"string","description":"UTC ISO-8601 delivery timestamp generated at send time."},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Patient UUID."},"client_id":{"type":"string","format":"uuid","description":"Owning client UUID."},"name":{"type":"string","description":"Patient name."},"species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Patient species in the public API vocabulary."},"breed":{"type":"string","nullable":true,"description":"Breed label, if known."},"sex":{"type":"string","enum":["male","female","unknown"],"description":"Biological sex. Neutered status is a separate boolean."},"neutered":{"type":"boolean","nullable":true,"description":"Whether the patient is neutered/spayed; null if unknown."},"date_of_birth":{"type":"string","nullable":true,"description":"Date of birth (YYYY-MM-DD) when known."},"color":{"type":"string","nullable":true,"description":"Coat / colour description."},"microchip_number":{"type":"string","nullable":true,"description":"Microchip identifier when recorded."},"status":{"type":"string","enum":["active","inactive","deceased","transferred"],"description":"Patient record status."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","client_id","name","species","breed","sex","neutered","date_of_birth","color","microchip_number","status","created_at","updated_at"],"additionalProperties":false}},"required":["event","timestamp","data"],"additionalProperties":false},"Webhook_patient_updated":{"type":"object","properties":{"event":{"type":"string","enum":["patient.updated"]},"timestamp":{"type":"string","description":"UTC ISO-8601 delivery timestamp generated at send time."},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Patient UUID."},"client_id":{"type":"string","format":"uuid","description":"Owning client UUID."},"name":{"type":"string","description":"Patient name."},"species":{"type":"string","enum":["dog","cat","bird","rabbit","small_mammal","reptile","horse","bovine","ovine","caprine","porcine","camelid","other"],"description":"Patient species in the public API vocabulary."},"breed":{"type":"string","nullable":true,"description":"Breed label, if known."},"sex":{"type":"string","enum":["male","female","unknown"],"description":"Biological sex. Neutered status is a separate boolean."},"neutered":{"type":"boolean","nullable":true,"description":"Whether the patient is neutered/spayed; null if unknown."},"date_of_birth":{"type":"string","nullable":true,"description":"Date of birth (YYYY-MM-DD) when known."},"color":{"type":"string","nullable":true,"description":"Coat / colour description."},"microchip_number":{"type":"string","nullable":true,"description":"Microchip identifier when recorded."},"status":{"type":"string","enum":["active","inactive","deceased","transferred"],"description":"Patient record status."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","client_id","name","species","breed","sex","neutered","date_of_birth","color","microchip_number","status","created_at","updated_at"],"additionalProperties":false}},"required":["event","timestamp","data"],"additionalProperties":false},"Webhook_client_created":{"type":"object","properties":{"event":{"type":"string","enum":["client.created"]},"timestamp":{"type":"string","description":"UTC ISO-8601 delivery timestamp generated at send time."},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Client UUID."},"first_name":{"type":"string","description":"Client given name."},"last_name":{"type":"string","description":"Client family name."},"email":{"type":"string","nullable":true,"description":"Primary email, or null if unset."},"phone":{"type":"string","nullable":true,"description":"Primary phone, or null if unset."},"address":{"type":"string","nullable":true,"description":"Street address line."},"city":{"type":"string","nullable":true,"description":"City / town."},"state":{"type":"string","nullable":true,"description":"County / state / region."},"zip":{"type":"string","nullable":true,"description":"Postal / ZIP code."},"preferred_contact_method":{"type":"string","nullable":true,"description":"Preferred contact channel (phone, email, sms, portal)."},"notes":{"type":"string","nullable":true,"description":"Free-text practice notes about the client (non-clinical)."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"required":["id","first_name","last_name","email","phone","address","city","state","zip","preferred_contact_method","notes","created_at","updated_at"],"additionalProperties":false}},"required":["event","timestamp","data"],"additionalProperties":false},"Webhook_invoice_created":{"type":"object","properties":{"event":{"type":"string","enum":["invoice.created"]},"timestamp":{"type":"string","description":"UTC ISO-8601 delivery timestamp generated at send time."},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Invoice UUID."},"client_id":{"type":"string","format":"uuid","description":"Billed client UUID."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Related patient UUID when set."},"appointment_id":{"type":"string","format":"uuid","nullable":true,"description":"Related appointment UUID when set."},"status":{"type":"string","description":"Invoice status (e.g. draft, open, paid)."},"currency":{"type":"string","description":"ISO currency code."},"subtotal":{"type":"string","description":"Subtotal as a decimal string."},"tax":{"type":"string","description":"Tax total as a decimal string."},"total":{"type":"string","description":"Grand total as a decimal string."},"paid_amount":{"type":"string","description":"Amount paid as a decimal string."},"due_date":{"type":"string","nullable":true,"description":"Due date when set."},"paid_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 paid timestamp when fully paid."},"is_estimate":{"type":"boolean","description":"True when this record is an estimate."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"additionalProperties":true}},"required":["event","timestamp","data"],"additionalProperties":false},"Webhook_invoice_paid":{"type":"object","properties":{"event":{"type":"string","enum":["invoice.paid"]},"timestamp":{"type":"string","description":"UTC ISO-8601 delivery timestamp generated at send time."},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Invoice UUID."},"client_id":{"type":"string","format":"uuid","description":"Billed client UUID."},"patient_id":{"type":"string","format":"uuid","nullable":true,"description":"Related patient UUID when set."},"appointment_id":{"type":"string","format":"uuid","nullable":true,"description":"Related appointment UUID when set."},"status":{"type":"string","description":"Invoice status (e.g. draft, open, paid)."},"currency":{"type":"string","description":"ISO currency code."},"subtotal":{"type":"string","description":"Subtotal as a decimal string."},"tax":{"type":"string","description":"Tax total as a decimal string."},"total":{"type":"string","description":"Grand total as a decimal string."},"paid_amount":{"type":"string","description":"Amount paid as a decimal string."},"due_date":{"type":"string","nullable":true,"description":"Due date when set."},"paid_at":{"type":"string","nullable":true,"description":"UTC ISO-8601 paid timestamp when fully paid."},"is_estimate":{"type":"boolean","description":"True when this record is an estimate."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."},"updated_at":{"type":"string","description":"UTC ISO-8601 last-update timestamp."}},"additionalProperties":true}},"required":["event","timestamp","data"],"additionalProperties":false},"Webhook_prescription_created":{"type":"object","properties":{"event":{"type":"string","enum":["prescription.created"]},"timestamp":{"type":"string","description":"UTC ISO-8601 delivery timestamp generated at send time."},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Prescription UUID."},"patient_id":{"type":"string","format":"uuid","description":"Patient UUID."},"medication_name":{"type":"string","description":"Medication name."},"dosage":{"type":"string","description":"Dosage instructions summary."},"frequency":{"type":"string","description":"Dosing frequency."},"status":{"type":"string","description":"Prescription status."},"instructions":{"type":"string","nullable":true,"description":"Additional dispensing / owner instructions."},"start_date":{"type":"string","description":"Start date."},"end_date":{"type":"string","nullable":true,"description":"End date when set."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."}},"additionalProperties":true}},"required":["event","timestamp","data"],"additionalProperties":false},"Webhook_vaccination_recorded":{"type":"object","properties":{"event":{"type":"string","enum":["vaccination.recorded"]},"timestamp":{"type":"string","description":"UTC ISO-8601 delivery timestamp generated at send time."},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Vaccination record UUID."},"patient_id":{"type":"string","format":"uuid","description":"Patient UUID."},"vaccine_name":{"type":"string","description":"Vaccine product / name."},"lot_number":{"type":"string","nullable":true,"description":"Lot number when recorded."},"manufacturer":{"type":"string","nullable":true,"description":"Manufacturer when recorded."},"administered_at":{"type":"string","description":"UTC ISO-8601 administration time."},"next_due_date":{"type":"string","nullable":true,"description":"Next due date (YYYY-MM-DD) when set."},"created_at":{"type":"string","description":"UTC ISO-8601 creation timestamp."}},"additionalProperties":true}},"required":["event","timestamp","data"],"additionalProperties":false},"Webhook_policy_updated":{"type":"object","properties":{"event":{"type":"string","enum":["policy.updated"]},"timestamp":{"type":"string","description":"UTC ISO-8601 delivery timestamp generated at send time."},"data":{"type":"object","additionalProperties":{},"description":"Event-specific payload object."}},"required":["event","timestamp","data"],"additionalProperties":false},"Webhook_clinic_profile_updated":{"type":"object","properties":{"event":{"type":"string","enum":["clinic.profile_updated"]},"timestamp":{"type":"string","description":"UTC ISO-8601 delivery timestamp generated at send time."},"data":{"type":"object","additionalProperties":{},"description":"Event-specific payload object."}},"required":["event","timestamp","data"],"additionalProperties":false}}},"paths":{"/api/v1/clients":{"get":{"operationId":"listClients","summary":"List clients","description":"Returns a paginated list of clients. Soft-deleted records are excluded unless include_deleted=true.","tags":["clients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"clients:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listClientsResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of rows to skip. Default 0."},"description":"Number of rows to skip. Default 0."}]},"post":{"operationId":"createClient","summary":"Create client","description":"Creates a client record. Auth secrets are never accepted or returned.","tags":["clients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"clients:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createClientResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createClientRequest"}}}}}},"/api/v1/clients/{id}":{"get":{"operationId":"getClient","summary":"Get client","description":"Returns a single client by UUID.","tags":["clients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"clients:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getClientResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]},"patch":{"operationId":"updateClient","summary":"Update client","description":"Partially updates a client. Omitted fields are left unchanged.","tags":["clients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"clients:write","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateClientResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateClientRequest"}}}}}},"/api/v1/patients":{"get":{"operationId":"listPatients","summary":"List patients","description":"Returns a paginated list of patients. Soft-deleted records are excluded unless include_deleted=true.","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"patients:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listPatientsResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of rows to skip. Default 0."},"description":"Number of rows to skip. Default 0."}]},"post":{"operationId":"createPatient","summary":"Create patient","description":"Creates a patient under an existing client.","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"patients:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPatientResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPatientRequest"}}}}}},"/api/v1/patients/{id}":{"get":{"operationId":"getPatient","summary":"Get patient","description":"Returns a single patient by UUID.","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"patients:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getPatientResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]},"patch":{"operationId":"updatePatient","summary":"Update patient","description":"Partially updates a patient.","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"patients:write","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePatientResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updatePatientRequest"}}}}}},"/api/v1/appointments":{"get":{"operationId":"listAppointments","summary":"List appointments","description":"Paginated appointments with optional status, time-range, client, and patient filters. Soft-deleted rows are excluded unless include_deleted=true.","tags":["appointments"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"appointments:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listAppointmentsResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Rows to skip. Default 0."},"description":"Rows to skip. Default 0."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["requested","scheduled","confirmed","checked_in","in_exam","checked_out","no_show","cancelled"],"description":"Filter by status."},"description":"Filter by status."},{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"Inclusive start-time lower bound."},"description":"Inclusive start-time lower bound."},{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"Inclusive start-time upper bound."},"description":"Inclusive start-time upper bound."},{"name":"client_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","description":"Filter by client UUID."},"description":"Filter by client UUID."},{"name":"patient_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","description":"Filter by patient UUID."},"description":"Filter by patient UUID."}]},"post":{"operationId":"createAppointment","summary":"Create appointment","description":"Creates an appointment. Each patient's billing_client_id must be that patient's owner.","tags":["appointments"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"appointments:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAppointmentResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAppointmentRequest"}}}}}},"/api/v1/appointments/{id}":{"get":{"operationId":"getAppointment","summary":"Get appointment","description":"Returns an appointment including multi-patient dimensions and entity_version.","tags":["appointments"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"appointments:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getAppointmentResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]},"patch":{"operationId":"updateAppointment","summary":"Update appointment","description":"Partially updates an appointment. Requires entity_version (428 if omitted). Returns 412 when the version is stale.","tags":["appointments"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"appointments:write","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAppointmentResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"412":{"description":"Precondition Failed — entity_version is stale.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"428":{"description":"Precondition Required — entity_version must be supplied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAppointmentRequest"}}}}}},"/api/v1/appointments/{id}/soap":{"put":{"operationId":"submitAppointmentSoap","summary":"Submit a draft SOAP note for a started appointment","description":"Opt-in. Saves a complete SOAP draft on the consultation a person has already started for this appointment. Does not create or start a consultation. Requires provider_note_id. Refuses staff-authored content and signed notes.","tags":["appointments"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"soap:write","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitAppointmentSoapResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The key is not the connected PawfectNotes key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Consultation not started, staff notes exist, the draft changed, or the note is signed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitAppointmentSoapRequest"}}}}}},"/api/v1/appointments/{id}/status":{"post":{"operationId":"updateAppointmentStatus","summary":"Update appointment status","description":"Transitions appointment status (check-in, complete, cancel, etc.).","tags":["appointments"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"appointments:write","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAppointmentStatusResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateAppointmentStatusRequest"}}}}}},"/api/v1/appointment-types":{"get":{"operationId":"listAppointmentTypes","summary":"List appointment types","description":"Returns configured appointment types.","tags":["appointment-types"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"appointments:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listAppointmentTypesResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/doctors":{"get":{"operationId":"listDoctors","summary":"List doctors","description":"Returns schedulable clinicians. Only id and display name are exposed.","tags":["doctors"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"appointments:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listDoctorsResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/rooms":{"get":{"operationId":"listRooms","summary":"List rooms","description":"Returns practice rooms available for scheduling.","tags":["rooms"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"appointments:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listRoomsResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/availability":{"get":{"operationId":"getAvailability","summary":"Get availability slots","description":"Returns availability slots for a clinician on a date. Timestamps are UTC; the date query is interpreted in clinic local hours.","tags":["availability"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"appointments:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getAvailabilityResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"date","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date YYYY-MM-DD in clinic local interpretation."},"description":"Calendar date YYYY-MM-DD in clinic local interpretation."},{"name":"clinician_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Clinician UUID to check."},"description":"Clinician UUID to check."},{"name":"duration_minutes","in":"query","required":false,"schema":{"type":"integer","minimum":5,"maximum":480,"description":"Slot duration in minutes. Default 30."},"description":"Slot duration in minutes. Default 30."},{"name":"room_type","in":"query","required":false,"schema":{"type":"string","description":"Optional room type filter."},"description":"Optional room type filter."},{"name":"day_start_hour","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":23,"description":"Local day start hour. Default 8."},"description":"Local day start hour. Default 8."},{"name":"day_end_hour","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":24,"description":"Local day end hour. Default 18."},"description":"Local day end hour. Default 18."}]}},"/api/v1/practice":{"get":{"operationId":"getPracticeProfile","summary":"Get practice profile","description":"Returns this practice's name, public contact details, timezone, and opening hours. Does not include settings or financial configuration.","tags":["practice"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"appointments:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getPracticeProfileResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/clients/lookup":{"get":{"operationId":"lookupClientsByPhone","summary":"Look up clients by phone","description":"Finds clients in this practice whose phone matches. A match is unverified. Several matches mean the caller is not identified.","tags":["clients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"clients:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/lookupClientsByPhoneResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"phone","in":"query","required":true,"schema":{"type":"string","minLength":8,"maxLength":32,"description":"Caller phone number."},"description":"Caller phone number."}]}},"/api/v1/scheduling/slots":{"get":{"operationId":"listDiarySlots","summary":"List bookable diary slots","description":"Returns slots that pass this practice's opening hours, appointment type, and staff rota. Unavailable slots are omitted.","tags":["scheduling"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"appointments:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listDiarySlotsResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"date","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Clinic-local date."},"description":"Clinic-local date."},{"name":"appointment_type_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Appointment type to search."},"description":"Appointment type to search."},{"name":"clinician_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","description":"Limit slots to one clinician."},"description":"Limit slots to one clinician."}]}},"/api/v1/scheduling/staff":{"get":{"operationId":"listStaffSchedule","summary":"List staff working windows","description":"Returns clinician display names and working windows for one clinic-local date. Notes and contact details are omitted.","tags":["scheduling"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"appointments:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listStaffScheduleResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"date","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Clinic-local date."},"description":"Clinic-local date."}]}},"/api/v1/invoices":{"get":{"operationId":"listInvoices","summary":"List invoices","description":"Paginated invoice headers and totals. Soft-deleted rows are excluded unless include_deleted=true.","tags":["invoices"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"invoices:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listInvoicesResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of rows to skip. Default 0."},"description":"Number of rows to skip. Default 0."}]}},"/api/v1/invoices/{id}":{"get":{"operationId":"getInvoice","summary":"Get invoice","description":"Returns a single invoice header. Line items are not included in v1.0.0.","tags":["invoices"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"invoices:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getInvoiceResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]}},"/api/v1/consultations/{id}/soap":{"get":{"operationId":"getSoapNote","summary":"Get consultation SOAP note","description":"Opt-in. Returns the four SOAP sections for one consultation. entity_version is 0 and id is null when no note exists yet. Does not include AI visit summaries.","tags":["consultations"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"soap:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getSoapNoteResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]},"put":{"operationId":"replaceSoapNote","summary":"Replace consultation SOAP note","description":"Opt-in. Replaces subjective, objective, assessment, and plan on a draft note. Requires entity_version (428 if omitted, 412 if stale). Send 0 to create the first draft. Allowed only while the consultation is in progress or ready for discharge. Finalized notes are not modified.","tags":["consultations"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"soap:write","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/replaceSoapNoteResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Consultation is not in progress, or the note is finalized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"412":{"description":"Precondition Failed — entity_version is stale.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"428":{"description":"Precondition Required — entity_version must be supplied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/replaceSoapNoteRequest"}}}}}},"/api/v1/clinical/vaccinations":{"get":{"operationId":"listVaccinations","summary":"List vaccinations","description":"Opt-in clinical scope. Returns vaccination records for a patient. Does not include SOAP or clinical notes.","tags":["clinical"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"clinical:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listVaccinationsResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Rows to skip. Default 0."},"description":"Rows to skip. Default 0."},{"name":"patient_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Required patient UUID filter."},"description":"Required patient UUID filter."}]}},"/api/v1/clinical/prescriptions":{"get":{"operationId":"listPrescriptions","summary":"List prescriptions","description":"Opt-in clinical scope. Returns prescriptions for a patient. Does not include clinical notes.","tags":["clinical"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"clinical:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listPrescriptionsResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Rows to skip. Default 0."},"description":"Rows to skip. Default 0."},{"name":"patient_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Required patient UUID filter."},"description":"Required patient UUID filter."}]}},"/api/v1/documents":{"get":{"operationId":"listDocuments","summary":"List documents","description":"Document metadata only. File bytes are not returned.","tags":["documents"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"documents:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listDocumentsResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of rows to skip. Default 0."},"description":"Number of rows to skip. Default 0."}]}},"/api/v1/documents/{id}":{"get":{"operationId":"getDocument","summary":"Get document metadata","description":"Returns document metadata. Does not return file content.","tags":["documents"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"documents:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getDocumentResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]}},"/api/v1/inventory":{"get":{"operationId":"listInventory","summary":"List inventory","description":"Product stock levels and sell prices. Cost, margin, and supplier details are not exposed.","tags":["inventory"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"inventory:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listInventoryResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of rows to skip. Default 0."},"description":"Number of rows to skip. Default 0."}]}},"/api/v1/waitlist":{"get":{"operationId":"listWaitlist","summary":"List waitlist entries","description":"Paginated appointment waitlist entries.","tags":["waitlist"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"waitlist:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listWaitlistResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of rows to skip. Default 0."},"description":"Number of rows to skip. Default 0."}]}},"/api/v1/reminders":{"get":{"operationId":"listReminders","summary":"List reminder sends","description":"Paginated reminder send history.","tags":["reminders"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"reminders:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listRemindersResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of rows to skip. Default 0."},"description":"Number of rows to skip. Default 0."}]},"post":{"operationId":"sendReminder","summary":"Send a reminder message now","description":"Send a reminder message now","tags":["reminders"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"reminders:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sendReminderResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sendReminderRequest"}}}}}},"/api/v1/tasks":{"get":{"operationId":"listTasks","summary":"List tasks","description":"Paginated tasks.","tags":["tasks"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"tasks:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listTasksResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of rows to skip. Default 0."},"description":"Number of rows to skip. Default 0."}]},"post":{"operationId":"createTask","summary":"Create a task","description":"Create a task","tags":["tasks"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"tasks:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createTaskResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createTaskRequest"}}}}}},"/api/v1/imaging/worklist":{"get":{"operationId":"listImagingWorklist","summary":"List imaging worklist","description":"Modality worklist entries (DICOM-oriented camelCase DTO) for requested/scheduled studies.","tags":["imaging"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"imaging:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listImagingWorklistResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of rows to skip. Default 0."},"description":"Number of rows to skip. Default 0."}]}},"/api/v1/imaging/worklist/{id}":{"get":{"operationId":"getImagingWorklistItem","summary":"Get imaging worklist item","description":"Returns a single modality worklist item (DICOM-oriented camelCase DTO).","tags":["imaging"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"imaging:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getImagingWorklistItemResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]}},"/api/v1/imaging/worklist/{id}/status":{"post":{"operationId":"updateImagingWorklistStatus","summary":"Update imaging worklist status","description":"Modality callback to mark an imaging request in progress or completed. Response uses the public imaging request DTO.","tags":["imaging"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"imaging:write","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateImagingWorklistStatusResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateImagingWorklistStatusRequest"}}}}}},"/api/v1/imaging/requests":{"get":{"operationId":"listImagingRequests","summary":"List imaging requests","description":"Paginated imaging requests for a patient.","tags":["imaging"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"imaging:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listImagingRequestsResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Rows to skip. Default 0."},"description":"Rows to skip. Default 0."},{"name":"patient_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Required patient UUID filter."},"description":"Required patient UUID filter."}]},"post":{"operationId":"createImagingRequest","summary":"Create imaging request","description":"Creates an imaging request for modality workflow.","tags":["imaging"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"imaging:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createImagingRequestResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createImagingRequestRequest"}}}}}},"/api/v1/consultations":{"get":{"operationId":"listConsultations","summary":"List consultations","description":"List consultations","tags":["consultations"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"consultations:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listConsultationsResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of rows to skip. Default 0."},"description":"Number of rows to skip. Default 0."}]}},"/api/v1/consultations/{id}":{"get":{"operationId":"getConsultationMeta","summary":"Get consultation metadata","description":"Get consultation metadata","tags":["consultations"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"consultations:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getConsultationMetaResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]}},"/api/v1/patients/{id}/vitals":{"get":{"operationId":"listVitals","summary":"List vitals","description":"List vitals","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"vitals:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listVitalsResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]},"post":{"operationId":"createVital","summary":"Record vitals","description":"Record vitals","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"vitals:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createVitalResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createVitalRequest"}}}}}},"/api/v1/patients/{id}/labs":{"get":{"operationId":"listLabs","summary":"List lab results","description":"List lab results","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"labs:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listLabsResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]},"post":{"operationId":"createLab","summary":"Record a lab result","description":"Record a lab result","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"labs:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createLabResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createLabRequest"}}}}}},"/api/v1/patients/{id}/diagnoses":{"get":{"operationId":"listDiagnoses","summary":"List diagnoses","description":"List diagnoses","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"diagnoses:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listDiagnosesResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]},"post":{"operationId":"createDiagnosis","summary":"Record a diagnosis","description":"Record a diagnosis","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"diagnoses:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createDiagnosisResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createDiagnosisRequest"}}}}}},"/api/v1/patients/{id}/problems":{"get":{"operationId":"listProblems","summary":"List problems","description":"List problems","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"problems:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listProblemsResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]},"post":{"operationId":"createProblem","summary":"Record a problem","description":"Record a problem","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"problems:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createProblemResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createProblemRequest"}}}}}},"/api/v1/patients/{id}/procedures":{"get":{"operationId":"listProcedures","summary":"List procedures","description":"List procedures","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"procedures:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listProceduresResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]},"post":{"operationId":"createProcedure","summary":"Record a procedure","description":"Record a procedure","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"procedures:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createProcedureResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createProcedureRequest"}}}}}},"/api/v1/patients/{id}/anaesthesia":{"get":{"operationId":"listAnaesthesia","summary":"List anaesthesia records","description":"List anaesthesia records","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"anaesthesia:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listAnaesthesiaResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]},"post":{"operationId":"createAnaesthesiaDraft","summary":"Create an anaesthesia draft","description":"Create an anaesthesia draft","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"anaesthesia:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAnaesthesiaDraftResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAnaesthesiaDraftRequest"}}}}}},"/api/v1/patients/{id}/consents":{"get":{"operationId":"listConsents","summary":"List consent forms","description":"List consent forms","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"consent:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listConsentsResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]},"post":{"operationId":"createConsentDraft","summary":"Create a consent draft","description":"Create a consent draft","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"consent:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createConsentDraftResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createConsentDraftRequest"}}}}}},"/api/v1/consultations/{id}/treatments":{"get":{"operationId":"listTreatments","summary":"List treatment charges","description":"List treatment charges","tags":["consultations"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"treatments:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listTreatmentsResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]},"post":{"operationId":"createTreatment","summary":"Add a treatment charge","description":"Add a treatment charge","tags":["consultations"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"treatments:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createTreatmentResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createTreatmentRequest"}}}}}},"/api/v1/consultations/{id}/home-sheet":{"get":{"operationId":"getHomeSheet","summary":"Get home sheet","description":"Get home sheet","tags":["consultations"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"home_sheets:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getHomeSheetResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]}},"/api/v1/patients/{id}/weights":{"get":{"operationId":"listWeights","summary":"List weights","description":"List weights","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"weights:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listWeightsResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]}},"/api/v1/patients/{id}/allergies":{"get":{"operationId":"listAllergies","summary":"List allergies","description":"List allergies","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"allergies:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listAllergiesResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]},"post":{"operationId":"createAllergy","summary":"Record an allergy","description":"Record an allergy","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"allergies:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAllergyResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createAllergyRequest"}}}}}},"/api/v1/invoices/{id}/lines":{"get":{"operationId":"listInvoiceLines","summary":"List invoice lines","description":"List invoice lines","tags":["invoices"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"invoice_lines:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listInvoiceLinesResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]}},"/api/v1/payments":{"get":{"operationId":"listPayments","summary":"List payment summaries","description":"List payment summaries","tags":["payments"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"payments:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listPaymentsResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of rows to skip. Default 0."},"description":"Number of rows to skip. Default 0."}]}},"/api/v1/estimates":{"get":{"operationId":"listEstimates","summary":"List estimates","description":"List estimates","tags":["estimates"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"estimates:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listEstimatesResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size. Default 25, maximum 100."},"description":"Page size. Default 25, maximum 100."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of rows to skip. Default 0."},"description":"Number of rows to skip. Default 0."}]},"post":{"operationId":"createEstimate","summary":"Create a draft estimate","description":"Create a draft estimate","tags":["estimates"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"estimates:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createEstimateResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createEstimateRequest"}}}}}},"/api/v1/estimate-drafts/{id}/send":{"post":{"operationId":"sendEstimateDraft","summary":"Send a prepared estimate email","description":"Send a prepared estimate email","tags":["estimate-drafts"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"estimates:issue","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sendEstimateDraftResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sendEstimateDraftRequest"}}}}}},"/api/v1/patients/{id}/pet-plans":{"get":{"operationId":"listPetPlans","summary":"List pet plan enrolments","description":"List pet plan enrolments","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"pet_plans:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listPetPlansResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]}},"/api/v1/purchase-orders":{"get":{"operationId":"listPurchaseOrders","summary":"List purchase orders","description":"List purchase orders","tags":["purchase-orders"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"procurement:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listPurchaseOrdersResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"createPurchaseOrder","summary":"Create a draft purchase order","description":"Create a draft purchase order","tags":["purchase-orders"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"procurement:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPurchaseOrderResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createPurchaseOrderRequest"}}}}}},"/api/v1/purchase-orders/{id}/submit":{"post":{"operationId":"submitPurchaseOrder","summary":"Submit a purchase order","description":"Submit a purchase order","tags":["purchase-orders"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"procurement:commit","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitPurchaseOrderResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitPurchaseOrderRequest"}}}}}},"/api/v1/goods-receipts/{id}/post":{"post":{"operationId":"postGoodsReceipt","summary":"Post an ordinary goods receipt","description":"Post an ordinary goods receipt","tags":["goods-receipts"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"procurement:commit","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/postGoodsReceiptResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/postGoodsReceiptRequest"}}}}}},"/api/v1/controlled-drugs/registers":{"get":{"operationId":"listCdRegisters","summary":"List controlled-drug registers","description":"List controlled-drug registers","tags":["controlled-drugs"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"cd:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listCdRegistersResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/controlled-drugs/registers/{id}/entries":{"get":{"operationId":"listCdEntries","summary":"List controlled-drug register entries","description":"List controlled-drug register entries","tags":["controlled-drugs"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"cd:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listCdEntriesResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]}},"/api/v1/documents/{id}/content":{"get":{"operationId":"getDocumentContent","summary":"Read document bytes","description":"Read document bytes","tags":["documents"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"documents:content","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getDocumentContentResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}]}},"/api/v1/communications":{"get":{"operationId":"listCommunications","summary":"List clinical communications","description":"List clinical communications","tags":["communications"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"communications:read","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/listCommunicationsResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/v1/patients/{id}/vaccinations":{"post":{"operationId":"createVaccinationRecord","summary":"Record a vaccination","description":"Record a vaccination","tags":["patients"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"vaccinations:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createVaccinationRecordResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createVaccinationRecordRequest"}}}}}},"/api/v1/inventory/{id}":{"post":{"operationId":"updateInventoryCatalogue","summary":"Update inventory catalogue fields","description":"Update inventory catalogue fields","tags":["inventory"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"inventory:write","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateInventoryCatalogueResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/updateInventoryCatalogueRequest"}}}}}},"/api/v1/inventory/{id}/movements":{"post":{"operationId":"moveInventory","summary":"Post a non-controlled stock movement","description":"Post a non-controlled stock movement","tags":["inventory"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"inventory:move","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/moveInventoryResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/moveInventoryRequest"}}}}}},"/api/v1/invoices/{id}/finalise":{"post":{"operationId":"finaliseInvoice","summary":"Finalise an ordinary invoice","description":"Finalise an ordinary invoice","tags":["invoices"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"invoices:finalise","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/finaliseInvoiceResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."},"description":"Resource UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/finaliseInvoiceRequest"}}}}}},"/api/v1/messages":{"post":{"operationId":"sendMessage","summary":"Send a client message","description":"Send a client message","tags":["messages"],"security":[{"ApiKeyAuth":[]}],"x-required-scope":"messages:send","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sendMessageResponse"}}}},"400":{"description":"Validation failed. See error.fields for details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"API key missing required scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded (600 requests/minute per key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sendMessageRequest"}}}}}}},"webhooks":{"appointment.created":{"post":{"summary":"A new appointment was booked.","description":"Appointment create via REST, UI, or portal booking paths that emit the event.\n\nPOST JSON to the subscriber URL with Content-Type application/json, X-Webhook-Event, and X-Webhook-Signature (HMAC-SHA256 hex of the raw body).\n\nRetry: none (clinic Settings webhooks).\n\nPayload fields follow the public appointment DTO; additive only within /api/v1.","tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook_appointment_created"},"example":{"event":"appointment.created","timestamp":"2026-07-26T10:00:00.000Z","data":{"id":"00000000-0000-4000-8000-000000000001","status":"scheduled"}}}}},"responses":{"200":{"description":"Subscriber acknowledges receipt (not verified)."}}}},"appointment.updated":{"post":{"summary":"Appointment details were changed.","description":"Appointment update that emits appointment.updated.\n\nPOST JSON to the subscriber URL with Content-Type application/json, X-Webhook-Event, and X-Webhook-Signature (HMAC-SHA256 hex of the raw body).\n\nRetry: none (clinic Settings webhooks).\n\nPayload fields follow the public appointment DTO; additive only within /api/v1.","tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook_appointment_updated"},"example":{"event":"appointment.updated","timestamp":"2026-07-26T10:00:00.000Z","data":{"id":"00000000-0000-4000-8000-000000000001"}}}}},"responses":{"200":{"description":"Subscriber acknowledges receipt (not verified)."}}}},"appointment.status_changed":{"post":{"summary":"Appointment status transitioned.","description":"Status transitions such as checked_in, checked_out, cancelled, no_show.\n\nPOST JSON to the subscriber URL with Content-Type application/json, X-Webhook-Event, and X-Webhook-Signature (HMAC-SHA256 hex of the raw body).\n\nRetry: none (clinic Settings webhooks).\n\nStatus values match ApiAppointmentStatusSchema.","tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook_appointment_status_changed"},"example":{"event":"appointment.status_changed","timestamp":"2026-07-26T10:00:00.000Z","data":{"id":"00000000-0000-4000-8000-000000000001","status":"checked_in"}}}}},"responses":{"200":{"description":"Subscriber acknowledges receipt (not verified)."}}}},"patient.created":{"post":{"summary":"A new patient record was created.","description":"Patient create via REST or clinic UI.\n\nPOST JSON to the subscriber URL with Content-Type application/json, X-Webhook-Event, and X-Webhook-Signature (HMAC-SHA256 hex of the raw body).\n\nRetry: none (clinic Settings webhooks).\n\nPayload fields follow the public patient DTO.","tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook_patient_created"},"example":{"event":"patient.created","timestamp":"2026-07-26T10:00:00.000Z","data":{"id":"00000000-0000-4000-8000-000000000002","name":"Rex"}}}}},"responses":{"200":{"description":"Subscriber acknowledges receipt (not verified)."}}}},"patient.updated":{"post":{"summary":"Patient details were updated.","description":"Patient update via REST or clinic UI.\n\nPOST JSON to the subscriber URL with Content-Type application/json, X-Webhook-Event, and X-Webhook-Signature (HMAC-SHA256 hex of the raw body).\n\nRetry: none (clinic Settings webhooks).\n\nPayload fields follow the public patient DTO.","tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook_patient_updated"},"example":{"event":"patient.updated","timestamp":"2026-07-26T10:00:00.000Z","data":{"id":"00000000-0000-4000-8000-000000000002"}}}}},"responses":{"200":{"description":"Subscriber acknowledges receipt (not verified)."}}}},"client.created":{"post":{"summary":"A new client was registered.","description":"Client create via REST or clinic UI.\n\nPOST JSON to the subscriber URL with Content-Type application/json, X-Webhook-Event, and X-Webhook-Signature (HMAC-SHA256 hex of the raw body).\n\nRetry: none (clinic Settings webhooks).\n\nPayload fields follow the public client DTO.","tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook_client_created"},"example":{"event":"client.created","timestamp":"2026-07-26T10:00:00.000Z","data":{"id":"00000000-0000-4000-8000-000000000003","first_name":"Alex","last_name":"Owner"}}}}},"responses":{"200":{"description":"Subscriber acknowledges receipt (not verified)."}}}},"invoice.created":{"post":{"summary":"An invoice was generated.","description":"Invoice finalisation / create paths that emit invoice.created.\n\nPOST JSON to the subscriber URL with Content-Type application/json, X-Webhook-Event, and X-Webhook-Signature (HMAC-SHA256 hex of the raw body).\n\nRetry: none (clinic Settings webhooks).\n\nInvoice webhook payloads may be a subset of the public invoice DTO.","tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook_invoice_created"},"example":{"event":"invoice.created","timestamp":"2026-07-26T10:00:00.000Z","data":{"id":"00000000-0000-4000-8000-000000000004","status":"open"}}}}},"responses":{"200":{"description":"Subscriber acknowledges receipt (not verified)."}}}},"invoice.paid":{"post":{"summary":"An invoice was marked as paid.","description":"Payment application that marks an invoice paid.\n\nPOST JSON to the subscriber URL with Content-Type application/json, X-Webhook-Event, and X-Webhook-Signature (HMAC-SHA256 hex of the raw body).\n\nRetry: none (clinic Settings webhooks).\n\nInvoice webhook payloads may be a subset of the public invoice DTO.","tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook_invoice_paid"},"example":{"event":"invoice.paid","timestamp":"2026-07-26T10:00:00.000Z","data":{"id":"00000000-0000-4000-8000-000000000004","status":"paid"}}}}},"responses":{"200":{"description":"Subscriber acknowledges receipt (not verified)."}}}},"prescription.created":{"post":{"summary":"A prescription was issued.","description":"Prescription create in clinical workflows.\n\nPOST JSON to the subscriber URL with Content-Type application/json, X-Webhook-Event, and X-Webhook-Signature (HMAC-SHA256 hex of the raw body).\n\nRetry: none (clinic Settings webhooks).\n\nFollows public prescription DTO fields when present.","tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook_prescription_created"},"example":{"event":"prescription.created","timestamp":"2026-07-26T10:00:00.000Z","data":{"id":"00000000-0000-4000-8000-000000000005"}}}}},"responses":{"200":{"description":"Subscriber acknowledges receipt (not verified)."}}}},"vaccination.recorded":{"post":{"summary":"A vaccination was recorded.","description":"Vaccination record create.\n\nPOST JSON to the subscriber URL with Content-Type application/json, X-Webhook-Event, and X-Webhook-Signature (HMAC-SHA256 hex of the raw body).\n\nRetry: none (clinic Settings webhooks).\n\nFollows public vaccination DTO fields when present.","tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook_vaccination_recorded"},"example":{"event":"vaccination.recorded","timestamp":"2026-07-26T10:00:00.000Z","data":{"id":"00000000-0000-4000-8000-000000000006"}}}}},"responses":{"200":{"description":"Subscriber acknowledges receipt (not verified)."}}}},"policy.updated":{"post":{"summary":"Practice policy settings were changed.","description":"Practice policy update.\n\nPOST JSON to the subscriber URL with Content-Type application/json, X-Webhook-Event, and X-Webhook-Signature (HMAC-SHA256 hex of the raw body).\n\nRetry: none (clinic Settings webhooks).\n\nOpaque settings payload; treat as notification-only.","tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook_policy_updated"},"example":{"event":"policy.updated","timestamp":"2026-07-26T10:00:00.000Z","data":{}}}}},"responses":{"200":{"description":"Subscriber acknowledges receipt (not verified)."}}}},"clinic.profile_updated":{"post":{"summary":"Practice profile details were updated.","description":"Clinic profile update.\n\nPOST JSON to the subscriber URL with Content-Type application/json, X-Webhook-Event, and X-Webhook-Signature (HMAC-SHA256 hex of the raw body).\n\nRetry: none (clinic Settings webhooks).\n\nOpaque profile payload; treat as notification-only.","tags":["webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook_clinic_profile_updated"},"example":{"event":"clinic.profile_updated","timestamp":"2026-07-26T10:00:00.000Z","data":{}}}}},"responses":{"200":{"description":"Subscriber acknowledges receipt (not verified)."}}}}},"x-fenced-paths":[],"x-meta-paths":[],"x-changelog":[{"version":"1.7.0","date":"2026-10-23","kind":"minor","summary":"Practice profile, phone client lookup, diary availability slots, and staff working windows for receptionist integrations. Existing client and patient reads are limited to the API key's practice."},{"version":"1.6.0","date":"2026-10-16","kind":"minor","summary":"Add clinician, patient, and client display fields on appointments, and PUT /api/v1/appointments/{id}/soap for a draft on a consultation that is already in progress."},{"version":"1.5.0","date":"2026-10-09","kind":"minor","summary":"Send a prepared estimate email (estimates:issue) and send a reminder message now (reminders:write). Neither records a staff user as the sender."},{"version":"1.4.0","date":"2026-10-09","kind":"minor","summary":"Workflow writes: ordinary invoice finalise, ordinary goods-receipt post, procurement submit, vaccination billing, inventory movements, treatment charges, and consented messages."},{"version":"1.3.0","date":"2026-10-09","kind":"minor","summary":"Draft writes attributed to the integration: vitals, labs, problems, procedures, allergies, diagnoses, anaesthesia drafts, consent drafts, tasks, catalogue inventory, draft estimates, and vaccination records without billing."},{"version":"1.2.0","date":"2026-10-09","kind":"minor","summary":"Practice-scoped reads for consultations, clinical records, invoice lines, payments, estimates, pet plans, procurement, the controlled-drug register, document bytes, and communications."},{"version":"1.1.0","date":"2026-10-09","kind":"minor","summary":"Add opt-in SOAP note read and replace on GET/PUT /api/v1/consultations/{id}/soap (soap:read, soap:write). Draft notes on an in-progress consultation only."},{"version":"1.0.0","date":"2026-07-26","kind":"minor","summary":"Publish executable clinic catalogue: OpenAPI from CLINIC_API_RESOURCES, field descriptions, webhook registry, and /api-docs generated from the same contract."}],"x-conventions":{"apiVersionPath":"/api/v1","resourceIdFormat":"UUID","timestamps":"UTC ISO-8601 strings","clinicTimezone":"Scheduling date queries use clinic-local day bounds; stored/returned instants are UTC.","pagination":{"params":["limit","offset"],"defaultLimit":25,"maxLimit":100,"envelope":"{ data, pagination: { limit, offset, total } }"},"errorEnvelope":"{ error: { message, code?, fields? } }","softDeletes":"Soft-deleted rows are omitted from list/get responses.","unknownRequestProperties":"Zod object schemas reject unknown keys unless the operation schema explicitly allows them.","optimisticConcurrency":{"field":"entity_version","preconditionRequired":428,"preconditionFailed":412},"rateLimit":{"limit":600,"window":"1 minute per API key","headers":["X-RateLimit-Limit","X-RateLimit-Remaining","X-RateLimit-Reset"]},"browserCors":"Cross-origin browser access to /api/v1 is not supported. No Access-Control-Allow-Origin is emitted on clinic REST responses."}}