{"openapi":"3.1.0","info":{"title":"scheduler","version":"0.1.0"},"paths":{"/scheduler/locations":{"get":{"tags":["scheduler"],"summary":"List Locations","operationId":"list_locations_scheduler_locations_get","parameters":[{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClinicLocationResponse"},"title":"Response List Locations Scheduler Locations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["scheduler"],"summary":"Create Location","operationId":"create_location_scheduler_locations_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicLocationCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicLocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scheduler/locations/{location_id}":{"patch":{"tags":["scheduler"],"summary":"Update Location","operationId":"update_location_scheduler_locations__location_id__patch","parameters":[{"name":"location_id","in":"path","required":true,"schema":{"type":"string","title":"Location Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicLocationUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicLocationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scheduler/resources":{"get":{"tags":["scheduler"],"summary":"List Resources","operationId":"list_resources_scheduler_resources_get","parameters":[{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}},{"name":"resource_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SchedulingResourceResponse"},"title":"Response List Resources Scheduler Resources Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["scheduler"],"summary":"Create Resource","operationId":"create_resource_scheduler_resources_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchedulingResourceCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchedulingResourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scheduler/resources/{resource_id}":{"patch":{"tags":["scheduler"],"summary":"Update Resource","operationId":"update_resource_scheduler_resources__resource_id__patch","parameters":[{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","title":"Resource Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchedulingResourceUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchedulingResourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scheduler/appointment-types":{"get":{"tags":["scheduler"],"summary":"List Appointment Types","operationId":"list_appointment_types_scheduler_appointment_types_get","parameters":[{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppointmentTypeResponse"},"title":"Response List Appointment Types Scheduler Appointment Types Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["scheduler"],"summary":"Create Appointment Type","operationId":"create_appointment_type_scheduler_appointment_types_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentTypeCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scheduler/appointment-types/{appointment_type_id}":{"patch":{"tags":["scheduler"],"summary":"Update Appointment Type","operationId":"update_appointment_type_scheduler_appointment_types__appointment_type_id__patch","parameters":[{"name":"appointment_type_id","in":"path","required":true,"schema":{"type":"string","title":"Appointment Type Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentTypeUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scheduler/availability-templates":{"get":{"tags":["scheduler"],"summary":"List Availability Templates","operationId":"list_availability_templates_scheduler_availability_templates_get","parameters":[{"name":"resource_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"}},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AvailabilityTemplateResponse"},"title":"Response List Availability Templates Scheduler Availability Templates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["scheduler"],"summary":"Create Availability Template","operationId":"create_availability_template_scheduler_availability_templates_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityTemplateCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scheduler/availability-templates/{template_id}":{"patch":{"tags":["scheduler"],"summary":"Update Availability Template","operationId":"update_availability_template_scheduler_availability_templates__template_id__patch","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityTemplateUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scheduler/appointments":{"get":{"tags":["scheduler"],"summary":"List Appointments","operationId":"list_appointments_scheduler_appointments_get","parameters":[{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"resource_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"}},{"name":"patient_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppointmentResponse"},"title":"Response List Appointments Scheduler Appointments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["scheduler"],"summary":"Create Appointment","operationId":"create_appointment_scheduler_appointments_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scheduler/appointments/{appointment_id}":{"get":{"tags":["scheduler"],"summary":"Get Appointment","operationId":"get_appointment_scheduler_appointments__appointment_id__get","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"string","title":"Appointment Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["scheduler"],"summary":"Update Appointment","operationId":"update_appointment_scheduler_appointments__appointment_id__patch","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"string","title":"Appointment Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scheduler/appointments/{appointment_id}/status":{"post":{"tags":["scheduler"],"summary":"Update Appointment Status","operationId":"update_appointment_status_scheduler_appointments__appointment_id__status_post","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"string","title":"Appointment Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentStatusUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scheduler/appointments/{appointment_id}/cancel":{"post":{"tags":["scheduler"],"summary":"Cancel Appointment","operationId":"cancel_appointment_scheduler_appointments__appointment_id__cancel_post","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"string","title":"Appointment Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentCancelRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scheduler/appointment-requests":{"get":{"tags":["scheduler"],"summary":"List Appointment Requests","operationId":"list_appointment_requests_scheduler_appointment_requests_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"patient_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppointmentRequestResponse"},"title":"Response List Appointment Requests Scheduler Appointment Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["scheduler"],"summary":"Create Appointment Request","operationId":"create_appointment_request_scheduler_appointment_requests_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentRequestCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scheduler/appointment-requests/{request_id}/resolve":{"post":{"tags":["scheduler"],"summary":"Resolve Appointment Request","operationId":"resolve_appointment_request_scheduler_appointment_requests__request_id__resolve_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentRequestResolveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scheduler/schedule":{"get":{"tags":["scheduler"],"summary":"Get Schedule","description":"Return all appointments (including blocks) for the given date range.","operationId":"get_schedule_scheduler_schedule_get","parameters":[{"name":"date_from","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Date From"}},{"name":"date_to","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Date To"}},{"name":"resource_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppointmentResponse"},"title":"Response Get Schedule Scheduler Schedule Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/scheduler/availability":{"get":{"tags":["scheduler"],"summary":"Get Availability","description":"Return open slots for a resource by diffing availability templates against booked appointments.","operationId":"get_availability_scheduler_availability_get","parameters":[{"name":"date_from","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Date From"}},{"name":"date_to","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Date To"}},{"name":"resource_id","in":"query","required":true,"schema":{"type":"string","title":"Resource Id"}},{"name":"appointment_type_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Type Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AvailableSlot"},"title":"Response Get Availability Scheduler Availability Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/status":{"get":{"summary":"Status","operationId":"status_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/readyz":{"get":{"summary":"Readyz","description":"Readiness probe — returns 200 only when the DB is reachable.\n\nCloud Run uses this to gate traffic routing.  A 503 causes the instance\nto be removed from the load balancer without a restart (unlike liveness).","operationId":"readyz_readyz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/authz/break-glass":{"post":{"summary":"Break Glass Endpoint","operationId":"break_glass_endpoint_authz_break_glass_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}},{"name":"X-Clinic-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clinic-Id"}},{"name":"X-Break-Glass-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Break-Glass-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AppointmentCancelRequest":{"properties":{"cancellation_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancellation Reason"},"cancelled_by_patient":{"type":"boolean","title":"Cancelled By Patient","default":false}},"type":"object","title":"AppointmentCancelRequest"},"AppointmentCreateRequest":{"properties":{"resource_id":{"type":"string","title":"Resource Id"},"scheduled_start":{"type":"string","format":"date-time","title":"Scheduled Start"},"scheduled_end":{"type":"string","format":"date-time","title":"Scheduled End"},"patient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Id"},"appointment_type_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Type Id"},"location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"is_block":{"type":"boolean","title":"Is Block","default":false},"block_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Reason"}},"type":"object","required":["resource_id","scheduled_start","scheduled_end"],"title":"AppointmentCreateRequest"},"AppointmentRequestCreateRequest":{"properties":{"patient_id":{"type":"string","title":"Patient Id"},"requested_date_from":{"type":"string","format":"date","title":"Requested Date From"},"appointment_type_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Type Id"},"preferred_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Resource Id"},"requested_date_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Requested Date To"},"preferred_time_of_day":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Time Of Day"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["patient_id","requested_date_from"],"title":"AppointmentRequestCreateRequest"},"AppointmentRequestResolveRequest":{"properties":{"action":{"type":"string","title":"Action"},"appointment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Id"},"decline_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decline Reason"}},"type":"object","required":["action"],"title":"AppointmentRequestResolveRequest"},"AppointmentRequestResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"clinic_id":{"type":"string","title":"Clinic Id"},"patient_id":{"type":"string","title":"Patient Id"},"appointment_type_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Type Id"},"preferred_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Resource Id"},"requested_date_from":{"type":"string","format":"date","title":"Requested Date From"},"requested_date_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Requested Date To"},"preferred_time_of_day":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Time Of Day"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"status":{"type":"string","title":"Status"},"resolved_appointment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved Appointment Id"},"resolved_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved By User Id"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"decline_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decline Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["request_id","clinic_id","patient_id","requested_date_from","status","created_at","updated_at"],"title":"AppointmentRequestResponse"},"AppointmentResponse":{"properties":{"appointment_id":{"type":"string","title":"Appointment Id"},"clinic_id":{"type":"string","title":"Clinic Id"},"patient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Id"},"resource_id":{"type":"string","title":"Resource Id"},"appointment_type_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Type Id"},"location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Id"},"scheduled_start":{"type":"string","format":"date-time","title":"Scheduled Start"},"scheduled_end":{"type":"string","format":"date-time","title":"Scheduled End"},"status":{"type":"string","title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"cancellation_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancellation Reason"},"is_block":{"type":"boolean","title":"Is Block"},"block_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Reason"},"booked_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booked By User Id"},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Confirmed At"},"checked_in_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked In At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["appointment_id","clinic_id","resource_id","scheduled_start","scheduled_end","status","is_block","created_at","updated_at"],"title":"AppointmentResponse"},"AppointmentStatusUpdateRequest":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"AppointmentStatusUpdateRequest"},"AppointmentTypeCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Hex"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"requires_new_patient_intake":{"type":"boolean","title":"Requires New Patient Intake","default":false},"allow_online_booking":{"type":"boolean","title":"Allow Online Booking","default":false}},"type":"object","required":["name","duration_minutes"],"title":"AppointmentTypeCreateRequest"},"AppointmentTypeResponse":{"properties":{"appointment_type_id":{"type":"string","title":"Appointment Type Id"},"clinic_id":{"type":"string","title":"Clinic Id"},"name":{"type":"string","title":"Name"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Hex"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"requires_new_patient_intake":{"type":"boolean","title":"Requires New Patient Intake"},"allow_online_booking":{"type":"boolean","title":"Allow Online Booking"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["appointment_type_id","clinic_id","name","duration_minutes","requires_new_patient_intake","allow_online_booking","is_active","created_at","updated_at"],"title":"AppointmentTypeResponse"},"AppointmentTypeUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes"},"color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Hex"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"requires_new_patient_intake":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requires New Patient Intake"},"allow_online_booking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Online Booking"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"AppointmentTypeUpdateRequest"},"AppointmentUpdateRequest":{"properties":{"scheduled_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Start"},"scheduled_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled End"},"appointment_type_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Type Id"},"location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"}},"type":"object","title":"AppointmentUpdateRequest"},"AvailabilityTemplateCreateRequest":{"properties":{"resource_id":{"type":"string","title":"Resource Id"},"day_of_week":{"type":"integer","title":"Day Of Week"},"start_time":{"type":"string","format":"time","title":"Start Time"},"end_time":{"type":"string","format":"time","title":"End Time"},"appointment_type_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Appointment Type Ids"},"effective_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective From"},"effective_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective Until"}},"type":"object","required":["resource_id","day_of_week","start_time","end_time"],"title":"AvailabilityTemplateCreateRequest"},"AvailabilityTemplateResponse":{"properties":{"template_id":{"type":"string","title":"Template Id"},"clinic_id":{"type":"string","title":"Clinic Id"},"resource_id":{"type":"string","title":"Resource Id"},"day_of_week":{"type":"integer","title":"Day Of Week"},"start_time":{"type":"string","format":"time","title":"Start Time"},"end_time":{"type":"string","format":"time","title":"End Time"},"appointment_type_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Appointment Type Ids"},"effective_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective From"},"effective_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective Until"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["template_id","clinic_id","resource_id","day_of_week","start_time","end_time","is_active","created_at","updated_at"],"title":"AvailabilityTemplateResponse"},"AvailabilityTemplateUpdateRequest":{"properties":{"start_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"End Time"},"appointment_type_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Appointment Type Ids"},"effective_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective From"},"effective_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective Until"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"AvailabilityTemplateUpdateRequest"},"AvailableSlot":{"properties":{"resource_id":{"type":"string","title":"Resource Id"},"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"},"appointment_type_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Type Id"}},"type":"object","required":["resource_id","start","end"],"title":"AvailableSlot"},"ClinicLocationCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"timezone":{"type":"string","title":"Timezone","default":"America/Chicago"}},"type":"object","required":["name"],"title":"ClinicLocationCreateRequest"},"ClinicLocationResponse":{"properties":{"location_id":{"type":"string","title":"Location Id"},"clinic_id":{"type":"string","title":"Clinic Id"},"name":{"type":"string","title":"Name"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"timezone":{"type":"string","title":"Timezone"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["location_id","clinic_id","name","timezone","is_active","created_at","updated_at"],"title":"ClinicLocationResponse"},"ClinicLocationUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"ClinicLocationUpdateRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"SchedulingResourceCreateRequest":{"properties":{"resource_type":{"type":"string","title":"Resource Type"},"resource_name":{"type":"string","title":"Resource Name"},"location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Id"},"provider_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider User Id"},"color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Hex"}},"type":"object","required":["resource_type","resource_name"],"title":"SchedulingResourceCreateRequest"},"SchedulingResourceResponse":{"properties":{"resource_id":{"type":"string","title":"Resource Id"},"clinic_id":{"type":"string","title":"Clinic Id"},"location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Id"},"resource_type":{"type":"string","title":"Resource Type"},"resource_name":{"type":"string","title":"Resource Name"},"provider_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider User Id"},"color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Hex"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["resource_id","clinic_id","resource_type","resource_name","is_active","created_at","updated_at"],"title":"SchedulingResourceResponse"},"SchedulingResourceUpdateRequest":{"properties":{"resource_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Name"},"location_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Id"},"provider_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider User Id"},"color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Hex"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"SchedulingResourceUpdateRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}