{"components":{"schemas":{"AlternativePayor":{"additionalProperties":false,"properties":{"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"name":{"description":"The name of the alternative payor.","type":"string"},"object":{"const":"alternative_payor","description":"Discriminator value emitted at `object`."},"payor_type":{"description":"The category of the alternative payor.","enum":["legal","medical_facility","other"],"type":"string"},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","created_at","name","payor_type","updated_at"],"type":"object"},"AttachmentSummary":{"additionalProperties":false,"properties":{"download_url":{"description":"The short-lived signed download URL for the attachment. Null while the malware scan is not complete.","format":"uri","type":["string","null"]},"filename":{"description":"The original filename of the attachment.","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"}},"required":["id","download_url","filename"],"type":"object"},"AvailabilityPeriod":{"additionalProperties":false,"properties":{"availability_type":{"description":"Whether the period makes the Clinician available or unavailable.","enum":["availability","unavailability"],"type":"string"},"clinician_id":{"description":"The Clinician affected by the period.","format":"uuid","type":["string","null"]},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"end_time":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"is_active":{"description":"Whether the period contributes to the diary.","type":"boolean"},"is_recurring":{"description":"Whether the period repeats. When false, use `start_time` and `end_time`; recurring fields are cleared.","type":"boolean"},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"clinician":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]}},"required":["clinician"],"type":"object"},"notes":{"description":"Internal notes about the period.","type":["string","null"]},"object":{"const":"availability_period","description":"Discriminator value emitted at `object`."},"recurring_dates_to_skip":{"description":"Specific ISO 8601 dates on which a recurring period must not occur. For example, `[\"2026-02-12\"]` skips the occurrence on 12 February 2026. Only dates that are today or in the future are retained.","items":{"format":"date","type":"string"},"type":"array"},"recurring_day_number_of_week":{"description":"The ISO weekday number used by a recurring period. The values start at 1, not 0: 1 is Monday, 2 is Tuesday, 3 is Wednesday, 4 is Thursday, 5 is Friday, 6 is Saturday, and 7 is Sunday.","maximum":7,"minimum":1,"type":["integer","null"]},"recurring_end_date":{"description":"The optional final date on which the recurrence can apply. It must be after `recurring_start_date`.","format":"date","type":["string","null"]},"recurring_end_time":{"description":"The end time for each recurring occurrence in the Organization's local time.","example":"17:00:00","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$","type":["string","null"]},"recurring_interval_in_seconds":{"description":"Required for the `simple` strategy. Use 604800 for weekly or 1209600 for every two weeks.","type":["integer","null"]},"recurring_nth_day_in_month":{"description":"Required for the `advanced` strategy. For example, use 2 with weekday 4 for the second Thursday of each month.","type":["integer","null"]},"recurring_start_date":{"description":"The first date on which the recurrence can apply. Supply a date that matches `recurring_day_number_of_week`.","format":"date","type":["string","null"]},"recurring_start_time":{"description":"The start time for each recurring occurrence in the Organization's local time.","example":"09:00:00","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$","type":["string","null"]},"recurring_strategy":{"description":"Select `simple` for a fixed interval measured in seconds, such as every week or every two weeks. Select `advanced` for an occurrence such as the second Thursday of every month. Use null for a non-recurring period.","enum":["simple","advanced",null],"type":["string","null"]},"room_id":{"description":"The Room affected by the period.","format":"uuid","type":["string","null"]},"service_variant_ids":{"description":"The ServiceVariants offered during an availability period.","items":{"format":"uuid","type":"string"},"type":"array"},"start_time":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","availability_type","clinician_id","created_at","end_time","is_active","is_recurring","links","notes","recurring_dates_to_skip","recurring_day_number_of_week","recurring_end_date","recurring_end_time","recurring_interval_in_seconds","recurring_nth_day_in_month","recurring_start_date","recurring_start_time","recurring_strategy","room_id","service_variant_ids","start_time","updated_at"],"type":"object"},"AvailabilitySlot":{"additionalProperties":false,"description":"A time when the Clinician can be booked for the requested ServiceVariant.","properties":{"clinician_id":{"description":"The identifier of the Clinician who can provide the slot.","format":"uuid","type":"string"},"end_time":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"location_id":{"description":"The identifier of the Location at which the slot is available.","format":"uuid","type":["string","null"]},"object":{"const":"availability_slot","description":"Always `availability_slot`."},"resource_type":{"description":"The type of resource that can be booked. Currently `clinician`; a future API version may also support `room`.","example":"clinician","type":"string"},"room_id":{"description":"The identifier of the Room required by the ServiceVariant, when applicable.","format":"uuid","type":["string","null"]},"service_id":{"description":"The identifier of the Service provided during the slot.","format":"uuid","type":"string"},"service_variant_id":{"description":"The identifier of the ServiceVariant provided during the slot.","format":"uuid","type":"string"},"start_time":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["object","resource_type","clinician_id","end_time","location_id","room_id","service_id","service_variant_id","start_time"],"type":"object"},"Booking":{"additionalProperties":false,"properties":{"canceled_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"cancellation_information":{"description":"Additional notes recorded with the cancellation.","type":["string","null"]},"cancellation_reason":{"description":"The reason the Booking was canceled. Required by Organizations that enforce cancellation reasons.","enum":["abusive_behavior","booked_in_error","childcare_issues","clinician_annual_leave","clinician_emergency","clinician_schedule_change","colleague_unavailable","double_booked","duplicate_booking","equipment_issue","facility_unavailable","failed_to_pay_in_advance","family_emergency_illness","fear_or_anxiety","financial_concerns","financial_requirements_not_met","forgot_to_attend","insurance_company_not_permitted","insurance_coverage_issues","insurance_verification_failed","language_barrier","medication_interference","no_longer_required","no_response_to_recall","other","patient_deceased","patient_not_permitted","personal_emergency_illness","pre_booking_steps_not_completed","professional_discretion","referral_not_provided","relocated","rescheduled","scheduling_conflict","staff_issue","switched_to_another_clinician","symptoms_resolved","too_unwell","transportation_issues","unable_failed_to_prepare_for_booking","unknown","weather_conditions","wrong_clinician","wrong_location","wrong_service_type",null],"type":["string","null"]},"cancellation_source":{"description":"Who canceled the Booking. API cancellations use `api`.","enum":["api","app","automation","patient","staff_member",null],"type":["string","null"]},"clinician":{"description":"The clinician assigned to the booking.","oneOf":[{"$ref":"#/components/schemas/Clinician"},{"type":"null"}]},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"end_time":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"information_for_patient":{"description":"The sanitized HTML shown to the patient.","type":["string","null"]},"information_for_staff_members":{"description":"The sanitized HTML shown only to staff members.","type":["string","null"]},"is_remote":{"description":"Whether the Booking takes place remotely.","type":"boolean"},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"clinician":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]},"invoices":{"description":"The full URL of a related resource.","format":"uri","type":"string"},"letters":{"description":"The full URL of a related resource.","format":"uri","type":"string"},"notes":{"description":"The full URL of a related resource.","format":"uri","type":"string"},"service":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]},"test_results":{"description":"The full URL of a related resource.","format":"uri","type":"string"}},"required":["clinician","invoices","letters","notes","service","test_results"],"type":"object"},"location":{"description":"The location where the booking takes place, or null for a remote booking.","oneOf":[{"$ref":"#/components/schemas/Location"},{"type":"null"}]},"object":{"const":"booking","description":"Discriminator value emitted at `object`."},"patient":{"description":"The patient attending the booking.","oneOf":[{"$ref":"#/components/schemas/Patient"},{"type":"null"}]},"payor":{"description":"The payor responsible for the booking's charges.","oneOf":[{"$ref":"#/components/schemas/Payor"},{"type":"null"}]},"recall_due_date":{"description":"The date the Patient is due to return, in ISO 8601 format (YYYY-MM-DD). Present on recall Bookings. Null on diary Bookings.","format":"date","type":["string","null"]},"remote_method":{"description":"The remote consultation method. `native_video` uses Carebit Video.","enum":["native_video",null],"type":["string","null"]},"service":{"description":"The service being provided during the booking.","oneOf":[{"$ref":"#/components/schemas/Service"},{"type":"null"}]},"service_variants":{"description":"The service variants selected for the booking.","items":{"$ref":"#/components/schemas/ServiceVariant"},"type":"array"},"start_time":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"status":{"description":"The Booking's current status. Null while Carebit is creating the record.","enum":["arrived","awaiting_payment","awaiting_recall","canceled","confirmed","did_not_attend","overdue_for_recall","prepared","recall_canceled","recall_expired","unconfirmed",null],"type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","canceled_at","cancellation_information","cancellation_reason","cancellation_source","clinician","created_at","end_time","information_for_patient","information_for_staff_members","is_remote","links","location","patient","payor","recall_due_date","remote_method","service","service_variants","start_time","status","updated_at"],"type":"object"},"Clinician":{"additionalProperties":false,"properties":{"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"display_name":{"description":"The formatted name of the clinician, including title.","type":"string"},"email":{"description":"The practice contact email of the clinician within the organization.","format":"email","type":["string","null"]},"first_name":{"description":"The first name of the clinician.","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"last_name":{"description":"The last name of the clinician.","type":["string","null"]},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"bookings":{"description":"URL to list Bookings for this Clinician.","format":"uri","type":"string"}},"required":["bookings"],"type":"object"},"medical_specialty":{"description":"The medical specialty of the clinician, when recorded.","type":["string","null"]},"object":{"const":"clinician","description":"Discriminator value emitted at `object`."},"title":{"description":"The professional or personal title of the clinician, when recorded, such as `Dr`.","type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","created_at","display_name","email","first_name","last_name","links","medical_specialty","title","updated_at"],"type":"object"},"ClinicianAgendaItem":{"additionalProperties":false,"description":"A Booking, availability interval, or unavailability interval in a Clinician's diary.","properties":{"booking":{"description":"The Booking represented by this item, or null for availability and unavailability.","oneOf":[{"$ref":"#/components/schemas/Booking"},{"type":"null"}]},"clinician_id":{"description":"The identifier of the Clinician whose diary contains the item.","format":"uuid","type":"string"},"end_time":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"location_id":{"description":"The Location associated with the item, when applicable.","format":"uuid","type":["string","null"]},"object":{"const":"clinician_agenda_item","description":"Always `clinician_agenda_item`."},"room_id":{"description":"The Room associated with the item, when applicable.","format":"uuid","type":["string","null"]},"service_ids":{"description":"The Services associated with a Booking or availability interval.","items":{"format":"uuid","type":"string"},"type":"array"},"service_variant_ids":{"description":"The ServiceVariants associated with a Booking or availability interval.","items":{"format":"uuid","type":"string"},"type":"array"},"start_time":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"type":{"description":"The kind of diary item.","enum":["availability","booking","unavailability"],"type":"string"}},"required":["object","type","booking","clinician_id","end_time","location_id","room_id","service_ids","service_variant_ids","start_time"],"type":"object"},"DigitalForm":{"additionalProperties":false,"properties":{"attachment_url":{"description":"The temporary URL for the attachment displayed with the DigitalForm.","format":"uri","type":["string","null"]},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"object":{"const":"digital_form","description":"Discriminator value emitted at `object`."},"patient_instructions":{"description":"The sanitized instructions shown to the Patient.","example":"Please complete this form before your appointment.","type":["string","null"]},"questions":{"description":"The ordered questions included in the DigitalForm.","items":{"$ref":"#/components/schemas/DigitalFormQuestion"},"type":"array"},"title":{"description":"The title of the DigitalForm.","type":"string"},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","attachment_url","created_at","patient_instructions","questions","title","updated_at"],"type":"object"},"DigitalFormQuestion":{"additionalProperties":false,"description":"A question on a DigitalForm. Embedded on DigitalForm and on each DigitalFormResponse answer.","properties":{"choices":{"description":"The choices available for a choice question.","items":{"additionalProperties":false,"properties":{"id":{"description":"The identifier of the DigitalFormQuestionChoice.","format":"uuid","type":"string"},"numerical_value":{"description":"The optional numerical value assigned to the choice.","type":["number","null"]},"text_value":{"description":"The optional machine-readable text value assigned to the choice.","example":"yes","type":["string","null"]},"title":{"description":"The choice shown to the Patient.","type":"string"}},"required":["id","numerical_value","text_value","title"],"type":"object"},"type":"array"},"help_text":{"description":"The supplementary guidance shown with the question.","example":"Select every option that applies.","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"is_answer_required":{"description":"Whether the Patient must answer the question.","type":"boolean"},"list_order_number":{"description":"The position of the question in the DigitalForm.","type":["integer","null"]},"question_type":{"description":"The input and consent behavior of the question.","enum":["consent_required","information_statement","multiple_choice_input","single_choice_input","text_input","number_input","date_input","signature_input"],"type":"string"},"title":{"description":"The question shown to the Patient.","type":"string"}},"required":["id","choices","help_text","is_answer_required","list_order_number","question_type","title"],"type":"object"},"DigitalFormResponse":{"additionalProperties":false,"properties":{"answers":{"description":"The answers currently recorded for the DigitalFormResponse.","items":{"additionalProperties":false,"properties":{"attachment_url":{"description":"The temporary URL for an attached answer.","format":"uri","type":["string","null"]},"date_value":{"description":"The date supplied for a date question.","format":"date","type":["string","null"]},"digital_form_question":{"$ref":"#/components/schemas/DigitalFormQuestion","description":"The DigitalFormQuestion this answer belongs to."},"digital_form_question_choice_id":{"description":"The selected DigitalFormQuestionChoice.","format":"uuid","type":["string","null"]},"digital_form_question_id":{"description":"The DigitalFormQuestion answered.","format":"uuid","type":"string"},"has_consented":{"description":"Whether the Patient granted the requested consent.","type":["boolean","null"]},"id":{"description":"The identifier of the DigitalFormQuestionAnswer.","format":"uuid","type":"string"},"numerical_value":{"description":"The numerical answer.","type":["number","null"]},"text_value":{"description":"The text answer or selected choice title.","example":"The symptoms started two weeks ago.","type":["string","null"]}},"required":["id","attachment_url","date_value","digital_form_question","digital_form_question_choice_id","digital_form_question_id","has_consented","numerical_value","text_value"],"type":"object"},"type":"array"},"booking_id":{"description":"The Booking associated with the response.","format":"uuid","type":["string","null"]},"completed_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"digital_form":{"$ref":"#/components/schemas/DigitalForm","description":"The complete DigitalForm definition used for the response."},"due_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"patient":{"description":"The full URL of a related resource.","format":"uri","type":"string"},"transmissions":{"description":"The full URL of a related resource.","format":"uri","type":"string"}},"required":["patient","transmissions"],"type":"object"},"object":{"const":"digital_form_response","description":"Discriminator value emitted at `object`."},"patient_id":{"description":"The Patient asked to complete the DigitalForm.","format":"uuid","type":"string"},"status":{"description":"The completion status of the DigitalFormResponse.","enum":["awaiting_completion","partially_completed","overdue","completed"],"type":"string"},"total_score":{"description":"The sum of numerical answers configured to contribute to the score.","type":["integer","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","answers","booking_id","completed_at","created_at","digital_form","due_at","links","patient_id","status","total_score","updated_at"],"type":"object"},"Error":{"properties":{"error":{"description":"The structured details that describe why the request failed.","properties":{"code":{"description":"The machine-readable error code.","type":"string"},"errors":{"description":"Additional errors from a failed validation.","items":{"properties":{"code":{"description":"The machine-readable code for this validation error.","type":"string"},"message":{"description":"A message that explains this validation error.","type":"string"},"param":{"description":"The name of the parameter that caused this validation error, when known.","type":["string","null"]}},"type":"object"},"type":["array","null"]},"message":{"description":"A message that explains the error and how to resolve it.","type":"string"},"param":{"description":"The name of the parameter that caused the error, when known.","type":["string","null"]},"type":{"description":"The high-level category of the error.","enum":["authentication_error","permission_error","invalid_request_error","rate_limit_error","api_error"],"type":"string"}},"required":["type","code","message"],"type":"object"}},"required":["error"],"type":"object"},"ExpirableFile":{"additionalProperties":false,"properties":{"attachment_url":{"description":"The temporary signed download URL, or null while Carebit generates the file and download URL.","format":"uri","type":["string","null"]},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"expires_at":{"description":"The time after which Carebit can delete the file.","format":"date-time","type":"string"},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"object":{"const":"expirable_file","description":"Discriminator value emitted at `object`."},"status":{"description":"Whether Carebit is still creating the report or the file is ready to download.","enum":["processing","succeeded"],"type":"string"},"title":{"description":"The report type used as the title of the ExpirableFile.","enum":["account_balances","audio_recordings","billing_codes","booked_services","bookings","bookings_summary_for_child_organizations","bookings_with_invoices","bookings_without_invoices","care_episodes","cari_credits_usage","credit_notes","creditors","debtors","debtors_per_invoice","end_of_year_accounts_zip","expenses","financial_summary","indemnity_bookings","indemnity_income","invoice_line_items","issued_invoices","issued_invoices_summary_for_child_organizations","leads_and_enquiries","patient_referrals","patient_registrations","prescriptions_report","product_sales_audit_log","product_sales_report","product_stock_levels_report","profit_and_loss","recall_bookings","received_payments","received_payments_for_invoice_line_items","received_payments_summary_for_child_organizations","referral_summary","refunds","remittance_adjustments","service_variants","tasks_due_per_staff_member","tasks_raised"],"type":"string"},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","attachment_url","created_at","expires_at","status","title","updated_at"],"type":"object"},"HumanTask":{"additionalProperties":false,"properties":{"assignees":{"description":"The people assigned to the HumanTask. Currently only `staff_member` is supported.","items":{"additionalProperties":false,"properties":{"assignee_id":{"description":"The identifier of the assignee. For `staff_member`, use an identifier from `GET /v1/staff_members`.","format":"uuid","type":"string"},"assignee_type":{"description":"The type of assignee. Currently only `staff_member` is supported.","enum":["staff_member"],"type":"string"}},"required":["assignee_id","assignee_type"],"type":"object"},"type":"array"},"completed_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"content":{"description":"The sanitized description of the work to complete.","example":"Review the Patient's completed consent form.","type":"string"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"creation_source":{"const":"api","description":"The channel through which the HumanTask was created."},"due_date":{"description":"The date by which staff should complete the HumanTask.","format":"date","type":"string"},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"is_remindable":{"description":"Whether Carebit can send reminders when the HumanTask becomes due.","type":"boolean"},"is_urgent":{"description":"Whether the HumanTask is marked as urgent.","type":"boolean"},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"patient":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]}},"required":["patient"],"type":"object"},"object":{"const":"human_task","description":"Discriminator value emitted at `object`."},"patient_id":{"description":"The Patient associated with the HumanTask.","format":"uuid","type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","assignees","completed_at","content","created_at","creation_source","due_date","is_remindable","is_urgent","links","patient_id","updated_at"],"type":"object"},"InsuranceCompany":{"additionalProperties":false,"properties":{"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"name":{"description":"The name of the insurance company.","type":"string"},"object":{"const":"insurance_company","description":"Discriminator value emitted at `object`."},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","created_at","name","updated_at"],"type":"object"},"Invoice":{"additionalProperties":false,"properties":{"booking_ids":{"description":"The Bookings associated with the Invoice.","items":{"format":"uuid","type":"string"},"type":"array"},"clinician_id":{"description":"The Clinician associated with the Invoice.","format":"uuid","type":["string","null"]},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"currency":{"description":"The ISO 4217 currency code.","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"invoice_notes":{"description":"The sanitized HTML notes on the Invoice.","example":"<p>Payment is due within 30 days.</p>","type":["string","null"]},"invoice_number":{"description":"The Invoice number, unique within the Organization.","example":"INV-1001","type":["string","null"]},"line_items":{"description":"The charges included on the Invoice.","items":{"$ref":"#/components/schemas/InvoiceLineItem"},"type":"array"},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"patient":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]}},"required":["patient"],"type":"object"},"object":{"const":"invoice","description":"Discriminator value emitted at `object`."},"patient_id":{"description":"The Patient associated with the Invoice.","format":"uuid","type":["string","null"]},"payor_type":{"description":"The type of party responsible for payment.","type":["string","null"]},"status":{"description":"The Invoice's current status.","enum":["awaiting_patient","being_processed","canceled","credited_error","credited_goodwill","credited_other","credited_overbilled","credited_service_not_delivered","draft","error","no_payment_required","overdue","overpaid","paid","partially_credited","partially_paid","partially_refunded","partially_written_off","payment_scheduled","refunded","scheduled_for_sending","sent_to_debt_collectors","sent_to_insurance_company","sent_to_other_recipient","unpaid","validated","written_off_nonpayer","written_off_other",null],"type":["string","null"]},"subtotal":{"description":"The subtotal in minor currency units.","type":["integer","null"]},"supply_date":{"description":"The date on which the invoiced services were supplied.","format":"date","type":["string","null"]},"tax_amount":{"description":"The tax amount in minor currency units.","type":["integer","null"]},"title":{"description":"The Invoice title.","type":["string","null"]},"total":{"description":"The total in minor currency units.","type":"integer"},"total_discount_amount":{"description":"The total discount in minor currency units.","type":["integer","null"]},"total_outstanding":{"description":"The outstanding amount in minor currency units.","type":["integer","null"]},"total_paid":{"description":"The paid amount in minor currency units.","type":["integer","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","booking_ids","clinician_id","created_at","currency","invoice_notes","invoice_number","line_items","links","patient_id","payor_type","status","subtotal","supply_date","tax_amount","title","total","total_discount_amount","total_outstanding","total_paid","updated_at"],"type":"object"},"InvoiceLineItem":{"additionalProperties":false,"properties":{"booking_id":{"description":"The Booking associated with the line item.","format":"uuid","type":["string","null"]},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"currency":{"description":"The ISO 4217 currency code.","type":["string","null"]},"discount_amount":{"description":"The discount in minor currency units.","type":["integer","null"]},"gross_amount":{"description":"The gross amount in minor currency units.","type":["integer","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"net_amount":{"description":"The net amount in minor currency units.","type":["integer","null"]},"object":{"const":"invoice_line_item","description":"Discriminator value emitted at `object`."},"quantity":{"description":"The quantity charged.","type":["number","null"]},"service_variant_id":{"description":"The ServiceVariant associated with the charge.","format":"uuid","type":["string","null"]},"tax_amount":{"description":"The tax amount in minor currency units.","type":["integer","null"]},"title":{"description":"The line item description.","type":["string","null"]},"total":{"description":"The line total in minor currency units.","type":["integer","null"]},"unit_price":{"description":"The unit price in minor currency units.","type":["integer","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","booking_id","created_at","currency","discount_amount","gross_amount","net_amount","quantity","service_variant_id","tax_amount","title","total","unit_price","updated_at"],"type":"object"},"Lead":{"additionalProperties":false,"properties":{"address_line_1":{"description":"The primary address line of the lead.","type":["string","null"]},"address_line_2":{"description":"The secondary address line of the lead.","type":["string","null"]},"attachments":{"description":"The files attached to the lead.","items":{"$ref":"#/components/schemas/AttachmentSummary"},"type":"array"},"city":{"description":"The city in the lead's postal address.","type":["string","null"]},"clinician":{"description":"The clinician the lead is assigned to, when recorded.","oneOf":[{"$ref":"#/components/schemas/Clinician"},{"type":"null"}]},"country_code":{"description":"The ISO 3166-1 alpha-2 country code for the postal address, such as `GB` for the United Kingdom.","pattern":"^[A-Z]{2}$","type":["string","null"]},"county":{"description":"The county or region in the lead's postal address.","type":["string","null"]},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"creation_source":{"description":"How the Lead was created. `api` means the record was created through the Developer Platform. Read-only.","type":["string","null"]},"date_of_birth":{"description":"The date of birth of the lead, in ISO 8601 format (YYYY-MM-DD).","format":"date","type":["string","null"]},"display_name":{"description":"The formatted display name of the lead, including their title when recorded.","type":["string","null"]},"email":{"description":"The contact email address of the lead.","format":"email","type":["string","null"]},"first_name":{"description":"The first name of the lead.","type":"string"},"gdpr_consent_granted_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"gdpr_consent_withdrawn_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"internal_notes":{"description":"Internal notes shown in the Notes box next to presenting problem on the Carebit lead enquiry screen. Distinct from `referral_notes`.","type":["string","null"]},"is_converted_to_patient":{"description":"Whether the lead has been converted to a patient. Read-only.","type":"boolean"},"is_lost":{"description":"Whether the lead has been marked as lost. Read-only.","type":"boolean"},"is_opted_out_of_sms":{"description":"Whether the lead has opted out of SMS communication.","type":"boolean"},"is_signed_up_to_newsletters":{"description":"Whether the lead has signed up to receive newsletters.","type":"boolean"},"last_name":{"description":"The last name of the lead.","type":"string"},"lead_type":{"description":"Whether the record is a patient inquiry or a referral.","enum":["inquiry","referral"],"type":"string"},"links":{"additionalProperties":false,"description":"URLs to related resources. `remote_file_import_batch` is present on create responses when at least one attachment was submitted.","properties":{"clinician":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]},"remote_file_import_batch":{"description":"The full URL of a related resource.","format":"uri","type":"string"},"self":{"description":"The full URL of a related resource.","format":"uri","type":"string"},"service":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]}},"required":["clinician","self","service"],"type":"object"},"mobile":{"description":"The mobile phone number of the lead, without the country dial code.","type":["string","null"]},"mobile_country_dial_code":{"description":"The ISO 3166-1 alpha-2 country code that selects the international dial code for `mobile`, for example `GB` selects `+44`.","pattern":"^[A-Z]{2}$","type":["string","null"]},"object":{"const":"lead","description":"Discriminator value emitted at `object`."},"organization_privacy_policy_consent_granted_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"patient_id":{"description":"The identifier of the Patient this Lead was converted to. Null until conversion. Read-only.","format":"uuid","type":["string","null"]},"phone":{"description":"The landline phone number of the lead, without the country dial code.","type":["string","null"]},"phone_country_dial_code":{"description":"The ISO 3166-1 alpha-2 country code that selects the international dial code for `phone`, for example `GB` selects `+44`.","pattern":"^[A-Z]{2}$","type":["string","null"]},"postcode":{"description":"The postal code in the lead's postal address.","type":["string","null"]},"presenting_problem":{"description":"The presenting problem the lead described. Shown next to Notes on the Carebit lead enquiry screen.","type":["string","null"]},"referral_notes":{"description":"The referral notes shown on the Carebit lead enquiry screen.","type":["string","null"]},"referral_source":{"description":"The referral source shown on the Carebit lead enquiry screen.","enum":["consultant","embassy","family_or_friend","gp_practice","hospital","insurance_company","physiotherapist","presentation_talk","previous_patient","private_practice","search_engine","self_referral","social_media","website","other",null],"type":["string","null"]},"remote_file_import_batch_id":{"description":"The identifier of the remote file import batch created for the submitted attachments. Present on create responses when at least one attachment was submitted.","format":"uuid","type":"string"},"service":{"description":"The Service the Lead is inquiring about, when recorded.","oneOf":[{"$ref":"#/components/schemas/Service"},{"type":"null"}]},"sex":{"description":"The sex of the Lead as supplied on the inquiry.","type":["string","null"]},"stage":{"description":"The current pipeline stage of the lead. Read-only; use `stage_id` when updating the lead.","oneOf":[{"$ref":"#/components/schemas/LeadStage"},{"type":"null"}]},"title":{"description":"The personal title of the lead, when recorded.","type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","address_line_1","address_line_2","attachments","city","clinician","country_code","county","created_at","creation_source","date_of_birth","display_name","email","first_name","gdpr_consent_granted_at","gdpr_consent_withdrawn_at","internal_notes","is_converted_to_patient","is_lost","is_opted_out_of_sms","is_signed_up_to_newsletters","last_name","lead_type","links","mobile","mobile_country_dial_code","organization_privacy_policy_consent_granted_at","patient_id","phone","phone_country_dial_code","postcode","presenting_problem","referral_notes","referral_source","service","sex","stage","title","updated_at"],"type":"object"},"LeadPipeline":{"additionalProperties":false,"properties":{"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"lead_type":{"description":"Whether this pipeline manages patient inquiries or referrals.","enum":["inquiry","referral"],"type":"string"},"name":{"description":"The display name of the pipeline.","type":"string"},"object":{"const":"lead_pipeline","description":"Discriminator value emitted at `object`."},"stages":{"description":"The ordered stages available in the pipeline.","items":{"$ref":"#/components/schemas/LeadStage"},"type":"array"},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","created_at","lead_type","name","stages","updated_at"],"type":"object"},"LeadStage":{"additionalProperties":false,"properties":{"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"is_conversion_stage":{"description":"Whether moving a Lead into this stage can start the Organization's Lead conversion workflow.","type":"boolean"},"is_lost_stage":{"description":"Whether moving a lead into this stage marks it as lost or rejected.","type":"boolean"},"name":{"description":"The display name of the stage.","type":"string"},"object":{"const":"lead_stage","description":"Discriminator value emitted at `object`."},"position":{"description":"The stage's display order within its pipeline.","type":["integer","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","created_at","is_conversion_stage","is_lost_stage","name","position","updated_at"],"type":"object"},"LeadStageTransition":{"additionalProperties":false,"properties":{"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"current_stage":{"$ref":"#/components/schemas/LeadStage","description":"The stage the lead moved into."},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"lead":{"$ref":"#/components/schemas/Lead","description":"The lead after the stage transition."},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"lead":{"description":"The full URL of a related resource.","format":"uri","type":"string"}},"required":["lead"],"type":"object"},"object":{"const":"lead_stage_transition","description":"Discriminator value emitted at `object`."},"previous_stage":{"description":"The stage the lead moved from.","oneOf":[{"$ref":"#/components/schemas/LeadStage"},{"type":"null"}]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","created_at","current_stage","lead","links","previous_stage","updated_at"],"type":"object"},"Letter":{"additionalProperties":false,"properties":{"automatically_create_resource_permission_for_patient":{"description":"Whether Carebit automatically shares the letter with the patient after processing.","type":"boolean"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"download_url":{"description":"The short-lived signed download URL for the Letter. Null until the uploaded file passes malware scanning.","format":"uri","type":["string","null"]},"filename":{"description":"The original filename of the letter document.","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"booking":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]},"clinician":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]},"patient":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]},"remote_file_import_batch":{"description":"The full URL of a related resource.","format":"uri","type":"string"}},"required":["booking","clinician","patient"],"type":"object"},"notify_patient_of_resource_permission":{"description":"Whether Carebit notifies the patient when the letter is shared with them.","type":["boolean","null"]},"object":{"const":"letter","description":"Discriminator value emitted at `object`."},"remote_file_import_batch_id":{"description":"The identifier of the remote file import batch created for the uploaded file. Set on the create response. Poll `/v1/remote_file_import_batches/:id` for processing status.","format":"uuid","type":"string"},"sent_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"status":{"description":"The Letter's workflow status. Null while the Letter is being created.","enum":["awaiting_proofreading","awaiting_receipt","awaiting_review","awaiting_sending","awaiting_typing","complete","draft","reviewed",null],"type":["string","null"]},"title":{"description":"The display title of the letter.","type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","automatically_create_resource_permission_for_patient","created_at","download_url","filename","links","notify_patient_of_resource_permission","sent_at","status","title","updated_at"],"type":"object"},"LetterWrite":{"additionalProperties":false,"oneOf":[{"not":{"required":["file_base64"]},"required":["file_url"]},{"not":{"required":["file_url"]},"required":["file_base64","filename"]}],"properties":{"automatically_create_resource_permission_for_patient":{"description":"Whether Carebit should automatically share the letter with the patient after processing.","type":"boolean"},"booking_id":{"description":"The identifier of the booking associated with the letter, or null when it is not linked to a booking.","format":"uuid","type":["string","null"]},"clinician_id":{"description":"The identifier of the clinician associated with the letter, or null when none is assigned.","format":"uuid","type":["string","null"]},"description":{"description":"A description of the Letter.","type":["string","null"]},"file_base64":{"description":"The letter bytes encoded as Base64. Provide this with `filename` instead of `file_url`. The decoded file can be at most 7 MB.","format":"byte","maxLength":9786712,"type":"string","writeOnly":true},"file_url":{"description":"The public HTTPS URL that Carebit can fetch.","format":"uri","type":"string"},"filename":{"description":"The filename to use for the letter. Required with `file_base64`; defaults to the remote file's filename for URL sources.","type":["string","null"]},"notify_patient_of_resource_permission":{"description":"Whether Carebit should notify the patient when the letter is shared with them.","type":"boolean"},"patient_id":{"description":"The identifier of the patient that the letter belongs to.","format":"uuid","type":"string"},"status":{"description":"The workflow status to assign to the letter.","enum":["awaiting_receipt","awaiting_review","awaiting_sending","complete","draft","reviewed"],"type":"string"},"title":{"description":"The display title of the letter.","type":"string"}},"type":"object"},"List":{"additionalProperties":false,"properties":{"clinician_id":{"description":"The Clinician associated with this List, when one is set.","format":"uuid","type":["string","null"]},"color_hex":{"description":"The display color of the List as a hex string, for example `#28a745`.","example":"#28a745","pattern":"^#[0-9A-Fa-f]{6}$","type":["string","null"]},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"clinician":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]},"members":{"description":"The full URL of a related resource.","format":"uri","type":"string"},"self":{"description":"The full URL of a related resource.","format":"uri","type":"string"}},"required":["clinician","members","self"],"type":"object"},"name":{"description":"The display name of the List.","maxLength":255,"type":"string"},"notes":{"description":"Internal notes about the List.","maxLength":10000,"type":["string","null"]},"object":{"const":"list","description":"Discriminator value emitted at `object`."},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","clinician_id","color_hex","created_at","links","name","notes","updated_at"],"type":"object"},"ListEnvelope":{"properties":{"data":{"description":"The resource objects for the current page.","items":{"type":"object"},"type":"array"},"has_more":{"description":"Whether another page is available after `next_cursor`.","type":"boolean"},"next_cursor":{"description":"The value to pass as `cursor` for the next page. Null on the last page.","type":["string","null"]},"object":{"const":"list","description":"Always `list`."},"url":{"description":"The API path that returned this list.","type":"string"}},"required":["object","url","data","has_more","next_cursor"],"type":"object"},"ListMember":{"additionalProperties":false,"properties":{"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"list":{"description":"The full URL of a related resource.","format":"uri","type":"string"},"patient":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]},"self":{"description":"The full URL of a related resource.","format":"uri","type":"string"}},"required":["list","patient","self"],"type":"object"},"list":{"description":"The list that contains this member.","oneOf":[{"$ref":"#/components/schemas/List"},{"type":"null"}]},"member":{"description":"The ListMember and its resource. Null when the resource has been removed.","properties":{"patient":{"$ref":"#/components/schemas/Patient","description":"The patient represented by this list member."},"type":{"description":"The kind of member. Additional values may be added later.","enum":["patient"],"type":"string"}},"required":["type","patient"],"type":["object","null"]},"object":{"const":"list_member","description":"Discriminator value emitted at `object`."},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","created_at","links","list","member","updated_at"],"type":"object"},"Location":{"additionalProperties":false,"properties":{"address_line_1":{"description":"The primary address line of the location.","type":["string","null"]},"address_line_2":{"description":"The secondary address line of the location.","type":["string","null"]},"city":{"description":"The city in the location's postal address.","type":["string","null"]},"country_code":{"description":"The ISO 3166-1 alpha-2 country code for the postal address, such as `GB` for the United Kingdom.","pattern":"^[A-Z]{2}$","type":["string","null"]},"county":{"description":"The county or region in the location's postal address.","type":["string","null"]},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"formatted_address":{"description":"The single-line address of the location, formatted for display.","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"name":{"description":"The display name of the location.","type":["string","null"]},"object":{"const":"location","description":"Discriminator value emitted at `object`."},"postcode":{"description":"The postal code of the location.","type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","address_line_1","address_line_2","city","country_code","county","created_at","formatted_address","name","postcode","updated_at"],"type":"object"},"Note":{"additionalProperties":false,"properties":{"attachments":{"description":"The files attached to the note.","items":{"$ref":"#/components/schemas/AttachmentSummary"},"type":"array"},"author":{"description":"The staff member or Developer Platform project that created the note.","oneOf":[{"$ref":"#/components/schemas/StaffMember"},{"type":"null"}]},"content":{"description":"The sanitized HTML body of the note.","type":["string","null"]},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"is_pinned":{"description":"Whether the note is pinned for prominent display.","type":"boolean"},"links":{"additionalProperties":false,"description":"URLs to related resources. Only the subject's link (`booking` or `patient`) is present on show/index/webhook responses. `remote_file_import_batch` is present on create/update responses when at least one attachment was submitted.","properties":{"booking":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]},"patient":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]},"remote_file_import_batch":{"description":"The full URL of a related resource.","format":"uri","type":"string"}},"type":"object"},"object":{"const":"note","description":"Discriminator value emitted at `object`."},"remote_file_import_batch_id":{"description":"The identifier of the remote file import batch created for uploaded attachments. Set on create and update responses when at least one attachment was submitted.","format":"uuid","type":"string"},"subject_id":{"description":"The identifier of the patient or booking that the note concerns.","format":"uuid","type":["string","null"]},"subject_type":{"description":"The type of resource that the note concerns.","enum":[null,"patient","booking"],"type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","attachments","author","content","created_at","is_pinned","links","subject_id","subject_type","updated_at"],"type":"object"},"OAuthRevokeResponse":{"additionalProperties":false,"description":"An empty object returned whether or not the token was valid. This prevents token enumeration.","properties":{},"type":"object"},"OAuthTokenResponse":{"properties":{"access_token":{"description":"The issued Bearer access token.","type":"string"},"created_at":{"description":"The Unix timestamp at which the token was issued.","type":"integer"},"expires_in":{"description":"The lifetime of the access token, in seconds.","type":"integer"},"refresh_token":{"description":"The refresh token. A new one is issued with each access token.","type":"string"},"scope":{"description":"The space-separated list of granted scopes.","type":"string"},"token_type":{"const":"Bearer","description":"The authentication scheme to use in the `Authorization` header.","type":"string"}},"required":["access_token","token_type","expires_in","created_at"],"type":"object"},"Organization":{"additionalProperties":false,"properties":{"address_line_1":{"description":"The primary address line of the organization.","type":["string","null"]},"address_line_2":{"description":"The secondary address line of the organization.","type":["string","null"]},"city":{"description":"The city in the organization's postal address.","type":["string","null"]},"country_code":{"description":"The ISO 3166-1 alpha-2 country code for the postal address, such as `GB` for the United Kingdom.","pattern":"^[A-Z]{2}$","type":["string","null"]},"county":{"description":"The county or region in the organization's postal address.","type":["string","null"]},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"currency":{"description":"The ISO 4217 currency code used by the organization. Must be one of `chf`, `eur`, `gbp`, or `usd`. Null when this Organization is returned from `GET /v1/organizations` or nested on a PatientConnection.","type":["string","null"]},"email":{"description":"The contact email address of the organization. Null when this Organization is returned from `GET /v1/organizations` or nested on a PatientConnection.","format":"email","type":["string","null"]},"formatted_address":{"description":"The single-line address of the organization, formatted for display.","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"name":{"description":"The display name of the organization, for example `Acme Healthcare`.","type":"string"},"object":{"const":"organization","description":"Discriminator value emitted at `object`."},"organization_type":{"description":"The kind of organization. Use `gp_practice` when attaching a GP.","enum":["consultant","gp_practice","hospital","laboratory","legal","other","pharmacy","private_practice",null],"type":["string","null"]},"phone":{"description":"The formatted contact phone number of the organization. Null when this Organization is returned from `GET /v1/organizations` or nested on a PatientConnection.","type":["string","null"]},"postcode":{"description":"The postal code in the organization's postal address.","type":["string","null"]},"subdomain":{"description":"The URL-safe subdomain that identifies the organization. Null when this Organization is returned from `GET /v1/organizations` or nested on a PatientConnection.","type":["string","null"]},"time_zone":{"description":"The IANA time zone used to interpret scheduling dates and display appointment times. Always `Europe/London` when present. Null when this Organization is returned from `GET /v1/organizations` or nested on a PatientConnection.","type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","address_line_1","address_line_2","city","country_code","county","created_at","currency","email","formatted_address","name","organization_type","phone","postcode","subdomain","time_zone","updated_at"],"type":"object"},"Patient":{"additionalProperties":false,"properties":{"address_line_1":{"description":"The primary address line of the Patient.","type":["string","null"]},"address_line_2":{"description":"The secondary address line of the Patient.","type":["string","null"]},"city":{"description":"The city in the Patient's postal address.","type":["string","null"]},"country_code":{"description":"The ISO 3166-1 alpha-2 country code for the postal address, such as `GB` for the United Kingdom.","pattern":"^[A-Z]{2}$","type":["string","null"]},"county":{"description":"The county or region in the Patient's postal address.","type":["string","null"]},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"creation_source":{"description":"How the Patient was created. `api` means the record was created through the Developer Platform. Read-only.","type":["string","null"]},"date_of_birth":{"description":"The date of birth of the patient, in ISO 8601 format (YYYY-MM-DD).","format":"date","type":["string","null"]},"display_name":{"description":"The formatted display name of the patient, including their title when recorded.","type":["string","null"]},"email":{"description":"The email address of the patient, when recorded.","format":"email","type":["string","null"]},"first_name":{"description":"The first name of the patient.","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"is_opted_out_of_sms":{"description":"Whether the Patient has opted out of SMS messages.","type":"boolean"},"last_name":{"description":"The last name of the patient.","type":["string","null"]},"mobile":{"description":"The national mobile number without its country calling code.","type":["string","null"]},"mobile_country_dial_code":{"description":"The ISO 3166-1 alpha-2 country code used to derive the mobile calling code.","pattern":"^[A-Z]{2}$","type":["string","null"]},"nhs_number":{"description":"The 10-digit NHS number of the patient, without formatting.","type":["string","null"]},"object":{"const":"patient","description":"Discriminator value emitted at `object`."},"phone":{"description":"The national phone number without its country calling code.","type":["string","null"]},"phone_country_dial_code":{"description":"The ISO 3166-1 alpha-2 country code used to derive the phone calling code.","pattern":"^[A-Z]{2}$","type":["string","null"]},"phone_number":{"description":"The Patient's preferred contact number, formatted for display and compatible with E.164.","type":["string","null"]},"postcode":{"description":"The postal code of the Patient.","type":["string","null"]},"sex":{"description":"The Patient's recorded sex.","enum":["female","male","other",null],"type":["string","null"]},"title":{"description":"The personal title of the patient, when recorded.","type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","address_line_1","address_line_2","city","country_code","county","created_at","creation_source","date_of_birth","display_name","email","first_name","is_opted_out_of_sms","last_name","mobile","mobile_country_dial_code","nhs_number","phone","phone_country_dial_code","phone_number","postcode","sex","title","updated_at"],"type":"object"},"PatientConnection":{"additionalProperties":false,"properties":{"clinician_id":{"description":"The Clinician associated with this registration, when one is assigned.","format":"uuid","type":["string","null"]},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"gp_status":{"description":"Whether this Organization has recorded a GP for the Patient. `has_gp` means a GP PatientConnection is expected. `no_gp_required` means the Patient does not need a GP. `none_or_omitted` means no GP has been recorded.","enum":["none_or_omitted","has_gp","no_gp_required",null],"type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"is_active":{"description":"Whether the Patient registration is active.","type":"boolean"},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"patient":{"description":"The full URL of a related resource.","format":"uri","type":"string"},"payor":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]}},"required":["patient","payor"],"type":"object"},"object":{"const":"patient_connection","description":"Discriminator value emitted at `object`."},"organization":{"$ref":"#/components/schemas/Organization","description":"The Organization this PatientConnection registers the Patient with. Email, subdomain, phone, currency, and time_zone are null."},"organization_id":{"description":"The Organization with which the Patient was registered.","format":"uuid","type":"string"},"patient":{"$ref":"#/components/schemas/Patient","description":"The Patient registered with the Organization."},"payor_id":{"description":"The Payor this Organization uses as the default billing party for the Patient.","format":"uuid","type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","clinician_id","created_at","gp_status","is_active","links","organization","organization_id","patient","payor_id","updated_at"],"type":"object"},"Payment":{"additionalProperties":false,"properties":{"amount":{"description":"The Payment amount in minor currency units.","type":"integer"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"currency":{"description":"The ISO 4217 currency code.","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"internal_notes":{"description":"Internal notes recorded with the Payment.","type":["string","null"]},"invoice_id":{"description":"The Invoice this Payment is allocated to, when one is assigned.","format":"uuid","type":["string","null"]},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"patient":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]}},"required":["patient"],"type":"object"},"object":{"const":"payment","description":"Discriminator value emitted at `object`."},"paid_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"patient_id":{"description":"The Patient associated with the Payment.","format":"uuid","type":["string","null"]},"payment_method_type":{"description":"How the Payment was collected.","enum":["bacs_debit","bank_transfer","card","card_external","cash","cheque","klarna","other","standing_order",null],"type":["string","null"]},"payor_type":{"description":"The type of party who made the Payment.","enum":["alternative_payor","insurance_company","location","patient",null],"type":["string","null"]},"refunds":{"description":"Refunds issued against this Payment, if any. Ordered by `created_at`.","items":{"$ref":"#/components/schemas/Refund"},"type":"array"},"status":{"description":"The Payment's current status.","enum":["awaiting_authentication","being_processed","canceled","failed","paid","partially_refunded","refunded","scheduled","unpaid",null],"type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","amount","created_at","currency","internal_notes","invoice_id","links","paid_at","patient_id","payment_method_type","payor_type","refunds","status","updated_at"],"type":"object"},"Payor":{"additionalProperties":false,"properties":{"address_line_1":{"description":"The primary address line of the payor.","type":["string","null"]},"address_line_2":{"description":"The secondary address line of the payor.","type":["string","null"]},"alternative_payor_id":{"description":"The identifier of the alternative payor responsible for payment, when `payor_type` is `alternative_payor`.","format":"uuid","type":["string","null"]},"city":{"description":"The city in the payor's postal address.","type":["string","null"]},"country_code":{"description":"The ISO 3166-1 alpha-2 country code for the postal address, such as `GB` for the United Kingdom.","pattern":"^[A-Z]{2}$","type":["string","null"]},"county":{"description":"The county or region in the payor's postal address.","type":["string","null"]},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"first_name":{"description":"The first name of the person responsible for payment, when applicable.","type":["string","null"]},"formatted_name":{"description":"The formatted name of the person responsible for payment.","type":["string","null"]},"formatted_payor_name":{"description":"The display name of the patient, insurer, or alternative payor responsible for payment.","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"insurance_authorization_code":{"description":"The insurer's authorization code.","type":["string","null"]},"insurance_company_id":{"description":"The identifier of the insurance company responsible for payment, when `payor_type` is `insurance_company`.","format":"uuid","type":["string","null"]},"insurance_policy_end_date":{"description":"The end date of the insurance policy, when recorded.","format":"date","type":["string","null"]},"insurance_policy_number":{"description":"The policy or membership number supplied by the insurer.","type":["string","null"]},"insurance_policy_start_date":{"description":"The start date of the insurance policy, when recorded.","format":"date","type":["string","null"]},"last_name":{"description":"The last name of the person responsible for payment, when applicable.","type":["string","null"]},"notes":{"description":"The additional payment or insurance information recorded for this payor.","type":["string","null"]},"object":{"const":"payor","description":"Discriminator value emitted at `object`."},"payor_type":{"description":"The type of party responsible for payment.","enum":["patient","insurance_company","alternative_payor"],"type":"string"},"postcode":{"description":"The postal code of the payor.","type":["string","null"]},"title":{"description":"The personal title of the person responsible for payment, when applicable.","type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","address_line_1","address_line_2","alternative_payor_id","city","country_code","county","created_at","first_name","formatted_name","formatted_payor_name","insurance_authorization_code","insurance_company_id","insurance_policy_end_date","insurance_policy_number","insurance_policy_start_date","last_name","notes","payor_type","postcode","title","updated_at"],"type":"object"},"Refund":{"additionalProperties":false,"properties":{"amount":{"description":"The refunded amount in minor currency units.","type":"integer"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"currency":{"description":"The ISO 4217 currency code.","type":["string","null"]},"error":{"description":"The failure message when the Refund did not complete.","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"invoice_id":{"description":"The Invoice associated with the refunded Payment, when one is assigned.","format":"uuid","type":["string","null"]},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"patient":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]}},"required":["patient"],"type":"object"},"notes":{"description":"Internal notes recorded with the Refund.","type":["string","null"]},"object":{"const":"refund","description":"Discriminator value emitted at `object`."},"patient_id":{"description":"The Patient associated with the Refund.","format":"uuid","type":["string","null"]},"payment_id":{"description":"The Payment this Refund was issued against.","format":"uuid","type":["string","null"]},"reason":{"description":"The reason the Refund was issued.","enum":["other","other_party_will_pay","overcharged","overpaid","service_not_delivered",null],"type":["string","null"]},"refund_source":{"description":"How the Refund is paid.","enum":["bank_account","deduction_from_balance","payment_account",null],"type":["string","null"]},"status":{"description":"The Refund's current status.","enum":["canceled","failed","processing","requires_action","succeeded",null],"type":["string","null"]},"succeeded_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","amount","created_at","currency","error","invoice_id","links","notes","patient_id","payment_id","reason","refund_source","status","succeeded_at","updated_at"],"type":"object"},"RemoteFileImportBatch":{"additionalProperties":false,"properties":{"completed_count":{"description":"The number of items that finished processing successfully.","minimum":0,"type":"integer"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"failed_count":{"description":"The number of items that finished processing with an error.","minimum":0,"type":"integer"},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"items":{"description":"The import items in their original request order.","items":{"$ref":"#/components/schemas/RemoteFileImportBatchItem"},"type":"array"},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"self":{"description":"The full URL of a related resource.","format":"uri","type":"string"}},"required":["self"],"type":"object"},"object":{"const":"remote_file_import_batch","description":"Discriminator value emitted at `object`."},"resource_type":{"description":"The type of resource created by every item in the batch.","enum":["letter","note","test_result"],"type":"string"},"status":{"description":"The current download, validation, and malware-scanning status of the batch.","enum":["completed","pending","processing"],"type":"string"},"total_count":{"description":"The total number of items submitted in the batch.","minimum":1,"type":"integer"},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","completed_count","created_at","failed_count","items","links","resource_type","status","total_count","updated_at"],"type":"object"},"RemoteFileImportBatchItem":{"additionalProperties":false,"properties":{"created_resource":{"description":"The URL of the resource created for a succeeded item. Null unless `status` is `succeeded`.","format":"uri","type":["string","null"]},"created_resource_id":{"description":"The identifier of the resource created for a succeeded item. Null unless `status` is `succeeded`.","format":"uuid","type":["string","null"]},"created_resource_type":{"description":"The type of resource created for a succeeded item. Null unless `status` is `succeeded`.","enum":[null,"Attachment","Letter","Note","TestResult"],"type":["string","null"]},"error":{"description":"The failure details for this item. Null unless the item has failed.","oneOf":[{"type":"null"},{"properties":{"code":{"description":"The machine-readable error code.","type":["string","null"]},"message":{"description":"A message that explains how the item failed.","type":["string","null"]}},"required":["code","message"],"type":"object"}]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"object":{"const":"remote_file_import_batch_item","description":"Always `remote_file_import_batch_item`."},"position":{"description":"The zero-based position of the item in the submitted batch.","minimum":0,"type":"integer"},"status":{"description":"The current download, validation, and malware-scanning status of the item.","enum":["failed","pending","processing","succeeded"],"type":"string"}},"required":["id","object","created_resource","created_resource_id","created_resource_type","error","position","status"],"type":"object"},"Service":{"additionalProperties":false,"properties":{"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"description":{"description":"The description of the service shown to staff members and patients.","type":["string","null"]},"duration_minutes":{"description":"The scheduled duration of the service, in minutes.","type":["integer","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"is_bookable_online":{"description":"Whether patients can book this service online in the Patient Portal.","type":"boolean"},"name":{"description":"The display name of the service.","type":"string"},"object":{"const":"service","description":"Discriminator value emitted at `object`."},"service_variants":{"description":"The bookable variants of this service.","items":{"$ref":"#/components/schemas/ServiceVariant"},"type":"array"},"tax_rate":{"description":"The tax rate applied to this service. Null when no tax rate is set.","oneOf":[{"$ref":"#/components/schemas/TaxRate"},{"type":"null"}]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","created_at","description","duration_minutes","is_bookable_online","name","service_variants","tax_rate","updated_at"],"type":"object"},"ServiceVariant":{"additionalProperties":false,"properties":{"clinician_id":{"description":"The identifier of the clinician assigned to this service variant, when the variant is clinician-specific.","format":"uuid","type":["string","null"]},"currency":{"description":"The ISO 4217 currency code used for this service variant. Must be one of `chf`, `eur`, `gbp`, or `usd`.","type":["string","null"]},"description":{"description":"The description of this service variant.","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"clinician":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]},"location":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]}},"required":["clinician","location"],"type":"object"},"location_id":{"description":"The identifier of the location assigned to this service variant, when the variant is location-specific.","format":"uuid","type":["string","null"]},"net_price":{"description":"The net price of this service variant, before tax, in the currency's minor units.","type":["integer","null"]},"permits_remote_bookings":{"description":"Whether this service variant can be used for remote bookings.","type":"boolean"}},"required":["id","clinician_id","currency","description","location_id","links","net_price","permits_remote_bookings"],"type":"object"},"StaffMember":{"additionalProperties":false,"properties":{"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"email":{"description":"The sign-in email address of the staff member.","format":"email","type":"string"},"first_name":{"description":"The first name of the staff member.","type":"string"},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"last_name":{"description":"The last name of the staff member.","type":"string"},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"self":{"description":"URL to retrieve this StaffMember.","format":"uri","type":"string"}},"required":["self"],"type":"object"},"name":{"description":"The display name of the staff member, including title.","type":"string"},"object":{"const":"staff_member","description":"Discriminator value emitted at `object`."},"title":{"description":"The professional or personal title of the staff member, such as `Dr`.","type":"string"},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","created_at","email","first_name","last_name","links","name","title","updated_at"],"type":"object"},"TaxRate":{"additionalProperties":false,"description":"Tax rate embedded in a Service. Emitted only when the Service has a tax rate.","properties":{"description":{"description":"The description of when the tax rate applies.","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"percentage":{"description":"The tax rate as a percentage from 0 to 100.","type":"number"},"title":{"description":"The display name of the tax rate, for example `20% VAT`.","type":"string"}},"required":["id","title","description","percentage"],"type":"object"},"TestResult":{"additionalProperties":false,"properties":{"automatically_create_resource_permission_for_patient":{"description":"Whether Carebit automatically shares the test result with the patient after processing.","type":"boolean"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"download_url":{"description":"The short-lived signed download URL for the TestResult. Null until the uploaded file passes malware scanning.","format":"uri","type":["string","null"]},"filename":{"description":"The original filename of the test result document, when one was supplied.","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"booking":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]},"clinician":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]},"patient":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]},"remote_file_import_batch":{"description":"The full URL of a related resource.","format":"uri","type":"string"}},"required":["booking","clinician","patient"],"type":"object"},"notify_patient_of_resource_permission":{"description":"Whether Carebit notifies the patient when the test result is shared with them.","type":["boolean","null"]},"object":{"const":"test_result","description":"Discriminator value emitted at `object`."},"remote_file_import_batch_id":{"description":"The identifier of the remote file import batch created for the uploaded file. Set on the create response when `file_url` or `file_base64` was submitted.","format":"uuid","type":"string"},"status":{"description":"The workflow status of the test result.","enum":["awaiting_proofreading","awaiting_receipt","awaiting_review","awaiting_sending","awaiting_typing","complete","draft","reviewed",null],"type":["string","null"]},"test_result_items":{"description":"The structured clinical observations included in the test result.","items":{"$ref":"#/components/schemas/TestResultItem"},"type":"array"},"title":{"description":"The display title of the test result.","type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","automatically_create_resource_permission_for_patient","created_at","download_url","filename","links","notify_patient_of_resource_permission","status","test_result_items","title","updated_at"],"type":"object"},"TestResultBatchItem":{"additionalProperties":false,"description":"The result of one item in a Test Result batch. `test_result` contains the created TestResult when processing finishes immediately. For an imported file, it is null and `remote_file_import_batch_item_id` identifies the item being processed.","properties":{"object":{"const":"test_result_batch_item","description":"Always `test_result_batch_item`."},"position":{"description":"The zero-based position of the item in the request `items` array.","minimum":0,"type":"integer"},"remote_file_import_batch_item_id":{"description":"The import item identifier for a file that is still being processed. Null when the TestResult was created immediately. Poll the parent `remote_file_import_batch` for status.","format":"uuid","type":["string","null"]},"status":{"description":"The item's processing status. `succeeded` when the TestResult was created immediately; otherwise the current file import status.","enum":["failed","pending","processing","succeeded"],"type":"string"},"test_result":{"description":"The created TestResult, or null while an imported file is being processed.","oneOf":[{"$ref":"#/components/schemas/TestResult"},{"type":"null"}]}},"required":["object","position","remote_file_import_batch_item_id","status","test_result"],"type":"object"},"TestResultBatchResponse":{"additionalProperties":false,"description":"The response from `POST /v1/test_result_batches`. `remote_file_import_batch` is null when every TestResult was created immediately (`201`). It contains the import batch when at least one item includes `file_url` or `file_base64` (`202`).","properties":{"items":{"description":"The per-item outcomes in their original request order.","items":{"$ref":"#/components/schemas/TestResultBatchItem"},"type":"array"},"object":{"const":"test_result_batch","description":"Always `test_result_batch`."},"remote_file_import_batch":{"description":"The file import batch to poll, or null when every TestResult was created immediately.","oneOf":[{"$ref":"#/components/schemas/RemoteFileImportBatch"},{"type":"null"}]}},"required":["object","items","remote_file_import_batch"],"type":"object"},"TestResultItem":{"additionalProperties":false,"properties":{"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"is_abnormal":{"description":"Whether the observation falls outside its reference range, when known.","type":["boolean","null"]},"notes":{"description":"Additional clinical notes about the observation.","type":["string","null"]},"object":{"const":"test_result_item","description":"Discriminator value emitted at `object`."},"observation_code":{"description":"The laboratory or clinical code that identifies the observation.","type":["string","null"]},"observation_name":{"description":"The observation's display name.","type":["string","null"]},"observation_text":{"description":"The textual observation value, when the result is not represented numerically.","type":["string","null"]},"observation_value":{"description":"The numeric value of the observation, when applicable.","type":["number","null"]},"observation_value_precision":{"description":"The precision qualifier for `observation_value`. `<` and `>` denote a bound, and `=` denotes an exact value.","enum":["<","=",">",null],"type":["string","null"]},"observation_value_units":{"description":"The unit used for `observation_value`.","type":["string","null"]},"observed_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"reference_range_lower_bound":{"description":"The lower bound of the expected reference range, when supplied.","type":["number","null"]},"reference_range_upper_bound":{"description":"The upper bound of the expected reference range, when supplied.","type":["number","null"]},"status":{"description":"The clinical workflow status of the observation.","enum":["corrected","final","pending",null],"type":["string","null"]},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","created_at","is_abnormal","notes","observation_code","observation_name","observation_text","observation_value","observation_value_precision","observation_value_units","observed_at","reference_range_lower_bound","reference_range_upper_bound","status","updated_at"],"type":"object"},"TestResultItemWrite":{"additionalProperties":false,"properties":{"is_abnormal":{"description":"Whether the observation falls outside its reference range, when known.","type":["boolean","null"]},"notes":{"description":"Additional clinical notes about the observation.","type":["string","null"]},"observation_code":{"description":"The laboratory or clinical code that identifies the observation.","type":["string","null"]},"observation_name":{"description":"The observation's display name.","type":["string","null"]},"observation_text":{"description":"The textual observation value, when the result is not represented numerically.","type":["string","null"]},"observation_value":{"description":"The numeric value of the observation, when applicable.","type":["number","null"]},"observation_value_precision":{"description":"The qualifier that indicates whether `observation_value` is exact or a boundary.","enum":["<","=",">",null],"type":["string","null"]},"observation_value_units":{"description":"The unit used for `observation_value`.","type":["string","null"]},"observed_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"reference_range_lower_bound":{"description":"The lower bound of the expected reference range, when supplied.","type":["number","null"]},"reference_range_upper_bound":{"description":"The upper bound of the expected reference range, when supplied.","type":["number","null"]},"status":{"description":"The clinical workflow status to assign to the observation.","enum":["corrected","final","pending",null],"type":["string","null"]}},"type":"object"},"TestResultWrite":{"additionalProperties":false,"not":{"required":["file_url","file_base64"]},"properties":{"automatically_create_resource_permission_for_patient":{"description":"Whether Carebit should automatically share the test result with the patient after processing.","type":"boolean"},"booking_id":{"description":"The identifier of the booking associated with the test result, or null when it is not linked to a booking.","format":"uuid","type":["string","null"]},"clinician_id":{"description":"The identifier of the clinician associated with the test result, or null when none is assigned.","format":"uuid","type":["string","null"]},"description":{"description":"A description of the TestResult.","type":["string","null"]},"file_base64":{"description":"The test result bytes encoded as Base64. Provide this with `filename` instead of `file_url`. The decoded file can be at most 7 MB.","format":"byte","maxLength":9786712,"type":["string","null"],"writeOnly":true},"file_url":{"description":"The public HTTPS URL of a test result document that Carebit should download.","format":"uri","type":["string","null"]},"filename":{"description":"The filename to use for the test result. Required with `file_base64`; defaults to the remote file's filename for URL sources.","type":["string","null"]},"notify_patient_of_resource_permission":{"description":"Whether Carebit should notify the patient when the test result is shared with them.","type":"boolean"},"patient_id":{"description":"The identifier of the patient that the test result belongs to.","format":"uuid","type":"string"},"status":{"description":"The workflow status to assign to the test result.","enum":["awaiting_review","complete","draft","reviewed"],"type":"string"},"test_result_items":{"description":"The structured clinical observations to include in the test result.","items":{"$ref":"#/components/schemas/TestResultItemWrite"},"maxItems":100,"type":"array"},"title":{"description":"The display title of the test result.","type":"string"}},"type":"object"},"Token":{"additionalProperties":false,"properties":{"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"expires_at":{"description":"The time after which this access token is no longer valid, as an ISO 8601 timestamp in UTC.","format":"date-time","type":"string"},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"organization":{"description":"The Organization this access token belongs to. Reading that resource requires `organization.read`.","format":"uri","type":"string"},"self":{"description":"This access token.","format":"uri","type":"string"}},"required":["organization","self"],"type":"object"},"livemode":{"description":"`true` when the token was issued in the live Carebit environment. `false` for test tokens.","type":"boolean"},"object":{"const":"token","description":"Discriminator value emitted at `object`."},"organization":{"additionalProperties":false,"description":"A summary of the Organization this access token belongs to. Address, email, and phone are omitted so a token without `organization.read` cannot read those fields.","properties":{"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"name":{"description":"The display name of the Organization.","type":"string"},"object":{"const":"organization","description":"Discriminator value emitted at `object`."}},"required":["id","object","name"],"type":"object"},"project":{"additionalProperties":false,"description":"A summary of the developer project that issued this access token.","properties":{"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"name":{"description":"The display name of the developer project.","type":"string"},"object":{"const":"project","description":"Discriminator value emitted at `object`."}},"required":["id","object","name"],"type":"object"},"scopes":{"description":"The OAuth scopes granted to this access token, sorted alphabetically. This is a subset of the developer project's scopes.","items":{"description":"An OAuth scope granted to this access token.","enum":["availability_periods.create","availability_periods.delete","availability_periods.update","availability_slots.read","bookings.cancel","bookings.create","bookings.read","bookings.update","clinician_agenda.read","clinicians.read","digital_form_responses.create","digital_form_responses.read","digital_forms.read","expirable_files.read","human_tasks.create","invoices.read","leads.create","leads.read","leads.update","letters.create","letters.read","lists.create","lists.delete","lists.read","lists.update","locations.read","notes.create","notes.read","notes.update","organization.read","organization.search","patient_connections.create","patient_connections.read","patient_connections.update","patients.create","patients.read","patients.update","payments.read","payors.create","payors.read","payors.update","reports.create","services.read","staff_members.read","test_results.create","test_results.read","transmissions.read","webhook_endpoints.create","webhook_endpoints.delete","webhook_endpoints.read","webhook_endpoints.update"],"type":"string"},"type":"array"}},"required":["id","object","created_at","expires_at","links","livemode","organization","project","scopes"],"type":"object"},"Transmission":{"additionalProperties":false,"properties":{"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"digital_form_response_id":{"description":"The DigitalFormResponse sent by this Transmission.","format":"uuid","type":"string"},"direction":{"description":"Whether the Transmission was sent or received by Carebit.","enum":["outbound","inbound"],"type":"string"},"error_message":{"description":"The delivery error reported for a failed Transmission.","example":"The recipient email address was rejected.","type":["string","null"]},"id":{"description":"The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.","format":"uuid","type":"string"},"links":{"additionalProperties":false,"description":"URLs to related resources.","properties":{"digital_form_response":{"description":"The full URL of a related resource.","format":"uri","type":"string"},"patient":{"description":"The full URL of a related resource.","format":"uri","type":["string","null"]}},"required":["digital_form_response","patient"],"type":"object"},"object":{"const":"transmission","description":"Discriminator value emitted at `object`."},"resource_type":{"description":"The type of resource this Transmission delivered. Currently only `digital_form_response` is supported.","enum":["digital_form_response"],"type":"string"},"sent_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"status":{"description":"The canonical delivery status of the Transmission.","enum":["queued","processing","sending","sent","delivered","receiving","received","no_answer","busy","failed","canceled"],"type":"string"},"subject":{"description":"The subject of the transmitted email.","example":"Please complete your pre-operative consent form","type":["string","null"]},"to":{"description":"The email address to which the DigitalFormResponse was sent.","example":"alex.morgan@example.com","format":"email","type":"string"},"transmission_method":{"description":"The method used to send the DigitalFormResponse.","enum":["email"],"type":"string"},"updated_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"}},"required":["id","object","created_at","digital_form_response_id","direction","error_message","links","resource_type","sent_at","status","subject","to","transmission_method","updated_at"],"type":"object"}},"securitySchemes":{"OAuth2":{"description":"Client-credentials OAuth 2.0 flow. Refresh tokens are issued alongside every access token.","flows":{"clientCredentials":{"refreshUrl":"https://api.carebit.co/oauth/token","scopes":{"availability_periods.create":"Create availability and unavailability periods.","availability_periods.delete":"Delete availability and unavailability periods.","availability_periods.update":"Update availability and unavailability periods.","availability_slots.read":"View slots that a Clinician can be booked into.","bookings.cancel":"Cancel Bookings.","bookings.create":"Create Bookings.","bookings.read":"View Bookings, including Patient and Payor details.","bookings.update":"Update Bookings.","clinician_agenda.read":"View a Clinician's diary, including Bookings, Patient details, availability, and unavailability.","clinicians.read":"Read Clinicians enabled in the Organization.","digital_form_responses.create":"Create DigitalFormResponses and send them to Patients.","digital_form_responses.read":"Read DigitalFormResponses for connected Patients.","digital_forms.read":"Read active DigitalForms and their questions.","expirable_files.read":"Read ExpirableFiles created by API report requests.","human_tasks.create":"Create HumanTasks for staff members.","invoices.read":"View Invoices in the Organization.","leads.create":"Create Leads and referrals in the Organization.","leads.read":"Read Leads and referrals in the Organization.","leads.update":"Update Leads and referrals in the Organization.","letters.create":"Create Letters and Letter batches.","letters.read":"View Letters shared with the integration.","lists.create":"Create Lists.","lists.delete":"Delete Lists.","lists.read":"View Lists and their members.","lists.update":"Update Lists and add or remove members.","locations.read":"View the Organization's Locations.","notes.create":"Create Notes and Note attachments.","notes.read":"View Notes and their attachments.","notes.update":"Update Notes created through the public API.","organization.read":"View the Organization connected to the access token.","organization.search":"Search other Organizations by name or postcode.","patient_connections.create":"Create PatientConnections to existing Organizations.","patient_connections.read":"View unlocked PatientConnections for connected Patients.","patient_connections.update":"Update this Organization's PatientConnections, including the selected Payor.","patients.create":"Create Patients, register them, and read the full representation of a matching connected Patient.","patients.read":"Read Patients with an active connection to the Organization.","patients.update":"Update Patients with an active connection to the Organization.","payments.read":"View Payments in the Organization.","payors.create":"Create Payors for Patients with an active connection to the Organization.","payors.read":"View Patient Payors and the available billing parties.","payors.update":"Update Payors for Patients with an active connection to the Organization.","reports.create":"Create downloadable reports.","services.read":"View Services and ServiceVariants.","staff_members.read":"Read StaffMembers who can be assigned HumanTasks.","test_results.create":"Create Test Results and Test Result batches.","test_results.read":"View Test Results shared with the integration.","transmissions.read":"Read DigitalFormResponse Transmission delivery logs.","webhook_endpoints.create":"Create Developer Platform webhook endpoints (internal management API).","webhook_endpoints.delete":"Delete Developer Platform webhook endpoints (internal management API).","webhook_endpoints.read":"Read Developer Platform webhook endpoints (internal management API).","webhook_endpoints.update":"Update Developer Platform webhook endpoints (internal management API)."},"tokenUrl":"https://api.carebit.co/oauth/token"}},"type":"oauth2"},"WebhookSignature":{"description":"HMAC-SHA256 signature over the raw request body prefixed by a Unix timestamp. Format: `t=<unix seconds>,v1=<hex digest>`. During secret rotation the header carries two `v1=` values (current then previous). Verify by computing `HMAC_SHA256(secret, \"{t}.{body}\")` and comparing constant-time against every `v1=` value.","in":"header","name":"Carebit-Signature","type":"apiKey"}}},"info":{"contact":{"name":"Carebit Developer Support","url":"https://carebit.dev"},"description":"This is Carebit's public REST API. Use it to connect your own software and interfaces\nto a Carebit Organization’s data.\n\nYou can authenticate with OAuth2 credentials. To create credentials, you need to sign\ninto a Carebit Organization as a staff member and go to\nSettings > Developer platform, create a project, and create an API\ncredential with your chosen API scopes for that project. Use the client ID and client\nsecret to request an access token from the OAuth2 token endpoint. You can then use the\naccess token to make requests to the API.\n\nEvery request is limited to that Organization, and to the scopes\non the developer project. A token may request a subset of those\nscopes. Credentials do not store their own scopes.\n","title":"Carebit Developer Platform API","version":"v1"},"openapi":"3.1.0","paths":{"/oauth/revoke":{"post":{"description":"This operation is idempotent. It returns `200 {}` whether or not the token was valid, which prevents token enumeration.","operationId":"oauth.revoke","requestBody":{"content":{"application/x-www-form-urlencoded":{"example":{"client_id":"example_client_id","client_secret":"carebit_cs_live_example_client_secret","token":"carebit_at_live_example_access_token","token_type_hint":"access_token"},"schema":{"properties":{"client_id":{"description":"The OAuth application UID.","type":"string"},"client_secret":{"description":"The OAuth application secret.","type":"string"},"token":{"description":"The access or refresh token value to revoke.","type":"string"},"token_type_hint":{"description":"The type of token supplied in `token`.","enum":["access_token","refresh_token"],"type":"string"}},"required":["token"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{},"schema":{"$ref":"#/components/schemas/OAuthRevokeResponse"}}},"description":"The token was revoked, or was already invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The client credentials are invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}}},"security":[],"summary":"Revoke an access or refresh token","tags":["OAuth"]}},"/oauth/token":{"post":{"description":"Exchange client credentials or a refresh token for an access token. Send `client_id` and `client_secret` using HTTP Basic authentication or as request body fields. This endpoint does not require a Bearer token; it issues one.","operationId":"oauth.token","requestBody":{"content":{"application/x-www-form-urlencoded":{"example":{"client_id":"example_client_id","client_secret":"carebit_cs_live_example_client_secret","grant_type":"client_credentials","scope":"bookings.read bookings.create"},"schema":{"properties":{"client_id":{"description":"The OAuth application UID. Omit when passing credentials via HTTP Basic.","type":"string"},"client_secret":{"description":"The OAuth application secret. Omit when passing credentials via HTTP Basic.","type":"string"},"grant_type":{"description":"The OAuth grant type to exchange for an access token.","enum":["client_credentials","refresh_token"],"type":"string"},"refresh_token":{"description":"The refresh token issued by a previous grant. Required only for `grant_type=refresh_token`.","type":"string"},"scope":{"description":"The space-separated list of requested scopes. Must be a subset of the developer project's scopes. Defaults to the project's full scope set for `client_credentials`. Requesting a scope the project does not have returns `invalid_scope`. Ignored for `refresh_token`.","type":"string"}},"required":["grant_type"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"access_token":"carebit_at_live_example_access_token","created_at":1767193200,"expires_in":3600,"refresh_token":"carebit_rt_live_example_refresh_token","scope":"bookings.read bookings.create","token_type":"Bearer"},"schema":{"$ref":"#/components/schemas/OAuthTokenResponse"}}},"description":"The access token was created. The response includes a `refresh_token` for both supported grant types.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The token request is malformed, or one or more requested scopes are not on the project (`invalid_scope`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The client credentials are invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The project is disabled or archived, or the Organization does not have the developer_platform entitlement.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many token requests.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[],"summary":"Create an access token","tags":["OAuth"]}},"/v1/alternative_payors":{"get":{"operationId":"alternative_payors.list","parameters":[{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/AlternativePayor"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `AlternativePayor` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["payors.read"]}],"summary":"List Alternative Payors","tags":["Payors"]}},"/v1/alternative_payors/{id}":{"get":{"operationId":"alternative_payors.retrieve","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlternativePayor"}}},"description":"The requested `AlternativePayor`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["payors.read"]}],"summary":"Get an Alternative Payor","tags":["Payors"]}},"/v1/availability_periods":{"post":{"description":"Set `is_recurring` to `false` for a one-off period and supply `start_time` and `end_time`. Set `is_recurring` to `true` for a repeating period and choose `simple` or `advanced` as the `recurring_strategy`. A simple weekly Tuesday uses `recurring_strategy: \"simple\"`, `recurring_day_number_of_week: 2`, `recurring_interval_in_seconds: 604800`, and a Tuesday `recurring_start_date`. A simple fortnightly period uses 1209600 seconds. The second Thursday of every month uses `recurring_strategy: \"advanced\"`, `recurring_nth_day_in_month: 2`, `recurring_day_number_of_week: 4`, and a matching start date such as `2026-01-08`. Add `recurring_dates_to_skip: [\"2026-02-12\"]` to omit that specific monthly occurrence. Recurring start and end times use the Organization's local time.","operationId":"availability_periods.create","parameters":[{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"availability_type":"unavailability","clinician_id":"00000000-0000-4000-8000-000000000002","end_time":"2026-01-01T10:30:00Z","is_active":true,"is_recurring":false,"notes":"Team meeting","start_time":"2026-01-01T10:00:00Z"},"schema":{"additionalProperties":false,"properties":{"availability_type":{"description":"Whether the period makes the Clinician available or unavailable.","enum":["availability","unavailability"],"type":"string"},"clinician_id":{"description":"The Clinician affected by the period.","format":"uuid","type":["string","null"]},"end_time":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"is_active":{"description":"Whether the period contributes to the diary.","type":"boolean"},"is_recurring":{"description":"Whether the period repeats. When false, supply `start_time` and `end_time`; recurring fields are cleared.","type":"boolean"},"notes":{"description":"Internal notes about the period.","type":["string","null"]},"recurring_dates_to_skip":{"description":"Specific ISO 8601 dates on which a recurring period must not occur. For example, `[\"2026-02-12\"]` skips the occurrence on 12 February 2026. Only dates that are today or in the future are retained.","items":{"format":"date","type":"string"},"type":"array"},"recurring_day_number_of_week":{"description":"The ISO weekday number used by a recurring period. The values start at 1, not 0: 1 is Monday, 2 is Tuesday, 3 is Wednesday, 4 is Thursday, 5 is Friday, 6 is Saturday, and 7 is Sunday.","maximum":7,"minimum":1,"type":["integer","null"]},"recurring_end_date":{"description":"The optional final recurrence date. It must be after `recurring_start_date`.","format":"date","type":["string","null"]},"recurring_end_time":{"description":"The end time for each recurring occurrence in the Organization's local time.","example":"17:00:00","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9])?$","type":["string","null"]},"recurring_interval_in_seconds":{"description":"Required for `simple`. Use 604800 for weekly or 1209600 for every two weeks.","type":["integer","null"]},"recurring_nth_day_in_month":{"description":"Required for `advanced`. Use 2 with weekday 4 for the second Thursday of each month.","type":["integer","null"]},"recurring_start_date":{"description":"The first recurrence date. Supply a date that matches `recurring_day_number_of_week`.","format":"date","type":["string","null"]},"recurring_start_time":{"description":"The start time for each recurring occurrence in the Organization's local time.","example":"09:00:00","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9])?$","type":["string","null"]},"recurring_strategy":{"description":"Select `simple` for a fixed interval measured in seconds, such as every week or every two weeks. Select `advanced` for an occurrence such as the second Thursday of every month. Use null for a non-recurring period.","enum":["simple","advanced",null],"type":["string","null"]},"room_id":{"description":"The Room affected by the period.","format":"uuid","type":["string","null"]},"service_variant_ids":{"description":"The ServiceVariants offered during an availability period.","items":{"format":"uuid","type":"string"},"type":"array"},"start_time":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]}},"required":["availability_type","clinician_id","is_active","is_recurring"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityPeriod"}}},"description":"The requested `AvailabilityPeriod`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A referenced resource was not found in the Organization.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["availability_periods.create"]}],"summary":"Create an availability or unavailability period","tags":["AvailabilityPeriods"]}},"/v1/availability_periods/{id}":{"delete":{"operationId":"availability_periods.delete","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"No content.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["availability_periods.delete"]}],"summary":"Delete an availability or unavailability period","tags":["AvailabilityPeriods"]},"patch":{"description":"Set `is_recurring` to `false` for a one-off period and supply `start_time` and `end_time`. Set `is_recurring` to `true` for a repeating period and choose `simple` or `advanced` as the `recurring_strategy`. A simple weekly Tuesday uses `recurring_strategy: \"simple\"`, `recurring_day_number_of_week: 2`, `recurring_interval_in_seconds: 604800`, and a Tuesday `recurring_start_date`. A simple fortnightly period uses 1209600 seconds. The second Thursday of every month uses `recurring_strategy: \"advanced\"`, `recurring_nth_day_in_month: 2`, `recurring_day_number_of_week: 4`, and a matching start date such as `2026-01-08`. Add `recurring_dates_to_skip: [\"2026-02-12\"]` to omit that specific monthly occurrence. Recurring start and end times use the Organization's local time.","operationId":"availability_periods.update","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"notes":"Updated team meeting"},"schema":{"additionalProperties":false,"properties":{"availability_type":{"description":"Whether the period makes the Clinician available or unavailable.","enum":["availability","unavailability"],"type":"string"},"clinician_id":{"description":"The Clinician affected by the period.","format":"uuid","type":["string","null"]},"end_time":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"is_active":{"description":"Whether the period contributes to the diary.","type":"boolean"},"is_recurring":{"description":"Whether the period repeats. When false, supply `start_time` and `end_time`; recurring fields are cleared.","type":"boolean"},"notes":{"description":"Internal notes about the period.","type":["string","null"]},"recurring_dates_to_skip":{"description":"Specific ISO 8601 dates on which a recurring period must not occur. For example, `[\"2026-02-12\"]` skips the occurrence on 12 February 2026. Only dates that are today or in the future are retained.","items":{"format":"date","type":"string"},"type":"array"},"recurring_day_number_of_week":{"description":"The ISO weekday number used by a recurring period. The values start at 1, not 0: 1 is Monday, 2 is Tuesday, 3 is Wednesday, 4 is Thursday, 5 is Friday, 6 is Saturday, and 7 is Sunday.","maximum":7,"minimum":1,"type":["integer","null"]},"recurring_end_date":{"description":"The optional final recurrence date. It must be after `recurring_start_date`.","format":"date","type":["string","null"]},"recurring_end_time":{"description":"The end time for each recurring occurrence in the Organization's local time.","example":"17:00:00","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9])?$","type":["string","null"]},"recurring_interval_in_seconds":{"description":"Required for `simple`. Use 604800 for weekly or 1209600 for every two weeks.","type":["integer","null"]},"recurring_nth_day_in_month":{"description":"Required for `advanced`. Use 2 with weekday 4 for the second Thursday of each month.","type":["integer","null"]},"recurring_start_date":{"description":"The first recurrence date. Supply a date that matches `recurring_day_number_of_week`.","format":"date","type":["string","null"]},"recurring_start_time":{"description":"The start time for each recurring occurrence in the Organization's local time.","example":"09:00:00","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9])?$","type":["string","null"]},"recurring_strategy":{"description":"Select `simple` for a fixed interval measured in seconds, such as every week or every two weeks. Select `advanced` for an occurrence such as the second Thursday of every month. Use null for a non-recurring period.","enum":["simple","advanced",null],"type":["string","null"]},"room_id":{"description":"The Room affected by the period.","format":"uuid","type":["string","null"]},"service_variant_ids":{"description":"The ServiceVariants offered during an availability period.","items":{"format":"uuid","type":"string"},"type":"array"},"start_time":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityPeriod"}}},"description":"The requested `AvailabilityPeriod`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["availability_periods.update"]}],"summary":"Update an availability or unavailability period","tags":["AvailabilityPeriods"]}},"/v1/availability_slots":{"get":{"description":"Returns times when the Clinician can be booked for the ServiceVariant. The results account for existing Bookings, unavailability, Service duration, Clinician buffers, and Room conflicts. They include Services that patients cannot book online and do not apply the Patient Portal's minimum booking notice.","operationId":"availability_slots.list","parameters":[{"description":"The Clinician to find slots for.","in":"query","name":"clinician_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The ServiceVariant to find slots for. It determines the duration and booking rules.","in":"query","name":"service_variant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The first date to include, in ISO 8601 format (YYYY-MM-DD).","in":"query","name":"start_date","required":true,"schema":{"format":"date","type":"string"}},{"description":"The last date to include, in ISO 8601 format (YYYY-MM-DD). The inclusive range cannot exceed 45 days.","in":"query","name":"end_date","required":true,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/AvailabilitySlot"},"type":"array"}},"type":"object"}]}}},"description":"The slots that the Clinician can be booked into.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A required parameter is missing, malformed, or outside the permitted date range.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The Clinician or ServiceVariant was not found in the Organization.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["availability_slots.read"]}],"summary":"List slots that a Clinician can be booked into","tags":["AvailabilitySlots"]}},"/v1/bookings":{"get":{"description":"Lists Bookings in the authenticated Organization. Diary queries require `start_time_from` and `start_time_to`, cannot exceed 30 days (90 days when `patient_id` is supplied), and are ordered by `start_time`. When `status` is a recall status (`awaiting_recall`, `overdue_for_recall`, `recall_expired`, or `recall_canceled`), omit the date window. Recall Bookings have no diary `start_time`, so the window is not applied; results are ordered by `recall_due_date`. `did_not_attend` still requires the date window.","operationId":"bookings.list","parameters":[{"description":"Inclusive lower bound for `start_time` in UTC ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). Required for diary queries, including `did_not_attend`. Omit this parameter when `status` is a recall status.","example":"2026-01-01T09:00:00Z","in":"query","name":"start_time_from","schema":{"format":"date-time","type":"string"}},{"description":"Inclusive upper bound for `start_time` in UTC ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). Required with `start_time_from` for diary queries, including `did_not_attend`. The range cannot exceed 30 days, or 90 days when `patient_id` is supplied. Omit this parameter when `status` is a recall status.","example":"2026-01-31T09:00:00Z","in":"query","name":"start_time_to","schema":{"format":"date-time","type":"string"}},{"in":"query","name":"clinician_id","schema":{"format":"uuid","type":"string"}},{"description":"Filter by a Patient with an active connection to the Organization. A valid connected Patient identifier permits a date range of up to 90 days.","in":"query","name":"patient_id","schema":{"format":"uuid","type":"string"}},{"description":"Filter by Booking status. When `status` is `awaiting_recall`, `overdue_for_recall`, `recall_expired`, or `recall_canceled`, omit `start_time_from` and `start_time_to`. Those Bookings have no diary `start_time`. `did_not_attend` still requires the date window.","in":"query","name":"status","schema":{"enum":["arrived","awaiting_payment","awaiting_recall","canceled","confirmed","did_not_attend","overdue_for_recall","prepared","recall_canceled","recall_expired","unconfirmed"],"type":"string"}},{"in":"query","name":"updated_since","schema":{"format":"date-time","type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/Booking"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `Booking` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A diary date range parameter is missing, malformed, or exceeds the permitted 30-day or Patient-filtered 90-day span. Recall-status lists do not require a date range.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The supplied Patient was not found among the Organization's active Patient connections.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["bookings.read"]}],"summary":"List Bookings","tags":["Bookings"]},"post":{"operationId":"bookings.create","parameters":[{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"clinician_id":"00000000-0000-4000-8000-000000000002","end_time":"2026-01-01T10:30:00Z","location_id":"00000000-0000-4000-8000-000000000003","patient_id":"00000000-0000-4000-8000-000000000004","service_id":"00000000-0000-4000-8000-000000000005","service_variant_id":"00000000-0000-4000-8000-000000000006","start_time":"2026-01-01T10:00:00Z","status":"unconfirmed"},"schema":{"additionalProperties":false,"properties":{"clinician_id":{"description":"The identifier of the clinician assigned to the booking, or null when no clinician is assigned.","format":"uuid","type":["string","null"]},"end_time":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"information_for_patient":{"description":"The information shown to the patient before the booking.","type":["string","null"]},"information_for_staff_members":{"description":"The internal information shown only to staff members.","type":["string","null"]},"is_remote":{"description":"Whether the Booking takes place remotely.","type":"boolean"},"location_id":{"description":"The identifier of the location where the booking takes place, or null for a remote booking.","format":"uuid","type":["string","null"]},"patient_id":{"description":"The identifier of the patient attending the booking.","format":"uuid","type":"string"},"payor_id":{"description":"The identifier of the payor responsible for the booking's charges, when different from the patient.","format":"uuid","type":["string","null"]},"remote_method":{"description":"The remote consultation method. `native_video` requires `is_remote` to be true.","enum":["native_video",null],"type":["string","null"]},"room_id":{"description":"The identifier of the room assigned to the booking, when applicable.","format":"uuid","type":["string","null"]},"service_id":{"description":"The identifier of the service being provided during the booking.","format":"uuid","type":"string"},"service_variant_id":{"description":"The identifier of the service variant selected for the booking.","format":"uuid","type":"string"},"start_time":{"description":"The ISO 8601 UTC time at which the booking starts.","format":"date-time","type":"string"},"status":{"description":"The status to assign to the Booking.","enum":["arrived","confirmed","did_not_attend","unconfirmed",null],"type":["string","null"]}},"required":["patient_id","start_time","service_id","service_variant_id"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}},"description":"Booking created.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A referenced resource was not found in your Organization.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["bookings.create"]}],"summary":"Create a Booking","tags":["Bookings"]}},"/v1/bookings/{booking_id}/cancellations":{"post":{"description":"Cancels a Booking through the same path as a StaffMember cancellation. Requires `bookings.cancel`; `bookings.update` does not grant this endpoint. `cancellation_reason` is required when the Organization requires cancellation reasons. API cancellations use `cancellation_source` `api` and automatically apply attendance penalty invoices, except when the Booking was awaiting payment. Canceling a diary Booking emits `booking.canceled`. Canceling a recall Booking sets status to `recall_canceled` and does not emit that event.","operationId":"booking_cancellations.create","parameters":[{"in":"path","name":"booking_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"cancellation_information":"The Patient asked to cancel by phone.","cancellation_reason":"booked_in_error"},"schema":{"additionalProperties":false,"properties":{"cancellation_information":{"description":"Additional notes recorded with the cancellation.","type":["string","null"]},"cancellation_reason":{"description":"The reason the Booking is being canceled. Required when the Organization requires cancellation reasons.","enum":["abusive_behavior","booked_in_error","childcare_issues","clinician_annual_leave","clinician_emergency","clinician_schedule_change","colleague_unavailable","double_booked","duplicate_booking","equipment_issue","facility_unavailable","failed_to_pay_in_advance","family_emergency_illness","fear_or_anxiety","financial_concerns","financial_requirements_not_met","forgot_to_attend","insurance_company_not_permitted","insurance_coverage_issues","insurance_verification_failed","language_barrier","medication_interference","no_longer_required","no_response_to_recall","other","patient_deceased","patient_not_permitted","personal_emergency_illness","pre_booking_steps_not_completed","professional_discretion","referral_not_provided","relocated","rescheduled","scheduling_conflict","staff_issue","switched_to_another_clinician","symptoms_resolved","too_unwell","transportation_issues","unable_failed_to_prepare_for_booking","unknown","weather_conditions","wrong_clinician","wrong_location","wrong_service_type",null],"type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}},"description":"The requested `Booking`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The Booking cannot be canceled from its current status, or `cancellation_reason` is missing or invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["bookings.cancel"]}],"summary":"Cancel a Booking","tags":["Bookings"]}},"/v1/bookings/{id}":{"get":{"operationId":"bookings.retrieve","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}},"description":"The requested `Booking`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["bookings.read"]}],"summary":"Get a Booking","tags":["Bookings"]},"patch":{"description":"Reschedule, confirm, arrive, mark as did not attend, or update Booking details. To cancel a Booking, use `POST /v1/bookings/{booking_id}/cancellations`, which requires `bookings.cancel`.","operationId":"bookings.update","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"status":"confirmed"},"schema":{"additionalProperties":false,"properties":{"clinician_id":{"description":"The identifier of the clinician assigned to the booking, or null when no clinician is assigned.","format":"uuid","type":["string","null"]},"end_time":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":["string","null"]},"information_for_patient":{"description":"The information shown to the patient before the booking.","type":["string","null"]},"information_for_staff_members":{"description":"The internal information shown only to staff members.","type":["string","null"]},"is_remote":{"description":"Whether the Booking takes place remotely.","type":"boolean"},"location_id":{"description":"The identifier of the location where the booking takes place, or null for a remote booking.","format":"uuid","type":["string","null"]},"patient_id":{"description":"The identifier of the patient attending the booking.","format":"uuid","type":"string"},"payor_id":{"description":"The identifier of the payor responsible for the booking's charges, when different from the patient.","format":"uuid","type":["string","null"]},"remote_method":{"description":"The remote consultation method. `native_video` requires `is_remote` to be true.","enum":["native_video",null],"type":["string","null"]},"room_id":{"description":"The identifier of the room assigned to the booking, when applicable.","format":"uuid","type":["string","null"]},"service_id":{"description":"The identifier of the service being provided during the booking.","format":"uuid","type":"string"},"service_variant_id":{"description":"The identifier of the service variant selected for the booking.","format":"uuid","type":"string"},"start_time":{"description":"The ISO 8601 UTC time at which the booking starts.","format":"date-time","type":"string"},"status":{"description":"The status to assign to the Booking.","enum":["arrived","confirmed","did_not_attend","unconfirmed",null],"type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}},"description":"The requested `Booking`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["bookings.update"]}],"summary":"Update a Booking","tags":["Bookings"]}},"/v1/clinician_agenda":{"get":{"description":"Returns the Clinician's Bookings, availability, and unavailability in time order. Bookings include staff and Patient details, so show only information appropriate for your users. Availability shows the diary schedule, not times that can necessarily be booked. Use the Availability Slots endpoints before creating a Booking. Unavailability labels and notes are not included.","operationId":"clinician_agenda.retrieve","parameters":[{"description":"The Clinician whose diary to return. Pass exactly one identifier.","in":"query","name":"clinician_ids[]","required":true,"schema":{"items":{"format":"uuid","type":"string"},"maxItems":1,"minItems":1,"type":"array"}},{"description":"The first date to include, in ISO 8601 format (YYYY-MM-DD).","in":"query","name":"start_date","required":true,"schema":{"format":"date","type":"string"}},{"description":"The last date to include, in ISO 8601 format (YYYY-MM-DD). The inclusive range cannot exceed 45 days.","in":"query","name":"end_date","required":true,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/ClinicianAgendaItem"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `ClinicianAgendaItem` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The Clinician list or date range is missing, malformed, or outside the permitted limits.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The Clinician was not found in the Organization.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["clinician_agenda.read"]}],"summary":"Get a Clinician's diary","tags":["Agenda"]}},"/v1/clinicians":{"get":{"operationId":"clinicians.list","parameters":[{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/Clinician"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `Clinician` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A pagination parameter is invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["clinicians.read"]}],"summary":"List the Organization's Clinicians","tags":["Clinicians"]}},"/v1/clinicians/{id}":{"get":{"operationId":"clinicians.retrieve","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Clinician"}}},"description":"The requested `Clinician`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["clinicians.read"]}],"summary":"Get a Clinician","tags":["Clinicians"]}},"/v1/digital_form_responses":{"get":{"operationId":"digital_form_responses.list","parameters":[{"description":"The Patient whose DigitalFormResponses should be returned.","in":"query","name":"patient_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/DigitalFormResponse"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `DigitalFormResponse` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["digital_form_responses.read"]}],"summary":"List a Patient's DigitalFormResponses","tags":["DigitalFormResponses"]},"post":{"description":"Creates a pending DigitalFormResponse and queues an email asking the Patient to complete it.","operationId":"digital_form_responses.create","parameters":[{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"booking_id":"00000000-0000-4000-8000-000000000001","digital_form_id":"00000000-0000-4000-8000-000000000020","due_at":"2026-01-04T17:00:00Z","patient_id":"00000000-0000-4000-8000-000000000004"},"schema":{"additionalProperties":false,"properties":{"booking_id":{"description":"The optional Booking associated with the response.","format":"uuid","type":["string","null"]},"digital_form_id":{"description":"The DigitalForm to send to the Patient.","format":"uuid","type":"string"},"due_at":{"description":"The optional time by which the Patient should complete the DigitalForm.","format":"date-time","type":["string","null"]},"patient_id":{"description":"The Patient who should complete the DigitalForm.","format":"uuid","type":"string"}},"required":["digital_form_id","patient_id"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigitalFormResponse"}}},"description":"The requested `DigitalFormResponse`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["digital_form_responses.create"]}],"summary":"Create and send a DigitalFormResponse","tags":["DigitalFormResponses"]}},"/v1/digital_form_responses/{id}":{"get":{"operationId":"digital_form_responses.retrieve","parameters":[{"description":"The identifier of the DigitalFormResponse.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigitalFormResponse"}}},"description":"The requested `DigitalFormResponse`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["digital_form_responses.read"]}],"summary":"Retrieve a DigitalFormResponse","tags":["DigitalFormResponses"]}},"/v1/digital_forms":{"get":{"operationId":"digital_forms.list","parameters":[{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/DigitalForm"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `DigitalForm` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["digital_forms.read"]}],"summary":"List DigitalForms","tags":["DigitalForms"]}},"/v1/digital_forms/{id}":{"get":{"operationId":"digital_forms.retrieve","parameters":[{"description":"The identifier of the DigitalForm.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigitalForm"}}},"description":"The requested `DigitalForm`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["digital_forms.read"]}],"summary":"Retrieve a DigitalForm","tags":["DigitalForms"]}},"/v1/expirable_files":{"get":{"description":"Returns ExpirableFiles created by API report requests for the authenticated Organization.","operationId":"expirable_files.list","parameters":[{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/ExpirableFile"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `ExpirableFile` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["expirable_files.read"]}],"summary":"List ExpirableFiles","tags":["ExpirableFiles"]}},"/v1/expirable_files/{id}":{"get":{"operationId":"expirable_files.retrieve","parameters":[{"description":"The identifier of the ExpirableFile.","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpirableFile"}}},"description":"The requested `ExpirableFile`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The ExpirableFile was not found in the authenticated Organization.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["expirable_files.read"]}],"summary":"Retrieve an ExpirableFile","tags":["ExpirableFiles"]}},"/v1/human_tasks":{"post":{"description":"Creates a HumanTask in the Organization's existing staff task queue. Look up assignable StaffMembers with `GET /v1/staff_members`.","operationId":"human_tasks.create","parameters":[{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"assignees":[{"assignee_id":"00000000-0000-4000-8000-000000000021","assignee_type":"staff_member"}],"content":"Review the Patient's pre-operative DigitalFormResponse.","due_date":"2026-01-04","is_urgent":false,"patient_id":"00000000-0000-4000-8000-000000000004"},"schema":{"additionalProperties":false,"properties":{"assignees":{"description":"The people to assign to the HumanTask. Each object requires `assignee_type` and `assignee_id`. Currently only `staff_member` is supported.","items":{"additionalProperties":false,"properties":{"assignee_id":{"description":"The identifier of the assignee. For `staff_member`, use an identifier from `GET /v1/staff_members`.","format":"uuid","type":"string"},"assignee_type":{"description":"The type of assignee. Currently only `staff_member` is supported.","enum":["staff_member"],"type":"string"}},"required":["assignee_id","assignee_type"],"type":"object"},"type":"array"},"content":{"description":"The description of the work to complete.","type":"string"},"due_date":{"description":"The date by which staff should complete the HumanTask.","format":"date","type":"string"},"is_remindable":{"description":"Whether Carebit can send reminders when the HumanTask becomes due.","type":"boolean"},"is_urgent":{"description":"Whether the HumanTask should be marked as urgent.","type":"boolean"},"patient_id":{"description":"The optional Patient associated with the HumanTask.","format":"uuid","type":["string","null"]}},"required":["content","due_date"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HumanTask"}}},"description":"The requested `HumanTask`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["human_tasks.create"]}],"summary":"Create a HumanTask","tags":["HumanTasks"]}},"/v1/insurance_companies":{"get":{"description":"Returns active insurance companies. Embassies and overseas government health offices are excluded.","operationId":"insurance_companies.list","parameters":[{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/InsuranceCompany"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `InsuranceCompany` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["payors.read"]}],"summary":"List Insurance Companies","tags":["Payors"]}},"/v1/insurance_companies/{id}":{"get":{"description":"Returns an active insurance company. Embassy and overseas government health office identifiers return `404`.","operationId":"insurance_companies.retrieve","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceCompany"}}},"description":"The requested `InsuranceCompany`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["payors.read"]}],"summary":"Get an Insurance Company","tags":["Payors"]}},"/v1/invoices":{"get":{"description":"Returns Invoices in the authenticated Organization. `booking_id` and `patient_id` are optional. When both are supplied, an Invoice must match both filters.","operationId":"invoices.list","parameters":[{"description":"Filter by a Booking in the Organization.","in":"query","name":"booking_id","schema":{"format":"uuid","type":"string"}},{"description":"Filter by a Patient with an active connection to the Organization.","in":"query","name":"patient_id","schema":{"format":"uuid","type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/Invoice"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `Invoice` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A pagination parameter is invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The Booking or Patient was not found in the Organization.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["invoices.read"]}],"summary":"List Invoices","tags":["Invoices"]}},"/v1/lead_pipelines":{"get":{"description":"Returns the Organization's Lead and referral pipelines. When updating a Lead, use a stage from the pipeline for its `lead_type`. Carebit Pro is required.","operationId":"lead_pipelines.list","responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/LeadPipeline"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `LeadPipeline` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, the project is disabled, or the Organization does not have Carebit Pro.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["leads.read"]}],"summary":"List Lead pipelines and stages","tags":["Leads"]}},"/v1/leads":{"get":{"description":"Returns the Organization's patient inquiries and referrals. By default, results include active and lost Leads. Use `is_lost` to return only one group. Carebit Pro is required.","operationId":"leads.list","parameters":[{"description":"Filter by the identifier of the assigned clinician.","in":"query","name":"clinician_id","schema":{"format":"uuid","type":"string"}},{"description":"Filter by exact email address.","in":"query","name":"email","schema":{"format":"email","type":"string"}},{"description":"When `true`, only lost Leads are returned. When `false`, only active Leads are returned. Omit to return both.","in":"query","name":"is_lost","schema":{"type":"boolean"}},{"description":"Filter by the Service the Lead is inquiring about.","in":"query","name":"service_id","schema":{"format":"uuid","type":"string"}},{"description":"Return Leads updated at or after this ISO 8601 timestamp.","in":"query","name":"updated_since","schema":{"format":"date-time","type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/Lead"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `Lead` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A filter or pagination parameter is invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, the project is disabled, or the Organization does not have Carebit Pro.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["leads.read"]}],"summary":"List Leads","tags":["Leads"]},"post":{"description":"Creates a patient inquiry or referral in the Organization. Attachments can use a public HTTPS URL or Base64-encoded data. Carebit validates and scans them for malware in the background; poll the returned remote file import batch for their status. Each successful request creates a new Lead unless the response is an Idempotency-Key replay. Carebit Pro is required.","operationId":"leads.create","parameters":[{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"attachments":[{"filename":"referral-letter.pdf","url":"https://files.example.com/referral-letter.pdf"}],"clinician_id":"00000000-0000-4000-8000-000000000002","country_code":"GB","email":"riley.cooper@example.invalid","first_name":"Riley","internal_notes":"Asked about evening appointments with Dr Smith.","last_name":"Cooper","lead_type":"inquiry","mobile":"7700900123","mobile_country_dial_code":"GB","presenting_problem":"Right knee pain","referral_notes":"Referred by Dr Patel at Riverside Medical.","referral_source":"gp_practice","service_id":"00000000-0000-4000-8000-000000000005"},"schema":{"additionalProperties":false,"properties":{"address_line_1":{"description":"The primary address line of the lead.","type":["string","null"]},"address_line_2":{"description":"The secondary address line of the lead.","type":["string","null"]},"attachments":{"description":"The files to attach to the Lead in the background. Provide either `url` or `file_base64` for each file. Carebit validates and scans every file for malware.","items":{"additionalProperties":false,"oneOf":[{"not":{"required":["file_base64"]},"required":["url"]},{"not":{"required":["url"]},"required":["file_base64","filename"]}],"properties":{"file_base64":{"description":"The file bytes encoded as Base64. Provide this with `filename` instead of `url`. The decoded file can be at most 7 MB.","format":"byte","maxLength":9786712,"type":"string","writeOnly":true},"filename":{"description":"The filename to use for the attachment. Required with `file_base64`; defaults to the remote file's filename for URL sources.","type":["string","null"]},"url":{"description":"The public HTTPS URL that Carebit can fetch.","format":"uri","type":"string"}},"type":"object"},"maxItems":100,"type":"array"},"city":{"description":"The city in the lead's postal address.","type":["string","null"]},"clinician_id":{"description":"The identifier of the clinician the lead is assigned to. Must be a clinician enabled in your Organization. Pass `null` to unassign.","format":"uuid","type":["string","null"]},"country_code":{"description":"The uppercase ISO 3166-1 alpha-2 country code for the lead's postal address.","pattern":"^[A-Z]{2}$","type":["string","null"]},"county":{"description":"The county or region in the lead's postal address.","type":["string","null"]},"date_of_birth":{"description":"The date of birth of the lead, in ISO 8601 format (YYYY-MM-DD).","format":"date","type":["string","null"]},"email":{"description":"The contact email address of the lead.","format":"email","type":["string","null"]},"first_name":{"description":"The first name of the lead. Required on create.","type":"string"},"gdpr_consent_granted_at":{"description":"The ISO 8601 UTC timestamp at which the lead granted GDPR consent.","format":"date-time","type":["string","null"]},"gdpr_consent_withdrawn_at":{"description":"The ISO 8601 UTC timestamp at which the lead withdrew GDPR consent.","format":"date-time","type":["string","null"]},"internal_notes":{"description":"Internal notes shown in the Notes box next to presenting problem on the Carebit lead enquiry screen. Distinct from `referral_notes`.","type":["string","null"]},"is_opted_out_of_sms":{"description":"Whether the lead has opted out of SMS communication.","type":"boolean"},"is_signed_up_to_newsletters":{"description":"Whether the lead has signed up to receive newsletters.","type":"boolean"},"last_name":{"description":"The last name of the lead. Required on create.","type":"string"},"lead_type":{"description":"Whether to treat the record as a patient inquiry or a referral. Defaults to `inquiry` on create.","enum":["inquiry","referral"],"type":"string"},"mobile":{"description":"The mobile phone number of the lead, without the country dial code.","type":["string","null"]},"mobile_country_dial_code":{"description":"The ISO 3166-1 alpha-2 country code that selects the international dial code for `mobile`, for example `GB` selects `+44`.","pattern":"^[A-Z]{2}$","type":["string","null"]},"organization_privacy_policy_consent_granted_at":{"description":"The ISO 8601 UTC timestamp at which the lead granted consent to the Organization's privacy policy.","format":"date-time","type":["string","null"]},"phone":{"description":"The landline phone number of the lead, without the country dial code.","type":["string","null"]},"phone_country_dial_code":{"description":"The ISO 3166-1 alpha-2 country code that selects the international dial code for `phone`, for example `GB` selects `+44`.","pattern":"^[A-Z]{2}$","type":["string","null"]},"postcode":{"description":"The postal code in the lead's postal address.","type":["string","null"]},"presenting_problem":{"description":"The presenting problem the lead described. Shown next to Notes on the Carebit lead enquiry screen.","type":["string","null"]},"referral_notes":{"description":"The referral notes shown on the Carebit lead enquiry screen.","type":["string","null"]},"referral_source":{"description":"The referral source shown on the Carebit lead enquiry screen.","enum":["consultant","embassy","family_or_friend","gp_practice","hospital","insurance_company","physiotherapist","presentation_talk","previous_patient","private_practice","search_engine","self_referral","social_media","website","other",null],"type":["string","null"]},"service_id":{"description":"The Service the Lead is inquiring about. It must belong to your Organization. Pass `null` to clear.","format":"uuid","type":["string","null"]},"sex":{"description":"The sex of the Lead as supplied on the inquiry.","type":["string","null"]},"title":{"description":"The personal title of the lead, when recorded.","type":["string","null"]}},"required":["first_name","last_name"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}},"description":"Lead created.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, the project is disabled, or the Organization does not have Carebit Pro.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A referenced resource was not found in your Organization.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["leads.create"]}],"summary":"Create a Lead","tags":["Leads"]}},"/v1/leads/{id}":{"get":{"description":"Returns a patient inquiry or referral from the Organization. Carebit Pro is required.","operationId":"leads.retrieve","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}},"description":"The requested `Lead`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, the project is disabled, or the Organization does not have Carebit Pro.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["leads.read"]}],"summary":"Get a Lead","tags":["Leads"]},"patch":{"description":"Updates any patient inquiry or referral in the Organization, regardless of how it was created. Use `stage_id` to move the Lead within the pipeline for its resulting `lead_type`. Conversion and lost stages can start the Organization's configured workflows. Attribution and lifecycle fields are read-only. Carebit Pro is required.","operationId":"leads.update","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"presenting_problem":"Left knee pain (updated)","stage_id":"00000000-0000-4000-8000-00000000000d"},"schema":{"additionalProperties":false,"properties":{"address_line_1":{"description":"The primary address line of the lead.","type":["string","null"]},"address_line_2":{"description":"The secondary address line of the lead.","type":["string","null"]},"city":{"description":"The city in the lead's postal address.","type":["string","null"]},"clinician_id":{"description":"The identifier of the clinician the lead is assigned to. Must be a clinician enabled in your Organization. Pass `null` to unassign.","format":"uuid","type":["string","null"]},"country_code":{"description":"The uppercase ISO 3166-1 alpha-2 country code for the lead's postal address.","pattern":"^[A-Z]{2}$","type":["string","null"]},"county":{"description":"The county or region in the lead's postal address.","type":["string","null"]},"date_of_birth":{"description":"The date of birth of the lead, in ISO 8601 format (YYYY-MM-DD).","format":"date","type":["string","null"]},"email":{"description":"The contact email address of the lead.","format":"email","type":["string","null"]},"first_name":{"description":"The first name of the lead. Required on create.","type":"string"},"gdpr_consent_granted_at":{"description":"The ISO 8601 UTC timestamp at which the lead granted GDPR consent.","format":"date-time","type":["string","null"]},"gdpr_consent_withdrawn_at":{"description":"The ISO 8601 UTC timestamp at which the lead withdrew GDPR consent.","format":"date-time","type":["string","null"]},"internal_notes":{"description":"Internal notes shown in the Notes box next to presenting problem on the Carebit lead enquiry screen. Distinct from `referral_notes`.","type":["string","null"]},"is_opted_out_of_sms":{"description":"Whether the lead has opted out of SMS communication.","type":"boolean"},"is_signed_up_to_newsletters":{"description":"Whether the lead has signed up to receive newsletters.","type":"boolean"},"last_name":{"description":"The last name of the lead. Required on create.","type":"string"},"lead_type":{"description":"Whether to treat the record as a patient inquiry or a referral. Defaults to `inquiry` on create.","enum":["inquiry","referral"],"type":"string"},"mobile":{"description":"The mobile phone number of the lead, without the country dial code.","type":["string","null"]},"mobile_country_dial_code":{"description":"The ISO 3166-1 alpha-2 country code that selects the international dial code for `mobile`, for example `GB` selects `+44`.","pattern":"^[A-Z]{2}$","type":["string","null"]},"organization_privacy_policy_consent_granted_at":{"description":"The ISO 8601 UTC timestamp at which the lead granted consent to the Organization's privacy policy.","format":"date-time","type":["string","null"]},"phone":{"description":"The landline phone number of the lead, without the country dial code.","type":["string","null"]},"phone_country_dial_code":{"description":"The ISO 3166-1 alpha-2 country code that selects the international dial code for `phone`, for example `GB` selects `+44`.","pattern":"^[A-Z]{2}$","type":["string","null"]},"postcode":{"description":"The postal code in the lead's postal address.","type":["string","null"]},"presenting_problem":{"description":"The presenting problem the lead described. Shown next to Notes on the Carebit lead enquiry screen.","type":["string","null"]},"referral_notes":{"description":"The referral notes shown on the Carebit lead enquiry screen.","type":["string","null"]},"referral_source":{"description":"The referral source shown on the Carebit lead enquiry screen.","enum":["consultant","embassy","family_or_friend","gp_practice","hospital","insurance_company","physiotherapist","presentation_talk","previous_patient","private_practice","search_engine","self_referral","social_media","website","other",null],"type":["string","null"]},"service_id":{"description":"The Service the Lead is inquiring about. It must belong to your Organization. Pass `null` to clear.","format":"uuid","type":["string","null"]},"sex":{"description":"The sex of the Lead as supplied on the inquiry.","type":["string","null"]},"stage_id":{"description":"The identifier of a stage in the pipeline that matches the Lead's resulting `lead_type`.","format":"uuid","type":"string"},"title":{"description":"The personal title of the lead, when recorded.","type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}},"description":"The requested `Lead`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, the project is disabled, or the Organization does not have Carebit Pro.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["leads.update"]}],"summary":"Update a Lead","tags":["Leads"]}},"/v1/letter_batches":{"post":{"description":"Each item accepts a public HTTPS `file_url` or Base64-encoded `file_base64`. Carebit creates all Letters together. If any item fails validation, no Letters are created.","operationId":"letter_batches.create","parameters":[{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"items":[{"automatically_create_resource_permission_for_patient":true,"file_url":"https://storage.example.invalid/letters/referral.pdf","notify_patient_of_resource_permission":true,"patient_id":"00000000-0000-4000-8000-000000000004","status":"complete","title":"Referral letter"}]},"schema":{"additionalProperties":false,"properties":{"items":{"description":"The letters to create. Items are processed in their submitted order.","items":{"$ref":"#/components/schemas/LetterWrite"},"maxItems":100,"minItems":1,"type":"array"}},"required":["items"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteFileImportBatch"}}},"description":"The batch was accepted. Poll it for each file's import status.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["letters.create"]}],"summary":"Create up to 100 Letters in one request","tags":["Letters"]}},"/v1/letters":{"get":{"operationId":"letters.list","parameters":[{"in":"query","name":"patient_id","schema":{"format":"uuid","type":"string"}},{"in":"query","name":"booking_id","schema":{"format":"uuid","type":"string"}},{"in":"query","name":"status","schema":{"enum":["awaiting_proofreading","awaiting_receipt","awaiting_review","awaiting_sending","awaiting_typing","complete","draft","reviewed"],"type":"string"}},{"in":"query","name":"created_since","schema":{"format":"date-time","type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/Letter"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `Letter` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A filter or pagination parameter is invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["letters.read"]}],"summary":"List Letters","tags":["Letters"]},"post":{"description":"Creates the Letter immediately, then imports its file in the background. Provide the file as a public HTTPS `file_url` or Base64-encoded `file_base64`. Poll `/v1/remote_file_import_batches/:remote_file_import_batch_id` for the import status.","operationId":"letters.create","parameters":[{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"automatically_create_resource_permission_for_patient":true,"file_url":"https://storage.example.invalid/letters/referral.pdf","filename":"referral.pdf","notify_patient_of_resource_permission":true,"patient_id":"00000000-0000-4000-8000-000000000004","status":"complete","title":"Referral letter"},"schema":{"additionalProperties":false,"oneOf":[{"not":{"required":["file_base64"]},"required":["file_url"]},{"not":{"required":["file_url"]},"required":["file_base64","filename"]}],"properties":{"automatically_create_resource_permission_for_patient":{"description":"Whether Carebit should automatically share the letter with the patient after processing.","type":"boolean"},"booking_id":{"description":"The identifier of the booking associated with the letter, or null when it is not linked to a booking.","format":"uuid","type":["string","null"]},"clinician_id":{"description":"The identifier of the clinician associated with the letter, or null when none is assigned.","format":"uuid","type":["string","null"]},"description":{"description":"A description of the Letter.","type":["string","null"]},"file_base64":{"description":"The letter bytes encoded as Base64. Provide this with `filename` instead of `file_url`. The decoded file can be at most 7 MB.","format":"byte","maxLength":9786712,"type":"string","writeOnly":true},"file_url":{"description":"The public HTTPS URL that Carebit can fetch.","format":"uri","type":"string"},"filename":{"description":"The filename to use for the letter. Required with `file_base64`; defaults to the remote file's filename for URL sources.","type":["string","null"]},"notify_patient_of_resource_permission":{"description":"Whether Carebit should notify the patient when the letter is shared with them.","type":"boolean"},"patient_id":{"description":"The identifier of the patient that the letter belongs to.","format":"uuid","type":"string"},"status":{"description":"The workflow status to assign to the letter.","enum":["awaiting_receipt","awaiting_review","awaiting_sending","complete","draft","reviewed"],"type":"string"},"title":{"description":"The display title of the letter.","type":"string"}},"required":["patient_id","title","status","automatically_create_resource_permission_for_patient","notify_patient_of_resource_permission"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Letter"}}},"description":"The requested `Letter`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["letters.create"]}],"summary":"Create a Letter with a file","tags":["Letters"]}},"/v1/letters/{id}":{"get":{"operationId":"letters.retrieve","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Letter"}}},"description":"The requested `Letter`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["letters.read"]}],"summary":"Get a Letter","tags":["Letters"]}},"/v1/lists":{"get":{"description":"Returns Lists in the Organization, ordered by name.","operationId":"lists.list","parameters":[{"description":"Filter by an exact List name, case-insensitively.","example":"Cataract waiting list","in":"query","name":"name","schema":{"type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/List"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `List` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A pagination parameter is invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["lists.read"]}],"summary":"List Lists","tags":["Lists"]},"post":{"operationId":"lists.create","parameters":[{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"clinician_id":"00000000-0000-4000-8000-000000000002","color_hex":"#28a745","name":"Cataract waiting list","notes":"Patients waiting for a cataract assessment."},"schema":{"additionalProperties":false,"properties":{"clinician_id":{"description":"The Clinician associated with this List. Null clears the Clinician.","format":"uuid","type":["string","null"]},"color_hex":{"description":"The display color of the List as a hex string, for example `#28a745`.","example":"#28a745","pattern":"^#[0-9A-Fa-f]{6}$","type":["string","null"]},"name":{"description":"The display name of the List.","maxLength":255,"type":"string"},"notes":{"description":"Internal notes about the List.","maxLength":10000,"type":["string","null"]}},"required":["name"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/List"}}},"description":"The requested `List`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The supplied Clinician was not found in the Organization.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["lists.create"]}],"summary":"Create a List","tags":["Lists"]}},"/v1/lists/{id}":{"delete":{"description":"Deletes a List and its members.","operationId":"lists.delete","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"No content.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["lists.delete"]}],"summary":"Delete a List","tags":["Lists"]},"get":{"operationId":"lists.retrieve","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/List"}}},"description":"The requested `List`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["lists.read"]}],"summary":"Get a List","tags":["Lists"]},"patch":{"operationId":"lists.update","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"name":"Updated cataract waiting list"},"schema":{"additionalProperties":false,"properties":{"clinician_id":{"description":"The Clinician associated with this List. Null clears the Clinician.","format":"uuid","type":["string","null"]},"color_hex":{"description":"The display color of the List as a hex string, for example `#28a745`.","example":"#28a745","pattern":"^#[0-9A-Fa-f]{6}$","type":["string","null"]},"name":{"description":"The display name of the List.","maxLength":255,"type":"string"},"notes":{"description":"Internal notes about the List.","maxLength":10000,"type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/List"}}},"description":"The requested `List`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["lists.update"]}],"summary":"Update a List","tags":["Lists"]}},"/v1/lists/{list_id}/members":{"get":{"operationId":"list_members.list","parameters":[{"in":"path","name":"list_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/ListMember"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `ListMember` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["lists.read"]}],"summary":"List members of a List","tags":["Lists"]},"post":{"description":"Adds a member to a List. Currently `member_type` accepts only `patient`, and `member_id` must be a connected Patient. Duplicate membership returns `422`. Adding a member emits `list.member_added`.","operationId":"list_members.create","parameters":[{"in":"path","name":"list_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"member_id":"00000000-0000-4000-8000-000000000004","member_type":"patient"},"schema":{"additionalProperties":false,"properties":{"member_id":{"description":"The identifier of the member to add. When `member_type` is `patient`, this is a connected Patient.","format":"uuid","type":"string"},"member_type":{"description":"The kind of member to add. Additional values may be added later.","enum":["patient"],"type":"string"}},"required":["member_id","member_type"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMember"}}},"description":"The requested `ListMember`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The List or member was not found in the Organization.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["lists.update"]}],"summary":"Add a member to a List","tags":["Lists"]}},"/v1/lists/{list_id}/members/{id}":{"delete":{"description":"Removes a member from a List. Removing a member emits `list.member_removed`.","operationId":"list_members.delete","parameters":[{"in":"path","name":"list_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"No content.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["lists.update"]}],"summary":"Remove a member from a List","tags":["Lists"]}},"/v1/locations":{"get":{"operationId":"locations.list","parameters":[{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/Location"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `Location` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["locations.read"]}],"summary":"List Locations","tags":["Locations"]}},"/v1/locations/{id}":{"get":{"operationId":"locations.retrieve","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Location"}}},"description":"The requested `Location`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["locations.read"]}],"summary":"Get a Location","tags":["Locations"]}},"/v1/next_availability_slot":{"get":{"description":"Finds the next time the Clinician can be booked for the ServiceVariant, searching up to 8 months ahead. The search includes Services that patients cannot book online and does not apply the Patient Portal's minimum booking notice.","operationId":"next_availability_slot.retrieve","parameters":[{"description":"The Clinician to find the next slot for.","in":"query","name":"clinician_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The ServiceVariant to find the next slot for. It determines the duration and booking rules.","in":"query","name":"service_variant_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The date from which to search, in ISO 8601 format (YYYY-MM-DD). Defaults to today.","in":"query","name":"from_date","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilitySlot"}}},"description":"The requested `AvailabilitySlot`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A required parameter is missing, malformed, or outside the permitted date range.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The Clinician or ServiceVariant was not found, or no slot was available within 8 months.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["availability_slots.read"]}],"summary":"Get the next slot that a Clinician can be booked into","tags":["AvailabilitySlots"]}},"/v1/notes":{"get":{"operationId":"notes.list","parameters":[{"in":"query","name":"patient_id","schema":{"format":"uuid","type":"string"}},{"in":"query","name":"booking_id","schema":{"format":"uuid","type":"string"}},{"in":"query","name":"updated_since","schema":{"format":"date-time","type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/Note"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `Note` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A filter or pagination parameter is invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["notes.read"]}],"summary":"List Notes","tags":["Notes"]},"post":{"operationId":"notes.create","parameters":[{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"content":"<p>Follow up in six weeks.</p>","is_pinned":false,"subject_id":"00000000-0000-4000-8000-000000000004","subject_type":"patient"},"schema":{"additionalProperties":false,"properties":{"attachments":{"description":"The files to attach to the Note. Provide either `url` or `file_base64` for each file.","items":{"additionalProperties":false,"oneOf":[{"not":{"required":["file_base64"]},"required":["url"]},{"not":{"required":["url"]},"required":["file_base64","filename"]}],"properties":{"file_base64":{"description":"The file bytes encoded as Base64. Provide this with `filename` instead of `url`. The decoded file can be at most 7 MB.","format":"byte","maxLength":9786712,"type":"string","writeOnly":true},"filename":{"description":"The filename to use for the attachment. Required with `file_base64`; defaults to the remote file's filename for URL sources.","type":["string","null"]},"url":{"description":"The public HTTPS URL that Carebit can fetch.","format":"uri","type":"string"}},"type":"object"},"maxItems":100,"type":"array"},"content":{"description":"The sanitized HTML body of the note.","type":"string"},"is_pinned":{"description":"Whether the note should be pinned for prominent display.","type":"boolean"},"subject_id":{"description":"The identifier of the patient or booking that the note concerns.","format":"uuid","type":"string"},"subject_type":{"description":"The type of resource that the note concerns.","enum":["booking","patient"],"type":"string"},"title":{"description":"The display title of the note.","type":["string","null"]}},"required":["subject_type","subject_id","content"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}},"description":"The requested `Note`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["notes.create"]}],"summary":"Create a Note","tags":["Notes"]}},"/v1/notes/{id}":{"get":{"operationId":"notes.retrieve","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}},"description":"The requested `Note`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["notes.read"]}],"summary":"Get a Note","tags":["Notes"]},"patch":{"operationId":"notes.update","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"content":"<p>Updated body.</p>"},"schema":{"additionalProperties":false,"properties":{"attachments":{"description":"The files to attach to the Note. Provide either `url` or `file_base64` for each file.","items":{"additionalProperties":false,"oneOf":[{"not":{"required":["file_base64"]},"required":["url"]},{"not":{"required":["url"]},"required":["file_base64","filename"]}],"properties":{"file_base64":{"description":"The file bytes encoded as Base64. Provide this with `filename` instead of `url`. The decoded file can be at most 7 MB.","format":"byte","maxLength":9786712,"type":"string","writeOnly":true},"filename":{"description":"The filename to use for the attachment. Required with `file_base64`; defaults to the remote file's filename for URL sources.","type":["string","null"]},"url":{"description":"The public HTTPS URL that Carebit can fetch.","format":"uri","type":"string"}},"type":"object"},"maxItems":100,"type":"array"},"content":{"description":"The sanitized HTML body of the note.","type":"string"},"is_pinned":{"description":"Whether the note should be pinned for prominent display.","type":"boolean"},"subject_id":{"description":"The identifier of the patient or booking that the note concerns.","format":"uuid","type":"string"},"subject_type":{"description":"The type of resource that the note concerns.","enum":["booking","patient"],"type":"string"},"title":{"description":"The display title of the note.","type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Note"}}},"description":"The requested `Note`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The Note was not created through the API for your Organization.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["notes.update"]}],"summary":"Update an API-created Note","tags":["Notes"]}},"/v1/organization":{"get":{"operationId":"organization.retrieve","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}},"description":"The requested `Organization`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["organization.read"]}],"summary":"Get the Organization for this access token","tags":["Organization"]}},"/v1/organizations":{"get":{"description":"Searches active Organizations by name or postcode so you can attach a PatientConnection, such as a GP practice. This endpoint does not create Organizations. At least one of `name` or `postcode` is required. The response uses the Organization object. Email, subdomain, phone, currency, and time_zone are null so a search cannot harvest contact details.","operationId":"organizations.search","parameters":[{"description":"Case-insensitive partial match on the Organization name. At least two characters. Provide `name` or `postcode`.","example":"High Street Surgery","in":"query","name":"name","schema":{"minLength":2,"type":"string"}},{"description":"Case-insensitive partial match on the postal code. At least two characters. Provide `name` or `postcode`.","example":"SW1A","in":"query","name":"postcode","schema":{"minLength":2,"type":"string"}},{"description":"Return only Organizations of this type. Use `gp_practice` when searching for a GP.","example":"gp_practice","in":"query","name":"organization_type","schema":{"enum":["consultant","gp_practice","hospital","laboratory","legal","other","pharmacy","private_practice"],"type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/Organization"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `Organization` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The search is missing `name` and `postcode`, a value is too short, or `organization_type` is not a documented value.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["organization.search"]}],"summary":"Search Organizations","tags":["Organization"]}},"/v1/patients":{"get":{"operationId":"patients.list","parameters":[{"description":"Return only these Patients. Maximum 25 identifiers. Identifiers without an active PatientConnection to the Organization are omitted.","in":"query","name":"ids[]","schema":{"items":{"format":"uuid","type":"string"},"maxItems":25,"minItems":1,"type":"array"}},{"description":"Filter by an exact email address, case-insensitively.","in":"query","name":"email","schema":{"format":"email","type":"string"}},{"description":"Filter by an exact phone or mobile number. Use the international E.164 format where possible: a plus sign, the country calling code, and the national number with no spaces, for example `+447700900123`. A number without a `+` or `00` prefix is treated as a UK number.","in":"query","name":"phone_number","schema":{"type":"string"}},{"description":"Filter by an exact first name, case-insensitively.","example":"John","in":"query","name":"first_name","schema":{"type":"string"}},{"description":"Filter by an exact last name, case-insensitively.","example":"Smith","in":"query","name":"last_name","schema":{"type":"string"}},{"description":"Filter by an exact date of birth in ISO 8601 format (YYYY-MM-DD).","in":"query","name":"date_of_birth","schema":{"format":"date","type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/Patient"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `Patient` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A filter or pagination parameter is invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["patients.read"]}],"summary":"List Patients connected to the Organization","tags":["Patients"]},"post":{"description":"Creates and registers a Patient with the Organization. If the details match a connected Patient, returns that Patient without changing their record. A match elsewhere in Carebit returns a conflict for review. This endpoint allows 10 requests per access token per minute to limit automated searches for existing Patients.","operationId":"patients.create","parameters":[{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"date_of_birth":"1990-01-01","email":"alex.morgan@example.com","first_name":"Alex","last_name":"Morgan","mobile":"7700900123","mobile_country_dial_code":"GB","postcode":"SW1A 1AA","sex":"female"},"schema":{"additionalProperties":false,"properties":{"address_line_1":{"description":"The primary address line of the Patient.","type":["string","null"]},"address_line_2":{"description":"The secondary address line of the Patient.","type":["string","null"]},"city":{"description":"The city in the Patient's postal address.","type":["string","null"]},"country_code":{"description":"The uppercase ISO 3166-1 alpha-2 country code for the Patient's address.","pattern":"^[A-Z]{2}$","type":["string","null"]},"county":{"description":"The county or region in the Patient's postal address.","type":["string","null"]},"date_of_birth":{"description":"The Patient's date of birth in ISO 8601 format.","format":"date","type":["string","null"]},"email":{"description":"The Patient's email address.","format":"email","type":["string","null"]},"first_name":{"description":"The Patient's first name.","type":["string","null"]},"is_opted_out_of_sms":{"description":"Whether the Patient has opted out of SMS messages.","type":"boolean"},"last_name":{"description":"The Patient's last name.","type":["string","null"]},"mobile":{"description":"The national mobile number without its country calling code.","type":["string","null"]},"mobile_country_dial_code":{"description":"The country code used to derive the mobile calling code.","pattern":"^[A-Z]{2}$","type":["string","null"]},"phone":{"description":"The national phone number without its country calling code.","type":["string","null"]},"phone_country_dial_code":{"description":"The country code used to derive the phone calling code.","pattern":"^[A-Z]{2}$","type":["string","null"]},"postcode":{"description":"The Patient's postal code.","type":["string","null"]},"sex":{"description":"The Patient's recorded sex.","enum":["female","male","other",null],"type":["string","null"]},"title":{"description":"The Patient's personal title.","type":["string","null"]}},"required":["first_name","last_name","date_of_birth","sex","postcode"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Patient"}}},"description":"An existing Patient connected to the Organization matched the supplied demographics. No Patient data was overwritten.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Patient"}}},"description":"Patient created and registered with the Organization.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A matching Patient exists elsewhere in Carebit and requires review before connection, or another request currently holds the IdempotencyKey.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["patients.create"]}],"summary":"Create or find a Patient","tags":["Patients"]}},"/v1/patients/{id}":{"get":{"operationId":"patients.retrieve","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Patient"}}},"description":"The requested `Patient`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["patients.read"]}],"summary":"Get a Patient","tags":["Patients"]},"patch":{"operationId":"patients.update","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"mobile":"7700900123","mobile_country_dial_code":"GB"},"schema":{"additionalProperties":false,"properties":{"address_line_1":{"description":"The primary address line of the Patient.","type":["string","null"]},"address_line_2":{"description":"The secondary address line of the Patient.","type":["string","null"]},"city":{"description":"The city in the Patient's postal address.","type":["string","null"]},"country_code":{"description":"The uppercase ISO 3166-1 alpha-2 country code for the Patient's address.","pattern":"^[A-Z]{2}$","type":["string","null"]},"county":{"description":"The county or region in the Patient's postal address.","type":["string","null"]},"date_of_birth":{"description":"The Patient's date of birth in ISO 8601 format.","format":"date","type":["string","null"]},"email":{"description":"The Patient's email address.","format":"email","type":["string","null"]},"first_name":{"description":"The Patient's first name.","type":["string","null"]},"is_opted_out_of_sms":{"description":"Whether the Patient has opted out of SMS messages.","type":"boolean"},"last_name":{"description":"The Patient's last name.","type":["string","null"]},"mobile":{"description":"The national mobile number without its country calling code.","type":["string","null"]},"mobile_country_dial_code":{"description":"The country code used to derive the mobile calling code.","pattern":"^[A-Z]{2}$","type":["string","null"]},"phone":{"description":"The national phone number without its country calling code.","type":["string","null"]},"phone_country_dial_code":{"description":"The country code used to derive the phone calling code.","pattern":"^[A-Z]{2}$","type":["string","null"]},"postcode":{"description":"The Patient's postal code.","type":["string","null"]},"sex":{"description":"The Patient's recorded sex.","enum":["female","male","other",null],"type":["string","null"]},"title":{"description":"The Patient's personal title.","type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Patient"}}},"description":"The requested `Patient`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["patients.update"]}],"summary":"Update a Patient","tags":["Patients"]}},"/v1/patients/{patient_id}/connections":{"get":{"description":"Returns PatientConnections this Organization already has ResourcePermissions for. Locked connections, including a GP that has not been unlocked in Carebit, are omitted.","operationId":"patient_connections.list","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/PatientConnection"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `PatientConnection` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["patient_connections.read"]}],"summary":"List a Patient's unlocked PatientConnections","tags":["PatientConnections"]},"post":{"description":"Connects the Patient to an existing Organization, such as a GP practice. If the Patient is already connected, Carebit returns that PatientConnection and grants this Organization access. This endpoint does not create Organizations. Search with `GET /v1/organizations` first.","operationId":"patient_connections.create","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"organization_id":"00000000-0000-4000-8000-000000000018"},"schema":{"additionalProperties":false,"properties":{"clinician_id":{"description":"The Clinician at the target Organization. The Clinician must already belong to that Organization. Pass `null` on update to remove the Clinician.","format":"uuid","type":["string","null"]},"gp_status":{"description":"Whether this Organization has recorded a GP for the Patient.","enum":["none_or_omitted","has_gp","no_gp_required",null],"type":["string","null"]},"is_active":{"description":"Whether the PatientConnection is active. Defaults to `true` on create.","type":"boolean"},"organization_id":{"description":"The existing Organization to connect the Patient to. Required on create. This endpoint does not create Organizations.","format":"uuid","type":"string"},"payor_id":{"description":"The Patient's Payor this Organization should use as the default billing party. The Payor must belong to the Patient.","format":"uuid","type":"string"}},"required":["organization_id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientConnection"}}},"description":"The Patient was already connected to the Organization. Carebit returned the existing PatientConnection.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientConnection"}}},"description":"PatientConnection created.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The Patient, Organization, Clinician, or Payor was not found.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["patient_connections.create"]}],"summary":"Create a PatientConnection","tags":["PatientConnections"]}},"/v1/patients/{patient_id}/connections/{id}":{"get":{"operationId":"patient_connections.retrieve","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientConnection"}}},"description":"The requested `PatientConnection`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["patient_connections.read"]}],"summary":"Get an unlocked PatientConnection","tags":["PatientConnections"]},"patch":{"description":"Updates this Organization's PatientConnection for the Patient. Unlocked connections to other Organizations, such as a GP, can be listed and retrieved but not updated. Use `payor_id` to select the default billing party this Organization uses for the Patient. You cannot change `organization_id`; connect the Patient to a different Organization with POST instead.","operationId":"patient_connections.update","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"payor_id":"00000000-0000-4000-8000-00000000000e"},"schema":{"additionalProperties":false,"properties":{"clinician_id":{"description":"The Clinician at the target Organization. The Clinician must already belong to that Organization. Pass `null` to remove the Clinician.","format":"uuid","type":["string","null"]},"gp_status":{"description":"Whether this Organization has recorded a GP for the Patient.","enum":["none_or_omitted","has_gp","no_gp_required",null],"type":["string","null"]},"is_active":{"description":"Whether the PatientConnection is active.","type":"boolean"},"payor_id":{"description":"The Patient's Payor this Organization should use as the default billing party. The Payor must belong to the Patient.","format":"uuid","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientConnection"}}},"description":"The requested `PatientConnection`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["patient_connections.update"]}],"summary":"Update this Organization's PatientConnection","tags":["PatientConnections"]}},"/v1/patients/{patient_id}/payors":{"get":{"operationId":"payors.list","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/Payor"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `Payor` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["payors.read"]}],"summary":"List a Patient's Payors","tags":["Payors"]},"post":{"description":"Creates an insurance or alternative Payor. Provide exactly one of `insurance_company_id` or `alternative_payor_id`. Set `set_as_default_payor` to `true` to also select this Payor on this Organization's PatientConnection. Carebit creates a self-pay Payor automatically when it creates the Patient.","operationId":"payors.create","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"insurance_company_id":"00000000-0000-4000-8000-00000000000e","insurance_policy_number":"POLICY123","set_as_default_payor":true},"schema":{"additionalProperties":false,"properties":{"address_line_1":{"description":"The primary policyholder address line.","type":["string","null"]},"address_line_2":{"description":"The secondary policyholder address line.","type":["string","null"]},"alternative_payor_id":{"description":"The Organization-owned AlternativePayor responsible for payment.","format":"uuid","type":"string"},"city":{"description":"The city in the policyholder address.","type":["string","null"]},"country_code":{"description":"The uppercase ISO 3166-1 alpha-2 country code for the policyholder address.","pattern":"^[A-Z]{2}$","type":["string","null"]},"county":{"description":"The county or region in the policyholder address.","type":["string","null"]},"first_name":{"description":"The policyholder's first name override.","type":["string","null"]},"insurance_authorization_code":{"description":"The insurer authorization code.","type":["string","null"]},"insurance_company_id":{"description":"The active InsuranceCompany responsible for payment.","format":"uuid","type":"string"},"insurance_policy_end_date":{"description":"The insurance policy end date.","format":"date","type":["string","null"]},"insurance_policy_number":{"description":"The insurance policy or membership number.","type":["string","null"]},"insurance_policy_start_date":{"description":"The insurance policy start date.","format":"date","type":["string","null"]},"last_name":{"description":"The policyholder's last name override.","type":["string","null"]},"notes":{"description":"Additional billing or insurance information.","type":["string","null"]},"postcode":{"description":"The postal code in the policyholder address.","type":["string","null"]},"set_as_default_payor":{"description":"When `true` on create, Carebit also sets this Payor as the default billing party on this Organization's PatientConnection. Nested GP connections are not changed. Omit or pass `false` to leave the selected Payor unchanged.","type":"boolean"},"title":{"description":"The policyholder's personal title override.","type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payor"}}},"description":"The requested `Payor`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["payors.create"]}],"summary":"Create a Patient Payor","tags":["Payors"]}},"/v1/patients/{patient_id}/payors/{id}":{"get":{"operationId":"payors.retrieve","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payor"}}},"description":"The requested `Payor`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["payors.read"]}],"summary":"Get a Patient Payor","tags":["Payors"]},"patch":{"description":"Updates a Payor. To change its type, provide one non-null `insurance_company_id` or `alternative_payor_id`. Once set, the Payor type cannot be cleared.","operationId":"payors.update","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"insurance_authorization_code":"AUTH123"},"schema":{"additionalProperties":false,"properties":{"address_line_1":{"description":"The primary policyholder address line.","type":["string","null"]},"address_line_2":{"description":"The secondary policyholder address line.","type":["string","null"]},"alternative_payor_id":{"description":"The Organization-owned AlternativePayor responsible for payment.","format":"uuid","type":"string"},"city":{"description":"The city in the policyholder address.","type":["string","null"]},"country_code":{"description":"The uppercase ISO 3166-1 alpha-2 country code for the policyholder address.","pattern":"^[A-Z]{2}$","type":["string","null"]},"county":{"description":"The county or region in the policyholder address.","type":["string","null"]},"first_name":{"description":"The policyholder's first name override.","type":["string","null"]},"insurance_authorization_code":{"description":"The insurer authorization code.","type":["string","null"]},"insurance_company_id":{"description":"The active InsuranceCompany responsible for payment.","format":"uuid","type":"string"},"insurance_policy_end_date":{"description":"The insurance policy end date.","format":"date","type":["string","null"]},"insurance_policy_number":{"description":"The insurance policy or membership number.","type":["string","null"]},"insurance_policy_start_date":{"description":"The insurance policy start date.","format":"date","type":["string","null"]},"last_name":{"description":"The policyholder's last name override.","type":["string","null"]},"notes":{"description":"Additional billing or insurance information.","type":["string","null"]},"postcode":{"description":"The postal code in the policyholder address.","type":["string","null"]},"title":{"description":"The policyholder's personal title override.","type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payor"}}},"description":"The requested `Payor`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["payors.update"]}],"summary":"Update a Patient Payor","tags":["Payors"]}},"/v1/payments":{"get":{"description":"Returns Payments in the authenticated Organization. Filter optionally by `patient_id` and by a `paid_at` window. Each Payment includes `invoice_id`, `patient_id`, and nested `refunds`.","operationId":"payments.list","parameters":[{"description":"Filter by a Patient with an active connection to the Organization.","in":"query","name":"patient_id","schema":{"format":"uuid","type":"string"}},{"description":"Inclusive lower bound for `paid_at` in UTC ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). Payments with a null `paid_at` are omitted when this filter is set.","in":"query","name":"paid_at_from","schema":{"format":"date-time","type":"string"}},{"description":"Inclusive upper bound for `paid_at` in UTC ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). Payments with a null `paid_at` are omitted when this filter is set.","in":"query","name":"paid_at_to","schema":{"format":"date-time","type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/Payment"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `Payment` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A time filter or pagination parameter is invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The Patient was not found in the Organization.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["payments.read"]}],"summary":"List Payments","tags":["Payments"]}},"/v1/remote_file_import_batches/{id}":{"get":{"description":"Requires the write scope for the batch's resource type: `letters.create`, `test_results.create`, or `notes.create`. A request with the wrong scope returns `404` without revealing whether the batch exists.","operationId":"remote_file_import_batches.retrieve","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteFileImportBatch"}}},"description":"The requested `RemoteFileImportBatch`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is disabled or the project cannot access this endpoint.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The batch does not exist for your Organization, or your access token lacks the write scope for the batch's resource type.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"summary":"Get a remote file import batch","tags":["RemoteFileImportBatches"]}},"/v1/reports":{"post":{"description":"Queues an asynchronous report and returns an ExpirableFile. Poll that ExpirableFile or subscribe to `expirable_file.available`.","operationId":"reports.create","parameters":[{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"clinician_id":"00000000-0000-4000-8000-000000000002","end_time":"2026-01-31T23:59:59Z","report_type":"bookings","start_time":"2026-01-01T00:00:00Z"},"schema":{"additionalProperties":false,"properties":{"age_range":{"description":"The optional Patient age range used by supported reports.","enum":["under_18","over_18",null],"type":["string","null"]},"clinician_id":{"description":"The optional Clinician used to restrict supported reports.","format":"uuid","type":["string","null"]},"end_time":{"description":"The inclusive end of the reporting period.","format":"date-time","type":"string"},"report_type":{"description":"The type of report to create.","enum":["account_balances","audio_recordings","billing_codes","booked_services","bookings","bookings_summary_for_child_organizations","bookings_with_invoices","bookings_without_invoices","care_episodes","cari_credits_usage","credit_notes","creditors","debtors","debtors_per_invoice","end_of_year_accounts_zip","expenses","financial_summary","indemnity_bookings","indemnity_income","invoice_line_items","issued_invoices","issued_invoices_summary_for_child_organizations","leads_and_enquiries","patient_referrals","patient_registrations","prescriptions_report","product_sales_audit_log","product_sales_report","product_stock_levels_report","profit_and_loss","recall_bookings","received_payments","received_payments_for_invoice_line_items","received_payments_summary_for_child_organizations","referral_summary","refunds","remittance_adjustments","service_variants","tasks_due_per_staff_member","tasks_raised"],"type":"string"},"start_time":{"description":"The inclusive start of the reporting period.","format":"date-time","type":"string"},"time_range_query_column":{"description":"The optional date field used by supported Booking, Expense, and Invoice reports.","enum":["bookings.created_at","bookings.start_time","expenses.created_at","expenses.paid_at","invoices.created_at","invoices.supply_date",null],"type":["string","null"]}},"required":["report_type","start_time","end_time"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpirableFile"}}},"description":"The report was accepted for processing.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A required parameter is missing or invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The supplied Clinician was not found in the authenticated Organization.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["reports.create"]}],"summary":"Create a report","tags":["Reports"]}},"/v1/services":{"get":{"operationId":"services.list","parameters":[{"description":"Only return Services that patients can book online.","in":"query","name":"is_bookable_online","required":false,"schema":{"type":"boolean"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/Service"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `Service` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A filter or pagination parameter is invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["services.read"]}],"summary":"List the Organization's Services","tags":["Services"]}},"/v1/services/{id}":{"get":{"operationId":"services.retrieve","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Service"}}},"description":"The requested `Service`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["services.read"]}],"summary":"Get a Service","tags":["Services"]}},"/v1/staff_members":{"get":{"description":"Returns confirmed StaffMembers who have an enabled access profile for the authenticated Organization. Results are ordered by first name, then last name. Use these identifiers as HumanTask `assignees`.","operationId":"staff_members.list","parameters":[{"description":"Filter by an exact first name, case-insensitively.","example":"John","in":"query","name":"first_name","schema":{"type":"string"}},{"description":"Filter by an exact last name, case-insensitively.","example":"Smith","in":"query","name":"last_name","schema":{"type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/StaffMember"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `StaffMember` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A pagination parameter is invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["staff_members.read"]}],"summary":"List the Organization's StaffMembers","tags":["StaffMembers"]}},"/v1/staff_members/{id}":{"get":{"description":"Returns one confirmed StaffMember who has an enabled access profile for the authenticated Organization.","operationId":"staff_members.retrieve","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffMember"}}},"description":"The requested `StaffMember`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["staff_members.read"]}],"summary":"Get a StaffMember","tags":["StaffMembers"]}},"/v1/test_result_batches":{"post":{"description":"Returns `201` when every TestResult is created immediately. Returns `202` when at least one item includes `file_url` or `file_base64`; poll `remote_file_import_batch` for each file's import status. Both responses use `TestResultBatchResponse`.","operationId":"test_result_batches.create","parameters":[{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"items":[{"automatically_create_resource_permission_for_patient":true,"notify_patient_of_resource_permission":true,"patient_id":"00000000-0000-4000-8000-000000000004","status":"complete","test_result_items":[{"observation_name":"Haemoglobin","observation_value":14.5,"observation_value_units":"g/dL","status":"final"}],"title":"Full blood count"}]},"schema":{"additionalProperties":false,"properties":{"items":{"description":"The test results to create. Items are processed in their submitted order.","items":{"$ref":"#/components/schemas/TestResultWrite"},"maxItems":100,"minItems":1,"type":"array"}},"required":["items"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestResultBatchResponse"}}},"description":"Every TestResult was created immediately.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestResultBatchResponse"}}},"description":"At least one file is being imported. Poll `remote_file_import_batch` for each item's status.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` header is missing (`idempotency_key_required`) or exceeds 255 characters (`idempotency_key_too_long`).","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["test_results.create"]}],"summary":"Create up to 100 Test Results in one request","tags":["TestResults"]}},"/v1/test_results":{"get":{"operationId":"test_results.list","parameters":[{"in":"query","name":"patient_id","schema":{"format":"uuid","type":"string"}},{"in":"query","name":"booking_id","schema":{"format":"uuid","type":"string"}},{"in":"query","name":"status","schema":{"enum":["awaiting_proofreading","awaiting_receipt","awaiting_review","awaiting_sending","awaiting_typing","complete","draft","reviewed"],"type":"string"}},{"in":"query","name":"created_since","schema":{"format":"date-time","type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/TestResult"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `TestResult` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A filter or pagination parameter is invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["test_results.read"]}],"summary":"List Test Results","tags":["TestResults"]},"post":{"description":"Returns the created TestResult with status `201`. If you provide `file_url` or `file_base64`, the response also identifies a remote file import batch. Poll that batch for the file's import status.","operationId":"test_results.create","parameters":[{"description":"Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an `Idempotency-Replayed: true` header. Same key + different body returns `422 idempotency_key_reused`. A duplicate that arrives while the first request is still in flight returns `409 idempotency_conflict` with `Retry-After: 1`.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"automatically_create_resource_permission_for_patient":true,"notify_patient_of_resource_permission":true,"patient_id":"00000000-0000-4000-8000-000000000004","status":"complete","test_result_items":[{"is_abnormal":false,"observation_code":"718-7","observation_name":"Haemoglobin","observation_value":14.5,"observation_value_units":"g/dL","reference_range_lower_bound":12,"reference_range_upper_bound":16,"status":"final"}],"title":"Full blood count"},"schema":{"additionalProperties":false,"not":{"required":["file_url","file_base64"]},"properties":{"automatically_create_resource_permission_for_patient":{"description":"Whether Carebit should automatically share the test result with the patient after processing.","type":"boolean"},"booking_id":{"description":"The identifier of the booking associated with the test result, or null when it is not linked to a booking.","format":"uuid","type":["string","null"]},"clinician_id":{"description":"The identifier of the clinician associated with the test result, or null when none is assigned.","format":"uuid","type":["string","null"]},"description":{"description":"A description of the TestResult.","type":["string","null"]},"file_base64":{"description":"The test result bytes encoded as Base64. Provide this with `filename` instead of `file_url`. The decoded file can be at most 7 MB.","format":"byte","maxLength":9786712,"type":["string","null"],"writeOnly":true},"file_url":{"description":"The public HTTPS URL of a test result document that Carebit should download.","format":"uri","type":["string","null"]},"filename":{"description":"The filename to use for the test result. Required with `file_base64`; defaults to the remote file's filename for URL sources.","type":["string","null"]},"notify_patient_of_resource_permission":{"description":"Whether Carebit should notify the patient when the test result is shared with them.","type":"boolean"},"patient_id":{"description":"The identifier of the patient that the test result belongs to.","format":"uuid","type":"string"},"status":{"description":"The workflow status to assign to the test result.","enum":["awaiting_review","complete","draft","reviewed"],"type":"string"},"test_result_items":{"description":"The structured clinical observations to include in the test result.","items":{"$ref":"#/components/schemas/TestResultItemWrite"},"maxItems":100,"type":"array"},"title":{"description":"The display title of the test result.","type":"string"}},"required":["patient_id","title","status","automatically_create_resource_permission_for_patient","notify_patient_of_resource_permission"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestResult"}}},"description":"The requested `TestResult`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Idempotency-Replayed":{"description":"Set to `true` when the response replays the result of an earlier identical request.","schema":{"const":"true","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The request contains more test result items than the per-request limit permits.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"A concurrent request holds the idempotency lease (`idempotency_conflict`). Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `1` while another request uses the same idempotency key.","schema":{"const":1,"type":"integer"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The `Idempotency-Key` was previously used with a different request body (`idempotency_key_reused`), or the request body failed validation.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["test_results.create"]}],"summary":"Create a Test Result","tags":["TestResults"]}},"/v1/test_results/{id}":{"get":{"operationId":"test_results.retrieve","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestResult"}}},"description":"The requested `TestResult`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["test_results.read"]}],"summary":"Get a Test Result","tags":["TestResults"]}},"/v1/token":{"get":{"description":"Returns the current access token, the Organization and project it belongs to, and the granted scopes. Any valid access token can call this endpoint. It does not require `organization.read`. The response does not include the token secret.","operationId":"oauth.retrieve","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}},"description":"The requested `Token`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The project is disabled or archived, or the Organization does not have the developer_platform entitlement.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"summary":"Get the access token used on this request","tags":["OAuth"]}},"/v1/transmissions":{"get":{"description":"Returns the email delivery log for allowlisted resources. At least one of `patient_id` or `resource_type` must be supplied. When both are supplied, a Transmission must match both filters. Currently `resource_type` accepts only `digital_form_response`. Omitting `resource_type` still returns only those allowlisted types.","operationId":"transmissions.list","parameters":[{"description":"Filter by a Patient with an active connection to the Organization.","in":"query","name":"patient_id","schema":{"format":"uuid","type":"string"}},{"description":"The type of resource whose Transmissions should be returned. Currently only `digital_form_response` is supported.","in":"query","name":"resource_type","schema":{"enum":["digital_form_response"],"type":"string"}},{"description":"The maximum number of items to return. Defaults to `25`; the maximum is `100`.","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Return items after this resource ID. You cannot use this with `cursor`.","in":"query","name":"starting_after","required":false,"schema":{"format":"uuid","type":"string"}},{"description":"The `next_cursor` value from the previous page. You cannot use this with `starting_after`.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEnvelope"},{"properties":{"data":{"items":{"$ref":"#/components/schemas/Transmission"},"type":"array"}},"type":"object"}]}}},"description":"Paginated list of `Transmission` objects.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Neither `patient_id` nor `resource_type` was supplied, `resource_type` is not allowlisted, or a pagination parameter is invalid.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token is missing, invalid, expired, or revoked.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The access token lacks the required scope, or the project is disabled.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error response.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Too many requests. Retry after the delay indicated by `Retry-After`.","headers":{"Carebit-Developer-Platform-API-Request-Id":{"description":"A unique request identifier. Include it when contacting Carebit support.","schema":{"format":"uuid","type":"string"}},"Retry-After":{"description":"The number of seconds to wait before retrying. Always `60` for rate-limit responses.","schema":{"const":60,"type":"integer"}}}}},"security":[{"OAuth2":["transmissions.read"]}],"summary":"List Transmissions","tags":["Transmissions"]}}},"security":[{"OAuth2":[]}],"servers":[{"description":"Production","url":"https://api.carebit.co"}],"tags":[{"description":"Create, inspect, and revoke OAuth 2.0 access tokens.","name":"OAuth"},{"description":"The Organization connected to the access token.","name":"Organization"},{"description":"The Services offered by the Organization and the ServiceVariants that can be booked.","name":"Services"},{"description":"Clinicians enabled in the Organization.","name":"Clinicians"},{"description":"Find slots that a Clinician can be booked into.","name":"AvailabilitySlots"},{"description":"Set when Clinicians can and cannot be booked, including repeating schedules.","name":"AvailabilityPeriods"},{"description":"A Clinician's diary, including Bookings, availability, and unavailability.","name":"Agenda"},{"description":"Locations where Bookings can take place.","name":"Locations"},{"description":"Patients with an active connection to the Organization.","name":"Patients"},{"description":"Unlocked registrations between a Patient and an Organization, including GP practices.","name":"PatientConnections"},{"description":"The people and organizations responsible for a Patient's charges.","name":"Payors"},{"description":"Appointments booked for Patients.","name":"Bookings"},{"description":"Forms and consent requests that Patients can complete.","name":"DigitalForms"},{"description":"Patient responses to DigitalForms.","name":"DigitalFormResponses"},{"description":"Temporary files created by asynchronous API requests.","name":"ExpirableFiles"},{"description":"Invoices associated with Bookings and Patients.","name":"Invoices"},{"description":"Payments collected for Invoices and Patients.","name":"Payments"},{"description":"Patient inquiries and referrals received by the Organization.","name":"Leads"},{"description":"Lists and the Patients who belong to them.","name":"Lists"},{"description":"Free-form Notes attached to Patients and Bookings.","name":"Notes"},{"description":"Reports created asynchronously by Carebit.","name":"Reports"},{"description":"Staff members in the Organization who can be assigned HumanTasks.","name":"StaffMembers"},{"description":"Work assigned to staff members.","name":"HumanTasks"},{"description":"Letters written or received on behalf of a Patient.","name":"Letters"},{"description":"Structured or file-based Test Results.","name":"TestResults"},{"description":"Delivery logs for DigitalForms sent to Patients.","name":"Transmissions"},{"description":"The progress of files being imported in the background.","name":"RemoteFileImportBatches"},{"description":"Events sent to your HTTPS endpoints.","name":"Webhooks"}],"webhooks":{"booking.arrived":{"post":{"operationId":"webhook.booking.arrived","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"canceled_at":null,"cancellation_information":null,"cancellation_reason":null,"cancellation_source":null,"clinician":{"created_at":"2026-01-01T09:00:00Z","display_name":"Dr Ada Lovelace","email":"ada.lovelace@example.invalid","first_name":"Ada","id":"00000000-0000-4000-8000-000000000002","last_name":"Lovelace","links":{"bookings":"https://api.carebit.co/v1/bookings?clinician_id=00000000-0000-4000-8000-000000000002"},"medical_specialty":"General Medicine","object":"clinician","title":"Dr","updated_at":"2026-01-01T09:00:00Z"},"created_at":"2026-01-01T09:00:00Z","end_time":"2026-01-01T10:30:00Z","id":"00000000-0000-4000-8000-000000000001","information_for_patient":"This is a test booking. Please ignore.","information_for_staff_members":"This is a test booking.","is_remote":false,"links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","invoices":"https://api.carebit.co/v1/invoices?booking_id=00000000-0000-4000-8000-000000000001","letters":"https://api.carebit.co/v1/letters?booking_id=00000000-0000-4000-8000-000000000001","notes":"https://api.carebit.co/v1/notes?booking_id=00000000-0000-4000-8000-000000000001","service":"https://api.carebit.co/v1/services/00000000-0000-4000-8000-000000000005","test_results":"https://api.carebit.co/v1/test_results?booking_id=00000000-0000-4000-8000-000000000001"},"location":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","formatted_address":"1 Test Street, Test City, GB, TE1 1ST","id":"00000000-0000-4000-8000-000000000003","name":"Test Location","object":"location","postcode":"TE1 1ST","updated_at":"2026-01-01T09:00:00Z"},"object":"booking","patient":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","creation_source":"api","date_of_birth":"1970-01-01","display_name":"Ms Test Patient","email":"test.patient@example.invalid","first_name":"Test","id":"00000000-0000-4000-8000-000000000004","is_opted_out_of_sms":false,"last_name":"Patient","mobile":"7700900123","mobile_country_dial_code":"GB","nhs_number":"9990000000","object":"patient","phone":"1234567890","phone_country_dial_code":"GB","phone_number":"+441234567890","postcode":"TE1 1ST","sex":"female","title":"Ms","updated_at":"2026-01-01T09:00:00Z"},"payor":null,"recall_due_date":null,"remote_method":null,"service":{"created_at":"2026-01-01T09:00:00Z","description":"Test consultation service.","duration_minutes":30,"id":"00000000-0000-4000-8000-000000000005","is_bookable_online":true,"name":"Test consultation","object":"service","service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"tax_rate":null,"updated_at":"2026-01-01T09:00:00Z"},"service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"start_time":"2026-01-01T10:00:00Z","status":"arrived","updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"booking.arrived"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/Booking"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"booking.arrived"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"A Patient arrived for a Booking.","tags":["Webhooks"]}},"booking.canceled":{"post":{"operationId":"webhook.booking.canceled","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"canceled_at":"2026-01-01T09:00:00Z","cancellation_information":null,"cancellation_reason":"booked_in_error","cancellation_source":"api","clinician":{"created_at":"2026-01-01T09:00:00Z","display_name":"Dr Ada Lovelace","email":"ada.lovelace@example.invalid","first_name":"Ada","id":"00000000-0000-4000-8000-000000000002","last_name":"Lovelace","links":{"bookings":"https://api.carebit.co/v1/bookings?clinician_id=00000000-0000-4000-8000-000000000002"},"medical_specialty":"General Medicine","object":"clinician","title":"Dr","updated_at":"2026-01-01T09:00:00Z"},"created_at":"2026-01-01T09:00:00Z","end_time":"2026-01-01T10:30:00Z","id":"00000000-0000-4000-8000-000000000001","information_for_patient":"This is a test booking. Please ignore.","information_for_staff_members":"This is a test booking.","is_remote":false,"links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","invoices":"https://api.carebit.co/v1/invoices?booking_id=00000000-0000-4000-8000-000000000001","letters":"https://api.carebit.co/v1/letters?booking_id=00000000-0000-4000-8000-000000000001","notes":"https://api.carebit.co/v1/notes?booking_id=00000000-0000-4000-8000-000000000001","service":"https://api.carebit.co/v1/services/00000000-0000-4000-8000-000000000005","test_results":"https://api.carebit.co/v1/test_results?booking_id=00000000-0000-4000-8000-000000000001"},"location":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","formatted_address":"1 Test Street, Test City, GB, TE1 1ST","id":"00000000-0000-4000-8000-000000000003","name":"Test Location","object":"location","postcode":"TE1 1ST","updated_at":"2026-01-01T09:00:00Z"},"object":"booking","patient":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","creation_source":"api","date_of_birth":"1970-01-01","display_name":"Ms Test Patient","email":"test.patient@example.invalid","first_name":"Test","id":"00000000-0000-4000-8000-000000000004","is_opted_out_of_sms":false,"last_name":"Patient","mobile":"7700900123","mobile_country_dial_code":"GB","nhs_number":"9990000000","object":"patient","phone":"1234567890","phone_country_dial_code":"GB","phone_number":"+441234567890","postcode":"TE1 1ST","sex":"female","title":"Ms","updated_at":"2026-01-01T09:00:00Z"},"payor":null,"recall_due_date":null,"remote_method":null,"service":{"created_at":"2026-01-01T09:00:00Z","description":"Test consultation service.","duration_minutes":30,"id":"00000000-0000-4000-8000-000000000005","is_bookable_online":true,"name":"Test consultation","object":"service","service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"tax_rate":null,"updated_at":"2026-01-01T09:00:00Z"},"service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"start_time":"2026-01-01T10:00:00Z","status":"canceled","updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"booking.canceled"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/Booking"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"booking.canceled"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"A Booking was canceled.","tags":["Webhooks"]}},"booking.confirmed":{"post":{"operationId":"webhook.booking.confirmed","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"canceled_at":null,"cancellation_information":null,"cancellation_reason":null,"cancellation_source":null,"clinician":{"created_at":"2026-01-01T09:00:00Z","display_name":"Dr Ada Lovelace","email":"ada.lovelace@example.invalid","first_name":"Ada","id":"00000000-0000-4000-8000-000000000002","last_name":"Lovelace","links":{"bookings":"https://api.carebit.co/v1/bookings?clinician_id=00000000-0000-4000-8000-000000000002"},"medical_specialty":"General Medicine","object":"clinician","title":"Dr","updated_at":"2026-01-01T09:00:00Z"},"created_at":"2026-01-01T09:00:00Z","end_time":"2026-01-01T10:30:00Z","id":"00000000-0000-4000-8000-000000000001","information_for_patient":"This is a test booking. Please ignore.","information_for_staff_members":"This is a test booking.","is_remote":false,"links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","invoices":"https://api.carebit.co/v1/invoices?booking_id=00000000-0000-4000-8000-000000000001","letters":"https://api.carebit.co/v1/letters?booking_id=00000000-0000-4000-8000-000000000001","notes":"https://api.carebit.co/v1/notes?booking_id=00000000-0000-4000-8000-000000000001","service":"https://api.carebit.co/v1/services/00000000-0000-4000-8000-000000000005","test_results":"https://api.carebit.co/v1/test_results?booking_id=00000000-0000-4000-8000-000000000001"},"location":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","formatted_address":"1 Test Street, Test City, GB, TE1 1ST","id":"00000000-0000-4000-8000-000000000003","name":"Test Location","object":"location","postcode":"TE1 1ST","updated_at":"2026-01-01T09:00:00Z"},"object":"booking","patient":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","creation_source":"api","date_of_birth":"1970-01-01","display_name":"Ms Test Patient","email":"test.patient@example.invalid","first_name":"Test","id":"00000000-0000-4000-8000-000000000004","is_opted_out_of_sms":false,"last_name":"Patient","mobile":"7700900123","mobile_country_dial_code":"GB","nhs_number":"9990000000","object":"patient","phone":"1234567890","phone_country_dial_code":"GB","phone_number":"+441234567890","postcode":"TE1 1ST","sex":"female","title":"Ms","updated_at":"2026-01-01T09:00:00Z"},"payor":null,"recall_due_date":null,"remote_method":null,"service":{"created_at":"2026-01-01T09:00:00Z","description":"Test consultation service.","duration_minutes":30,"id":"00000000-0000-4000-8000-000000000005","is_bookable_online":true,"name":"Test consultation","object":"service","service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"tax_rate":null,"updated_at":"2026-01-01T09:00:00Z"},"service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"start_time":"2026-01-01T10:00:00Z","status":"confirmed","updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"booking.confirmed"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/Booking"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"booking.confirmed"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"A Booking was confirmed.","tags":["Webhooks"]}},"booking.did_not_attend":{"post":{"operationId":"webhook.booking.did_not_attend","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"canceled_at":null,"cancellation_information":null,"cancellation_reason":null,"cancellation_source":null,"clinician":{"created_at":"2026-01-01T09:00:00Z","display_name":"Dr Ada Lovelace","email":"ada.lovelace@example.invalid","first_name":"Ada","id":"00000000-0000-4000-8000-000000000002","last_name":"Lovelace","links":{"bookings":"https://api.carebit.co/v1/bookings?clinician_id=00000000-0000-4000-8000-000000000002"},"medical_specialty":"General Medicine","object":"clinician","title":"Dr","updated_at":"2026-01-01T09:00:00Z"},"created_at":"2026-01-01T09:00:00Z","end_time":"2026-01-01T08:30:00Z","id":"00000000-0000-4000-8000-000000000001","information_for_patient":"This is a test booking. Please ignore.","information_for_staff_members":"This is a test booking.","is_remote":false,"links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","invoices":"https://api.carebit.co/v1/invoices?booking_id=00000000-0000-4000-8000-000000000001","letters":"https://api.carebit.co/v1/letters?booking_id=00000000-0000-4000-8000-000000000001","notes":"https://api.carebit.co/v1/notes?booking_id=00000000-0000-4000-8000-000000000001","service":"https://api.carebit.co/v1/services/00000000-0000-4000-8000-000000000005","test_results":"https://api.carebit.co/v1/test_results?booking_id=00000000-0000-4000-8000-000000000001"},"location":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","formatted_address":"1 Test Street, Test City, GB, TE1 1ST","id":"00000000-0000-4000-8000-000000000003","name":"Test Location","object":"location","postcode":"TE1 1ST","updated_at":"2026-01-01T09:00:00Z"},"object":"booking","patient":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","creation_source":"api","date_of_birth":"1970-01-01","display_name":"Ms Test Patient","email":"test.patient@example.invalid","first_name":"Test","id":"00000000-0000-4000-8000-000000000004","is_opted_out_of_sms":false,"last_name":"Patient","mobile":"7700900123","mobile_country_dial_code":"GB","nhs_number":"9990000000","object":"patient","phone":"1234567890","phone_country_dial_code":"GB","phone_number":"+441234567890","postcode":"TE1 1ST","sex":"female","title":"Ms","updated_at":"2026-01-01T09:00:00Z"},"payor":null,"recall_due_date":null,"remote_method":null,"service":{"created_at":"2026-01-01T09:00:00Z","description":"Test consultation service.","duration_minutes":30,"id":"00000000-0000-4000-8000-000000000005","is_bookable_online":true,"name":"Test consultation","object":"service","service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"tax_rate":null,"updated_at":"2026-01-01T09:00:00Z"},"service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"start_time":"2026-01-01T08:00:00Z","status":"did_not_attend","updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"booking.did_not_attend"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/Booking"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"booking.did_not_attend"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"A Booking was marked as did not attend.","tags":["Webhooks"]}},"booking.end_time_reached":{"post":{"operationId":"webhook.booking.end_time_reached","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"canceled_at":null,"cancellation_information":null,"cancellation_reason":null,"cancellation_source":null,"clinician":{"created_at":"2026-01-01T09:00:00Z","display_name":"Dr Ada Lovelace","email":"ada.lovelace@example.invalid","first_name":"Ada","id":"00000000-0000-4000-8000-000000000002","last_name":"Lovelace","links":{"bookings":"https://api.carebit.co/v1/bookings?clinician_id=00000000-0000-4000-8000-000000000002"},"medical_specialty":"General Medicine","object":"clinician","title":"Dr","updated_at":"2026-01-01T09:00:00Z"},"created_at":"2026-01-01T09:00:00Z","end_time":"2026-01-01T10:30:00Z","id":"00000000-0000-4000-8000-000000000001","information_for_patient":"This is a test booking. Please ignore.","information_for_staff_members":"This is a test booking.","is_remote":false,"links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","invoices":"https://api.carebit.co/v1/invoices?booking_id=00000000-0000-4000-8000-000000000001","letters":"https://api.carebit.co/v1/letters?booking_id=00000000-0000-4000-8000-000000000001","notes":"https://api.carebit.co/v1/notes?booking_id=00000000-0000-4000-8000-000000000001","service":"https://api.carebit.co/v1/services/00000000-0000-4000-8000-000000000005","test_results":"https://api.carebit.co/v1/test_results?booking_id=00000000-0000-4000-8000-000000000001"},"location":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","formatted_address":"1 Test Street, Test City, GB, TE1 1ST","id":"00000000-0000-4000-8000-000000000003","name":"Test Location","object":"location","postcode":"TE1 1ST","updated_at":"2026-01-01T09:00:00Z"},"object":"booking","patient":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","creation_source":"api","date_of_birth":"1970-01-01","display_name":"Ms Test Patient","email":"test.patient@example.invalid","first_name":"Test","id":"00000000-0000-4000-8000-000000000004","is_opted_out_of_sms":false,"last_name":"Patient","mobile":"7700900123","mobile_country_dial_code":"GB","nhs_number":"9990000000","object":"patient","phone":"1234567890","phone_country_dial_code":"GB","phone_number":"+441234567890","postcode":"TE1 1ST","sex":"female","title":"Ms","updated_at":"2026-01-01T09:00:00Z"},"payor":null,"recall_due_date":null,"remote_method":null,"service":{"created_at":"2026-01-01T09:00:00Z","description":"Test consultation service.","duration_minutes":30,"id":"00000000-0000-4000-8000-000000000005","is_bookable_online":true,"name":"Test consultation","object":"service","service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"tax_rate":null,"updated_at":"2026-01-01T09:00:00Z"},"service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"start_time":"2026-01-01T10:00:00Z","status":"confirmed","updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"booking.end_time_reached"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/Booking"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"booking.end_time_reached"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"A Booking reached its scheduled end time.","tags":["Webhooks"]}},"booking.updated":{"post":{"operationId":"webhook.booking.updated","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"canceled_at":null,"cancellation_information":null,"cancellation_reason":null,"cancellation_source":null,"clinician":{"created_at":"2026-01-01T09:00:00Z","display_name":"Dr Ada Lovelace","email":"ada.lovelace@example.invalid","first_name":"Ada","id":"00000000-0000-4000-8000-000000000002","last_name":"Lovelace","links":{"bookings":"https://api.carebit.co/v1/bookings?clinician_id=00000000-0000-4000-8000-000000000002"},"medical_specialty":"General Medicine","object":"clinician","title":"Dr","updated_at":"2026-01-01T09:00:00Z"},"created_at":"2026-01-01T09:00:00Z","end_time":"2026-01-01T10:30:00Z","id":"00000000-0000-4000-8000-000000000001","information_for_patient":"This is a test booking. Please ignore.","information_for_staff_members":"This is a test booking.","is_remote":false,"links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","invoices":"https://api.carebit.co/v1/invoices?booking_id=00000000-0000-4000-8000-000000000001","letters":"https://api.carebit.co/v1/letters?booking_id=00000000-0000-4000-8000-000000000001","notes":"https://api.carebit.co/v1/notes?booking_id=00000000-0000-4000-8000-000000000001","service":"https://api.carebit.co/v1/services/00000000-0000-4000-8000-000000000005","test_results":"https://api.carebit.co/v1/test_results?booking_id=00000000-0000-4000-8000-000000000001"},"location":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","formatted_address":"1 Test Street, Test City, GB, TE1 1ST","id":"00000000-0000-4000-8000-000000000003","name":"Test Location","object":"location","postcode":"TE1 1ST","updated_at":"2026-01-01T09:00:00Z"},"object":"booking","patient":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","creation_source":"api","date_of_birth":"1970-01-01","display_name":"Ms Test Patient","email":"test.patient@example.invalid","first_name":"Test","id":"00000000-0000-4000-8000-000000000004","is_opted_out_of_sms":false,"last_name":"Patient","mobile":"7700900123","mobile_country_dial_code":"GB","nhs_number":"9990000000","object":"patient","phone":"1234567890","phone_country_dial_code":"GB","phone_number":"+441234567890","postcode":"TE1 1ST","sex":"female","title":"Ms","updated_at":"2026-01-01T09:00:00Z"},"payor":null,"recall_due_date":null,"remote_method":null,"service":{"created_at":"2026-01-01T09:00:00Z","description":"Test consultation service.","duration_minutes":30,"id":"00000000-0000-4000-8000-000000000005","is_bookable_online":true,"name":"Test consultation","object":"service","service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"tax_rate":null,"updated_at":"2026-01-01T09:00:00Z"},"service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"start_time":"2026-01-01T10:00:00Z","status":"confirmed","updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"booking.updated"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/Booking"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"booking.updated"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"A Booking's schedule, service, or metadata changed.","tags":["Webhooks"]}},"digital_form_response.completed":{"post":{"operationId":"webhook.digital_form_response.completed","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"answers":[{"attachment_url":null,"date_value":null,"digital_form_question":{"choices":[{"id":"00000000-0000-4000-8000-000000000023","numerical_value":1,"text_value":"yes","title":"Yes"}],"help_text":"Select every option that applies.","id":"00000000-0000-4000-8000-000000000022","is_answer_required":true,"list_order_number":1,"question_type":"single_choice_input","title":"Do you consent to the procedure?"},"digital_form_question_choice_id":"00000000-0000-4000-8000-000000000023","digital_form_question_id":"00000000-0000-4000-8000-000000000022","has_consented":null,"id":"00000000-0000-4000-8000-000000000024","numerical_value":1,"text_value":"Yes"}],"booking_id":"00000000-0000-4000-8000-000000000001","completed_at":"2026-01-01T09:00:00Z","created_at":"2026-01-01T09:00:00Z","digital_form":{"attachment_url":null,"created_at":"2026-01-01T09:00:00Z","id":"00000000-0000-4000-8000-000000000020","object":"digital_form","patient_instructions":"Please complete this consent form.","questions":[{"choices":[{"id":"00000000-0000-4000-8000-000000000023","numerical_value":1,"text_value":"yes","title":"Yes"}],"help_text":"Select every option that applies.","id":"00000000-0000-4000-8000-000000000022","is_answer_required":true,"list_order_number":1,"question_type":"single_choice_input","title":"Do you consent to the procedure?"}],"title":"Pre-operative consent","updated_at":"2026-01-01T09:00:00Z"},"due_at":"2026-01-01T08:30:00Z","id":"00000000-0000-4000-8000-000000000021","links":{"patient":"https://api.carebit.co/v1/patients/00000000-0000-4000-8000-000000000004","transmissions":"https://api.carebit.co/v1/transmissions?patient_id=00000000-0000-4000-8000-000000000004&resource_type=digital_form_response"},"object":"digital_form_response","patient_id":"00000000-0000-4000-8000-000000000004","status":"completed","total_score":0,"updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"digital_form_response.completed"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/DigitalFormResponse"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"digital_form_response.completed"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"A Patient completed a DigitalFormResponse.","tags":["Webhooks"]}},"expirable_file.available":{"post":{"operationId":"webhook.expirable_file.available","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"attachment_url":"https://files.example.invalid/reports/bookings.csv?signature=test","created_at":"2026-01-01T09:00:00Z","expires_at":"2026-01-02T09:00:00Z","id":"00000000-0000-4000-8000-000000000019","object":"expirable_file","status":"succeeded","title":"bookings","updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"expirable_file.available"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/ExpirableFile"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"expirable_file.available"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"An ExpirableFile is available to download.","tags":["Webhooks"]}},"lead.converted_to_patient":{"post":{"operationId":"webhook.lead.converted_to_patient","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"address_line_1":"1 Test Street","address_line_2":null,"attachments":[],"city":"Test City","clinician":{"created_at":"2026-01-01T09:00:00Z","display_name":"Dr Ada Lovelace","email":"ada.lovelace@example.invalid","first_name":"Ada","id":"00000000-0000-4000-8000-000000000002","last_name":"Lovelace","links":{"bookings":"https://api.carebit.co/v1/bookings?clinician_id=00000000-0000-4000-8000-000000000002"},"medical_specialty":"General Medicine","object":"clinician","title":"Dr","updated_at":"2026-01-01T09:00:00Z"},"country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","creation_source":"api","date_of_birth":"1990-01-01","display_name":"Ms Test Lead","email":"test.lead@example.invalid","first_name":"Test","gdpr_consent_granted_at":"2026-01-01T09:00:00Z","gdpr_consent_withdrawn_at":null,"id":"00000000-0000-4000-8000-000000000013","internal_notes":"Asked about evening appointments with Dr Smith.","is_converted_to_patient":true,"is_lost":false,"is_opted_out_of_sms":false,"is_signed_up_to_newsletters":false,"last_name":"Lead","lead_type":"inquiry","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","self":"https://api.carebit.co/v1/leads/00000000-0000-4000-8000-000000000013","service":"https://api.carebit.co/v1/services/00000000-0000-4000-8000-000000000005"},"mobile":"7700900123","mobile_country_dial_code":"GB","object":"lead","organization_privacy_policy_consent_granted_at":"2026-01-01T09:00:00Z","patient_id":"00000000-0000-4000-8000-000000000004","phone":null,"phone_country_dial_code":null,"postcode":"TE1 1ST","presenting_problem":"Persistent knee pain","referral_notes":"Referred by Dr Patel at Riverside Medical.","referral_source":"gp_practice","service":{"created_at":"2026-01-01T09:00:00Z","description":"Test consultation service.","duration_minutes":30,"id":"00000000-0000-4000-8000-000000000005","is_bookable_online":true,"name":"Test consultation","object":"service","service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"tax_rate":null,"updated_at":"2026-01-01T09:00:00Z"},"sex":"female","stage":{"created_at":"2026-01-01T09:00:00Z","id":"00000000-0000-4000-8000-000000000015","is_conversion_stage":false,"is_lost_stage":false,"name":"Contact made","object":"lead_stage","position":5,"updated_at":"2026-01-01T09:00:00Z"},"title":"Ms","updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"lead.converted_to_patient"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/Lead"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"lead.converted_to_patient"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"A Lead was converted to a Patient.","tags":["Webhooks"]}},"lead.created":{"post":{"operationId":"webhook.lead.created","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"address_line_1":"1 Test Street","address_line_2":null,"attachments":[],"city":"Test City","clinician":{"created_at":"2026-01-01T09:00:00Z","display_name":"Dr Ada Lovelace","email":"ada.lovelace@example.invalid","first_name":"Ada","id":"00000000-0000-4000-8000-000000000002","last_name":"Lovelace","links":{"bookings":"https://api.carebit.co/v1/bookings?clinician_id=00000000-0000-4000-8000-000000000002"},"medical_specialty":"General Medicine","object":"clinician","title":"Dr","updated_at":"2026-01-01T09:00:00Z"},"country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","creation_source":"api","date_of_birth":"1990-01-01","display_name":"Ms Test Lead","email":"test.lead@example.invalid","first_name":"Test","gdpr_consent_granted_at":"2026-01-01T09:00:00Z","gdpr_consent_withdrawn_at":null,"id":"00000000-0000-4000-8000-000000000013","internal_notes":"Asked about evening appointments with Dr Smith.","is_converted_to_patient":false,"is_lost":false,"is_opted_out_of_sms":false,"is_signed_up_to_newsletters":false,"last_name":"Lead","lead_type":"inquiry","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","self":"https://api.carebit.co/v1/leads/00000000-0000-4000-8000-000000000013","service":"https://api.carebit.co/v1/services/00000000-0000-4000-8000-000000000005"},"mobile":"7700900123","mobile_country_dial_code":"GB","object":"lead","organization_privacy_policy_consent_granted_at":"2026-01-01T09:00:00Z","patient_id":null,"phone":null,"phone_country_dial_code":null,"postcode":"TE1 1ST","presenting_problem":"Persistent knee pain","referral_notes":"Referred by Dr Patel at Riverside Medical.","referral_source":"gp_practice","service":{"created_at":"2026-01-01T09:00:00Z","description":"Test consultation service.","duration_minutes":30,"id":"00000000-0000-4000-8000-000000000005","is_bookable_online":true,"name":"Test consultation","object":"service","service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"tax_rate":null,"updated_at":"2026-01-01T09:00:00Z"},"sex":"female","stage":{"created_at":"2026-01-01T09:00:00Z","id":"00000000-0000-4000-8000-000000000015","is_conversion_stage":false,"is_lost_stage":false,"name":"Contact made","object":"lead_stage","position":5,"updated_at":"2026-01-01T09:00:00Z"},"title":"Ms","updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"lead.created"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/Lead"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"lead.created"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"A Lead was created.","tags":["Webhooks"]}},"lead.stage_changed":{"post":{"operationId":"webhook.lead.stage_changed","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"created_at":"2026-01-01T09:00:00Z","current_stage":{"created_at":"2026-01-01T09:00:00Z","id":"00000000-0000-4000-8000-000000000015","is_conversion_stage":false,"is_lost_stage":false,"name":"Contact made","object":"lead_stage","position":5,"updated_at":"2026-01-01T09:00:00Z"},"id":"00000000-0000-4000-8000-000000000016","lead":{"address_line_1":"1 Test Street","address_line_2":null,"attachments":[],"city":"Test City","clinician":{"created_at":"2026-01-01T09:00:00Z","display_name":"Dr Ada Lovelace","email":"ada.lovelace@example.invalid","first_name":"Ada","id":"00000000-0000-4000-8000-000000000002","last_name":"Lovelace","links":{"bookings":"https://api.carebit.co/v1/bookings?clinician_id=00000000-0000-4000-8000-000000000002"},"medical_specialty":"General Medicine","object":"clinician","title":"Dr","updated_at":"2026-01-01T09:00:00Z"},"country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","creation_source":"api","date_of_birth":"1990-01-01","display_name":"Ms Test Lead","email":"test.lead@example.invalid","first_name":"Test","gdpr_consent_granted_at":"2026-01-01T09:00:00Z","gdpr_consent_withdrawn_at":null,"id":"00000000-0000-4000-8000-000000000013","internal_notes":"Asked about evening appointments with Dr Smith.","is_converted_to_patient":false,"is_lost":false,"is_opted_out_of_sms":false,"is_signed_up_to_newsletters":false,"last_name":"Lead","lead_type":"inquiry","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","self":"https://api.carebit.co/v1/leads/00000000-0000-4000-8000-000000000013","service":"https://api.carebit.co/v1/services/00000000-0000-4000-8000-000000000005"},"mobile":"7700900123","mobile_country_dial_code":"GB","object":"lead","organization_privacy_policy_consent_granted_at":"2026-01-01T09:00:00Z","patient_id":null,"phone":null,"phone_country_dial_code":null,"postcode":"TE1 1ST","presenting_problem":"Persistent knee pain","referral_notes":"Referred by Dr Patel at Riverside Medical.","referral_source":"gp_practice","service":{"created_at":"2026-01-01T09:00:00Z","description":"Test consultation service.","duration_minutes":30,"id":"00000000-0000-4000-8000-000000000005","is_bookable_online":true,"name":"Test consultation","object":"service","service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"tax_rate":null,"updated_at":"2026-01-01T09:00:00Z"},"sex":"female","stage":{"created_at":"2026-01-01T09:00:00Z","id":"00000000-0000-4000-8000-000000000015","is_conversion_stage":false,"is_lost_stage":false,"name":"Contact made","object":"lead_stage","position":5,"updated_at":"2026-01-01T09:00:00Z"},"title":"Ms","updated_at":"2026-01-01T09:00:00Z"},"links":{"lead":"https://api.carebit.co/v1/leads/00000000-0000-4000-8000-000000000013"},"object":"lead_stage_transition","previous_stage":{"created_at":"2026-01-01T09:00:00Z","id":"00000000-0000-4000-8000-000000000014","is_conversion_stage":false,"is_lost_stage":false,"name":"Enquiry","object":"lead_stage","position":0,"updated_at":"2026-01-01T09:00:00Z"},"updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"lead.stage_changed"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/LeadStageTransition"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"lead.stage_changed"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"A Lead moved between pipeline stages.","tags":["Webhooks"]}},"lead.updated":{"post":{"operationId":"webhook.lead.updated","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"address_line_1":"1 Test Street","address_line_2":null,"attachments":[],"city":"Test City","clinician":{"created_at":"2026-01-01T09:00:00Z","display_name":"Dr Ada Lovelace","email":"ada.lovelace@example.invalid","first_name":"Ada","id":"00000000-0000-4000-8000-000000000002","last_name":"Lovelace","links":{"bookings":"https://api.carebit.co/v1/bookings?clinician_id=00000000-0000-4000-8000-000000000002"},"medical_specialty":"General Medicine","object":"clinician","title":"Dr","updated_at":"2026-01-01T09:00:00Z"},"country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","creation_source":"api","date_of_birth":"1990-01-01","display_name":"Ms Test Lead","email":"test.lead@example.invalid","first_name":"Test","gdpr_consent_granted_at":"2026-01-01T09:00:00Z","gdpr_consent_withdrawn_at":null,"id":"00000000-0000-4000-8000-000000000013","internal_notes":"Asked about evening appointments with Dr Smith.","is_converted_to_patient":false,"is_lost":false,"is_opted_out_of_sms":false,"is_signed_up_to_newsletters":false,"last_name":"Lead","lead_type":"inquiry","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","self":"https://api.carebit.co/v1/leads/00000000-0000-4000-8000-000000000013","service":"https://api.carebit.co/v1/services/00000000-0000-4000-8000-000000000005"},"mobile":"7700900123","mobile_country_dial_code":"GB","object":"lead","organization_privacy_policy_consent_granted_at":"2026-01-01T09:00:00Z","patient_id":null,"phone":null,"phone_country_dial_code":null,"postcode":"TE1 1ST","presenting_problem":"Persistent knee pain","referral_notes":"Referred by Dr Patel at Riverside Medical.","referral_source":"gp_practice","service":{"created_at":"2026-01-01T09:00:00Z","description":"Test consultation service.","duration_minutes":30,"id":"00000000-0000-4000-8000-000000000005","is_bookable_online":true,"name":"Test consultation","object":"service","service_variants":[{"clinician_id":"00000000-0000-4000-8000-000000000002","currency":"GBP","description":"Standard consultation variant.","id":"00000000-0000-4000-8000-000000000006","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","location":"https://api.carebit.co/v1/locations/00000000-0000-4000-8000-000000000003"},"location_id":"00000000-0000-4000-8000-000000000003","net_price":6200,"permits_remote_bookings":false}],"tax_rate":null,"updated_at":"2026-01-01T09:00:00Z"},"sex":"female","stage":{"created_at":"2026-01-01T09:00:00Z","id":"00000000-0000-4000-8000-000000000015","is_conversion_stage":false,"is_lost_stage":false,"name":"Contact made","object":"lead_stage","position":5,"updated_at":"2026-01-01T09:00:00Z"},"title":"Ms","updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"lead.updated"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/Lead"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"lead.updated"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"A Lead's profile or lifecycle data changed.","tags":["Webhooks"]}},"list.member_added":{"post":{"operationId":"webhook.list.member_added","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"created_at":"2026-01-01T09:00:00Z","id":"00000000-0000-4000-8000-000000000010","links":{"list":"https://api.carebit.co/v1/lists/00000000-0000-4000-8000-000000000011","patient":"https://api.carebit.co/v1/patients/00000000-0000-4000-8000-000000000004","self":"https://api.carebit.co/v1/lists/00000000-0000-4000-8000-000000000011/members/00000000-0000-4000-8000-000000000010"},"list":{"clinician_id":"00000000-0000-4000-8000-000000000002","color_hex":"#28a745","created_at":"2026-01-01T09:00:00Z","id":"00000000-0000-4000-8000-000000000011","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","members":"https://api.carebit.co/v1/lists/00000000-0000-4000-8000-000000000011/members","self":"https://api.carebit.co/v1/lists/00000000-0000-4000-8000-000000000011"},"name":"Test list","notes":"Some notes","object":"list","updated_at":"2026-01-01T09:00:00Z"},"member":{"patient":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","creation_source":"api","date_of_birth":"1970-01-01","display_name":"Ms Test Patient","email":"test.patient@example.invalid","first_name":"Test","id":"00000000-0000-4000-8000-000000000004","is_opted_out_of_sms":false,"last_name":"Patient","mobile":"7700900123","mobile_country_dial_code":"GB","nhs_number":"9990000000","object":"patient","phone":"1234567890","phone_country_dial_code":"GB","phone_number":"+441234567890","postcode":"TE1 1ST","sex":"female","title":"Ms","updated_at":"2026-01-01T09:00:00Z"},"type":"patient"},"object":"list_member","updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"list.member_added"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/ListMember"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"list.member_added"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"A Patient was added to a List.","tags":["Webhooks"]}},"list.member_removed":{"post":{"operationId":"webhook.list.member_removed","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"created_at":"2026-01-01T09:00:00Z","id":"00000000-0000-4000-8000-000000000010","links":{"list":"https://api.carebit.co/v1/lists/00000000-0000-4000-8000-000000000011","patient":"https://api.carebit.co/v1/patients/00000000-0000-4000-8000-000000000004","self":"https://api.carebit.co/v1/lists/00000000-0000-4000-8000-000000000011/members/00000000-0000-4000-8000-000000000010"},"list":{"clinician_id":"00000000-0000-4000-8000-000000000002","color_hex":"#28a745","created_at":"2026-01-01T09:00:00Z","id":"00000000-0000-4000-8000-000000000011","links":{"clinician":"https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002","members":"https://api.carebit.co/v1/lists/00000000-0000-4000-8000-000000000011/members","self":"https://api.carebit.co/v1/lists/00000000-0000-4000-8000-000000000011"},"name":"Test list","notes":"Some notes","object":"list","updated_at":"2026-01-01T09:00:00Z"},"member":{"patient":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","creation_source":"api","date_of_birth":"1970-01-01","display_name":"Ms Test Patient","email":"test.patient@example.invalid","first_name":"Test","id":"00000000-0000-4000-8000-000000000004","is_opted_out_of_sms":false,"last_name":"Patient","mobile":"7700900123","mobile_country_dial_code":"GB","nhs_number":"9990000000","object":"patient","phone":"1234567890","phone_country_dial_code":"GB","phone_number":"+441234567890","postcode":"TE1 1ST","sex":"female","title":"Ms","updated_at":"2026-01-01T09:00:00Z"},"type":"patient"},"object":"list_member","updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"list.member_removed"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/ListMember"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"list.member_removed"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"A Patient was removed from a List.","tags":["Webhooks"]}},"patient_connection.created":{"post":{"operationId":"webhook.patient_connection.created","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"clinician_id":"00000000-0000-4000-8000-000000000002","created_at":"2026-01-01T09:00:00Z","gp_status":"has_gp","id":"00000000-0000-4000-8000-000000000017","is_active":true,"links":{"patient":"https://api.carebit.co/v1/patients/00000000-0000-4000-8000-000000000004","payor":null},"object":"patient_connection","organization":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","currency":null,"email":null,"formatted_address":"1 Test Street, Test City, GB, TE1 1ST","id":"00000000-0000-4000-8000-000000000018","name":"High Street Surgery","object":"organization","organization_type":"gp_practice","phone":null,"postcode":"TE1 1ST","subdomain":null,"time_zone":null,"updated_at":"2026-01-01T09:00:00Z"},"organization_id":"00000000-0000-4000-8000-000000000018","patient":{"address_line_1":"1 Test Street","address_line_2":null,"city":"Test City","country_code":"GB","county":"Testshire","created_at":"2026-01-01T09:00:00Z","creation_source":"api","date_of_birth":"1970-01-01","display_name":"Ms Test Patient","email":"test.patient@example.invalid","first_name":"Test","id":"00000000-0000-4000-8000-000000000004","is_opted_out_of_sms":false,"last_name":"Patient","mobile":"7700900123","mobile_country_dial_code":"GB","nhs_number":"9990000000","object":"patient","phone":"1234567890","phone_country_dial_code":"GB","phone_number":"+441234567890","postcode":"TE1 1ST","sex":"female","title":"Ms","updated_at":"2026-01-01T09:00:00Z"},"payor_id":null,"updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"patient_connection.created"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/PatientConnection"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"patient_connection.created"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"A Patient was created for or connected to an Organization.","tags":["Webhooks"]}},"refund.created":{"post":{"operationId":"webhook.refund.created","requestBody":{"content":{"application/json":{"example":{"api_version":"v1","created_at":"2026-01-01T09:00:00Z","data":{"object":{"amount":25000,"created_at":"2026-01-01T09:00:00Z","currency":"gbp","error":null,"id":"00000000-0000-4000-8000-000000000025","invoice_id":"00000000-0000-4000-8000-000000000027","links":{"patient":"https://api.carebit.co/v1/patients/00000000-0000-4000-8000-000000000004"},"notes":"Refund for a canceled consultation.","object":"refund","patient_id":"00000000-0000-4000-8000-000000000004","payment_id":"00000000-0000-4000-8000-000000000026","reason":"service_not_delivered","refund_source":"payment_account","status":"processing","succeeded_at":null,"updated_at":"2026-01-01T09:00:00Z"}},"developer_platform_project_id":null,"id":"evt_00000000-0000-4000-8000-000000000012","livemode":false,"object":"event","source":"dashboard","type":"refund.created"},"schema":{"properties":{"api_version":{"const":"v1"},"context":{"description":"Present only when `source` is `api`. Identifies the acting project and API key.","properties":{"developer_platform_api_key_id":{"format":"uuid","type":["string","null"]},"developer_platform_project_id":{"format":"uuid","type":["string","null"]}},"type":"object"},"created_at":{"description":"An ISO 8601 timestamp in UTC, with a `Z` suffix. For example, `2026-07-01T09:00:00Z`.","format":"date-time","type":"string"},"data":{"properties":{"object":{"$ref":"#/components/schemas/Refund"}},"required":["object"],"type":"object"},"developer_platform_project_id":{"description":"The project ID whose credential caused the change. Null for `dashboard` events.","format":"uuid","type":["string","null"]},"id":{"description":"Event identifier prefixed with `evt_`.","type":"string"},"livemode":{"description":"`false` for test-event deliveries.","type":"boolean"},"object":{"const":"event"},"source":{"description":"Origin of the change. `api` means a Developer Platform mutation; `dashboard` means a Carebit-initiated change.","enum":["api","dashboard"],"type":"string"},"type":{"const":"refund.created"}},"required":["id","object","api_version","type","created_at","livemode","source","developer_platform_project_id","data"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Return any `2XX` to acknowledge receipt. Non-2XX or timeout retries with backoff for 3 days."}},"security":[{"WebhookSignature":[]}],"summary":"A Refund was created.","tags":["Webhooks"]}}},"x-carebit-signature-vectors":[{"body":"{\"id\":\"evt_00000000-0000-4000-8000-000000000012\",\"object\":\"event\",\"api_version\":\"v1\",\"type\":\"booking.confirmed\",\"created_at\":\"2026-01-01T09:00:00Z\",\"livemode\":false,\"data\":{\"object\":{\"id\":\"00000000-0000-4000-8000-000000000001\",\"object\":\"booking\",\"status\":\"confirmed\"}}}","description":"HMAC-SHA256 digest for a single active signing secret.","expected_signatures":["ea85f3c956517c657635229da52d0e2337651f8866a609b5947151e17d11346f"],"header":"t=1700000000,v1=ea85f3c956517c657635229da52d0e2337651f8866a609b5947151e17d11346f","name":"primary","secret":"carebit_whsec_test_openapi_primary_secret_00000000000000","signed_payload":"1700000000.{\"id\":\"evt_00000000-0000-4000-8000-000000000012\",\"object\":\"event\",\"api_version\":\"v1\",\"type\":\"booking.confirmed\",\"created_at\":\"2026-01-01T09:00:00Z\",\"livemode\":false,\"data\":{\"object\":{\"id\":\"00000000-0000-4000-8000-000000000001\",\"object\":\"booking\",\"status\":\"confirmed\"}}}","timestamp":1700000000},{"body":"{\"id\":\"evt_00000000-0000-4000-8000-000000000012\",\"object\":\"event\",\"api_version\":\"v1\",\"type\":\"booking.confirmed\",\"created_at\":\"2026-01-01T09:00:00Z\",\"livemode\":false,\"data\":{\"object\":{\"id\":\"00000000-0000-4000-8000-000000000001\",\"object\":\"booking\",\"status\":\"confirmed\"}}}","description":"Digests for the 24-hour rotation window. Both `v1=` values must be considered.","expected_signatures":["ea85f3c956517c657635229da52d0e2337651f8866a609b5947151e17d11346f","dd888208017d7ebcfb23b14528937ab7176700e3378bf9388524a7dea6b459b3"],"header":"t=1700000000,v1=ea85f3c956517c657635229da52d0e2337651f8866a609b5947151e17d11346f,v1=dd888208017d7ebcfb23b14528937ab7176700e3378bf9388524a7dea6b459b3","name":"rotation","previous_secret":"carebit_whsec_test_openapi_previous_secret_0000000000000","primary_secret":"carebit_whsec_test_openapi_primary_secret_00000000000000","signed_payload":"1700000000.{\"id\":\"evt_00000000-0000-4000-8000-000000000012\",\"object\":\"event\",\"api_version\":\"v1\",\"type\":\"booking.confirmed\",\"created_at\":\"2026-01-01T09:00:00Z\",\"livemode\":false,\"data\":{\"object\":{\"id\":\"00000000-0000-4000-8000-000000000001\",\"object\":\"booking\",\"status\":\"confirmed\"}}}","timestamp":1700000000},{"body":"{\"id\":\"evt_00000000-0000-4000-8000-000000000012\",\"object\":\"event\",\"api_version\":\"v1\",\"type\":\"booking.confirmed\",\"created_at\":\"2026-01-01T09:00:00Z\",\"livemode\":false,\"data\":{\"object\":{\"id\":\"00000000-0000-4000-8000-000000000001\",\"object\":\"booking\",\"status\":\"confirmed\"}}}","description":"Same body six minutes older than the primary vector. A verifier with the default five-minute tolerance MUST reject this delivery.","expected_result":"reject","expected_signatures":["83a503f6c3e8365da843043d79b97f3fd54cd6aea46fd87632da9a603dcf6c13"],"header":"t=1699999640,v1=83a503f6c3e8365da843043d79b97f3fd54cd6aea46fd87632da9a603dcf6c13","name":"stale_timestamp_rejected","reference_timestamp":1700000000,"secret":"carebit_whsec_test_openapi_primary_secret_00000000000000","signed_payload":"1699999640.{\"id\":\"evt_00000000-0000-4000-8000-000000000012\",\"object\":\"event\",\"api_version\":\"v1\",\"type\":\"booking.confirmed\",\"created_at\":\"2026-01-01T09:00:00Z\",\"livemode\":false,\"data\":{\"object\":{\"id\":\"00000000-0000-4000-8000-000000000001\",\"object\":\"booking\",\"status\":\"confirmed\"}}}","timestamp":1699999640,"tolerance_seconds":300}]}