{"openapi":"3.1.0","info":{"title":"DocEnLinea Platform API","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["health"],"summary":"Health","description":"Liveness — does not touch the database, so it works before Postgres exists.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}},"/health/db":{"get":{"tags":["health"],"summary":"Health Db","description":"Readiness — pings the database. 200 with ``db: down`` if unreachable.","operationId":"health_db_health_db_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Db Health Db Get"}}}}}}},"/health/crypto":{"get":{"tags":["health"],"summary":"Health Crypto","description":"Field-encryption self-check. Reports whether the app-layer key works.\n\nNever returns the key or any ciphertext — only booleans + an error class, so\nit's safe to expose. Used to diagnose encrypted-write failures (e.g. 2FA\nenrolment) that surface as opaque 500s.","operationId":"health_crypto_health_crypto_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Crypto Health Crypto Get"}}}}}}},"/health/email":{"get":{"tags":["health"],"summary":"Health Email","description":"Reports whether outbound email (Resend) is configured. Leaks no secrets.","operationId":"health_email_health_email_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Email Health Email Get"}}}}}}},"/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/patient-signup":{"post":{"tags":["auth"],"summary":"Patient Signup","description":"Public patient self-registration via an affiliate's white-label link.\n\nTurnstile-gated, bound to the affiliate from the link, requires Terms +\nPrivacy acceptance. A session is issued immediately so the patient proceeds\nstraight into mandatory 2FA enrolment (same as every other panel).","operationId":"patient_signup_auth_patient_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientSignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","operationId":"refresh_auth_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}}}},"/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}}}},"/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}}}}},"/auth/set-password":{"post":{"tags":["auth"],"summary":"Set Password","description":"Invited user sets their initial password via an emailed setup token.","operationId":"set_password_auth_set_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/password/change":{"post":{"tags":["auth"],"summary":"Change Password","operationId":"change_password_auth_password_change_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/password/forgot":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Public: request a password-reset link.\n\nAlways returns 200 (never reveals whether the email exists). Sends a\nshort-lived, single-use reset link only for an existing, non-disabled account.\n2FA is untouched — after resetting, the user still completes their second\nfactor at sign-in (a lost authenticator remains an admin/break-glass action).","operationId":"forgot_password_auth_password_forgot_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/password/reset":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Complete a password reset from an emailed, short-lived, single-use token.","operationId":"reset_password_auth_password_reset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/2fa/enroll":{"post":{"tags":["auth"],"summary":"Enroll 2Fa","description":"Generate a TOTP secret; not active until confirmed via /2fa/verify.","operationId":"enroll_2fa_auth_2fa_enroll_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpEnrollResponse"}}}}}}},"/auth/2fa/verify":{"post":{"tags":["auth"],"summary":"Verify 2Fa","description":"Confirm the first TOTP code, activate 2FA, and issue recovery codes once.","operationId":"verify_2fa_auth_2fa_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpActivatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend Verification","description":"Public resend (used from the 'verify your email' screen, pre-login).\n\nAlways returns 200 regardless of whether the email exists or is already\nverified, to avoid account enumeration. Sends only for an existing,\nstill-unverified account.","operationId":"resend_verification_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/config":{"get":{"tags":["public"],"summary":"Public Config","description":"Non-secret config the browser panels need at load time.","operationId":"public_config_public_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Public Config Public Config Get"}}}}}}},"/public/brand":{"get":{"tags":["public"],"summary":"Public Brand","operationId":"public_brand_public_brand_get","parameters":[{"name":"slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Slug"}},{"name":"host","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Host"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicBrand"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/brand/me":{"get":{"tags":["public"],"summary":"Public Brand Me","description":"White-label brand tokens for the LOGGED-IN user's affiliate.\n\nLets a patient who reaches the shared portal host (no ``?aff`` slug and not on\nthe tenant's custom domain) still get their affiliate's look after auth —\nbranding follows the account, not just the URL. Returns ``enabled=false`` when\nthe user has no affiliate or the tenant isn't painting its own brand.","operationId":"public_brand_me_public_brand_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicBrand"}}}}}}},"/public/brand/{slug}/logo":{"get":{"tags":["public"],"summary":"Public Brand Logo","operationId":"public_brand_logo_public_brand__slug__logo_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/brand/{slug}/font":{"get":{"tags":["public"],"summary":"Public Brand Font","operationId":"public_brand_font_public_brand__slug__font_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/brand/{slug}/favicon":{"get":{"tags":["public"],"summary":"Public Brand Favicon","operationId":"public_brand_favicon_public_brand__slug__favicon_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/lab-requisition/{slug}/{lane}.pdf":{"get":{"tags":["public"],"summary":"Public Lab Requisition","description":"Branded (white-label), printable list of a lane's recommended BASIC labs.\n\nUnauthenticated by design so it can be linked from the review-received email\nfor the patient to download/print and take to any lab. Carries NO PHI — just\nthe generic recommended-labs checklist, the affiliate's brand + Responsable\nSanitario, and the standing disclaimer. 404 for unknown slug / no basic panel.","operationId":"public_lab_requisition_public_lab_requisition__slug___lane__pdf_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"lane","in":"path","required":true,"schema":{"type":"string","title":"Lane"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","maxLength":5,"default":"es","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/landing/{slug}/hero":{"get":{"tags":["public"],"summary":"Public Landing Hero","description":"Hero image for an affiliate's PUBLISHED landing page (no auth).\n\n``lane`` selects the targeted lane page's hero (\"\"=the basic root page).","operationId":"public_landing_hero_public_landing__slug__hero_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"lane","in":"query","required":false,"schema":{"type":"string","default":"","title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/intake/questions":{"get":{"tags":["public"],"summary":"Public Intake Questions","operationId":"public_intake_questions_public_intake_questions_get","parameters":[{"name":"lane","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":20,"title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/api__schemas__admin_manage__IntakeQuestionOut"},"title":"Response Public Intake Questions Public Intake Questions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/info-requests":{"post":{"tags":["public"],"summary":"Create Info Request","operationId":"create_info_request_public_info_requests_post","parameters":[{"name":"x-intake-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Intake-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoRequestCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoRequestCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/doctor-applications":{"post":{"tags":["public"],"summary":"Create Doctor Application","description":"Marketing-site form for a physician who wants to be considered.","operationId":"create_doctor_application_public_doctor_applications_post","parameters":[{"name":"x-intake-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Intake-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorApplicationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorApplicationCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/starter-signup":{"post":{"tags":["public"],"summary":"Create Starter Signup","operationId":"create_starter_signup_public_starter_signup_post","parameters":[{"name":"x-intake-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Intake-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarterSignupIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarterSignupCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/postal-code/{cp}":{"get":{"tags":["public"],"summary":"Postal Code","description":"Colonias, city, and state for a Mexican postal code.","operationId":"postal_code_public_postal_code__cp__get","parameters":[{"name":"cp","in":"path","required":true,"schema":{"type":"string","title":"Cp"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Postal Code Public Postal Code  Cp  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/doctor-evaluations/{token}":{"get":{"tags":["public"],"summary":"Get Doctor Evaluation","description":"The vía form for one physician. No scores.","operationId":"get_doctor_evaluation_public_doctor_evaluations__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Doctor Evaluation Public Doctor Evaluations  Token  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["public"],"summary":"Submit Doctor Evaluation","description":"Store the answers and the proposed levels on the inquiry.","operationId":"submit_doctor_evaluation_public_doctor_evaluations__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationSubmit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Submit Doctor Evaluation Public Doctor Evaluations  Token  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/info/verify":{"post":{"tags":["public"],"summary":"Verify","description":"Render-time check. Writes nothing.","operationId":"verify_public_info_verify_post","parameters":[{"name":"x-intake-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Intake-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Verify Public Info Verify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/info/interest":{"post":{"tags":["public"],"summary":"Interest","operationId":"interest_public_info_interest_post","parameters":[{"name":"x-intake-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Intake-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterestIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Interest Public Info Interest Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/info/optional":{"post":{"tags":["public"],"summary":"Optional","operationId":"optional_public_info_optional_post","parameters":[{"name":"x-intake-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Intake-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionalIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Optional Public Info Optional Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/info/form":{"post":{"tags":["public"],"summary":"Form","operationId":"form_public_info_form_post","parameters":[{"name":"x-intake-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Intake-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Form Public Info Form Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/overview":{"get":{"tags":["admin"],"summary":"Overview","operationId":"overview_admin_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverviewCounts"}}}}}}},"/admin/nav-counts":{"get":{"tags":["admin"],"summary":"Nav Counts","description":"Per-tab \"needs attention\" counts for the sidebar badges.\n\nEach value is the number of items on that tab awaiting an admin action. The\nfrontend only paints badges for tabs the admin can actually see, so counts\nfor hidden tabs are simply ignored. Cross-cutting read: exempt from the\nper-tab permission guard (see ``enforce_admin_perms``).","operationId":"nav_counts_admin_nav_counts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Nav Counts Admin Nav Counts Get"}}}}}}},"/admin/panel-alerts":{"get":{"tags":["admin"],"summary":"Panel Alerts","description":"Cross-panel \"needs attention\" totals for the super-admin top switcher.\n\nOne badge per top-menu panel so a super-admin can tell, from any panel, which\nOTHER panel has work waiting. Each total is platform-wide (a super-admin sees\nevery tenant) and mirrors that panel's own left-nav alerts:\n\n  * admin          — the sum of the Admin sidebar badges (see ``nav_counts``).\n  * medico         — open review cases in the queue (excludes unpaid).\n  * pharma         — fulfillment orders awaiting a pharmacy to claim.\n  * communications — managed threads with unread messages.\n\nAffiliate/patient have no platform-wide admin alert, so they report 0 (no\nbadge). Read-only; admin-guarded at the router level.","operationId":"panel_alerts_admin_panel_alerts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Panel Alerts Admin Panel Alerts Get"}}}}}}},"/admin/accounting":{"get":{"tags":["admin"],"summary":"Accounting","description":"Portfolio-wide platform-fee accounting: grand totals (by currency) plus a\nper-affiliate breakdown, over the selected range. Reuses the same rollup as\nthe affiliate console so the numbers match exactly.","operationId":"accounting_admin_accounting_get","parameters":[{"name":"granularity","in":"query","required":false,"schema":{"type":"string","default":"month","title":"Granularity"}},{"name":"periods","in":"query","required":false,"schema":{"type":"integer","default":6,"title":"Periods"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounting/reconciliation":{"get":{"tags":["admin"],"summary":"List Reconciliation Runs","description":"Recent overwatch runs + the count of currently-open discrepancies.","operationId":"list_reconciliation_runs_admin_accounting_reconciliation_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Reconciliation Runs Admin Accounting Reconciliation Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounting/reconciliation/{run_id}":{"get":{"tags":["admin"],"summary":"Get Reconciliation Run","operationId":"get_reconciliation_run_admin_accounting_reconciliation__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Reconciliation Run Admin Accounting Reconciliation  Run Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounting/reconcile":{"post":{"tags":["admin"],"summary":"Run Reconcile Now","description":"Run the overwatch reconciliation immediately (deterministic; no money moves).","operationId":"run_reconcile_now_admin_accounting_reconcile_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Run Reconcile Now Admin Accounting Reconcile Post"}}}}}}},"/admin/accounting/payouts":{"get":{"tags":["admin"],"summary":"List Payouts","description":"Payout runs (most recent first) + whether execution is currently possible.","operationId":"list_payouts_admin_accounting_payouts_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Payouts Admin Accounting Payouts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounting/payouts/preview":{"get":{"tags":["admin"],"summary":"Preview Payouts","description":"Non-mutating: matured, unpaid margin available per affiliate right now.","operationId":"preview_payouts_admin_accounting_payouts_preview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Preview Payouts Admin Accounting Payouts Preview Get"}}}}}}},"/admin/accounting/payouts/build/{affiliate_id}":{"post":{"tags":["admin"],"summary":"Build Payout","description":"Snapshot an affiliate's matured margin into a draft payout (no money moves).","operationId":"build_payout_admin_accounting_payouts_build__affiliate_id__post","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Build Payout Admin Accounting Payouts Build  Affiliate Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounting/payouts/{payout_id}/execute":{"post":{"tags":["admin"],"summary":"Execute Payout","description":"Settle a draft payout via a Stripe Transfer (guarded; explicit admin action).","operationId":"execute_payout_admin_accounting_payouts__payout_id__execute_post","parameters":[{"name":"payout_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Payout Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Execute Payout Admin Accounting Payouts  Payout Id  Execute Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounting/pharmacy-payables":{"get":{"tags":["admin"],"summary":"Pharmacy Payables","description":"Per-pharmacy invoiced vs paid, so DocEnLinea can settle supplier costs.","operationId":"pharmacy_payables_admin_accounting_pharmacy_payables_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Pharmacy Payables Admin Accounting Pharmacy Payables Get"}}}}}}},"/admin/accounting/tax-rates":{"get":{"tags":["admin"],"summary":"Tax Rates","description":"The rates payroll uses, grouped for the tax-table tab.","operationId":"tax_rates_admin_accounting_tax_rates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Tax Rates Admin Accounting Tax Rates Get"}}}}}},"put":{"tags":["admin"],"summary":"Set Tax Rates","description":"Replace the name and percent of the rates payroll calculates from.","operationId":"set_tax_rates_admin_accounting_tax_rates_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Tax Rates Admin Accounting Tax Rates Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounting/physician-payables":{"get":{"tags":["admin"],"summary":"Physician Payables","description":"Network physicians on salary, the level defaults, and the payroll lines.\n\nClinic physicians are omitted. Payroll uses the amount on the physician's\nfile. An empty file falls back to that level's rate. An employee is paid\nhalf of their monthly salary. An independent is paid their fee for each\ncompleted review.","operationId":"physician_payables_admin_accounting_physician_payables_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Physician Payables Admin Accounting Physician Payables Get"}}}}}}},"/admin/accounting/physician-pay":{"put":{"tags":["admin"],"summary":"Set Physician Pay","description":"Set the salary and the per-review fee for physician levels 1–5. Empty clears that amount.","operationId":"set_physician_pay_admin_accounting_physician_pay_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Physician Pay Admin Accounting Physician Pay Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounting/physician-payroll":{"put":{"tags":["admin"],"summary":"Set Physician Payroll","description":"Set the entered amount on each payroll-tax line. Empty clears it.","operationId":"set_physician_payroll_admin_accounting_physician_payroll_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Physician Payroll Admin Accounting Physician Payroll Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounting/physician-payroll-period":{"put":{"tags":["admin"],"summary":"Set Pay Period","description":"Save one physician's quincena. Confirm stores the pesos for the accountant.","operationId":"set_pay_period_admin_accounting_physician_payroll_period_put","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Pay Period Admin Accounting Physician Payroll Period Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounting/expenses":{"get":{"tags":["admin"],"summary":"List Expenses","description":"Operating expenses. Recurring rows repeat every month from their date.","operationId":"list_expenses_admin_accounting_expenses_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Expenses Admin Accounting Expenses Get"}}}}}},"post":{"tags":["admin"],"summary":"Create Expense","description":"Add a one-time expense, or one that repeats every month.","operationId":"create_expense_admin_accounting_expenses_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Expense Admin Accounting Expenses Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounting/expenses/{expense_id}":{"delete":{"tags":["admin"],"summary":"Delete Expense","operationId":"delete_expense_admin_accounting_expenses__expense_id__delete","parameters":[{"name":"expense_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Expense Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounting/pharmacy-invoices":{"post":{"tags":["admin"],"summary":"Create Pharmacy Invoice","description":"Record a pharmacy/lab payable invoice (invoice-by-invoice payables).","operationId":"create_pharmacy_invoice_admin_accounting_pharmacy_invoices_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Pharmacy Invoice Admin Accounting Pharmacy Invoices Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounting/pharmacy-payments":{"post":{"tags":["admin"],"summary":"Create Pharmacy Payment","description":"Record a payment made to a pharmacy/lab (optionally against an invoice).","operationId":"create_pharmacy_payment_admin_accounting_pharmacy_payments_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Pharmacy Payment Admin Accounting Pharmacy Payments Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/accounting/payments/{payment_id}/refund":{"post":{"tags":["admin"],"summary":"Refund Payment","description":"Refund a patient payment via Stripe and email the patient (super-admin).\n\nMoney movement is sensitive, so this is gated to super-admins. Refunds the\ncharge on Stripe (on the connected account for a direct charge), marks the\npayment ``refunded``, and fires the branded refund email. An optional\n``amount`` in the body issues a partial refund (else full).","operationId":"refund_payment_admin_accounting_payments__payment_id__refund_post","parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Payment Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Refund Payment Admin Accounting Payments  Payment Id  Refund Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/stripe/connect":{"post":{"tags":["admin"],"summary":"Admin Stripe Connect","description":"Create (or resume) a Connect Express account for an affiliate and return a\nhosted onboarding link the admin can send them to finish banking details.","operationId":"admin_stripe_connect_admin_affiliates__affiliate_id__stripe_connect_post","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Stripe Connect Admin Affiliates  Affiliate Id  Stripe Connect Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/stripe/refresh":{"post":{"tags":["admin"],"summary":"Admin Stripe Refresh","description":"Re-pull a connected account's status from Stripe (charges/payouts enabled).","operationId":"admin_stripe_refresh_admin_affiliates__affiliate_id__stripe_refresh_post","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Stripe Refresh Admin Affiliates  Affiliate Id  Stripe Refresh Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/stripe/platform-status":{"get":{"tags":["admin"],"summary":"Admin Stripe Platform Status","description":"Superadmin-only: the platform's OWN Stripe account activation state and the\nexact outstanding requirements (why it isn't live / Connect-ready yet).\n\nOpen ``/admin/stripe/platform-status`` in the browser while signed in as a\nsuperadmin to see it — no secret keys are returned.","operationId":"admin_stripe_platform_status_admin_stripe_platform_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Stripe Platform Status Admin Stripe Platform Status Get"}}}}}}},"/admin/stripe/config":{"get":{"tags":["admin"],"summary":"Admin Stripe Config","description":"Cheap Stripe configuration snapshot for the admin Stripe tab — no Stripe\nAPI call. Reports whether a secret key is set and whether the inbound webhook\nsigning secret is configured. Governed by the ``accounting`` tab perm.","operationId":"admin_stripe_config_admin_stripe_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Stripe Config Admin Stripe Config Get"}}}}}}},"/admin/stripe/payments":{"get":{"tags":["admin"],"summary":"Admin Stripe Payments","description":"Recent patient payments (pay-to-submit reviews / call charges) with light\nnon-PHI context (client_ref, affiliate). Governed by the ``accounting`` tab\nperm; refunds remain a separate super-admin-only action.","operationId":"admin_stripe_payments_admin_stripe_payments_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Admin Stripe Payments Admin Stripe Payments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/medication-payments":{"get":{"tags":["admin"],"summary":"List Medication Payments To Verify","description":"Approved cases whose medication charge was marked paid off-platform and are\nawaiting admin verification before the order is released to the pharmacy.\nGoverned by the ``accounting`` tab perm.","operationId":"list_medication_payments_to_verify_admin_medication_payments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MedicationPaymentQueueRow"},"type":"array","title":"Response List Medication Payments To Verify Admin Medication Payments Get"}}}}}}},"/admin/cases/{case_id}/verify-medication-payment":{"post":{"tags":["admin"],"summary":"Verify Medication Payment","description":"Verify a manually-collected medication payment and RELEASE the order to the\npharmacy. Mirrors the Stripe webhook's release path: marks the case paid,\nbuilds the fulfillment order (which attaches the receta), and advances the\naffiliate's fulfillment timeline. Governed by the ``accounting`` tab perm.","operationId":"verify_medication_payment_admin_cases__case_id__verify_medication_payment_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationPaymentActionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/info-requests":{"get":{"tags":["admin"],"summary":"List Info Requests","operationId":"list_info_requests_admin_info_requests_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/InfoRequestStatus"},{"type":"null"}],"title":"Status"}},{"name":"lead_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InfoRequestOut"},"title":"Response List Info Requests Admin Info Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/info-requests/{request_id}":{"patch":{"tags":["admin"],"summary":"Update Info Request","operationId":"update_info_request_admin_info_requests__request_id__patch","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoRequestUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Info Request","operationId":"delete_info_request_admin_info_requests__request_id__delete","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/info-requests/{request_id}/reply":{"post":{"tags":["admin"],"summary":"Reply Info Request","description":"Send a branded DocEnLinea email to the lead from inside the console.\n\nThe reply never opens an external mail client — it is rendered with the\nplatform's branded template, sent via Resend, and recorded on the contact\ntrail as an outbound email so the history stays complete.","operationId":"reply_info_request_admin_info_requests__request_id__reply_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadReply"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/activities":{"get":{"tags":["admin"],"summary":"List Activities","operationId":"list_activities_admin_activities_get","parameters":[{"name":"entity_type","in":"query","required":true,"schema":{"type":"string","pattern":"^(lead|affiliate)$","title":"Entity Type"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActivityOut"},"title":"Response List Activities Admin Activities Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create Activity","operationId":"create_activity_admin_activities_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/onboarding":{"patch":{"tags":["admin"],"summary":"Update Onboarding","operationId":"update_onboarding_admin_affiliates__affiliate_id__onboarding_patch","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStepUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__admin_manage__AffiliateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates":{"get":{"tags":["admin"],"summary":"List Affiliates","operationId":"list_affiliates_admin_affiliates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/api__schemas__admin_manage__AffiliateOut"},"type":"array","title":"Response List Affiliates Admin Affiliates Get"}}}}}},"post":{"tags":["admin"],"summary":"Create Affiliate","operationId":"create_affiliate_admin_affiliates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__admin_manage__AffiliateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/info-requests/{request_id}/convert":{"post":{"tags":["admin"],"summary":"Convert Lead","description":"Promote a qualified lead into an Affiliate tenant, preserving the trail.","operationId":"convert_lead_admin_info_requests__request_id__convert_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadConvert"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__admin_manage__AffiliateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}":{"patch":{"tags":["admin"],"summary":"Update Affiliate","operationId":"update_affiliate_admin_affiliates__affiliate_id__patch","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__admin_manage__AffiliateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Affiliate","description":"Hard-delete an affiliate (super-admin; for test/data cleanup).\n\nPostgres FK rules apply: fee configs, billing, API keys and webhooks CASCADE;\nusers, review cases, fulfillment and patient files are detached (SET NULL).","operationId":"delete_affiliate_admin_affiliates__affiliate_id__delete","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/responsable-sanitario":{"put":{"tags":["admin"],"summary":"Set Responsable Sanitario","description":"Provision the affiliate's OWN Responsable Sanitario (Art. 19 RLGSMP).\n\nSet when they purchase the service. DocEnLinea's Responsable Sanitario is\nnever assigned here — each tenant must carry their own.","operationId":"set_responsable_sanitario_admin_affiliates__affiliate_id__responsable_sanitario_put","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsableSanitarioIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__admin_manage__AffiliateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/deposit":{"get":{"tags":["admin"],"summary":"Get Affiliate Deposit","description":"The affiliate's COGS-deposit balances + recent ledger entries.","operationId":"get_affiliate_deposit_admin_affiliates__affiliate_id__deposit_get","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositStatementOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Post Affiliate Deposit","description":"Record a top-up (funds the buffer), settlement (reduces outstanding), or a\nsigned adjustment to an affiliate's COGS-deposit ledger.","operationId":"post_affiliate_deposit_admin_affiliates__affiliate_id__deposit_post","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositActionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositStatementOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/reviewers":{"get":{"tags":["admin"],"summary":"List Reviewers","operationId":"list_reviewers_admin_reviewers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReviewerOut"},"type":"array","title":"Response List Reviewers Admin Reviewers Get"}}}}}},"post":{"tags":["admin"],"summary":"Create Reviewer","operationId":"create_reviewer_admin_reviewers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/reviewers/{reviewer_id}":{"patch":{"tags":["admin"],"summary":"Update Reviewer","operationId":"update_reviewer_admin_reviewers__reviewer_id__patch","parameters":[{"name":"reviewer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Reviewer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Reviewer","description":"Remove a reviewer (médico) and their login account.\n\nDeleting the account cascades the reviewer row; any case / consult / decision\nlinks are FK ``ondelete=SET NULL``, so clinical history is preserved but\nunassigned. (Reassign or re-verify a replacement reviewer as needed.)","operationId":"delete_reviewer_admin_reviewers__reviewer_id__delete","parameters":[{"name":"reviewer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Reviewer Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/reviewers/{reviewer_id}/signature":{"post":{"tags":["admin"],"summary":"Upload Reviewer Signature","description":"Place a signature file for this physician. The photo is reduced to the ink.\n\nThe physician still has to confirm the cleaned image before it stamps a receta.","operationId":"upload_reviewer_signature_admin_reviewers__reviewer_id__signature_post","parameters":[{"name":"reviewer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Reviewer Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_reviewer_signature_admin_reviewers__reviewer_id__signature_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Reviewer Signature","operationId":"delete_reviewer_signature_admin_reviewers__reviewer_id__signature_delete","parameters":[{"name":"reviewer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Reviewer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/reviewers/{reviewer_id}/efirma-cert":{"post":{"tags":["admin"],"summary":"Upload Reviewer Efirma Cert","description":"Store the physician's public e.firma certificate.\n\nA .key, a password, or a .pfx is refused. The file has to be the .cer.\nStoring it does not change the receta while the platform switch is off.","operationId":"upload_reviewer_efirma_cert_admin_reviewers__reviewer_id__efirma_cert_post","parameters":[{"name":"reviewer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Reviewer Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_reviewer_efirma_cert_admin_reviewers__reviewer_id__efirma_cert_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Reviewer Efirma Cert","description":"Remove the public certificate. Decisions already signed keep their own copy.","operationId":"delete_reviewer_efirma_cert_admin_reviewers__reviewer_id__efirma_cert_delete","parameters":[{"name":"reviewer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Reviewer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/reviewers/{reviewer_id}/availability":{"patch":{"tags":["admin"],"summary":"Update Reviewer Availability","operationId":"update_reviewer_availability_admin_reviewers__reviewer_id__availability_patch","parameters":[{"name":"reviewer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Reviewer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/pharmacies":{"get":{"tags":["admin"],"summary":"List Pharmacies","operationId":"list_pharmacies_admin_pharmacies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/api__schemas__admin_manage__PharmacyOut"},"type":"array","title":"Response List Pharmacies Admin Pharmacies Get"}}}}}},"post":{"tags":["admin"],"summary":"Create Pharmacy","operationId":"create_pharmacy_admin_pharmacies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PharmacyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__admin_manage__PharmacyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/pharmacies/{pharmacy_id}":{"patch":{"tags":["admin"],"summary":"Update Pharmacy","operationId":"update_pharmacy_admin_pharmacies__pharmacy_id__patch","parameters":[{"name":"pharmacy_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pharmacy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PharmacyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__admin_manage__PharmacyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Pharmacy","description":"Hard-delete a pharmacy/lab (super-admin; for test/data cleanup).\n\nIts medication catalog CASCADEs; portal users and fulfillment orders are\ndetached (SET NULL).","operationId":"delete_pharmacy_admin_pharmacies__pharmacy_id__delete","parameters":[{"name":"pharmacy_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pharmacy Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/pharmacies/{pharmacy_id}/users":{"get":{"tags":["admin"],"summary":"List Pharmacy Users","operationId":"list_pharmacy_users_admin_pharmacies__pharmacy_id__users_get","parameters":[{"name":"pharmacy_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pharmacy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PortalUserOut"},"title":"Response List Pharmacy Users Admin Pharmacies  Pharmacy Id  Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create Pharmacy User","operationId":"create_pharmacy_user_admin_pharmacies__pharmacy_id__users_post","parameters":[{"name":"pharmacy_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pharmacy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalUserCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/pharmacies/{pharmacy_id}/users/{user_id}":{"patch":{"tags":["admin"],"summary":"Update Pharmacy User","operationId":"update_pharmacy_user_admin_pharmacies__pharmacy_id__users__user_id__patch","parameters":[{"name":"pharmacy_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pharmacy Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalUserStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/pharmacies/{pharmacy_id}/medications":{"get":{"tags":["admin"],"summary":"List Medications","operationId":"list_medications_admin_pharmacies__pharmacy_id__medications_get","parameters":[{"name":"pharmacy_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pharmacy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MedicationOut"},"title":"Response List Medications Admin Pharmacies  Pharmacy Id  Medications Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create Medication","operationId":"create_medication_admin_pharmacies__pharmacy_id__medications_post","parameters":[{"name":"pharmacy_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pharmacy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/medications/{medication_id}":{"patch":{"tags":["admin"],"summary":"Update Medication","operationId":"update_medication_admin_medications__medication_id__patch","parameters":[{"name":"medication_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Medication Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Medication","operationId":"delete_medication_admin_medications__medication_id__delete","parameters":[{"name":"medication_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Medication Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/catalog":{"get":{"tags":["admin"],"summary":"Catalog","operationId":"catalog_admin_catalog_get","parameters":[{"name":"lane","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CatalogItem"},"title":"Response Catalog Admin Catalog Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/protocols":{"get":{"tags":["admin"],"summary":"List Protocols","operationId":"list_protocols_admin_protocols_get","parameters":[{"name":"lane","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProtocolOut"},"title":"Response List Protocols Admin Protocols Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create Protocol","operationId":"create_protocol_admin_protocols_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtocolCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtocolOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/protocol-estimate":{"post":{"tags":["admin"],"summary":"Protocol Estimate","description":"AI-estimate pharmacy cost (MXN) for uncatalogued protocol lines.\n\nMirrors the médico protocol-price flow: catalog-linked lines are priced\ndeterministically elsewhere; this endpoint only fills in typed/unlinked\nlines. Returns estimates keyed by the caller-supplied row index.","operationId":"protocol_estimate_admin_protocol_estimate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtocolEstimateIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtocolEstimateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/protocols/{protocol_id}":{"patch":{"tags":["admin"],"summary":"Update Protocol","operationId":"update_protocol_admin_protocols__protocol_id__patch","parameters":[{"name":"protocol_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Protocol Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtocolUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtocolOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Protocol","operationId":"delete_protocol_admin_protocols__protocol_id__delete","parameters":[{"name":"protocol_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Protocol Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/intake/questions":{"get":{"tags":["admin"],"summary":"List Intake Questions","operationId":"list_intake_questions_admin_intake_questions_get","parameters":[{"name":"lane","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/api__schemas__admin_manage__IntakeQuestionOut"},"title":"Response List Intake Questions Admin Intake Questions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create Intake Question","operationId":"create_intake_question_admin_intake_questions_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeQuestionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__admin_manage__IntakeQuestionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/intake/questions/{question_id}":{"patch":{"tags":["admin"],"summary":"Update Intake Question","operationId":"update_intake_question_admin_intake_questions__question_id__patch","parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Question Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeQuestionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__admin_manage__IntakeQuestionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Intake Question","operationId":"delete_intake_question_admin_intake_questions__question_id__delete","parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Question Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/intake/questions/reorder":{"post":{"tags":["admin"],"summary":"Reorder Intake Questions","operationId":"reorder_intake_questions_admin_intake_questions_reorder_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeReorderIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/api__schemas__admin_manage__IntakeQuestionOut"},"type":"array","title":"Response Reorder Intake Questions Admin Intake Questions Reorder Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/intake/labs":{"get":{"tags":["admin"],"summary":"List Lab Panels","operationId":"list_lab_panels_admin_intake_labs_get","parameters":[{"name":"lane","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lane"}},{"name":"tier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LabPanelOut"},"title":"Response List Lab Panels Admin Intake Labs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create Lab Panel","operationId":"create_lab_panel_admin_intake_labs_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabPanelCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabPanelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/intake/labs/{panel_id}":{"patch":{"tags":["admin"],"summary":"Update Lab Panel","operationId":"update_lab_panel_admin_intake_labs__panel_id__patch","parameters":[{"name":"panel_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Panel Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabPanelUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabPanelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Lab Panel","operationId":"delete_lab_panel_admin_intake_labs__panel_id__delete","parameters":[{"name":"panel_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Panel Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/intake/labs/reorder":{"post":{"tags":["admin"],"summary":"Reorder Lab Panels","operationId":"reorder_lab_panels_admin_intake_labs_reorder_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeReorderIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LabPanelOut"},"type":"array","title":"Response Reorder Lab Panels Admin Intake Labs Reorder Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/comm/threads":{"get":{"tags":["admin"],"summary":"Admin List Comm Threads","description":"Every tenant's client-email threads. Defaults to *managed* threads (the\nones DocEnLinea staff answer on the tenant's behalf).","operationId":"admin_list_comm_threads_admin_comm_threads_get","parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"managed","title":"Scope"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminCommThreadRow"},"title":"Response Admin List Comm Threads Admin Comm Threads Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/patients":{"get":{"tags":["admin"],"summary":"List Patients","operationId":"list_patients_admin_patients_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PatientSummaryOut"},"title":"Response List Patients Admin Patients Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/patients/{user_id}":{"get":{"tags":["admin"],"summary":"Get Patient","operationId":"get_patient_admin_patients__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Patient","description":"Hard-delete a patient account and their cases (super-admin; test cleanup).\n\nRefused while the clinical file is still inside the five-year hold\n(later of the last medical act and consent). Removes the patient's review\ncases first (cascading consult sessions and detaching fulfillment), then\nthe account (uploaded files CASCADE).","operationId":"delete_patient_admin_patients__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/patients/{user_id}/status":{"post":{"tags":["admin"],"summary":"Set Patient Status","operationId":"set_patient_status_admin_patients__user_id__status_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/patients/{user_id}/reset-2fa":{"post":{"tags":["admin"],"summary":"Reset Patient 2Fa","description":"Account recovery: clear 2FA so the patient can re-enrol on next login.\n\nTouches only auth material — never PHI. Audited as a privileged action.","operationId":"reset_patient_2fa_admin_patients__user_id__reset_2fa_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/comm/buckets":{"get":{"tags":["admin"],"summary":"List Comm Buckets","operationId":"list_comm_buckets_admin_comm_buckets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CommSubjectBucketAdminOut"},"type":"array","title":"Response List Comm Buckets Admin Comm Buckets Get"}}}}}},"post":{"tags":["admin"],"summary":"Create Comm Bucket","operationId":"create_comm_bucket_admin_comm_buckets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommSubjectBucketCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommSubjectBucketAdminOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/comm/buckets/{bucket_id}":{"patch":{"tags":["admin"],"summary":"Update Comm Bucket","operationId":"update_comm_bucket_admin_comm_buckets__bucket_id__patch","parameters":[{"name":"bucket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bucket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommSubjectBucketUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommSubjectBucketAdminOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/comms/agents":{"get":{"tags":["admin"],"summary":"List Comms Agents","description":"DocEnLinea's own communications agents (cross-tenant staff, affiliate NULL).","operationId":"list_comms_agents_admin_comms_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ResponderRow"},"type":"array","title":"Response List Comms Agents Admin Comms Agents Get"}}}}}},"post":{"tags":["admin"],"summary":"Create Comms Agent","operationId":"create_comms_agent_admin_comms_agents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponderCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponderRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/team":{"get":{"tags":["admin"],"summary":"List Admins","operationId":"list_admins_admin_team_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AdminUserOut"},"type":"array","title":"Response List Admins Admin Team Get"}}}}}},"post":{"tags":["admin"],"summary":"Create Admin","operationId":"create_admin_admin_team_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/team/{user_id}/resend-invite":{"post":{"tags":["admin"],"summary":"Resend Admin Invite","description":"Resend the set-password / 2FA invite to an admin who hasn't finished setup.\n\nOnly valid while the account is still ``invited`` (they haven't set a\npassword yet). Once active they use the normal 'forgot password' flow, so we\nrefuse here to avoid handing out reset links from the team screen. A fresh\nsingle-use token is minted each time and the dedup guard is bypassed with a\ntimestamp suffix so the mail actually re-sends.","operationId":"resend_admin_invite_admin_team__user_id__resend_invite_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/team/{user_id}":{"patch":{"tags":["admin"],"summary":"Update Admin","operationId":"update_admin_admin_team__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Admin","description":"Delete an admin account (super-admin only).\n\nGuards against stranding the control plane: a super-admin can't delete their\nown account, and the last remaining super-admin can't be deleted.","operationId":"delete_admin_admin_team__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/global-fees":{"get":{"tags":["admin"],"summary":"Get Global Fees","operationId":"get_global_fees_admin_global_fees_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeConfigOut"}}}}}},"put":{"tags":["admin"],"summary":"Update Global Fees","operationId":"update_global_fees_admin_global_fees_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeConfigUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/onboarding/quote":{"post":{"tags":["admin"],"summary":"Onboarding Quote","description":"Price a plan + add-on selection (setup + first month, IVA, total, split).","operationId":"onboarding_quote_admin_onboarding_quote_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanQuoteIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanQuoteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/onboarding-invoice":{"get":{"tags":["admin"],"summary":"Get Onboarding Invoice","operationId":"get_onboarding_invoice_admin_affiliates__affiliate_id__onboarding_invoice_get","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OnboardingInvoiceOut"},{"type":"null"}],"title":"Response Get Onboarding Invoice Admin Affiliates  Affiliate Id  Onboarding Invoice Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create Onboarding Invoice","description":"Raise (or replace) an affiliate's onboarding invoice from a fresh quote.","operationId":"create_onboarding_invoice_admin_affiliates__affiliate_id__onboarding_invoice_post","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanQuoteIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingInvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/onboarding-invoices/{invoice_id}/links":{"post":{"tags":["admin"],"summary":"Generate Onboarding Links","description":"Create Stripe Checkout links for the setup part and the remainder.\n\nCharged on DocEnLinea's own platform balance (affiliate → DocEnLinea). The\nwebhook marks each part paid; when both settle the invoice is ``paid``.","operationId":"generate_onboarding_links_admin_onboarding_invoices__invoice_id__links_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingInvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/onboarding-invoices/{invoice_id}/mark-paid":{"post":{"tags":["admin"],"summary":"Mark Onboarding Paid","description":"Manually mark a part (or the whole) onboarding invoice as paid off-platform.","operationId":"mark_onboarding_paid_admin_onboarding_invoices__invoice_id__mark_paid_post","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invoice Id"}},{"name":"part","in":"query","required":false,"schema":{"type":"string","pattern":"^(setup|remainder|all)$","default":"all","title":"Part"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingInvoiceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/upgrade-requests":{"get":{"tags":["admin"],"summary":"List Upgrade Requests","operationId":"list_upgrade_requests_admin_upgrade_requests_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UpgradeRequestOut"},"title":"Response List Upgrade Requests Admin Upgrade Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/upgrade-requests/{request_id}":{"patch":{"tags":["admin"],"summary":"Update Upgrade Request","operationId":"update_upgrade_request_admin_upgrade_requests__request_id__patch","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeRequestUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/audit":{"get":{"tags":["admin"],"summary":"List Audit Log","description":"Most-recent-first slice of the append-only audit trail.","operationId":"list_audit_log_admin_audit_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogOut"},"title":"Response List Audit Log Admin Audit Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/consent-versions":{"get":{"tags":["admin"],"summary":"List Consent Versions","description":"All consent-text versions, newest first (active ones surfaced by the UI).","operationId":"list_consent_versions_admin_consent_versions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConsentVersionOut"},"type":"array","title":"Response List Consent Versions Admin Consent Versions Get"}}}}}}},"/admin/bots":{"get":{"tags":["admin"],"summary":"Get Bots","operationId":"get_bots_admin_bots_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Bots Admin Bots Get"}}}}}}},"/admin/bots/info/links":{"post":{"tags":["admin"],"summary":"Info Links","description":"Signed /info URLs for a list of prospect ids in one segment.","operationId":"info_links_admin_bots_info_links_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfoLinksIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Info Links Admin Bots Info Links Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/bots/info/export":{"get":{"tags":["admin"],"summary":"Info Export","description":"Confirmed, non-bot /info events as CSV text (Tracker reconciliation).","operationId":"info_export_admin_bots_info_export_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Info Export Admin Bots Info Export Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/bots/settings":{"put":{"tags":["admin"],"summary":"Put Settings","operationId":"put_settings_admin_bots_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotSettingsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Put Settings Admin Bots Settings Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/bots/doctors/{reviewer_id}":{"patch":{"tags":["admin"],"summary":"Patch Doctor","operationId":"patch_doctor_admin_bots_doctors__reviewer_id__patch","parameters":[{"name":"reviewer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Reviewer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotDoctorIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Patch Doctor Admin Bots Doctors  Reviewer Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/bots/test":{"post":{"tags":["admin"],"summary":"Send Test","operationId":"send_test_admin_bots_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Send Test Admin Bots Test Post"}}}}}}},"/admin/doctor-applications":{"get":{"tags":["admin"],"summary":"List Doctor Applications","operationId":"list_doctor_applications_admin_doctor_applications_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DoctorApplicationOut"},"type":"array","title":"Response List Doctor Applications Admin Doctor Applications Get"}}}}}}},"/admin/doctor-applications/{application_id}":{"patch":{"tags":["admin"],"summary":"Update Doctor Application","operationId":"update_doctor_application_admin_doctor_applications__application_id__patch","parameters":[{"name":"application_id","in":"path","required":true,"schema":{"type":"string","title":"Application Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorApplicationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorApplicationOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/tenants":{"get":{"tags":["affiliate"],"summary":"List Tenants","description":"All affiliates, for the super-admin tenant picker. Admin-only.","operationId":"list_tenants_affiliate_tenants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TenantOption"},"type":"array","title":"Response List Tenants Affiliate Tenants Get"}}}}}}},"/affiliate/overview":{"get":{"tags":["affiliate"],"summary":"Overview","operationId":"overview_affiliate_overview_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateOverview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/responsable-sanitario":{"put":{"tags":["affiliate"],"summary":"Save Responsable Sanitario","description":"Affiliate self-serve: save their OWN Responsable Sanitario (Art. 19).\n\nOnly allowed when DocEnLinea does NOT provide it (``rs_managed`` is False).\nWhen DocEnLinea manages it (paid service) the fields are admin-provisioned and\nread-only here. DocEnLinea's own Responsable Sanitario is never used — the\naffiliate must contract their own or buy the managed service.","operationId":"save_responsable_sanitario_affiliate_responsable_sanitario_put","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsableSanitario"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsableSanitario"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/api-keys":{"get":{"tags":["affiliate"],"summary":"List Api Keys","operationId":"list_api_keys_affiliate_api_keys_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyOut"},"title":"Response List Api Keys Affiliate Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["affiliate"],"summary":"Create Api Key","operationId":"create_api_key_affiliate_api_keys_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/api-keys/{key_id}/revoke":{"post":{"tags":["affiliate"],"summary":"Revoke Api Key","operationId":"revoke_api_key_affiliate_api_keys__key_id__revoke_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/whitelabel/qr":{"get":{"tags":["affiliate"],"summary":"Branded Link Qr","description":"QR code (SVG + PNG data URIs) for the tenant's branded patient link, so the\naffiliate can download it or embed it anywhere in their brand.","operationId":"branded_link_qr_affiliate_whitelabel_qr_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandedLinkQrOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/branding":{"get":{"tags":["affiliate"],"summary":"Get Branding","operationId":"get_branding_affiliate_branding_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["affiliate"],"summary":"Update Branding","operationId":"update_branding_affiliate_branding_patch","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/branding/logo":{"get":{"tags":["affiliate"],"summary":"Get Logo","description":"Authed logo bytes for the console preview (works before white-label is on).","operationId":"get_logo_affiliate_branding_logo_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["affiliate"],"summary":"Upload Logo","operationId":"upload_logo_affiliate_branding_logo_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_logo_affiliate_branding_logo_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["affiliate"],"summary":"Delete Logo","operationId":"delete_logo_affiliate_branding_logo_delete","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/branding/font":{"get":{"tags":["affiliate"],"summary":"Get Font","description":"Authed custom-font bytes for the console preview.","operationId":"get_font_affiliate_branding_font_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["affiliate"],"summary":"Upload Font","operationId":"upload_font_affiliate_branding_font_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_font_affiliate_branding_font_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["affiliate"],"summary":"Delete Font","operationId":"delete_font_affiliate_branding_font_delete","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/branding/favicon":{"get":{"tags":["affiliate"],"summary":"Get Favicon","operationId":"get_favicon_affiliate_branding_favicon_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["affiliate"],"summary":"Upload Favicon","operationId":"upload_favicon_affiliate_branding_favicon_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_favicon_affiliate_branding_favicon_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["affiliate"],"summary":"Delete Favicon","operationId":"delete_favicon_affiliate_branding_favicon_delete","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/landing":{"get":{"tags":["affiliate"],"summary":"Get Landing","operationId":"get_landing_affiliate_landing_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lane","in":"query","required":false,"schema":{"type":"string","default":"","title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["affiliate"],"summary":"Update Landing","operationId":"update_landing_affiliate_landing_put","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lane","in":"query","required":false,"schema":{"type":"string","default":"","title":"Lane"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/landing/publish":{"post":{"tags":["affiliate"],"summary":"Publish Landing","operationId":"publish_landing_affiliate_landing_publish_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lane","in":"query","required":false,"schema":{"type":"string","default":"","title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/landing/unpublish":{"post":{"tags":["affiliate"],"summary":"Unpublish Landing","operationId":"unpublish_landing_affiliate_landing_unpublish_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lane","in":"query","required":false,"schema":{"type":"string","default":"","title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/landing/preview-token":{"post":{"tags":["affiliate"],"summary":"Rotate Landing Preview Token","description":"Mint (or rotate) the public draft-share token. Regenerating revokes the old URL.","operationId":"rotate_landing_preview_token_affiliate_landing_preview_token_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lane","in":"query","required":false,"schema":{"type":"string","default":"","title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/landing/hero":{"get":{"tags":["affiliate"],"summary":"Get Landing Hero","description":"Authed hero bytes for the console preview.","operationId":"get_landing_hero_affiliate_landing_hero_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lane","in":"query","required":false,"schema":{"type":"string","default":"","title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["affiliate"],"summary":"Upload Landing Hero","operationId":"upload_landing_hero_affiliate_landing_hero_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lane","in":"query","required":false,"schema":{"type":"string","default":"","title":"Lane"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_landing_hero_affiliate_landing_hero_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["affiliate"],"summary":"Delete Landing Hero","operationId":"delete_landing_hero_affiliate_landing_hero_delete","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lane","in":"query","required":false,"schema":{"type":"string","default":"","title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LandingConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/whitelabel":{"get":{"tags":["affiliate"],"summary":"Get Whitelabel","operationId":"get_whitelabel_affiliate_whitelabel_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhiteLabelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["affiliate"],"summary":"Update Whitelabel","operationId":"update_whitelabel_affiliate_whitelabel_patch","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhiteLabelUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhiteLabelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/whitelabel/verify":{"post":{"tags":["affiliate"],"summary":"Verify Whitelabel Domain","description":"Probe the tenant's custom domain over HTTPS and flip ``custom_domain_verified``.\n\nA correctly-provisioned Cloudflare-for-SaaS custom hostname routes the domain\nto our app, so ``https://<domain>/health`` returns our JSON. If the hostname\nisn't claimed yet (Cloudflare error 1014) or DNS/TLS isn't ready, the probe\nfails and we leave it unverified — the UI explains what's still missing.","operationId":"verify_whitelabel_domain_affiliate_whitelabel_verify_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhiteLabelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/whitelabel/email":{"get":{"tags":["affiliate"],"summary":"Get Email Domain","operationId":"get_email_domain_affiliate_whitelabel_email_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomainOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/whitelabel/email/provision":{"post":{"tags":["affiliate"],"summary":"Provision Email Domain","operationId":"provision_email_domain_affiliate_whitelabel_email_provision_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomainOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/whitelabel/email/verify":{"post":{"tags":["affiliate"],"summary":"Verify Email Domain","operationId":"verify_email_domain_affiliate_whitelabel_email_verify_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomainOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/whitelabel/inbound":{"get":{"tags":["affiliate"],"summary":"Get Inbound Domain","operationId":"get_inbound_domain_affiliate_whitelabel_inbound_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomainOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/whitelabel/inbound/provision":{"post":{"tags":["affiliate"],"summary":"Provision Inbound Domain","operationId":"provision_inbound_domain_affiliate_whitelabel_inbound_provision_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomainOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/whitelabel/inbound/verify":{"post":{"tags":["affiliate"],"summary":"Verify Inbound Domain","operationId":"verify_inbound_domain_affiliate_whitelabel_inbound_verify_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomainOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/webhooks":{"get":{"tags":["affiliate"],"summary":"List Webhooks","operationId":"list_webhooks_affiliate_webhooks_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookOut"},"title":"Response List Webhooks Affiliate Webhooks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["affiliate"],"summary":"Create Webhook","operationId":"create_webhook_affiliate_webhooks_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/webhooks/{webhook_id}":{"patch":{"tags":["affiliate"],"summary":"Update Webhook","description":"Edit a webhook's URL, subscribed events, or enabled/disabled status.\n\nEvents are editable so a subscription can pick up event types added after the\nwebhook was created (an explicit list is frozen otherwise, and only ``[]``/``*``\nauto-receive new ones). Changing the URL rotates the signing secret in the same\nstep — a re-pointed stream must never keep a secret its previous recipient holds.","operationId":"update_webhook_affiliate_webhooks__webhook_id__patch","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["affiliate"],"summary":"Delete Webhook","operationId":"delete_webhook_affiliate_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/webhooks/{webhook_id}/rotate-secret":{"post":{"tags":["affiliate"],"summary":"Rotate Webhook Secret","operationId":"rotate_webhook_secret_affiliate_webhooks__webhook_id__rotate_secret_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretRotated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/cases":{"get":{"tags":["affiliate"],"summary":"List Cases","description":"Case counts (approved / more-info / denied) + weekly/monthly breakdown.\n\nSelects only non-PHI columns, so the encrypted intake/decision are never\nloaded or decrypted here.","operationId":"list_cases_affiliate_cases_get","parameters":[{"name":"granularity","in":"query","required":false,"schema":{"type":"string","default":"month","title":"Granularity"}},{"name":"periods","in":"query","required":false,"schema":{"type":"integer","default":6,"title":"Periods"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CasesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/fees":{"get":{"tags":["affiliate"],"summary":"Get Fees","operationId":"get_fees_affiliate_fees_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["affiliate"],"summary":"Update Fees","operationId":"update_fees_affiliate_fees_patch","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/pricing":{"get":{"tags":["affiliate"],"summary":"Get Pricing","operationId":"get_pricing_affiliate_pricing_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliatePricingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["affiliate"],"summary":"Update Pricing","operationId":"update_pricing_affiliate_pricing_patch","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliatePricingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliatePricingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/onboarding-invoice":{"get":{"tags":["affiliate"],"summary":"My Onboarding Invoice","operationId":"my_onboarding_invoice_affiliate_onboarding_invoice_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OnboardingInvoiceOut"},{"type":"null"}],"title":"Response My Onboarding Invoice Affiliate Onboarding Invoice Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/onboarding-invoice.pdf":{"get":{"tags":["affiliate"],"summary":"My Onboarding Invoice Pdf","description":"Branded PDF of the affiliate's onboarding fee summary.","operationId":"my_onboarding_invoice_pdf_affiliate_onboarding_invoice_pdf_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/upgrade-requests":{"post":{"tags":["affiliate"],"summary":"Create Upgrade Request","description":"File a plan upgrade / add-on request for admin follow-up (contact admin).","operationId":"create_upgrade_request_affiliate_upgrade_requests_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeRequestIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/medications":{"get":{"tags":["affiliate"],"summary":"List Medications","description":"The medication catalog priced for this tenant: cost (from its parent),\neditable increase, resulting price, and the avg retail reference.","operationId":"list_medications_affiliate_medications_get","parameters":[{"name":"lane","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lane"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateMedOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/medications/{medication_id}":{"patch":{"tags":["affiliate"],"summary":"Update Medication Price","description":"Set (or clear) this tenant's own increase over its cost for one med.","operationId":"update_medication_price_affiliate_medications__medication_id__patch","parameters":[{"name":"medication_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Medication Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateMedUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateMedRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/protocols":{"get":{"tags":["affiliate"],"summary":"List Shared Protocols","description":"The curated protocols shared with this tenant: cost (our marked-up price),\neditable increase, and the resulting price.","operationId":"list_shared_protocols_affiliate_protocols_get","parameters":[{"name":"lane","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lane"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateProtocolOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/protocols/{protocol_id}":{"patch":{"tags":["affiliate"],"summary":"Update Protocol Price","description":"Set (or clear) this tenant's own increase over its cost for one protocol.","operationId":"update_protocol_price_affiliate_protocols__protocol_id__patch","parameters":[{"name":"protocol_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Protocol Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateProtocolUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateProtocolRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/patients":{"get":{"tags":["affiliate"],"summary":"List Patients","description":"This tenant's own patients (clients). Scoped to the resolved affiliate.","operationId":"list_patients_affiliate_patients_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateClientRow"},"title":"Response List Patients Affiliate Patients Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/patients/{patient_id}":{"get":{"tags":["affiliate"],"summary":"Get Patient Detail","description":"One client's profile + their order process/history (no clinical PHI).\n\nEach ReviewCase is surfaced as an \"order\" with its review + payment state and\nthe linked fulfillment's operational timeline (carrier/tracking/dates). The\nencrypted intake/decision/items are never loaded or decrypted here.","operationId":"get_patient_detail_affiliate_patients__patient_id__get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Patient Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateClientDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["affiliate"],"summary":"Delete Patient","description":"Hard-delete a client account and their cases (super-admin only).\n\nRefused while the clinical file is still inside the five-year hold.\nDeleting a patient removes medical records, so this stays a platform\nsuper-admin action even inside the affiliate console — affiliate-role users\ncan view clients but never delete them. Mirrors ``/admin/patients`` deletion:\nreview cases (cascading consult sessions / detaching fulfillment) go first,\nthen the account (uploaded files CASCADE). Scoped to the selected tenant.","operationId":"delete_patient_affiliate_patients__patient_id__delete","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Patient Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/cases/{case_id}/medication-paid":{"post":{"tags":["affiliate"],"summary":"Mark Medication Paid","description":"Affiliate self-attests that an approved case's medication charge was\ncollected off-platform (their own processor).\n\nMoves the gate from ``pending`` → ``submitted``. The order is NOT released\nhere — an admin must verify the payment first\n(``/admin/cases/{id}/verify-medication-payment``). This exists only as a\ncontrolled fallback; the standard flow is the patient paying through our\nStripe Connect, which auto-releases via the webhook.","operationId":"mark_medication_paid_affiliate_cases__case_id__medication_paid_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationPaidIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationPaymentActionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/comm/threads":{"get":{"tags":["affiliate"],"summary":"List Comm Threads","description":"This tenant's client-email threads (owned + those it manages as a platform),\nnewest activity first.","operationId":"list_comm_threads_affiliate_comm_threads_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"bucket","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Bucket"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CommThreadRow"},"title":"Response List Comm Threads Affiliate Comm Threads Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/comm/summary":{"get":{"tags":["affiliate"],"summary":"Comm Summary","description":"Lightweight counts for the Communications nav badge + auto-refresh.\n\n``unread`` = client emails awaiting attention (drives the nav badge); ``open``\n= active non-clinical threads. Scoped to this tenant's own threads plus any it\nmanages as a platform (mirrors ``/comm/threads``).","operationId":"comm_summary_affiliate_comm_summary_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Comm Summary Affiliate Comm Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/nav-counts":{"get":{"tags":["affiliate"],"summary":"Nav Counts","description":"Per-tab \"needs attention\" counts for the sidebar badges.\n\n``communications`` = unread client emails; ``cases`` = cases needing the\naffiliate's attention (médico asked for more info, plus in-pipeline cases);\n``affiliates`` = sub-tenants pending onboarding (platform tenants only).","operationId":"nav_counts_affiliate_nav_counts_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Nav Counts Affiliate Nav Counts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/comm/threads/{thread_id}":{"get":{"tags":["affiliate"],"summary":"Get Comm Thread","operationId":"get_comm_thread_affiliate_comm_threads__thread_id__get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommThreadDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/comm/threads/{thread_id}/translate":{"get":{"tags":["affiliate"],"summary":"Translate Comm Thread","description":"Translate a thread's message bodies into ``lang`` (es|en|fr) for reading.","operationId":"translate_comm_thread_affiliate_comm_threads__thread_id__translate_get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"es","title":"Lang"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Translate Comm Thread Affiliate Comm Threads  Thread Id  Translate Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/comm/threads/{thread_id}/reply":{"post":{"tags":["affiliate"],"summary":"Reply Comm Thread","description":"Send a branded reply to the client and record it on the thread.\n\nWhen the thread is *managed* (DocEnLinea staff answering on the tenant's\nbehalf) and a ``managed_response_fee`` is set, a billing charge is recorded.","operationId":"reply_comm_thread_affiliate_comm_threads__thread_id__reply_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommReplyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommMessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/comm/threads/{thread_id}/status":{"post":{"tags":["affiliate"],"summary":"Set Comm Thread Status","operationId":"set_comm_thread_status_affiliate_comm_threads__thread_id__status_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommStatusIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommThreadRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/comm/threads/{thread_id}/escalate":{"post":{"tags":["affiliate"],"summary":"Escalate Comm Thread","description":"Flag a thread as clinical → route to a medical reviewer, lock CS reply.\n\nAny responder (or read-only follower) may escalate — it's a safety action.","operationId":"escalate_comm_thread_affiliate_comm_threads__thread_id__escalate_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommThreadRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/comm/threads/{thread_id}/escalate-cs":{"post":{"tags":["affiliate"],"summary":"Escalate Comm Thread Cs","description":"Hand a client-email thread to DocEnLinea customer service.\n\nFor a SELF-managed affiliate who can't resolve a thread themselves. The thread\nstays with DocEnLinea CS until it's marked resolved: the owning affiliate goes\nread-only (they still track it) and CS answers as the affiliate's brand. Books\nthe one-off ``cs_escalation_fee`` once. Refused for clinical threads (those go\nto a reviewer) and for already-managed threads (DocEnLinea already answers).","operationId":"escalate_comm_thread_cs_affiliate_comm_threads__thread_id__escalate_cs_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommThreadRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/comm/threads/{thread_id}/bucket":{"post":{"tags":["affiliate"],"summary":"Set Comm Thread Bucket","description":"Re-tag a thread's subject bucket (manual triage correction).","operationId":"set_comm_thread_bucket_affiliate_comm_threads__thread_id__bucket_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommBucketIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommThreadRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/responders":{"get":{"tags":["affiliate"],"summary":"List Responders","description":"This tenant's communications agents (people who answer client emails).","operationId":"list_responders_affiliate_responders_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResponderRow"},"title":"Response List Responders Affiliate Responders Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["affiliate"],"summary":"Create Responder","description":"Create a communications agent scoped to this tenant (their own subtree).","operationId":"create_responder_affiliate_responders_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponderCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponderRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/responders/{responder_id}":{"delete":{"tags":["affiliate"],"summary":"Suspend Responder","description":"Suspend a communications agent (revokes portal/inbox access).","operationId":"suspend_responder_affiliate_responders__responder_id__delete","parameters":[{"name":"responder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Responder Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/children":{"get":{"tags":["affiliate"],"summary":"List Children","description":"Direct sub-affiliates of this tenant (a Platform's clients).","operationId":"list_children_affiliate_children_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateChildRow"},"title":"Response List Children Affiliate Children Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["affiliate"],"summary":"Create Child","description":"A Platform creates one of its own sub-affiliates (parent = this platform).","operationId":"create_child_affiliate_children_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateChildCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateChildRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/children/{child_id}":{"patch":{"tags":["affiliate"],"summary":"Update Child","description":"A Platform edits one of its own direct sub-affiliates (parent stays fixed).","operationId":"update_child_affiliate_children__child_id__patch","parameters":[{"name":"child_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Child Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateChildUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateChildRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/profile":{"get":{"tags":["affiliate"],"summary":"Get Profile","operationId":"get_profile_affiliate_profile_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["affiliate"],"summary":"Update Profile","operationId":"update_profile_affiliate_profile_patch","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateProfileUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/profile/tax-doc":{"post":{"tags":["affiliate"],"summary":"Upload Tax Doc","operationId":"upload_tax_doc_affiliate_profile_tax_doc_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_tax_doc_affiliate_profile_tax_doc_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["affiliate"],"summary":"Get Tax Doc","operationId":"get_tax_doc_affiliate_profile_tax_doc_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["affiliate"],"summary":"Delete Tax Doc","operationId":"delete_tax_doc_affiliate_profile_tax_doc_delete","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/stripe/connect":{"post":{"tags":["affiliate"],"summary":"Stripe Connect","description":"Start (or resume) Stripe Connect Express onboarding for this affiliate.\n\nCreates the connected account on first use, stores its id, and returns a\none-time onboarding ``url`` the console redirects the affiliate to. When they\nfinish, Stripe sends them back to the affiliate profile, which calls\n``/stripe/refresh`` to pull the latest ``charges_enabled`` status.","operationId":"stripe_connect_affiliate_stripe_connect_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stripe Connect Affiliate Stripe Connect Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/stripe/refresh":{"post":{"tags":["affiliate"],"summary":"Stripe Refresh","description":"Re-pull the connected account status from Stripe (charges_enabled).","operationId":"stripe_refresh_affiliate_stripe_refresh_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/payouts":{"get":{"tags":["affiliate"],"summary":"Affiliate Payouts","description":"Payout statement for the affiliate: matured margin available + run history.\n\nRead-only; part of the \"100% accounting of everything\" the affiliate sees.","operationId":"affiliate_payouts_affiliate_payouts_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Affiliate Payouts Affiliate Payouts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/charges":{"post":{"tags":["affiliate"],"summary":"Add Charge","operationId":"add_charge_affiliate_charges_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChargeIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Charge Affiliate Charges Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/payments":{"get":{"tags":["affiliate"],"summary":"List Payments","operationId":"list_payments_affiliate_payments_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentOut"},"title":"Response List Payments Affiliate Payments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["affiliate"],"summary":"Add Payment","operationId":"add_payment_affiliate_payments_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/payments/{payment_id}":{"delete":{"tags":["affiliate"],"summary":"Delete Payment","operationId":"delete_payment_affiliate_payments__payment_id__delete","parameters":[{"name":"payment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Payment Id"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/billing":{"get":{"tags":["affiliate"],"summary":"Billing","description":"Itemized accounting for the selected range.\n\nDerived automatically: the monthly platform fee (each month), per-case review\nfee (× approved cases in the period), and one-time setup fee (in the period\nthe affiliate was created). Processing/markup/adjustment lines come from\nadmin-recorded charges; ``received`` from recorded payments. Totals cover the\nselected range only. The math lives in :mod:`api.services.billing` so the\nadmin portfolio view rolls up identically.","operationId":"billing_affiliate_billing_get","parameters":[{"name":"granularity","in":"query","required":false,"schema":{"type":"string","default":"month","title":"Granularity"}},{"name":"periods","in":"query","required":false,"schema":{"type":"integer","default":6,"title":"Periods"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/support":{"get":{"tags":["affiliate"],"summary":"Support Info","description":"Eligibility + curated FAQ for the AI Affiliate Service widget.","operationId":"support_info_affiliate_support_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"es","title":"Lang"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportInfoOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/guide":{"get":{"tags":["affiliate"],"summary":"Setup Guide","description":"Structured setup/onboarding guide + \"?\" help topics, tailored per option.\n\n- Direct DocEnLinea affiliates get the DocEnLinea-branded guide for their type.\n- A platform's own affiliates (``parent_affiliate_id`` set) get a fully\n  white-labeled guide: the brand is the platform's name and no DocEnLinea\n  reference appears anywhere.\n- Super-admins and platforms get a \"preview as\" switcher — admins across the\n  DocEnLinea options; platforms across the white-labeled guides they hand\n  their own affiliates.","operationId":"setup_guide_affiliate_guide_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"es","title":"Lang"}},{"name":"audience","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audience"}},{"name":"white_label","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"White Label"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Setup Guide Affiliate Guide Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/support/ask":{"post":{"tags":["affiliate"],"summary":"Support Ask","description":"Answer an affiliate's free-form question. Degrades to an escalation prompt\n(never a 500) when the AI is unavailable or unsure.","operationId":"support_ask_affiliate_support_ask_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportAskIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportAskOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/support/escalate":{"post":{"tags":["affiliate"],"summary":"Support Escalate","description":"Escalate an unresolved question to the affiliate team inbox.","operationId":"support_escalate_affiliate_support_escalate_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportEscalateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportEscalateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/starter/status":{"get":{"tags":["starter"],"summary":"Starter Status","description":"The onboarding checklist, the legal pack, and the recovery balance.","operationId":"starter_status_affiliate_starter_status_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarterStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/starter/documents/accept":{"post":{"tags":["starter"],"summary":"Accept Documents","description":"Record acceptance of the legal pack, pinned to the exact text shown.\n\nThe client echoes back the hash it rendered. A mismatch means the document\nwas republished between render and submit, so the acceptance is refused\nrather than attached to wording the subscriber never saw.","operationId":"accept_documents_affiliate_starter_documents_accept_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarterDocsAcceptIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarterStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/starter/policies":{"get":{"tags":["starter"],"summary":"Operating Policies","description":"The operating policies, for every affiliate. Spanish is the controlling text.","operationId":"operating_policies_affiliate_starter_policies_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarterDocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/starter/policies/accept":{"post":{"tags":["starter"],"summary":"Accept Operating Policies","description":"Record that this affiliate ticked every operating policy.\n\nStarters also meet this inside the documents gate. This endpoint is how\nevery other affiliate accepts the same text. It does not sign the commercial\nagreement.","operationId":"accept_operating_policies_affiliate_starter_policies_accept_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarterDocAcceptIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarterDocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/starter/rs":{"get":{"tags":["starter"],"summary":"Rs Guidelines","description":"Optional page. Only an affiliate who will use a provided Responsable Sanitario.","operationId":"rs_guidelines_affiliate_starter_rs_get","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarterDocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/starter/rs/accept":{"post":{"tags":["starter"],"summary":"Accept Rs Guidelines","description":"Records the choice to use a provided Responsable Sanitario. Not a go-live gate.","operationId":"accept_rs_guidelines_affiliate_starter_rs_accept_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarterDocAcceptIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarterDocOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/starter/lane":{"post":{"tags":["starter"],"summary":"Choose Lane","description":"Pick the lanes. Changeable until go-live, fixed afterwards.","operationId":"choose_lane_affiliate_starter_lane_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarterLaneIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarterStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/starter/stripe/connect":{"post":{"tags":["starter"],"summary":"Starter Stripe Connect","description":"Start Stripe Connect Express onboarding and return the one-time URL.\n\nStripe returns the subscriber to the console's onboarding view, which calls\n``/stripe/refresh`` to pull ``charges_enabled`` — the last gate.","operationId":"starter_stripe_connect_affiliate_starter_stripe_connect_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Starter Stripe Connect Affiliate Starter Stripe Connect Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/affiliate/starter/stripe/refresh":{"post":{"tags":["starter"],"summary":"Starter Stripe Refresh","description":"Re-pull ``charges_enabled``; go live on the call where it turns true.","operationId":"starter_stripe_refresh_affiliate_starter_stripe_refresh_post","parameters":[{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarterStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/recovery":{"get":{"tags":["starter"],"summary":"List Recoveries","description":"Every starter's running balance, for the admin Affiliates view.","operationId":"list_recoveries_admin_recovery_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Recoveries Admin Recovery Get"}}}}}}},"/admin/recovery/{affiliate_id}":{"get":{"tags":["starter"],"summary":"Get Recovery","operationId":"get_recovery_admin_recovery__affiliate_id__get","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Recovery Admin Recovery  Affiliate Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/recovery/{affiliate_id}/cap":{"post":{"tags":["starter"],"summary":"Cap Recovery","description":"Stop the ceiling early at a lower number, without converting yet.\n\nThis is the lever for a subscriber whose patients grew fast: the balance\nstops climbing at the cap, and conversion follows when it is met.","operationId":"cap_recovery_admin_recovery__affiliate_id__cap_post","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryCapIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cap Recovery Admin Recovery  Affiliate Id  Cap Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/recovery/{affiliate_id}/convert":{"post":{"tags":["starter"],"summary":"Convert Recovery","description":"Close the recovery and move the subscriber to the normal monthly fee.","operationId":"convert_recovery_admin_recovery__affiliate_id__convert_post","parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryConvertIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Convert Recovery Admin Recovery  Affiliate Id  Convert Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/me":{"get":{"tags":["medico"],"summary":"Me","operationId":"me_medico_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerProfileOut"}}}}}}},"/medico/me/availability":{"patch":{"tags":["medico"],"summary":"Set Availability","operationId":"set_availability_medico_me_availability_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/practice/agreement":{"post":{"tags":["medico"],"summary":"Accept Practice Agreement","description":"The physician accepts the current reviewer agreement. Stored on their account.","operationId":"accept_practice_agreement_medico_practice_agreement_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticeAcceptIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/practice/guidelines":{"post":{"tags":["medico"],"summary":"Accept Review Guidelines","description":"The physician accepts the review guidelines on their own page.","operationId":"accept_review_guidelines_medico_practice_guidelines_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticeAcceptIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/practice/license":{"post":{"tags":["medico"],"summary":"Accept License Advertising","description":"Optional. Lets affiliates show this physician's name and cédula in ads.","operationId":"accept_license_advertising_medico_practice_license_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticeAcceptIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/practice/signature":{"get":{"tags":["medico"],"summary":"Preview Own Signature","description":"The image this physician is asked to recognize as their own, before it can stamp.","operationId":"preview_own_signature_medico_practice_signature_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignaturePreviewOut"}}}}}},"post":{"tags":["medico"],"summary":"Attest Own Signature","description":"Bind the loaded image to this physician. A later upload voids the attestation.","operationId":"attest_own_signature_medico_practice_signature_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticeAcceptIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/practice/signature/capture":{"post":{"tags":["medico"],"summary":"Capture Own Signature","description":"Take a photo of ink on white paper and keep only the cleaned PNG.\n\nThe original photo is not stored. The physician still confirms the image\nthey are shown, in a second step, before it can stamp a receta.","operationId":"capture_own_signature_medico_practice_signature_capture_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_capture_own_signature_medico_practice_signature_capture_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignaturePreviewOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/practice/letterhead":{"post":{"tags":["medico"],"summary":"Save Letterhead","description":"The physician records the school and office printed on their receta.\n\nName and cédula stay with the administrator. Those are the legal identity.","operationId":"save_letterhead_medico_practice_letterhead_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LetterheadIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/practice/signing-method":{"post":{"tags":["medico"],"summary":"Set Signing Method","description":"This physician chooses facsimile or their own e.firma.\n\nThe private key is not part of this choice. Off means the photographed\nsignature. On means each approval is signed with the certificate on the\naccount. The platform switch can still keep every receta on the facsimile.","operationId":"set_signing_method_medico_practice_signing_method_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SigningMethodIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/practice/bot-contact":{"post":{"tags":["medico"],"summary":"Set Bot Contact","description":"This physician's consent to reminders from the Grok Bot Team.\n\nWithdrawing also turns off the admin switch, so a later consent needs the\nadmin again.","operationId":"set_bot_contact_medico_practice_bot_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotContactIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/practice/efirma-cert":{"post":{"tags":["medico"],"summary":"Upload Own Efirma Cert","description":"Store this physician's public .cer. A private key is refused.","operationId":"upload_own_efirma_cert_medico_practice_efirma_cert_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_own_efirma_cert_medico_practice_efirma_cert_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["medico"],"summary":"Delete Own Efirma Cert","operationId":"delete_own_efirma_cert_medico_practice_efirma_cert_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerProfileOut"}}}}}}},"/medico/bookings":{"get":{"tags":["medico"],"summary":"My Bookings","description":"Upcoming scheduled consults on the signed-in reviewer's calendar.\n\nAlso carries the last week's missed appointments. A booking whose slot passed\nwithout a call used to fall off this list an hour later, so a consult nobody\njoined left no trace on the calendar it was booked against.\n\nSuper-admins previewing the panel see all upcoming bookings so they can\nverify the calendar without being a specific reviewer.","operationId":"my_bookings_medico_bookings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReviewerBookingOut"},"type":"array","title":"Response My Bookings Medico Bookings Get"}}}}}}},"/medico/bookings/{booking_id}/cancel":{"post":{"tags":["medico"],"summary":"Cancel My Booking","description":"Remove an appointment from the reviewer's calendar.\n\nA missed slot (the call never happened) is removable. A future paid\nappointment is refunded only inside the same 12-hour window the patient\ncancel uses; past that window the charge stands.","operationId":"cancel_my_booking_medico_bookings__booking_id__cancel_post","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel My Booking Medico Bookings  Booking Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/bookings/{booking_id}/reschedule":{"post":{"tags":["medico"],"summary":"Reschedule My Booking","description":"Move an appointment, including one that was missed, to a future time.\n\nThe reviewer keeps the booking. The new time has to be in the future and\nmust not overlap another live appointment of the same reviewer. A missed\nbooking is put back to confirmed so it shows as upcoming again.","operationId":"reschedule_my_booking_medico_bookings__booking_id__reschedule_post","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingMoveIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerBookingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/bookings/{booking_id}/calendar.ics":{"get":{"tags":["medico"],"summary":"Booking Calendar","description":"Download an .ics invite for a consult on the reviewer's calendar.","operationId":"booking_calendar_medico_bookings__booking_id__calendar_ics_get","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/overview":{"get":{"tags":["medico"],"summary":"Overview","operationId":"overview_medico_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicoOverview"}}}}}}},"/medico/lane-catalog":{"get":{"tags":["medico"],"summary":"Lane Catalog","description":"The lane's approved medications + protocol templates the reviewer may apply.\n\nSourced from the admin-built pharmacy catalog (:class:`PharmacyMedication`)\nand :class:`ProtocolTemplate`. Empty until an admin configures them — the\nreviewer decision form shows nothing to \"click to add\" before then.","operationId":"lane_catalog_medico_lane_catalog_get","parameters":[{"name":"lane","in":"query","required":true,"schema":{"type":"string","title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Lane Catalog Medico Lane Catalog Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/protocol-price":{"post":{"tags":["medico"],"summary":"Protocol Price","description":"Price the current (possibly edited) protocol for a médico prescription.\n\nCatalog-linked lines are priced deterministically from the pharmacy catalog\n(per-mg when the item is mg-dosed, else per unit × quantity); the patient\nprice is the catalog price. Typed/unlinked lines are AI-estimated from the\nmedication name + dosage, then marked up. Recomputed each time the reviewer\nadjusts a dose or medication — the returned total drives the prescription's\ncost/price preview. Read-only; never writes.","operationId":"protocol_price_medico_protocol_price_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtocolPriceIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtocolPriceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/queue":{"get":{"tags":["medico"],"summary":"Queue","description":"Cases split into the médico panel's working queues (+ closed).\n\n- ``review``   — For a physician, one case: the review they already have\n  open, or the oldest case nobody has claimed. The waiting count is on\n  the overview. An administrator still receives the whole queue.\n- ``consults`` — Doctor video/voice queue: full-service cases, \"More info\"\n  requests that asked for a call, and appealed denials.\n- ``safety``   — an uncleared red side-effect report is halting this\n  patient's refills. Mostly *approved* cases, which is why it needs its own\n  section: the other working queues are keyed on an open case, and a patient\n  already on treatment is the one who has side effects to report.\n- ``hold``     — approved cases parked on the patient's incomplete profile\n  (shipping/billing). Waiting on the patient, not the médico.\n- ``closed``   — resolved cases (approved / denied), excluding held ones.","operationId":"queue_medico_queue_get","parameters":[{"name":"section","in":"query","required":false,"schema":{"type":"string","default":"review","title":"Section"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/api__schemas__medico__CaseListItem"},"title":"Response Queue Medico Queue Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/cases/{case_id}":{"get":{"tags":["medico"],"summary":"Get Case","operationId":"get_case_medico_cases__case_id__get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/cases/{case_id}/translate-intake":{"post":{"tags":["medico"],"summary":"Translate Case Intake","description":"Translate a case's intake for reading (default → Spanish). Display-only.\n\nEvery médico's first language is Spanish, so a foreign-language case can be\nread here without changing the stored record. Written review only — this is\nnever used for live video/voice consults.","operationId":"translate_case_intake_medico_cases__case_id__translate_intake_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","default":"es","title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Translate Case Intake Medico Cases  Case Id  Translate Intake Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/cases/{case_id}/files":{"get":{"tags":["medico"],"summary":"Case Patient Files","description":"Files the case's patient uploaded from their portal (labs/images/docs).\n\nAccount-level files, linked via ``patient_user_id``; empty for API-only cases\nwith no patient account. The reviewer must be able to access the case.","operationId":"case_patient_files_medico_cases__case_id__files_get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PatientFileOut"},"title":"Response Case Patient Files Medico Cases  Case Id  Files Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["medico"],"summary":"Send Case File","description":"Médico sends a file TO the patient (attached to the case).\n\nStored as a :class:`PatientFile` owned by the case's patient so it appears in\ntheir portal and downloads, but tagged ``source=\"reviewer\"`` so both panels\nshow the direction. API-only cases (no patient account) can't receive files.","operationId":"send_case_file_medico_cases__case_id__files_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_send_case_file_medico_cases__case_id__files_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientFileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/cases/{case_id}/notes":{"get":{"tags":["medico"],"summary":"List Case Notes","description":"All médico notes on a case (private + shared), newest first.","operationId":"list_case_notes_medico_cases__case_id__notes_get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/api__schemas__medico__CaseNoteOut"},"title":"Response List Case Notes Medico Cases  Case Id  Notes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["medico"],"summary":"Add Case Note","description":"Add a médico note to a case — private (clinician file) or shared with patient.","operationId":"add_case_note_medico_cases__case_id__notes_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseNoteIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__medico__CaseNoteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/cases/{case_id}/side-effects":{"get":{"tags":["medico"],"summary":"List Case Side Effects","description":"Everything this patient has reported, across lanes and cases, newest first.\n\nDeliberately not limited to this case. A renewal opens a new case, so a\ncase-scoped list hands the reviewer an empty history at the one moment they\nare re-targeting a protocol. Other lanes are included because a symptom the\npatient reported on another protocol is still a fact about this patient.\n``case_id`` on each row tells the panel which ones came from earlier cases.\n\nCarries the triage rationale and the model that produced it, so the reviewer\nsees not just the level but why it was assigned.","operationId":"list_case_side_effects_medico_cases__case_id__side_effects_get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReviewerReportOut"},"title":"Response List Case Side Effects Medico Cases  Case Id  Side Effects Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/side-effects/{report_id}/clear":{"post":{"tags":["medico"],"summary":"Clear Side Effect","description":"Clinician clears a red report, releasing the refill hold on its case.\n\nThe only way a halted refill ever moves again. Recorded with who cleared it\nand why, because that is the clinical judgement the halt was waiting for.","operationId":"clear_side_effect_medico_side_effects__report_id__clear_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportClearIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerReportOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/cases/{case_id}/files/{file_id}/download":{"get":{"tags":["medico"],"summary":"Download Case Patient File","description":"Stream a patient-uploaded file to a reviewer working the case.","operationId":"download_case_patient_file_medico_cases__case_id__files__file_id__download_get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/lab-panels":{"get":{"tags":["medico"],"summary":"Lab Panels","description":"Active basic-lab panels for a lane (admin-managed reference on a case).","operationId":"lab_panels_medico_lab_panels_get","parameters":[{"name":"lane","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LabPanelOut"},"title":"Response Lab Panels Medico Lab Panels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/cases/{case_id}/claim":{"post":{"tags":["medico"],"summary":"Claim Case","operationId":"claim_case_medico_cases__case_id__claim_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/cases/{case_id}/efirma-payload":{"post":{"tags":["medico"],"summary":"Efirma Payload","description":"The exact text the browser must sign, plus the public certificate.\n\nRefused while the platform switch is off. The private key is not part\nof this exchange.","operationId":"efirma_payload_medico_cases__case_id__efirma_payload_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EFirmaPayloadIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EFirmaPayloadOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/cases/{case_id}/decision":{"post":{"tags":["medico"],"summary":"Decide Case","operationId":"decide_case_medico_cases__case_id__decision_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/cases/{case_id}/ai-analyze":{"post":{"tags":["medico"],"summary":"Ai Analyze Case","description":"Generate an AI DRAFT suggestion for a case (never auto-applied).\n\nThe model proposes an outcome + a protocol drawn strictly from the lane's\napproved catalog, over a de-identified payload. The reviewer then Accepts &\nimplements (writes the real ``decision`` via ``/decision``) or overrides.\nFailures degrade to manual review (the caller sees an error toast).","operationId":"ai_analyze_case_medico_cases__case_id__ai_analyze_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/cases/{case_id}/session":{"post":{"tags":["medico"],"summary":"Start Session","operationId":"start_session_medico_cases__case_id__session_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionStartIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinTokenOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/sessions/{session_id}/token":{"post":{"tags":["medico"],"summary":"Refresh Session Token","operationId":"refresh_session_token_medico_sessions__session_id__token_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinTokenOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/sessions/{session_id}/end":{"post":{"tags":["medico"],"summary":"End Session","operationId":"end_session_medico_sessions__session_id__end_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultSessionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/sessions/{session_id}/transcript":{"post":{"tags":["medico"],"summary":"Append Transcript","operationId":"append_transcript_medico_sessions__session_id__transcript_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptIn"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/comm/clinical":{"get":{"tags":["medico"],"summary":"Clinical Queue","description":"Threads escalated to a medical reviewer (cross-affiliate).","operationId":"clinical_queue_medico_comm_clinical_get","parameters":[{"name":"include_resolved","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Resolved"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminCommThreadRow"},"title":"Response Clinical Queue Medico Comm Clinical Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/comm/clinical/summary":{"get":{"tags":["medico"],"summary":"Clinical Summary","description":"Counts for the Clinical-messages nav badge + auto-refresh: ``unread`` (new\nescalated threads awaiting a reviewer) and ``total`` currently on hold.","operationId":"clinical_summary_medico_comm_clinical_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Clinical Summary Medico Comm Clinical Summary Get"}}}}}}},"/medico/comm/threads/{thread_id}":{"get":{"tags":["medico"],"summary":"Clinical Thread","operationId":"clinical_thread_medico_comm_threads__thread_id__get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommThreadDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/comm/threads/{thread_id}/translate":{"get":{"tags":["medico"],"summary":"Clinical Translate","description":"Translate a clinical thread's message bodies into ``lang`` for reading.","operationId":"clinical_translate_medico_comm_threads__thread_id__translate_get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"es","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Clinical Translate Medico Comm Threads  Thread Id  Translate Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/comm/threads/{thread_id}/reply":{"post":{"tags":["medico"],"summary":"Clinical Reply","description":"A reviewer's clinical reply — relayed verbatim to the client + logged.\n\nSending resolves the clinical hold (status -> pending, awaiting the client)\nso CS can handle any non-clinical follow-up. It does NOT re-arm on its own —\nif a later reply is clinical, a human re-escalates it.","operationId":"clinical_reply_medico_comm_threads__thread_id__reply_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommReplyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommMessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/medico/comm/threads/{thread_id}/declinical":{"post":{"tags":["medico"],"summary":"Return To Service","description":"Bounce a wrongly-escalated (non-clinical) thread back to customer service.\n\nTriage only *suggests* medical; a human escalation can still miss. When a\nreviewer opens a thread that isn't actually clinical (e.g. a shipping reply\nwhose subject echoed a drug name), this clears the hold WITHOUT sending a\nclinical reply — the thread leaves this queue and CS can answer it normally.","operationId":"return_to_service_medico_comm_threads__thread_id__declinical_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCommThreadRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/external-ref":{"post":{"tags":["patient"],"summary":"Link External Ref","description":"Attribute this account to the referring affiliate's own id for the patient.\n\nSignup already binds ``?ref=`` for brand-new patients. This covers the other\nhalf: someone who *already* has an account here and arrives on a fresh\nreferral link. Because they authenticated first, the binding is safe — the\nperson clicking proved they own the account, which a signup-time ref can't.\n\nIdempotent, and never an error path. Re-posting a ref the account already\nholds succeeds; anything else returns ``linked: false`` and changes nothing.\n\nBinding is only half the job. Cases and orders copy the ref off the account\nwhen they are created, so anything already open predates the binding and\nstays unattributable. We backfill those and replay their current state, which\nmakes a second visit to the referral link the fix for a patient whose first\none never carried a ref.","operationId":"link_external_ref_patient_external_ref_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalRefIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalRefOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/profile":{"get":{"tags":["patient"],"summary":"Get Profile","operationId":"get_profile_patient_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}}}},"patch":{"tags":["patient"],"summary":"Update Profile","operationId":"update_profile_patient_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/files":{"get":{"tags":["patient"],"summary":"List Files","description":"List the caller's own uploaded files (metadata only, newest first).","operationId":"list_files_patient_files_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientFileOut"},"type":"array","title":"Response List Files Patient Files Get"}}}}}},"post":{"tags":["patient"],"summary":"Upload File","description":"Upload a lab result, image, or document to the caller's own account.\n\n``case_id`` links the file to a specific case (e.g. shared during a live\nconsult) so the reviewer working that case sees it in context; it's validated\nto belong to the caller and silently ignored if it doesn't.","operationId":"upload_file_patient_files_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_patient_files_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientFileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/files/{file_id}/download":{"get":{"tags":["patient"],"summary":"Download File","description":"Stream the caller's own file bytes (decrypted on the way out).","operationId":"download_file_patient_files__file_id__download_get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/files/{file_id}":{"delete":{"tags":["patient"],"summary":"Delete File","description":"Delete one of the caller's own files.\n\nRefused while that patient's clinical file is still inside the five-year\nhold. A lab, image, or document already in the expediente stays until the\nlater of the last medical act and consent.","operationId":"delete_file_patient_files__file_id__delete","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/body-comp/analyze":{"post":{"tags":["patient"],"summary":"Body Comp Analyze","description":"Stateless body-fat estimate from photo(s). Persists nothing; the patient\nsaves the result explicitly via ``POST /patient/health/body-comp``.","operationId":"body_comp_analyze_patient_body_comp_analyze_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BodyCompAnalyzeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BodyCompAnalyzeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/health/body-comp":{"post":{"tags":["patient"],"summary":"Save Body Comp","description":"Save a body-composition entry (weight/height/BMI/body-fat) to history.","operationId":"save_body_comp_patient_health_body_comp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BodyCompSaveIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthLogOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/health/vitals-check":{"post":{"tags":["patient"],"summary":"Save Vitals Check","description":"Ingest a camera (rPPG) vitals reading — available on all lanes.","operationId":"save_vitals_check_patient_health_vitals_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VitalsCheckIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthLogOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/health/history":{"get":{"tags":["patient"],"summary":"Health History","description":"The caller's own body-composition + camera-vitals history (newest first).","operationId":"health_history_patient_health_history_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthHistoryOut"}}}}}}},"/patient/intake/state":{"get":{"tags":["patient"],"summary":"Intake State","description":"Tell the portal whether the patient must still complete intake, which\nlanes are available (with per-lane status), and whether we still need to ask\nfor their biological sex before showing the lane picker.","operationId":"intake_state_patient_intake_state_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientIntakeState"}}}}}}},"/patient/intake/sex":{"post":{"tags":["patient"],"summary":"Set Sex","description":"Record the patient's biological sex (drives lane eligibility).","operationId":"set_sex_patient_intake_sex_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SexIn"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/intake/questions":{"get":{"tags":["patient"],"summary":"Intake Questions","description":"Active questions for a lane the patient is allowed to choose.","operationId":"intake_questions_patient_intake_questions_get","parameters":[{"name":"lane","in":"query","required":true,"schema":{"type":"string","title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/api__schemas__patient__IntakeQuestionOut"},"title":"Response Intake Questions Patient Intake Questions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/intake/legal":{"get":{"tags":["patient"],"summary":"Intake Legal","description":"Consent + attestations for the intake's final step.\n\nServed rather than bundled so the portal can't drift from the wording the\nsubmit endpoint validates against.","operationId":"intake_legal_patient_intake_legal_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"es","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeLegalOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/intake/submit":{"post":{"tags":["patient"],"summary":"Intake Submit","description":"Create the patient's review case from their lane answers (one at a time).","operationId":"intake_submit_patient_intake_submit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeSubmit"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntakeSubmitResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/payments":{"get":{"tags":["patient"],"summary":"My Payments","description":"The patient's own payment receipts (newest first).\n\n``amount`` is the total the patient was charged (medication charges are\nIVA-inclusive). Canceled/expired checkout attempts are hidden so the list\nreads as a clean history of real charges + anything still due.","operationId":"my_payments_patient_payments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response My Payments Patient Payments Get"}}}}}}},"/patient/cases":{"get":{"tags":["patient"],"summary":"My Cases","description":"The patient's own cases (newest first): status, how they answered, and the\nreviewer's decision once one exists. Sanitized — no reviewer PII.","operationId":"my_cases_patient_cases_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/api__schemas__patient__PatientCaseOut"},"type":"array","title":"Response My Cases Patient Cases Get"}}}}}}},"/patient/orders":{"get":{"tags":["patient"],"summary":"My Orders","description":"The patient's own shipments (fulfillment orders), newest first.\n\nSurfaces the fulfillment lifecycle + carrier/tracking so the patient can\nfollow their medication after a reviewer approves. Scoped to the caller's\nown cases; clinical items and the raw address are never returned.","operationId":"my_orders_patient_orders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientOrderOut"},"type":"array","title":"Response My Orders Patient Orders Get"}}}}}}},"/patient/orders/{order_id}/received":{"post":{"tags":["patient"],"summary":"Confirm Order Received","description":"Patient confirms their shipment arrived, closing the order as delivered.\n\nThe pharmacy can only report that it handed the parcel to a carrier; the\npatient is the one party who knows it turned up. So this, not the pharmacy\npanel, is what normally writes ``delivered`` (an admin can still record it\nfor someone who never confirms).","operationId":"confirm_order_received_patient_orders__order_id__received_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOrderOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/side-effects/options":{"get":{"tags":["patient"],"summary":"Side Effect Options","description":"The vocabulary the panel renders. Served so the checkboxes that can halt a\nrefill are always the same list the server enforces.","operationId":"side_effect_options_patient_side_effects_options_get","parameters":[{"name":"lane","in":"query","required":true,"schema":{"type":"string","title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__patient__SideEffectOptionsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/side-effects":{"get":{"tags":["patient"],"summary":"My Side Effects","description":"Everything this patient has reported, newest first.","operationId":"my_side_effects_patient_side_effects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/api__schemas__patient__SideEffectReportOut"},"type":"array","title":"Response My Side Effects Patient Side Effects Get"}}}}}},"post":{"tags":["patient"],"summary":"Submit Side Effect","description":"Log how the medication is affecting me, against one of my approved cases.","operationId":"submit_side_effect_patient_side_effects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__patient__SideEffectReportIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__patient__SideEffectReportOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/refills":{"get":{"tags":["patient"],"summary":"My Refills","description":"The patient's reviewer-authorized refill plans, newest first.","operationId":"my_refills_patient_refills_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RefillPlanOut"},"type":"array","title":"Response My Refills Patient Refills Get"}}}}}}},"/patient/refills/{plan_id}/reorder":{"post":{"tags":["patient"],"summary":"Reorder Refill","description":"Confirm a due refill and send one fill to the pharmacy.\n\nA monthly plan with a saved card is charged first. The shipment uses the\noriginal receta. A plan with no card on file still confirms without a charge.","operationId":"reorder_refill_patient_refills__plan_id__reorder_post","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reorder Refill Patient Refills  Plan Id  Reorder Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/cases/{case_id}/checkout":{"post":{"tags":["patient"],"summary":"Case Checkout","description":"Create a fresh Stripe Checkout URL for a pending-payment case (Pay now).","operationId":"case_checkout_patient_cases__case_id__checkout_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Case Checkout Patient Cases  Case Id  Checkout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/cases/{case_id}/cancel":{"post":{"tags":["patient"],"summary":"Cancel Case","description":"Cancel a case that's parked on a post-approval profile hold.\n\nAvailable only while the case is APPROVED but waiting on the patient's\nshipping + billing address (the \"update or cancel\" branch of the daily\nreminder). Sets the case to ``cancelled``, cancels any refill plans, and\nemails a confirmation. Once the profile is complete (payment opens) this is\nno longer offered.","operationId":"cancel_case_patient_cases__case_id__cancel_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Case Patient Cases  Case Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/cases/{case_id}/medication-checkout":{"post":{"tags":["patient"],"summary":"Medication Checkout","description":"Create a Stripe Checkout URL for an approved case's MEDICATION charge.\n\nCharged after the médico approves and before the order reaches the pharmacy.\nThe amount is the sum of the approved protocol's catalog prices (recomputed\nfrom the stored decision). On payment the webhook releases the order.","operationId":"medication_checkout_patient_cases__case_id__medication_checkout_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"plan","in":"query","required":false,"schema":{"type":"string","default":"month","title":"Plan"}},{"name":"accept_returns","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Accept Returns"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Medication Checkout Patient Cases  Case Id  Medication Checkout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/cases/{case_id}/lab-requisition.pdf":{"get":{"tags":["patient"],"summary":"Lab Requisition Pdf","description":"Branded, printable requisition of the labs the médico requested for this\ncase. White-label aware (the affiliate's brand name + Responsable Sanitario).\n404 when no labs were requested on the decision.","operationId":"lab_requisition_pdf_patient_cases__case_id__lab_requisition_pdf_get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/lab-requisition/{lane}.pdf":{"get":{"tags":["patient"],"summary":"Lane Lab Requisition Pdf","description":"Branded (white-label) requisition of a lane's recommended BASIC labs for\nthe signed-in patient to download/print before uploading results. 404 when\nthe lane has no basic panel configured.","operationId":"lane_lab_requisition_pdf_patient_lab_requisition__lane__pdf_get","parameters":[{"name":"lane","in":"path","required":true,"schema":{"type":"string","title":"Lane"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","maxLength":5,"default":"es","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/cases/{case_id}/consult/request":{"post":{"tags":["patient"],"summary":"Consult Request","description":"Patient requests an on-demand video/voice consult for one of their cases.\n\nIf the affiliate has a consult price (and Stripe Connect), the patient pays\nfirst (Stripe Checkout) and the case enters the médico consult queue once the\ncharge completes. Otherwise the request is free and queues immediately.","operationId":"consult_request_patient_cases__case_id__consult_request_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultRequestIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultRequestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/cases/{case_id}/consult/slots":{"get":{"tags":["patient"],"summary":"Consult Slots","description":"Open appointment slots for this case's lane (UTC starts; UI localizes).\n\nOnly médicos cleared for live consults who speak the case locale are offered.","operationId":"consult_slots_patient_cases__case_id__consult_slots_get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConsultSlotOut"},"title":"Response Consult Slots Patient Cases  Case Id  Consult Slots Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/cases/{case_id}/consult/waitlist":{"post":{"tags":["patient"],"summary":"Consult Waitlist Join","description":"Opt into the \"notify me when a doctor is available\" waitlist.\n\nUsed when no open consult slots exist for the case's lane/locale (no médico\nhas set availability yet). The cron notifies the patient — email + in-portal\n— once slots appear, then clears the flag. Idempotent.","operationId":"consult_waitlist_join_patient_cases__case_id__consult_waitlist_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultWaitlistResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["patient"],"summary":"Consult Waitlist Leave","description":"Leave the consult availability waitlist.","operationId":"consult_waitlist_leave_patient_cases__case_id__consult_waitlist_delete","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultWaitlistResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/cases/{case_id}/consult/book":{"post":{"tags":["patient"],"summary":"Consult Book","description":"Book a specific slot: reserve it, then confirm (free) or pay (Stripe).\n\nValidates the slot is still open on the reviewer's calendar. Free bookings\nconfirm immediately; paid bookings are held until the Stripe webhook lands.","operationId":"consult_book_patient_cases__case_id__consult_book_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultBookIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultBookResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/bookings":{"get":{"tags":["patient"],"summary":"My Bookings List","description":"The patient's scheduled consults — upcoming, plus any that fell through.\n\nA booking used to drop out of this list two hours past its slot, which took\nthe whole appointment card with it: time, reviewer, kind and the reschedule\naction all vanished at once and the page fell back to a generic \"a provider\nwill start the call\" line. A consult that never happened is unfinished\nbusiness, so it keeps its place here until the patient dismisses it.","operationId":"my_bookings_list_patient_bookings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConsultBookingOut"},"type":"array","title":"Response My Bookings List Patient Bookings Get"}}}}}}},"/patient/bookings/{booking_id}/previsit":{"get":{"tags":["patient"],"summary":"Get Previsit","description":"Read the patient's own pre-visit check-in for a booking.","operationId":"get_previsit_patient_bookings__booking_id__previsit_get","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreVisitOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["patient"],"summary":"Save Previsit","description":"Save (or update) the patient's pre-visit check-in answers.","operationId":"save_previsit_patient_bookings__booking_id__previsit_put","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreVisitIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreVisitOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/bookings/{booking_id}/dismiss":{"post":{"tags":["patient"],"summary":"Dismiss Booking","description":"Clear a missed consult from the patient's portal.\n\nOnly a ``missed`` booking can be dismissed — it is the one state the portal\nholds open indefinitely, and the patient is the one who decides they're done\nwith it. Idempotent: dismissing twice is a no-op, not a conflict.","operationId":"dismiss_booking_patient_bookings__booking_id__dismiss_post","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dismiss Booking Patient Bookings  Booking Id  Dismiss Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/bookings/{booking_id}/calendar.ics":{"get":{"tags":["patient"],"summary":"Booking Calendar","description":"Download an .ics calendar invite for one of the patient's own consults.","operationId":"booking_calendar_patient_bookings__booking_id__calendar_ics_get","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/bookings/{booking_id}/cancel":{"post":{"tags":["patient"],"summary":"Cancel Booking","description":"Cancel a scheduled consult. Refund only if cancelled ≥12h before the call.\n\nPolicy: after the 12h window (or once the call time has passed / no-show)\nthere is NO refund and NO free rebook — the patient must book (and pay for)\na new consult.","operationId":"cancel_booking_patient_bookings__booking_id__cancel_post","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultCancelIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultCancelResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/bookings/{booking_id}/reschedule":{"post":{"tags":["patient"],"summary":"Reschedule Booking","description":"Move a booking to a new open slot. Allowed only ≥6h before the old time.\n\nThe payment (if any) carries over — rescheduling never re-charges. A médico\nwho speaks the case locale and is cleared for consults must own the new slot.","operationId":"reschedule_booking_patient_bookings__booking_id__reschedule_post","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultRescheduleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultBookResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/cases/{case_id}/consult/join":{"post":{"tags":["patient"],"summary":"Consult Join","description":"Join the reviewer/doctor's LIVE session for this case (patient side).\n\nReturns an Agora token for the active session's channel. 409 if no call is\nlive yet — the patient waits until the reviewer starts it.","operationId":"consult_join_patient_cases__case_id__consult_join_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinTokenOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/cases/{case_id}/notes":{"get":{"tags":["patient"],"summary":"Case Shared Notes","description":"Notes the médico chose to SHARE with the patient for this case (newest first).","operationId":"case_shared_notes_patient_cases__case_id__notes_get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/api__schemas__patient__CaseNoteOut"},"title":"Response Case Shared Notes Patient Cases  Case Id  Notes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patient/consult/{session_id}/token":{"post":{"tags":["patient"],"summary":"Consult Refresh Token","description":"Renew the patient's Agora token before it expires (long consults).","operationId":"consult_refresh_token_patient_consult__session_id__token_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinTokenOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/me":{"get":{"tags":["pharma"],"summary":"Me","operationId":"me_pharma_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PharmaProfileOut"}}}}}}},"/pharma/pharmacies":{"get":{"tags":["pharma"],"summary":"List Pharmacies For Picker","description":"Active pharmacies, for the super-admin pharmacy picker. Admin-only.","operationId":"list_pharmacies_for_picker_pharma_pharmacies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/api__schemas__pharma__PharmacyOut"},"type":"array","title":"Response List Pharmacies For Picker Pharma Pharmacies Get"}}}}}}},"/pharma/overview":{"get":{"tags":["pharma"],"summary":"Overview","operationId":"overview_pharma_overview_get","parameters":[{"name":"pharmacy_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Pharmacy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PharmaOverview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/incoming":{"get":{"tags":["pharma"],"summary":"List Incoming","description":"Unpaid approvals are not shown to a pharmacy.\n\nA fulfillment order is created only after the medication payment is\nconfirmed. Until then this list is empty, including for an administrator\npreviewing the pharmacy panel.","operationId":"list_incoming_pharma_incoming_get","parameters":[{"name":"pharmacy_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Pharmacy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IncomingItem"},"title":"Response List Incoming Pharma Incoming Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/orders":{"get":{"tags":["pharma"],"summary":"List Orders","operationId":"list_orders_pharma_orders_get","parameters":[{"name":"section","in":"query","required":false,"schema":{"type":"string","pattern":"^(queue|active|closed|exceptions)$","default":"queue","title":"Section"}},{"name":"pharmacy_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Pharmacy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderListItem"},"title":"Response List Orders Pharma Orders Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/orders/{order_id}":{"get":{"tags":["pharma"],"summary":"Get Order","operationId":"get_order_pharma_orders__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/orders/{order_id}/prescription":{"get":{"tags":["pharma"],"summary":"Get Order Prescription","description":"Download the auto-generated prescription (receta médica) PDF for an order.\n\nScoped like the order itself (owning pharmacy or admin). Returns 404 when no\nprescription has been attached yet.","operationId":"get_order_prescription_pharma_orders__order_id__prescription_get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/policies":{"get":{"tags":["pharma"],"summary":"Fulfillment Policies","operationId":"fulfillment_policies_pharma_policies_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}},{"name":"pharmacy_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Pharmacy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PharmacyPolicyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/policies/accept":{"post":{"tags":["pharma"],"summary":"Accept Fulfillment Policies","operationId":"accept_fulfillment_policies_pharma_policies_accept_post","parameters":[{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}},{"name":"pharmacy_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Pharmacy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PharmacyPolicyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/orders/{order_id}/claim":{"post":{"tags":["pharma"],"summary":"Claim Order","operationId":"claim_order_pharma_orders__order_id__claim_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}},{"name":"pharmacy_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Pharmacy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/orders/{order_id}/advance":{"post":{"tags":["pharma"],"summary":"Advance Order","operationId":"advance_order_pharma_orders__order_id__advance_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvanceIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/pace":{"get":{"tags":["pharma"],"summary":"Pace","description":"Review, fulfillment, and delivery days for the last 90 days.","operationId":"pace_pharma_pace_get","parameters":[{"name":"pharmacy_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Pharmacy Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/orders/{order_id}/exception":{"post":{"tags":["pharma"],"summary":"Mark Exception","description":"Pharmacy records a refused parcel, a bad address, or a warm pen.","operationId":"mark_exception_pharma_orders__order_id__exception_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/orders/{order_id}/exception/resolve":{"post":{"tags":["pharma"],"summary":"Resolve Exception","description":"Pharmacy closes an open exception. This does not mark the order delivered.","operationId":"resolve_exception_pharma_orders__order_id__exception_resolve_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/orders/{order_id}/delivery-outcome":{"post":{"tags":["pharma"],"summary":"Record Delivery Outcome","description":"Admin records a failed delivery or a refusal, and the patient is emailed.","operationId":"record_delivery_outcome_pharma_orders__order_id__delivery_outcome_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryOutcomeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/orders/{order_id}/return-received":{"post":{"tags":["pharma"],"summary":"Record Return","description":"Admin records that a failed delivery came back, and whether it is intact.","operationId":"record_return_pharma_orders__order_id__return_received_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnReceivedIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/orders/{order_id}/reship-charge":{"post":{"tags":["pharma"],"summary":"Charge Reship","description":"Email the patient a checkout for the shipping on a reship of the same medication.\n\nUsed only when the first shipment went to the address the patient gave.\nOur process and pharmacy failures are reshipped at no charge.","operationId":"charge_reship_pharma_orders__order_id__reship_charge_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Charge Reship Pharma Orders  Order Id  Reship Charge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pharma/orders/{order_id}/reship":{"post":{"tags":["pharma"],"summary":"Reship Order","description":"Send a failed delivery again, once the policy allows it.","operationId":"reship_order_pharma_orders__order_id__reship_post","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReshipIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases":{"post":{"tags":["intake"],"summary":"Create Case","operationId":"create_case_v1_cases_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseIntakeIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["cases"],"summary":"List Cases","description":"List the calling affiliate's cases (newest first). Scoped to the affiliate;\nanother tenant's cases are never returned. Filter by ``status``, ``lane``, or\n``updated_since`` (ISO-8601) and page with ``limit``/``offset``.","operationId":"list_cases_v1_cases_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ReviewCaseStatus"},{"type":"null"}],"title":"Status"}},{"name":"lane","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Lane"}},{"name":"updated_since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated Since"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/fulfillment":{"post":{"tags":["intake"],"summary":"Create Fulfillment","description":"Submit an already-approved script + shipping for direct fulfillment (§5.2).\n\nFor affiliates that run their own medical review (e.g. a platform under its\nown Responsable Sanitario). The order skips the DocEnLinea reviewer and lands\nstraight in the pharmacy queue for its lane. Every stage change is streamed\nback via the ``fulfillment.updated`` webhook. Idempotent on ``external_ref``:\na repeat with the same ref returns the existing open order.","operationId":"create_fulfillment_v1_fulfillment_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentIntakeIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["fulfillment"],"summary":"List Fulfillment","description":"List the calling affiliate's fulfillment orders (newest first).","operationId":"list_fulfillment_v1_fulfillment_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentStatus"},{"type":"null"}],"title":"Status"}},{"name":"lane","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Lane"}},{"name":"updated_since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated Since"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases/{case_id}":{"get":{"tags":["cases"],"summary":"Get Case Status","operationId":"get_case_status_v1_cases__case_id__get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases/{case_id}/prescription":{"get":{"tags":["cases"],"summary":"Get Case Prescription","operationId":"get_case_prescription_v1_cases__case_id__prescription_get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrescriptionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/side-effects/options":{"get":{"tags":["cases"],"summary":"Side Effect Options","description":"The closed vocabulary to collect against. Fetch this rather than hardcoding\nit: the red-flag list is what halts a refill, and it will grow.","operationId":"side_effect_options_v1_side_effects_options_get","parameters":[{"name":"lane","in":"query","required":true,"schema":{"type":"string","maxLength":20,"title":"Lane"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__intake__SideEffectOptionsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases/{case_id}/reports":{"post":{"tags":["cases"],"summary":"Submit Case Report","description":"Forward a side-effect report the affiliate's own app collected.\n\nThis is the path that closes the loop for a partner already asking patients\nhow they feel: without it, that answer never reaches the medical reviewer and\na refill ships on a date alone. Triaged identically to a report typed into\nour own portal, including the refill halt on red.","operationId":"submit_case_report_v1_cases__case_id__reports_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__intake__SideEffectReportIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__schemas__intake__SideEffectReportOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["cases"],"summary":"List Case Reports","description":"This patient's reports, newest first — including any this affiliate did not file.\n\nSpans the patient's cases and lanes rather than one case, so a renewal does\nnot reset the partner's view of a patient they are still serving.\n\n``affiliate_id`` is passed explicitly and is not optional here: case-scoping\nused to keep tenants apart as a side effect, and patient-scoped history\nwithout it would expose reports the same patient filed under a different\naffiliate.\n\nExcludes the reviewer-facing triage rationale and the patient's free text:\na partner needs to know that refills are halted, not to read the clinical\nnote behind it.","operationId":"list_case_reports_v1_cases__case_id__reports_get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/api__schemas__intake__SideEffectReportOut"},"title":"Response List Case Reports V1 Cases  Case Id  Reports Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/consults":{"get":{"tags":["cases"],"summary":"List Consults","description":"The calling affiliate's scheduled consults, soonest first.\n\nOrdered by ``scheduled_start`` ascending rather than newest-created, because\nthe question a partner asks this endpoint is \"what is coming up\", and paging\nby creation order would interleave next week's appointment with one booked\nmonths ago.\n\nFilter by ``status``, ``lane``, ``external_ref`` (one patient's appointments),\nand a ``scheduled_from``/``scheduled_to`` window. Bookings still in ``hold``\nare included only if explicitly asked for by ``status``: a held slot is not\nan appointment yet, and it should not appear in the default \"upcoming\" list a\npartner renders to a patient.","operationId":"list_consults_v1_consults_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ConsultBookingStatus"},{"type":"null"}],"title":"Status"}},{"name":"lane","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Lane"}},{"name":"external_ref","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"External Ref"}},{"name":"scheduled_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled From"}},{"name":"scheduled_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases/{case_id}/consults":{"get":{"tags":["cases"],"summary":"List Case Consults","description":"Every consult on one case, soonest first — including holds and history.\n\nUnlike the list endpoint this does not hide holds, because scoped to a single\ncase the question is \"what happened with this appointment\", and a hold that\nlapsed is part of that answer.","operationId":"list_case_consults_v1_cases__case_id__consults_get","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConsultOut"},"title":"Response List Case Consults V1 Cases  Case Id  Consults Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cases/{case_id}/revoke-consent":{"post":{"tags":["cases"],"summary":"Revoke Case Consent","description":"Patient/affiliate-initiated consent revocation (§4, §5.2).\n\nRecords the revocation and propagates it to the reviewer (the controller) via\nthe ``consent.revoked`` webhook. Does **not** delete data or retroactively\naffect the lawfulness of prior processing — the reviewer decides what happens\nto the case from here.","operationId":"revoke_case_consent_v1_cases__case_id__revoke_consent_post","parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeConsentIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeConsentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/fulfillment/{order_id}":{"get":{"tags":["fulfillment"],"summary":"Get Fulfillment","operationId":"get_fulfillment_v1_fulfillment__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/events":{"get":{"tags":["events"],"summary":"List Events","description":"List events emitted to the calling affiliate (newest first). Filter by\n``type`` (e.g. ``case.created``) or ``since`` (ISO-8601).","operationId":"list_events_v1_events_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Type"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/stripe/webhook":{"post":{"tags":["payments"],"summary":"Stripe Webhook","operationId":"stripe_webhook_payments_stripe_webhook_post","parameters":[{"name":"Stripe-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stripe Webhook Payments Stripe Webhook Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/stripe/webhook/{provider}":{"post":{"tags":["payments"],"summary":"Stripe Webhook Provider","description":"Per-provider webhook endpoint (secondary / high-risk MIDs).\n\nEach processor is a separate Stripe account with its own signing secret, so it\ngets its own endpoint. The charge already stored ``provider`` on the payment,\nso the handler logic is identical — only the verifying secret differs.","operationId":"stripe_webhook_provider_payments_stripe_webhook__provider__post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"Stripe-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Stripe Webhook Provider Payments Stripe Webhook  Provider  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/email/inbound":{"post":{"tags":["inbound-email"],"summary":"Receive Inbound","operationId":"receive_inbound_webhooks_email_inbound_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Receive Inbound Webhooks Email Inbound Post"}}}}}}},"/comms/me":{"get":{"tags":["communications"],"summary":"Comms Me","description":"Who am I + my scope (single tenant vs. cross-tenant staff).","operationId":"comms_me_comms_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Comms Me Comms Me Get"}}}}}}},"/comms/threads":{"get":{"tags":["communications"],"summary":"List Threads","operationId":"list_threads_comms_threads_get","parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"managed","title":"Scope"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"bucket","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Bucket"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminCommThreadRow"},"title":"Response List Threads Comms Threads Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/comms/summary":{"get":{"tags":["communications"],"summary":"Threads Summary","description":"Per-status thread counts for the current scope/bucket, powering the inbox\nstatus cards. ``open``/``pending``/``closed`` exclude clinical threads (which\nget their own card), so ``all`` == open + pending + closed + clinical. The\nfree-text search (``q``) is intentionally not applied here — the cards reflect\nthe whole scope, not the current search.","operationId":"threads_summary_comms_summary_get","parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"managed","title":"Scope"}},{"name":"bucket","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Bucket"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Threads Summary Comms Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/comms/bucket-summary":{"get":{"tags":["communications"],"summary":"Bucket Summary","description":"Per-subject count of UNRESOLVED threads (anything not ``closed``), powering\nthe subject nested-tab alert badges. Keyed by ``CommSubjectBucket.key``, plus\n``\"\"`` (all subjects) and ``_none`` (threads with no subject yet).","operationId":"bucket_summary_comms_bucket_summary_get","parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"managed","title":"Scope"}},{"name":"affiliate_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Bucket Summary Comms Bucket Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/comms/threads/{thread_id}":{"get":{"tags":["communications"],"summary":"Get Thread","operationId":"get_thread_comms_threads__thread_id__get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommThreadDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/comms/threads/{thread_id}/translate":{"get":{"tags":["communications"],"summary":"Translate Thread","description":"Translate a thread's message bodies into ``lang`` (es|en|fr) for reading.\n\nDisplay-only: the stored messages are untouched. The reader picks a language\nand the panel swaps the on-screen text.","operationId":"translate_thread_comms_threads__thread_id__translate_get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"es","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Translate Thread Comms Threads  Thread Id  Translate Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/comms/threads/{thread_id}/reply":{"post":{"tags":["communications"],"summary":"Reply Thread","operationId":"reply_thread_comms_threads__thread_id__reply_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommReplyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommMessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/comms/threads/{thread_id}/status":{"post":{"tags":["communications"],"summary":"Set Status","operationId":"set_status_comms_threads__thread_id__status_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommStatusIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCommThreadRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/comms/threads/{thread_id}/escalate":{"post":{"tags":["communications"],"summary":"Escalate Thread","description":"Flag clinical → route to a medical reviewer and lock CS reply.","operationId":"escalate_thread_comms_threads__thread_id__escalate_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCommThreadRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/comms/threads/{thread_id}/take-over":{"post":{"tags":["communications"],"summary":"Take Over Thread","description":"DocEnLinea takes over a self-managed thread so CS can answer it.\n\nThe read-only escape hatch for \"the affiliate needs help\": a DocEnLinea agent\nescalates the thread to customer service on the affiliate's behalf (same end\nstate as the affiliate's own escalate button, so it enters the Managed queue\nand the owning affiliate goes read-only + can track it). DocEnLinea-initiated,\nso it is NOT billed — only the affiliate's own escalation books the fee. Staff\nonly; refused for clinical, already-escalated, or already-managed threads.","operationId":"take_over_thread_comms_threads__thread_id__take_over_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCommThreadRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/comms/threads/{thread_id}/bucket":{"post":{"tags":["communications"],"summary":"Set Bucket","description":"Re-tag the thread's subject bucket (clinical buckets auto-escalate).","operationId":"set_bucket_comms_threads__thread_id__bucket_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Thread Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommBucketIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCommThreadRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/comms/buckets":{"get":{"tags":["communications"],"summary":"List Buckets For Portal","description":"Active subject buckets for the triage dropdown.","operationId":"list_buckets_for_portal_comms_buckets_get","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CommSubjectBucketOut"},"title":"Response List Buckets For Portal Comms Buckets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"tags":["meta"],"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"tags":["meta"],"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/evaluacion/{token}":{"get":{"summary":"Doctor Evaluation Page","description":"Public vía form. The token is the only credential.","operationId":"doctor_evaluation_page_evaluacion__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountingOut":{"properties":{"currency":{"type":"string","title":"Currency"},"granularity":{"type":"string","title":"Granularity"},"config":{"$ref":"#/components/schemas/FeeConfigOut"},"periods":{"items":{"$ref":"#/components/schemas/AccountingPeriod"},"type":"array","title":"Periods"},"billed":{"type":"number","title":"Billed"},"received":{"type":"number","title":"Received"},"outstanding":{"type":"number","title":"Outstanding"},"payments":{"items":{"$ref":"#/components/schemas/PaymentOut"},"type":"array","title":"Payments"},"iva_pct":{"type":"number","title":"Iva Pct","default":16.0},"iva_total":{"type":"number","title":"Iva Total","default":0.0},"gross":{"type":"number","title":"Gross","default":0.0},"margin":{"type":"number","title":"Margin","default":0.0},"docenlinea_revenue":{"type":"number","title":"Docenlinea Revenue","default":0.0},"supplier_cost":{"type":"number","title":"Supplier Cost","default":0.0},"subtree_gross":{"type":"number","title":"Subtree Gross","default":0.0},"subtree_margin":{"type":"number","title":"Subtree Margin","default":0.0},"med_iva_pct":{"type":"number","title":"Med Iva Pct","default":16.0},"med_iva_collected":{"type":"number","title":"Med Iva Collected","default":0.0},"med_iva_on_margin":{"type":"number","title":"Med Iva On Margin","default":0.0},"med_iva_on_docenlinea_revenue":{"type":"number","title":"Med Iva On Docenlinea Revenue","default":0.0},"med_iva_on_supplier_cost":{"type":"number","title":"Med Iva On Supplier Cost","default":0.0},"med_iva_remitted_by_self":{"type":"boolean","title":"Med Iva Remitted By Self","default":false},"subtree_med_iva_collected":{"type":"number","title":"Subtree Med Iva Collected","default":0.0},"subtree_med_iva_on_margin":{"type":"number","title":"Subtree Med Iva On Margin","default":0.0},"has_children":{"type":"boolean","title":"Has Children","default":false},"usd_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Usd Rate"},"billed_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Billed Usd"},"received_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Received Usd"},"outstanding_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Outstanding Usd"}},"type":"object","required":["currency","granularity","config","periods","billed","received","outstanding","payments"],"title":"AccountingOut"},"AccountingPeriod":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"start":{"type":"string","format":"date","title":"Start"},"end":{"type":"string","format":"date","title":"End"},"cases_approved":{"type":"integer","title":"Cases Approved"},"lines":{"items":{"$ref":"#/components/schemas/LineItem"},"type":"array","title":"Lines"},"charges_total":{"type":"number","title":"Charges Total"},"received":{"type":"number","title":"Received"}},"type":"object","required":["key","label","start","end","cases_approved","lines","charges_total","received"],"title":"AccountingPeriod"},"ActivityCreate":{"properties":{"entity_type":{"type":"string","pattern":"^(lead|affiliate)$","title":"Entity Type"},"entity_id":{"type":"string","title":"Entity Id"},"kind":{"type":"string","title":"Kind","default":"note"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"summary":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Summary"},"body":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"Body"},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred At"},"next_action":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Next Action"},"next_action_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Action At"}},"type":"object","required":["entity_type","entity_id"],"title":"ActivityCreate"},"ActivityOut":{"properties":{"id":{"type":"string","title":"Id"},"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"string","title":"Entity Id"},"kind":{"type":"string","title":"Kind"},"direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"next_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Action"},"next_action_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Action At"},"actor_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor User Id"},"actor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","entity_type","entity_id","kind","occurred_at","created_at"],"title":"ActivityOut"},"Address":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"line1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Line1"},"line2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Line2"},"colonia":{"anyOf":[{"type":"string","maxLength":150},{"type":"null"}],"title":"Colonia"},"city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Country"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"}},"type":"object","title":"Address"},"AdminAccountingOut":{"properties":{"granularity":{"type":"string","title":"Granularity"},"totals":{"items":{"$ref":"#/components/schemas/CurrencyTotal"},"type":"array","title":"Totals"},"affiliates":{"items":{"$ref":"#/components/schemas/AffiliateAccountingRow"},"type":"array","title":"Affiliates"},"gross_total":{"type":"number","title":"Gross Total","default":0.0},"docenlinea_revenue_total":{"type":"number","title":"Docenlinea Revenue Total","default":0.0},"channel_margin_total":{"type":"number","title":"Channel Margin Total","default":0.0},"iva_total":{"type":"number","title":"Iva Total","default":0.0},"med_iva_collected_total":{"type":"number","title":"Med Iva Collected Total","default":0.0},"med_iva_supplier_total":{"type":"number","title":"Med Iva Supplier Total","default":0.0},"med_iva_docenlinea_total":{"type":"number","title":"Med Iva Docenlinea Total","default":0.0},"med_iva_channel_total":{"type":"number","title":"Med Iva Channel Total","default":0.0},"med_iva_held_no_rfc_total":{"type":"number","title":"Med Iva Held No Rfc Total","default":0.0},"gross_total_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Total Usd"},"docenlinea_revenue_total_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Docenlinea Revenue Total Usd"},"iva_total_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Iva Total Usd"}},"type":"object","required":["granularity","totals","affiliates"],"title":"AdminAccountingOut"},"AdminCommThreadRow":{"properties":{"id":{"type":"string","title":"Id"},"affiliate_id":{"type":"string","title":"Affiliate Id"},"affiliate_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Name"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"client_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Email"},"status":{"type":"string","title":"Status"},"unread":{"type":"boolean","title":"Unread","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_clinical":{"type":"boolean","title":"Is Clinical","default":false},"cs_escalated":{"type":"boolean","title":"Cs Escalated","default":false},"subject_bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Bucket"},"message_count":{"type":"integer","title":"Message Count","default":0},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Message At"},"patient_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Ref"}},"type":"object","required":["id","affiliate_id","status"],"title":"AdminCommThreadRow","description":"A comm thread row for the admin/portal cross-tenant inbox."},"AdminUserCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"full_name":{"type":"string","maxLength":200,"minLength":1,"title":"Full Name"},"is_superadmin":{"type":"boolean","title":"Is Superadmin","default":false},"perms":{"additionalProperties":{"type":"string"},"type":"object","title":"Perms"}},"type":"object","required":["email","full_name"],"title":"AdminUserCreate"},"AdminUserOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"status":{"$ref":"#/components/schemas/UserStatus"},"is_superadmin":{"type":"boolean","title":"Is Superadmin","default":false},"perms":{"additionalProperties":{"type":"string"},"type":"object","title":"Perms"},"two_factor":{"type":"boolean","title":"Two Factor","default":false},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","status","created_at"],"title":"AdminUserOut"},"AdminUserUpdate":{"properties":{"full_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Full Name"},"is_superadmin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Superadmin"},"perms":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Perms"},"status":{"anyOf":[{"$ref":"#/components/schemas/UserStatus"},{"type":"null"}]}},"type":"object","title":"AdminUserUpdate"},"AdvanceIn":{"properties":{"to_status":{"type":"string","enum":["compounding","ready","shipped","delivered","cancelled"],"title":"To Status"},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"},"tracking_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Number"},"tracking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Url"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["to_status"],"title":"AdvanceIn","description":"Move an order to the next state in its lifecycle."},"AffiliateAccountingRow":{"properties":{"affiliate_id":{"type":"string","title":"Affiliate Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"type":{"type":"string","title":"Type"},"status":{"type":"string","title":"Status"},"currency":{"type":"string","title":"Currency"},"cases_total":{"type":"integer","title":"Cases Total"},"cases_approved":{"type":"integer","title":"Cases Approved"},"cases_needs_info":{"type":"integer","title":"Cases Needs Info"},"cases_rejected":{"type":"integer","title":"Cases Rejected"},"billed":{"type":"number","title":"Billed"},"received":{"type":"number","title":"Received"},"outstanding":{"type":"number","title":"Outstanding"},"iva_total":{"type":"number","title":"Iva Total","default":0.0},"gross":{"type":"number","title":"Gross","default":0.0},"margin":{"type":"number","title":"Margin","default":0.0},"docenlinea_revenue":{"type":"number","title":"Docenlinea Revenue","default":0.0},"subtree_gross":{"type":"number","title":"Subtree Gross","default":0.0},"subtree_margin":{"type":"number","title":"Subtree Margin","default":0.0},"med_iva_collected":{"type":"number","title":"Med Iva Collected","default":0.0},"med_iva_on_margin":{"type":"number","title":"Med Iva On Margin","default":0.0},"med_iva_on_docenlinea_revenue":{"type":"number","title":"Med Iva On Docenlinea Revenue","default":0.0},"med_iva_on_supplier_cost":{"type":"number","title":"Med Iva On Supplier Cost","default":0.0},"med_iva_remitted_by_self":{"type":"boolean","title":"Med Iva Remitted By Self","default":false},"parent_affiliate_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Affiliate Id"},"parent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Name"},"usd_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Usd Rate"},"billed_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Billed Usd"},"received_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Received Usd"},"outstanding_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Outstanding Usd"}},"type":"object","required":["affiliate_id","name","slug","type","status","currency","cases_total","cases_approved","cases_needs_info","cases_rejected","billed","received","outstanding"],"title":"AffiliateAccountingRow"},"AffiliateChildCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"type":{"type":"string","title":"Type","default":"influencer"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"white_label":{"type":"boolean","title":"White Label","default":false},"api_access":{"type":"boolean","title":"Api Access","default":false},"comms_access":{"type":"boolean","title":"Comms Access","default":false},"lanes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Lanes"},"user_email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"User Email"},"user_full_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"User Full Name"},"user_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Password"}},"type":"object","required":["name"],"title":"AffiliateChildCreate"},"AffiliateChildRow":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"type":{"type":"string","title":"Type"},"status":{"type":"string","title":"Status"},"white_label":{"type":"boolean","title":"White Label","default":false},"api_access":{"type":"boolean","title":"Api Access","default":false},"comms_access":{"type":"boolean","title":"Comms Access","default":false},"lanes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Lanes"},"clients_count":{"type":"integer","title":"Clients Count","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","slug","type","status","created_at"],"title":"AffiliateChildRow"},"AffiliateChildUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"white_label":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"White Label"},"api_access":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Api Access"},"comms_access":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Comms Access"},"lanes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Lanes"}},"type":"object","title":"AffiliateChildUpdate","description":"Platform edits to one of its own sub-affiliates (parent stays fixed)."},"AffiliateClientDetail":{"properties":{"id":{"type":"string","title":"Id"},"client_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Ref"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"email":{"type":"string","title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"orders":{"items":{"$ref":"#/components/schemas/ClientOrderRow"},"type":"array","title":"Orders","default":[]},"threads":{"items":{"$ref":"#/components/schemas/ClientThreadRow"},"type":"array","title":"Threads","default":[]}},"type":"object","required":["id","email","status","created_at"],"title":"AffiliateClientDetail"},"AffiliateClientRow":{"properties":{"id":{"type":"string","title":"Id"},"client_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Ref"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"email":{"type":"string","title":"Email"},"status":{"type":"string","title":"Status"},"cases_count":{"type":"integer","title":"Cases Count","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","status","created_at"],"title":"AffiliateClientRow"},"AffiliateCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"type":{"$ref":"#/components/schemas/AffiliateType"},"jurisdiction":{"$ref":"#/components/schemas/Jurisdiction","default":"MX"},"locations":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Locations"},"parent_affiliate_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Affiliate Id"},"active":{"type":"boolean","title":"Active","default":true},"white_label":{"type":"boolean","title":"White Label","default":false},"api_access":{"type":"boolean","title":"Api Access","default":false},"comms_access":{"type":"boolean","title":"Comms Access","default":false},"support_ai_access":{"type":"boolean","title":"Support Ai Access","default":false},"landing_enabled":{"type":"boolean","title":"Landing Enabled","default":false},"lane_landing_enabled":{"type":"boolean","title":"Lane Landing Enabled","default":false},"rs_managed":{"type":"boolean","title":"Rs Managed","default":false},"comms_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comms Mode"},"lanes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Lanes"},"plan_key":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Plan Key"},"addon_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Addon Keys"},"extra_setup_fee":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Extra Setup Fee"},"discount_pct":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Discount Pct"},"create_invoice":{"type":"boolean","title":"Create Invoice","default":false},"user_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"User Email"},"user_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Password"},"user_full_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"User Full Name"}},"type":"object","required":["name","type"],"title":"AffiliateCreate"},"AffiliateMedOut":{"properties":{"can_edit":{"type":"boolean","title":"Can Edit"},"currency":{"type":"string","title":"Currency"},"items":{"items":{"$ref":"#/components/schemas/AffiliateMedRow"},"type":"array","title":"Items"},"iva_pct":{"type":"number","title":"Iva Pct","default":16.0},"shipping_fee":{"type":"number","title":"Shipping Fee","default":0.0},"has_rfc":{"type":"boolean","title":"Has Rfc","default":false}},"type":"object","required":["can_edit","currency","items"],"title":"AffiliateMedOut"},"AffiliateMedRow":{"properties":{"medication_id":{"type":"string","title":"Medication Id"},"pharmacy_id":{"type":"string","title":"Pharmacy Id"},"pharmacy_name":{"type":"string","title":"Pharmacy Name"},"lane":{"type":"string","title":"Lane"},"name":{"type":"string","title":"Name"},"dosage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dosage"},"form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"currency":{"type":"string","title":"Currency"},"cost":{"type":"number","title":"Cost"},"increase":{"type":"number","title":"Increase"},"price":{"type":"number","title":"Price"},"iva":{"type":"number","title":"Iva","default":0.0},"shipping":{"type":"number","title":"Shipping","default":0.0},"total":{"type":"number","title":"Total","default":0.0},"avg_retail_price":{"type":"number","title":"Avg Retail Price","default":0.0},"has_override":{"type":"boolean","title":"Has Override","default":false}},"type":"object","required":["medication_id","pharmacy_id","pharmacy_name","lane","name","currency","cost","increase","price"],"title":"AffiliateMedRow"},"AffiliateMedUpdate":{"properties":{"increase":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Increase"}},"type":"object","title":"AffiliateMedUpdate"},"AffiliateOverview":{"properties":{"affiliate":{"$ref":"#/components/schemas/api__schemas__affiliate__AffiliateOut"},"api_keys_active":{"type":"integer","title":"Api Keys Active"},"webhooks_active":{"type":"integer","title":"Webhooks Active"},"responsable_sanitario":{"anyOf":[{"$ref":"#/components/schemas/ResponsableSanitario"},{"type":"null"}]},"rs_managed":{"type":"boolean","title":"Rs Managed","default":false},"rs_verified":{"type":"boolean","title":"Rs Verified","default":false}},"type":"object","required":["affiliate","api_keys_active","webhooks_active"],"title":"AffiliateOverview"},"AffiliatePricingOut":{"properties":{"currency":{"type":"string","title":"Currency"},"setup_fee":{"type":"number","title":"Setup Fee"},"monthly_platform_fee":{"type":"number","title":"Monthly Platform Fee"},"per_case_fee":{"type":"number","title":"Per Case Fee"},"per_consult_fee":{"type":"number","title":"Per Consult Fee"},"med_cost_markup_pct":{"type":"number","title":"Med Cost Markup Pct"},"proc_cost_pct":{"type":"number","title":"Proc Cost Pct","default":0.0},"proc_cost_flat":{"type":"number","title":"Proc Cost Flat","default":0.0},"lanes":{"items":{"$ref":"#/components/schemas/LanePrice"},"type":"array","title":"Lanes"},"call_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Call Price"},"med_markup_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Med Markup Pct"},"med_markup_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Med Markup Amount"},"proc_fee_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Proc Fee Pct"},"proc_fee_flat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Proc Fee Flat"},"is_platform":{"type":"boolean","title":"Is Platform","default":false},"can_edit":{"type":"boolean","title":"Can Edit"},"iva_pct":{"type":"number","title":"Iva Pct","default":16.0},"has_rfc":{"type":"boolean","title":"Has Rfc","default":false}},"type":"object","required":["currency","setup_fee","monthly_platform_fee","per_case_fee","per_consult_fee","med_cost_markup_pct","lanes","call_price","med_markup_pct","can_edit"],"title":"AffiliatePricingOut"},"AffiliatePricingUpdate":{"properties":{"review_prices":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Review Prices"},"call_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Call Price"},"med_markup_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Med Markup Pct"},"med_markup_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Med Markup Amount"},"proc_fee_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Proc Fee Pct"},"proc_fee_flat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Proc Fee Flat"}},"type":"object","title":"AffiliatePricingUpdate"},"AffiliateProfileOut":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"login_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Login Email"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/PostalAddress"},{"type":"null"}]},"shipping_address":{"anyOf":[{"$ref":"#/components/schemas/PostalAddress"},{"type":"null"}]},"rfc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rfc"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"tax_regime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Regime"},"cfdi_use":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cfdi Use"},"tax_postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Postal Code"},"has_tax_doc":{"type":"boolean","title":"Has Tax Doc","default":false},"tax_doc_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Doc Filename"},"stripe_connected":{"type":"boolean","title":"Stripe Connected","default":false},"stripe_charges_enabled":{"type":"boolean","title":"Stripe Charges Enabled","default":false},"stripe_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Account Id"},"currency":{"type":"string","title":"Currency","default":"MXN"},"payment_processing_pct":{"type":"number","title":"Payment Processing Pct","default":0.0},"payment_processing_flat":{"type":"number","title":"Payment Processing Flat","default":0.0}},"type":"object","required":["name","slug"],"title":"AffiliateProfileOut"},"AffiliateProfileUpdate":{"properties":{"contact_email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Contact Email"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/PostalAddress"},{"type":"null"}]},"shipping_address":{"anyOf":[{"$ref":"#/components/schemas/PostalAddress"},{"type":"null"}]},"rfc":{"anyOf":[{"type":"string","maxLength":13},{"type":"null"}],"title":"Rfc"},"legal_name":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Legal Name"},"tax_regime":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Tax Regime"},"cfdi_use":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Cfdi Use"},"tax_postal_code":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Tax Postal Code"}},"type":"object","title":"AffiliateProfileUpdate"},"AffiliateProtocolOut":{"properties":{"can_edit":{"type":"boolean","title":"Can Edit"},"currency":{"type":"string","title":"Currency"},"items":{"items":{"$ref":"#/components/schemas/AffiliateProtocolRow"},"type":"array","title":"Items"},"iva_pct":{"type":"number","title":"Iva Pct","default":16.0},"shipping_fee":{"type":"number","title":"Shipping Fee","default":0.0},"has_rfc":{"type":"boolean","title":"Has Rfc","default":false}},"type":"object","required":["can_edit","currency","items"],"title":"AffiliateProtocolOut"},"AffiliateProtocolRow":{"properties":{"protocol_id":{"type":"string","title":"Protocol Id"},"lane":{"type":"string","title":"Lane"},"name":{"type":"string","title":"Name"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"currency":{"type":"string","title":"Currency"},"cost":{"type":"number","title":"Cost"},"increase":{"type":"number","title":"Increase"},"price":{"type":"number","title":"Price"},"iva":{"type":"number","title":"Iva","default":0.0},"shipping":{"type":"number","title":"Shipping","default":0.0},"total":{"type":"number","title":"Total","default":0.0},"avg_retail_price":{"type":"number","title":"Avg Retail Price","default":0.0},"item_count":{"type":"integer","title":"Item Count","default":0},"has_override":{"type":"boolean","title":"Has Override","default":false}},"type":"object","required":["protocol_id","lane","name","currency","cost","increase","price"],"title":"AffiliateProtocolRow"},"AffiliateProtocolUpdate":{"properties":{"increase":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Increase"}},"type":"object","title":"AffiliateProtocolUpdate"},"AffiliateStatus":{"type":"string","enum":["pending","active","suspended"],"title":"AffiliateStatus"},"AffiliateType":{"type":"string","enum":["platform","app","influencer","trainer","medical_office","gym"],"title":"AffiliateType"},"AffiliateUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"code":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Code"},"type":{"anyOf":[{"$ref":"#/components/schemas/AffiliateType"},{"type":"null"}]},"jurisdiction":{"anyOf":[{"$ref":"#/components/schemas/Jurisdiction"},{"type":"null"}]},"locations":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Locations"},"parent_affiliate_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Affiliate Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/AffiliateStatus"},{"type":"null"}]},"white_label":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"White Label"},"api_access":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Api Access"},"comms_access":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Comms Access"},"support_ai_access":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Support Ai Access"},"landing_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Landing Enabled"},"lane_landing_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Lane Landing Enabled"},"rs_managed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rs Managed"},"review_release_delay_minutes":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Review Release Delay Minutes"},"comms_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comms Mode"},"from_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"From Name"},"from_email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"From Email"},"reply_to":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Reply To"},"custom_domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Custom Domain"},"custom_domain_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Custom Domain Verified"},"email_domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email Domain"},"inbound_email_domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Inbound Email Domain"},"lanes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Lanes"},"stripe_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Account Id"},"payout_cadence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Cadence"},"payout_hold_days":{"anyOf":[{"type":"integer","maximum":90.0,"minimum":0.0},{"type":"null"}],"title":"Payout Hold Days"},"reserve_pct":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reserve Pct"},"payment_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Mode"},"net_terms_days":{"anyOf":[{"type":"integer","maximum":120.0,"minimum":0.0},{"type":"null"}],"title":"Net Terms Days"},"deposit_level":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Deposit Level"},"review_prices":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Review Prices"},"call_price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Price"}},"type":"object","title":"AffiliateUpdate"},"ApiKeyCreate":{"properties":{"label":{"type":"string","maxLength":120,"minLength":1,"title":"Label"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"}},"type":"object","required":["label"],"title":"ApiKeyCreate"},"ApiKeyCreated":{"properties":{"api_key":{"$ref":"#/components/schemas/ApiKeyOut"},"key":{"type":"string","title":"Key"}},"type":"object","required":["api_key","key"],"title":"ApiKeyCreated","description":"Returned once on creation — ``key`` is never retrievable again."},"ApiKeyOut":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"prefix":{"type":"string","title":"Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"status":{"$ref":"#/components/schemas/ApiKeyStatus"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","label","prefix","scopes","status","created_at"],"title":"ApiKeyOut"},"ApiKeyStatus":{"type":"string","enum":["active","revoked"],"title":"ApiKeyStatus"},"AttestationBlockOut":{"properties":{"version":{"type":"string","title":"Version"},"lang":{"type":"string","title":"Lang"},"items":{"items":{"$ref":"#/components/schemas/AttestationItemOut"},"type":"array","title":"Items"}},"type":"object","required":["version","lang","items"],"title":"AttestationBlockOut","description":"The five Responsable-Sanitario attestations, rendered server-side."},"AttestationItemOut":{"properties":{"key":{"type":"string","title":"Key"},"text":{"type":"string","title":"Text"}},"type":"object","required":["key","text"],"title":"AttestationItemOut"},"AuditLogOut":{"properties":{"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"actor_type":{"type":"string","title":"Actor Type"},"actor_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Email"},"action":{"type":"string","title":"Action"},"subject_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Type"},"subject_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Id"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"}},"type":"object","required":["id","created_at","actor_type","action"],"title":"AuditLogOut"},"AvailWindow":{"properties":{"day":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Day","description":"0=Mon … 6=Sun"},"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"}},"type":"object","required":["day","start","end"],"title":"AvailWindow"},"AvailabilityIn":{"properties":{"online_now":{"type":"boolean","title":"Online Now"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone"},"windows":{"anyOf":[{"items":{"$ref":"#/components/schemas/AvailWindow"},"type":"array"},{"type":"null"}],"title":"Windows"}},"type":"object","required":["online_now"],"title":"AvailabilityIn"},"AvailabilitySlot":{"properties":{"day":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Day","description":"0=Mon … 6=Sun"},"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"}},"type":"object","required":["day","start","end"],"title":"AvailabilitySlot"},"AvailabilityUpdate":{"properties":{"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone"},"availability":{"items":{"$ref":"#/components/schemas/AvailabilitySlot"},"type":"array","title":"Availability"}},"type":"object","title":"AvailabilityUpdate"},"BillingChargeKind":{"type":"string","enum":["setup","platform","review","processing","markup","comms","network_credit","adjustment","other"],"title":"BillingChargeKind"},"BlendAddon":{"properties":{"activo":{"type":"string","maxLength":120,"minLength":1,"title":"Activo"},"amount":{"type":"number","minimum":0.0,"title":"Amount"}},"type":"object","required":["activo","amount"],"title":"BlendAddon"},"BlendCharge":{"properties":{"producto":{"type":"string","maxLength":80,"minLength":1,"title":"Producto"},"presentacion":{"type":"string","maxLength":80,"minLength":1,"title":"Presentacion"},"two":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Two"},"more":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"More"}},"type":"object","required":["producto","presentacion"],"title":"BlendCharge"},"BlendRules":{"properties":{"base":{"type":"number","exclusiveMinimum":0.0,"title":"Base","default":30},"forms":{"items":{"type":"string"},"type":"array","title":"Forms"},"more":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"More"},"addons":{"items":{"$ref":"#/components/schemas/BlendAddon"},"type":"array","title":"Addons"}},"type":"object","title":"BlendRules","description":"Combination charge by the active added, per ``base`` units of the pack."},"BodyCompAnalyzeIn":{"properties":{"images":{"items":{"type":"string"},"type":"array","maxItems":3,"minItems":1,"title":"Images"},"height_cm":{"type":"number","exclusiveMaximum":260.0,"exclusiveMinimum":50.0,"title":"Height Cm"},"weight_kg":{"type":"number","exclusiveMaximum":400.0,"exclusiveMinimum":20.0,"title":"Weight Kg"}},"type":"object","required":["images","height_cm","weight_kg"],"title":"BodyCompAnalyzeIn","description":"Stateless body-fat estimate request. Photos are data URLs (never stored)."},"BodyCompAnalyzeOut":{"properties":{"available":{"type":"boolean","title":"Available","default":true},"estimated_bf_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Bf Pct"},"confidence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Confidence"},"reasoning":{"type":"string","title":"Reasoning","default":""},"bmi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bmi"}},"type":"object","title":"BodyCompAnalyzeOut"},"BodyCompSaveIn":{"properties":{"weight_kg":{"type":"number","exclusiveMaximum":400.0,"exclusiveMinimum":20.0,"title":"Weight Kg"},"height_cm":{"type":"number","exclusiveMaximum":260.0,"exclusiveMinimum":50.0,"title":"Height Cm"},"body_fat_pct":{"anyOf":[{"type":"number","exclusiveMaximum":70.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Body Fat Pct"},"bf_source":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Bf Source"},"confidence":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Confidence"},"photo_count":{"type":"integer","maximum":3.0,"minimum":0.0,"title":"Photo Count","default":0},"notes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Notes"}},"type":"object","required":["weight_kg","height_cm"],"title":"BodyCompSaveIn","description":"Persist a body-composition entry to the patient's history (glp1 lane)."},"Body_capture_own_signature_medico_practice_signature_capture_post":{"properties":{"file":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_capture_own_signature_medico_practice_signature_capture_post"},"Body_send_case_file_medico_cases__case_id__files_post":{"properties":{"file":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","title":"File"},"kind":{"type":"string","title":"Kind","default":"document"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["file"],"title":"Body_send_case_file_medico_cases__case_id__files_post"},"Body_upload_favicon_affiliate_branding_favicon_post":{"properties":{"file":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_favicon_affiliate_branding_favicon_post"},"Body_upload_file_patient_files_post":{"properties":{"file":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","title":"File"},"kind":{"type":"string","title":"Kind","default":"lab"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"case_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Id"}},"type":"object","required":["file"],"title":"Body_upload_file_patient_files_post"},"Body_upload_font_affiliate_branding_font_post":{"properties":{"file":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_font_affiliate_branding_font_post"},"Body_upload_landing_hero_affiliate_landing_hero_post":{"properties":{"file":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_landing_hero_affiliate_landing_hero_post"},"Body_upload_logo_affiliate_branding_logo_post":{"properties":{"file":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_logo_affiliate_branding_logo_post"},"Body_upload_own_efirma_cert_medico_practice_efirma_cert_post":{"properties":{"file":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_own_efirma_cert_medico_practice_efirma_cert_post"},"Body_upload_reviewer_efirma_cert_admin_reviewers__reviewer_id__efirma_cert_post":{"properties":{"file":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_reviewer_efirma_cert_admin_reviewers__reviewer_id__efirma_cert_post"},"Body_upload_reviewer_signature_admin_reviewers__reviewer_id__signature_post":{"properties":{"file":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_reviewer_signature_admin_reviewers__reviewer_id__signature_post"},"Body_upload_tax_doc_affiliate_profile_tax_doc_post":{"properties":{"file":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_tax_doc_affiliate_profile_tax_doc_post"},"BookingMoveIn":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"}},"type":"object","required":["start"],"title":"BookingMoveIn","description":"A new start time chosen by the reviewer. The same reviewer keeps the slot."},"BotContactIn":{"properties":{"channel":{"anyOf":[{"type":"string","enum":["call","whatsapp"]},{"type":"null"}],"title":"Channel"}},"type":"object","title":"BotContactIn"},"BotDoctorIn":{"properties":{"allowed":{"type":"boolean","title":"Allowed"}},"type":"object","required":["allowed"],"title":"BotDoctorIn"},"BotSettingsIn":{"properties":{"enabled_events":{"items":{"type":"string"},"type":"array","title":"Enabled Events"},"cases_wait_hours":{"type":"integer","maximum":168.0,"minimum":1.0,"title":"Cases Wait Hours"}},"type":"object","required":["enabled_events","cases_wait_hours"],"title":"BotSettingsIn"},"BrandedLinkQrOut":{"properties":{"link":{"type":"string","title":"Link"},"qr_svg":{"type":"string","title":"Qr Svg"},"qr_png":{"type":"string","title":"Qr Png"},"signup_url":{"type":"string","title":"Signup Url"},"signup_qr_svg":{"type":"string","title":"Signup Qr Svg"},"signup_qr_png":{"type":"string","title":"Signup Qr Png"}},"type":"object","required":["link","qr_svg","qr_png","signup_url","signup_qr_svg","signup_qr_png"],"title":"BrandedLinkQrOut","description":"The affiliate's shareable patient link(s) + downloadable QR (data URIs).\n\n``link`` is the branded root (a published landing page, or the patient portal\nwhen there's no landing page). ``signup_url`` skips any landing page and drops\nthe visitor straight on the signup (``/start`` on a custom domain); it equals\n``link`` when the tenant has no verified custom domain (root is already signup)."},"BrandingOut":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"white_label":{"type":"boolean","title":"White Label"},"brand_applied":{"type":"boolean","title":"Brand Applied","default":false},"own_logo":{"type":"string","title":"Own Logo","default":"now"},"primary_color":{"type":"string","title":"Primary Color"},"accent_color":{"type":"string","title":"Accent Color"},"font_family":{"type":"string","title":"Font Family"},"has_logo":{"type":"boolean","title":"Has Logo"},"has_font":{"type":"boolean","title":"Has Font"},"has_favicon":{"type":"boolean","title":"Has Favicon","default":false},"custom_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain"},"custom_domain_verified":{"type":"boolean","title":"Custom Domain Verified","default":false}},"type":"object","required":["name","slug","white_label","primary_color","accent_color","font_family","has_logo","has_font"],"title":"BrandingOut","description":"Current brand config for the console's Branding tab."},"BrandingUpdate":{"properties":{"white_label":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"White Label"},"brand_applied":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Brand Applied"},"primary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Color"},"accent_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent Color"},"font_family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Font Family"}},"type":"object","title":"BrandingUpdate","description":"Partial update of the constrained brand tokens.\n\nColours are validated as 6-digit hex; font must be from ``ALLOWED_FONTS``.\n``brand_applied`` is the on/off switch that makes the public brand endpoint\nserve these tokens to the patient surfaces; it is open to every tier.\n``white_label`` is the plan entitlement (custom domain + sender) and is\naccepted here from an admin only — an affiliate cannot grant it to itself."},"CaseBookingOut":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"status":{"type":"string","title":"Status"},"scheduled_start":{"type":"string","format":"date-time","title":"Scheduled Start"},"missed":{"type":"boolean","title":"Missed","default":false}},"type":"object","required":["id","kind","status","scheduled_start"],"title":"CaseBookingOut","description":"The case's still-actionable appointment (upcoming or recently missed)."},"CaseCreated":{"properties":{"id":{"type":"string","title":"Id"},"status":{"$ref":"#/components/schemas/ReviewCaseStatus"},"lane":{"type":"string","title":"Lane"},"path":{"$ref":"#/components/schemas/CasePath"},"mode":{"$ref":"#/components/schemas/ReviewMode"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","status","lane","path","mode","created_at"],"title":"CaseCreated","description":"Confirmation returned once a case is accepted."},"CaseDetailOut":{"properties":{"id":{"type":"string","title":"Id"},"lane":{"type":"string","title":"Lane"},"path":{"$ref":"#/components/schemas/CasePath"},"mode":{"$ref":"#/components/schemas/ReviewMode"},"status":{"$ref":"#/components/schemas/ReviewCaseStatus"},"locale":{"$ref":"#/components/schemas/Locale"},"patient_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Alias"},"patient_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Ref"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"affiliate_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Name"},"assigned_reviewer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Reviewer Id"},"needs_call":{"type":"boolean","title":"Needs Call","default":false},"booking":{"anyOf":[{"$ref":"#/components/schemas/CaseBookingOut"},{"type":"null"}]},"intake":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Intake"},"decision":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Decision"},"ai_suggestion":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ai Suggestion"},"ai_suggested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ai Suggested At"},"ai_enabled":{"type":"boolean","title":"Ai Enabled","default":false},"has_labs":{"type":"boolean","title":"Has Labs","default":false},"lab_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lab Status"},"red_flags":{"items":{"type":"string"},"type":"array","title":"Red Flags"},"risk":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Risk"},"profile_hold":{"type":"boolean","title":"Profile Hold","default":false},"sessions":{"items":{"$ref":"#/components/schemas/ConsultSessionOut"},"type":"array","title":"Sessions"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","lane","path","mode","status","locale","created_at","updated_at"],"title":"CaseDetailOut"},"CaseIntakeIn":{"properties":{"lane":{"type":"string","enum":["trt","hrt","glp1","longevity","peptides"],"title":"Lane"},"path":{"$ref":"#/components/schemas/CasePath","default":"reviewer"},"mode":{"$ref":"#/components/schemas/ReviewMode","default":"data"},"locale":{"$ref":"#/components/schemas/Locale","default":"es"},"external_ref":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"External Ref"},"patient_alias":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Patient Alias"},"intake":{"additionalProperties":true,"type":"object","title":"Intake","description":"Structured questionnaire + lab refs (PHI)."},"consent":{"$ref":"#/components/schemas/ConsentTokenIn"}},"type":"object","required":["lane","intake","consent"],"title":"CaseIntakeIn","description":"A case submitted by an affiliate for one lane."},"CaseListOut":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"data":{"items":{"$ref":"#/components/schemas/CaseStatusOut"},"type":"array","title":"Data"}},"type":"object","required":["total","limit","offset"],"title":"CaseListOut"},"CaseNoteIn":{"properties":{"text":{"type":"string","maxLength":8000,"minLength":1,"title":"Text"},"shared":{"type":"boolean","title":"Shared","default":false}},"type":"object","required":["text"],"title":"CaseNoteIn"},"CasePath":{"type":"string","enum":["reviewer","full_service"],"title":"CasePath","description":"The patient's chosen service path."},"CaseResult":{"properties":{"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"decided_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided At"},"needs_labs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Needs Labs"},"needs_call":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Needs Call"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"follow_up":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Follow Up"},"has_prescription":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Prescription"}},"type":"object","title":"CaseResult","description":"Sanitized reviewer outcome for the affiliate (no raw clinical notes).\n\nFull protocol detail is retrieved separately via ``GET /cases/{id}/prescription``."},"CaseStatusOut":{"properties":{"id":{"type":"string","title":"Id"},"status":{"$ref":"#/components/schemas/ReviewCaseStatus"},"lane":{"type":"string","title":"Lane"},"path":{"$ref":"#/components/schemas/CasePath"},"mode":{"$ref":"#/components/schemas/ReviewMode"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"patient_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Alias"},"consent_revoked":{"type":"boolean","title":"Consent Revoked","default":false},"profile_hold":{"type":"boolean","title":"Profile Hold","default":false},"profile_hold_since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Profile Hold Since"},"result":{"anyOf":[{"$ref":"#/components/schemas/CaseResult"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","status","lane","path","mode","created_at","updated_at"],"title":"CaseStatusOut","description":"Status + result of a case (``GET /cases/{id}``; webhooks preferred)."},"CasesOut":{"properties":{"total":{"type":"integer","title":"Total"},"approved":{"type":"integer","title":"Approved"},"needs_info":{"type":"integer","title":"Needs Info"},"rejected":{"type":"integer","title":"Rejected"},"pending":{"type":"integer","title":"Pending"},"by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Status"},"periods":{"items":{"$ref":"#/components/schemas/PeriodCount"},"type":"array","title":"Periods"},"items":{"items":{"$ref":"#/components/schemas/api__schemas__billing__CaseListItem"},"type":"array","title":"Items"}},"type":"object","required":["total","approved","needs_info","rejected","pending","by_status","periods","items"],"title":"CasesOut"},"CatalogItem":{"properties":{"id":{"type":"string","title":"Id"},"pharmacy_id":{"type":"string","title":"Pharmacy Id"},"pharmacy_name":{"type":"string","title":"Pharmacy Name"},"lane":{"type":"string","title":"Lane"},"name":{"type":"string","title":"Name"},"dosage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dosage"},"form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form"},"pay_descriptor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pay Descriptor"},"currency":{"type":"string","title":"Currency"},"cost":{"type":"number","title":"Cost","default":0.0},"fee":{"type":"number","title":"Fee","default":0.0},"price":{"type":"number","title":"Price"},"avg_retail_price":{"type":"number","title":"Avg Retail Price","default":0.0},"unit_mg":{"type":"number","title":"Unit Mg","default":0.0},"shared":{"type":"boolean","title":"Shared","default":false},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["id","pharmacy_id","pharmacy_name","lane","name","dosage","currency","price"],"title":"CatalogItem"},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","maxLength":256,"minLength":1,"title":"Current Password"},"new_password":{"type":"string","maxLength":256,"minLength":1,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"ChargeIn":{"properties":{"occurred_on":{"type":"string","format":"date","title":"Occurred On"},"kind":{"$ref":"#/components/schemas/BillingChargeKind"},"description":{"type":"string","maxLength":200,"minLength":1,"title":"Description"},"amount":{"type":"number","title":"Amount"},"case_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Id"}},"type":"object","required":["occurred_on","kind","description","amount"],"title":"ChargeIn"},"ClientFulfillment":{"properties":{"status":{"type":"string","title":"Status"},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"},"tracking_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Number"},"tracking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Url"},"ready_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ready At"},"shipped_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipped At"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["status"],"title":"ClientFulfillment","description":"Operational fulfillment state for one order (no clinical PHI)."},"ClientOrderRow":{"properties":{"case_id":{"type":"string","title":"Case Id"},"lane":{"type":"string","title":"Lane"},"review_status":{"type":"string","title":"Review Status"},"payment_status":{"type":"string","title":"Payment Status"},"med_payment_status":{"type":"string","title":"Med Payment Status","default":"none"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"fulfillment":{"anyOf":[{"$ref":"#/components/schemas/ClientFulfillment"},{"type":"null"}]}},"type":"object","required":["case_id","lane","review_status","payment_status","created_at"],"title":"ClientOrderRow","description":"One case = one 'order' in the client's history, with its fulfillment."},"ClientThreadRow":{"properties":{"id":{"type":"string","title":"Id"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"status":{"type":"string","title":"Status"},"is_clinical":{"type":"boolean","title":"Is Clinical","default":false},"subject_bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Bucket"},"message_count":{"type":"integer","title":"Message Count","default":0},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Message At"}},"type":"object","required":["id","status"],"title":"ClientThreadRow","description":"One email conversation on the client's profile (read-only per matrix)."},"CommBucketIn":{"properties":{"subject_bucket":{"type":"string","maxLength":60,"minLength":1,"title":"Subject Bucket"}},"type":"object","required":["subject_bucket"],"title":"CommBucketIn"},"CommMessageOut":{"properties":{"id":{"type":"string","title":"Id"},"direction":{"type":"string","title":"Direction"},"from_addr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Addr"},"to_addr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Addr"},"body_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Text"},"body_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html"},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name"},"is_clinical":{"type":"boolean","title":"Is Clinical","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","direction","created_at"],"title":"CommMessageOut"},"CommReplyIn":{"properties":{"body":{"type":"string","maxLength":20000,"minLength":1,"title":"Body"}},"type":"object","required":["body"],"title":"CommReplyIn"},"CommStatusIn":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"CommStatusIn"},"CommSubjectBucketAdminOut":{"properties":{"id":{"type":"string","title":"Id"},"key":{"type":"string","title":"Key"},"label_en":{"type":"string","title":"Label En"},"label_es":{"type":"string","title":"Label Es"},"is_clinical":{"type":"boolean","title":"Is Clinical","default":false},"active":{"type":"boolean","title":"Active","default":true},"sort":{"type":"integer","title":"Sort","default":0}},"type":"object","required":["id","key","label_en","label_es"],"title":"CommSubjectBucketAdminOut"},"CommSubjectBucketCreate":{"properties":{"key":{"type":"string","maxLength":60,"minLength":1,"title":"Key"},"label_en":{"type":"string","maxLength":120,"minLength":1,"title":"Label En"},"label_es":{"type":"string","maxLength":120,"minLength":1,"title":"Label Es"},"is_clinical":{"type":"boolean","title":"Is Clinical","default":false},"sort":{"type":"integer","title":"Sort","default":0}},"type":"object","required":["key","label_en","label_es"],"title":"CommSubjectBucketCreate"},"CommSubjectBucketOut":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"is_clinical":{"type":"boolean","title":"Is Clinical","default":false}},"type":"object","required":["key","label"],"title":"CommSubjectBucketOut"},"CommSubjectBucketUpdate":{"properties":{"label_en":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Label En"},"label_es":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Label Es"},"is_clinical":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Clinical"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"sort":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort"}},"type":"object","title":"CommSubjectBucketUpdate"},"CommThreadDetail":{"properties":{"id":{"type":"string","title":"Id"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"client_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Email"},"status":{"type":"string","title":"Status"},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_clinical":{"type":"boolean","title":"Is Clinical","default":false},"cs_escalated":{"type":"boolean","title":"Cs Escalated","default":false},"subject_bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Bucket"},"patient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Id"},"patient_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Ref"},"reply_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply Address"},"can_reply":{"type":"boolean","title":"Can Reply","default":true},"managed_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Managed Fee"},"messages":{"items":{"$ref":"#/components/schemas/CommMessageOut"},"type":"array","title":"Messages"}},"type":"object","required":["id","status"],"title":"CommThreadDetail"},"CommThreadRow":{"properties":{"id":{"type":"string","title":"Id"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"},"client_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Email"},"status":{"type":"string","title":"Status"},"unread":{"type":"boolean","title":"Unread","default":false},"is_managed":{"type":"boolean","title":"Is Managed","default":false},"is_clinical":{"type":"boolean","title":"Is Clinical","default":false},"cs_escalated":{"type":"boolean","title":"Cs Escalated","default":false},"subject_bucket":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Bucket"},"message_count":{"type":"integer","title":"Message Count","default":0},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Message At"},"patient_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Ref"}},"type":"object","required":["id","status"],"title":"CommThreadRow"},"CommsBand":{"properties":{"up_to":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Up To"},"rate":{"type":"number","title":"Rate","default":0.0}},"type":"object","title":"CommsBand","description":"One graduated overage band within a managed-communications level.\n\n``up_to`` is the cumulative reply count (inclusive, counting the included\nquota) this band covers up to; ``None`` means \"and above\" (the last band)."},"CommsTier":{"properties":{"label":{"type":"string","title":"Label"},"monthly_base":{"type":"number","title":"Monthly Base","default":0.0},"included":{"type":"integer","title":"Included","default":0},"overage":{"type":"number","title":"Overage","default":0.0},"bands":{"items":{"$ref":"#/components/schemas/CommsBand"},"type":"array","title":"Bands"}},"type":"object","required":["label"],"title":"CommsTier","description":"One selectable managed-communications level."},"ConsentAcceptIn":{"properties":{"version":{"type":"string","maxLength":40,"minLength":1,"title":"Version"},"lang":{"type":"string","maxLength":2,"minLength":2,"title":"Lang"},"text_hash":{"type":"string","maxLength":100,"minLength":1,"title":"Text Hash"},"covers":{"items":{"type":"string"},"type":"array","title":"Covers"}},"type":"object","required":["version","lang","text_hash"],"title":"ConsentAcceptIn","description":"The portal's echo of the consent block it displayed."},"ConsentBlockOut":{"properties":{"version":{"type":"string","title":"Version"},"lang":{"type":"string","title":"Lang"},"text":{"type":"string","title":"Text"},"text_hash":{"type":"string","title":"Text Hash"},"covers":{"items":{"$ref":"#/components/schemas/ConsentCoverOut"},"type":"array","title":"Covers"}},"type":"object","required":["version","lang","text","text_hash","covers"],"title":"ConsentBlockOut","description":"The consent the portal must display, rendered server-side.\n\n``text`` is the stored consent version with ``{{affiliate_name}}`` already\nresolved, and ``text_hash`` is its SHA-256. The portal shows ``text``\nverbatim and echoes ``version``/``lang``/``text_hash`` back on submit, so\nwhat the patient read and what we validate are the same bytes."},"ConsentCoverOut":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"}},"type":"object","required":["key","label"],"title":"ConsentCoverOut","description":"One of the four checkboxes (a–d) the patient must tick."},"ConsentTokenIn":{"properties":{"granted":{"type":"boolean","title":"Granted"},"granted_at":{"type":"string","format":"date-time","title":"Granted At"},"version":{"type":"string","maxLength":40,"minLength":1,"title":"Version"},"lang":{"$ref":"#/components/schemas/Locale"},"text_hash":{"type":"string","maxLength":100,"minLength":1,"title":"Text Hash"},"storage_region":{"type":"string","maxLength":8,"title":"Storage Region","default":"US"},"ip":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Ip"},"jurisdiction":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Jurisdiction"},"covers":{"items":{"type":"string"},"type":"array","title":"Covers"}},"type":"object","required":["granted","granted_at","version","lang","text_hash"],"title":"ConsentTokenIn","description":"The consent token captured at intake (see ``INTAKE-CONSENT-v1.md``)."},"ConsentVersionOut":{"properties":{"id":{"type":"string","title":"Id"},"version":{"type":"string","title":"Version"},"locale":{"type":"string","title":"Locale"},"text_hash":{"type":"string","title":"Text Hash"},"covers":{"items":{"type":"string"},"type":"array","title":"Covers"},"effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective At"},"is_active":{"type":"boolean","title":"Is Active","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","version","locale","text_hash","created_at"],"title":"ConsentVersionOut"},"ConsultBookIn":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"reviewer_id":{"type":"string","title":"Reviewer Id"},"kind":{"type":"string","title":"Kind","default":"video"},"lang":{"type":"string","title":"Lang","default":"es"}},"type":"object","required":["start","reviewer_id"],"title":"ConsultBookIn","description":"Patient books a specific slot for a case."},"ConsultBookResult":{"properties":{"booking_id":{"type":"string","title":"Booking Id"},"status":{"type":"string","title":"Status"},"scheduled_start":{"type":"string","format":"date-time","title":"Scheduled Start"},"payment_status":{"type":"string","title":"Payment Status"},"checkout_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Url"}},"type":"object","required":["booking_id","status","scheduled_start","payment_status"],"title":"ConsultBookResult"},"ConsultBookingOut":{"properties":{"id":{"type":"string","title":"Id"},"case_id":{"type":"string","title":"Case Id"},"lane":{"type":"string","title":"Lane"},"kind":{"type":"string","title":"Kind"},"status":{"type":"string","title":"Status"},"scheduled_start":{"type":"string","format":"date-time","title":"Scheduled Start"},"scheduled_end":{"type":"string","format":"date-time","title":"Scheduled End"},"duration_min":{"type":"integer","title":"Duration Min"},"reviewer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Name"},"joinable":{"type":"boolean","title":"Joinable","default":false},"elapsed":{"type":"boolean","title":"Elapsed","default":false},"missed":{"type":"boolean","title":"Missed","default":false},"can_dismiss":{"type":"boolean","title":"Can Dismiss","default":false},"can_cancel":{"type":"boolean","title":"Can Cancel","default":false},"refund_if_cancel":{"type":"boolean","title":"Refund If Cancel","default":false},"refund_used":{"type":"boolean","title":"Refund Used","default":false},"can_reschedule":{"type":"boolean","title":"Can Reschedule","default":false},"previsit_done":{"type":"boolean","title":"Previsit Done","default":false}},"type":"object","required":["id","case_id","lane","kind","status","scheduled_start","scheduled_end","duration_min"],"title":"ConsultBookingOut","description":"A patient's scheduled consult, safe for the portal."},"ConsultBookingStatus":{"type":"string","enum":["hold","confirmed","cancelled","completed","missed"],"title":"ConsultBookingStatus","description":"Lifecycle of a scheduled (calendar-booked) video/voice consult."},"ConsultCancelIn":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ConsultCancelIn"},"ConsultCancelResult":{"properties":{"status":{"type":"string","title":"Status"},"refunded":{"type":"boolean","title":"Refunded","default":false},"refund_eligible":{"type":"boolean","title":"Refund Eligible","default":false}},"type":"object","required":["status"],"title":"ConsultCancelResult"},"ConsultKind":{"type":"string","enum":["video","voice"],"title":"ConsultKind"},"ConsultListOut":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"data":{"items":{"$ref":"#/components/schemas/ConsultOut"},"type":"array","title":"Data"}},"type":"object","required":["total","limit","offset"],"title":"ConsultListOut"},"ConsultOut":{"properties":{"id":{"type":"string","title":"Id"},"case_id":{"type":"string","title":"Case Id"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"status":{"type":"string","title":"Status"},"lane":{"type":"string","title":"Lane"},"kind":{"type":"string","title":"Kind"},"scheduled_start":{"type":"string","format":"date-time","title":"Scheduled Start"},"duration_min":{"type":"integer","title":"Duration Min"},"reschedule_count":{"type":"integer","title":"Reschedule Count"},"cancel_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","case_id","status","lane","kind","scheduled_start","duration_min","reschedule_count","created_at","updated_at"],"title":"ConsultOut","description":"Scheduled consult lifecycle (when + status), no clinical content.\n\nCarries the appointment, not the appointment's contents. The booking's\n``pre_visit`` check-in is the patient's reason for the visit, their symptoms,\nmedications and allergies — it is encrypted at rest and is not exposed here\nat any scope. Neither is the patient or reviewer identity: a partner already\nknows which of its patients a case belongs to via ``external_ref``, and the\nreviewer is not theirs to route around.\n\n``duration_min`` plus ``scheduled_start`` is deliberately given instead of an\nend time, because the end time a partner should show is the slot length, not\nhowever long the call actually ran."},"ConsultRequestIn":{"properties":{"kind":{"type":"string","title":"Kind","default":"video"},"lang":{"type":"string","title":"Lang","default":"es"}},"type":"object","title":"ConsultRequestIn","description":"Patient asks for a video/voice consult with their reviewer/doctor."},"ConsultRequestResult":{"properties":{"payment_status":{"type":"string","title":"Payment Status"},"call_requested":{"type":"boolean","title":"Call Requested","default":false},"checkout_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Url"}},"type":"object","required":["payment_status"],"title":"ConsultRequestResult"},"ConsultRescheduleIn":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"reviewer_id":{"type":"string","title":"Reviewer Id"}},"type":"object","required":["start","reviewer_id"],"title":"ConsultRescheduleIn","description":"Move a booking to a new open slot (same case, ≥6h before the old time)."},"ConsultSessionOut":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"$ref":"#/components/schemas/ConsultKind"},"status":{"$ref":"#/components/schemas/ConsultStatus"},"channel":{"type":"string","title":"Channel"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"duration_sec":{"type":"integer","title":"Duration Sec","default":0}},"type":"object","required":["id","kind","status","channel","started_at"],"title":"ConsultSessionOut"},"ConsultSlotOut":{"properties":{"start":{"type":"string","title":"Start"},"reviewer_id":{"type":"string","title":"Reviewer Id"},"reviewer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Name"}},"type":"object","required":["start","reviewer_id"],"title":"ConsultSlotOut","description":"An open appointment slot (UTC start; the UI renders in local time)."},"ConsultStatus":{"type":"string","enum":["active","ended"],"title":"ConsultStatus"},"ConsultTermsAcceptIn":{"properties":{"version":{"type":"string","maxLength":40,"minLength":1,"title":"Version"},"text_hash":{"type":"string","maxLength":100,"minLength":1,"title":"Text Hash"}},"type":"object","required":["version","text_hash"],"title":"ConsultTermsAcceptIn"},"ConsultTermsOut":{"properties":{"version":{"type":"string","title":"Version"},"lang":{"type":"string","title":"Lang"},"text":{"type":"string","title":"Text"},"text_hash":{"type":"string","title":"Text Hash"},"duration_min":{"type":"integer","title":"Duration Min"},"price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price"},"payable":{"type":"boolean","title":"Payable","default":false}},"type":"object","required":["version","lang","text","text_hash","duration_min"],"title":"ConsultTermsOut","description":"Terms shown when the patient chooses a video/voice consult at intake."},"ConsultWaitlistResult":{"properties":{"waitlisted":{"type":"boolean","title":"Waitlisted","default":false}},"type":"object","title":"ConsultWaitlistResult","description":"State after opting into / out of the consult availability waitlist."},"CurrencyTotal":{"properties":{"currency":{"type":"string","title":"Currency"},"affiliates":{"type":"integer","title":"Affiliates"},"billed":{"type":"number","title":"Billed"},"received":{"type":"number","title":"Received"},"outstanding":{"type":"number","title":"Outstanding"},"iva_total":{"type":"number","title":"Iva Total","default":0.0},"usd_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Usd Rate"},"billed_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Billed Usd"},"received_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Received Usd"},"outstanding_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Outstanding Usd"},"iva_total_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Iva Total Usd"}},"type":"object","required":["currency","affiliates","billed","received","outstanding"],"title":"CurrencyTotal","description":"Portfolio totals grouped by currency. Base currency is MXN; the MXN bucket\nalso carries a USD equivalent at the day's rate for convenience."},"DecisionIn":{"properties":{"outcome":{"type":"string","enum":["approve","more_info","deny"],"title":"Outcome"},"protocol":{"items":{"$ref":"#/components/schemas/api__schemas__medico__ProtocolItem"},"type":"array","title":"Protocol"},"protocol_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Protocol Id"},"protocol_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Protocol Name"},"pay_descriptor":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Pay Descriptor"},"notes":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"Notes"},"follow_up":{"anyOf":[{"$ref":"#/components/schemas/FollowUp"},{"type":"null"}]},"more_info":{"anyOf":[{"$ref":"#/components/schemas/MoreInfoRequest"},{"type":"null"}]},"deny_reason":{"anyOf":[{"type":"string","maxLength":8000},{"type":"null"}],"title":"Deny Reason"},"rx_signer":{"type":"string","enum":["reviewer","responsable"],"title":"Rx Signer","default":"reviewer"},"ai_action":{"anyOf":[{"type":"string","enum":["accepted","edited","manual"]},{"type":"null"}],"title":"Ai Action"},"rx_sign":{"type":"boolean","title":"Rx Sign","default":false},"efirma_cms":{"anyOf":[{"type":"string","maxLength":40000},{"type":"null"}],"title":"Efirma Cms"}},"type":"object","required":["outcome"],"title":"DecisionIn"},"DeliveryOutcomeIn":{"properties":{"outcome":{"type":"string","enum":["failed_delivery","refused"],"title":"Outcome"},"reason":{"anyOf":[{"type":"string","enum":["patient_address","our_process","pharmacy"]},{"type":"null"}],"title":"Reason"},"note":{"type":"string","maxLength":500,"minLength":3,"title":"Note"}},"type":"object","required":["outcome","note"],"title":"DeliveryOutcomeIn","description":"An admin records a failed delivery or a refusal. The note is required."},"DepositActionIn":{"properties":{"kind":{"type":"string","title":"Kind"},"amount":{"type":"number","title":"Amount"},"note":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Note"}},"type":"object","required":["kind","amount"],"title":"DepositActionIn","description":"Admin entry to an affiliate's COGS-deposit ledger."},"DepositLevel":{"properties":{"label":{"type":"string","title":"Label"},"up_to_orders":{"type":"integer","title":"Up To Orders","default":0},"deposit_amount":{"type":"number","title":"Deposit Amount","default":0.0}},"type":"object","required":["label"],"title":"DepositLevel","description":"One volume-based COGS-deposit level for affiliate-collected partners."},"DepositStatementOut":{"properties":{"currency":{"type":"string","title":"Currency","default":"MXN"},"payment_mode":{"type":"string","title":"Payment Mode"},"net_terms_days":{"type":"integer","title":"Net Terms Days"},"deposit_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deposit Level"},"deposit_required":{"type":"string","title":"Deposit Required"},"deposit_funded":{"type":"string","title":"Deposit Funded"},"deposit_drawn":{"type":"string","title":"Deposit Drawn"},"available":{"type":"string","title":"Available"},"txns":{"items":{"$ref":"#/components/schemas/DepositTxnOut"},"type":"array","title":"Txns"}},"type":"object","required":["payment_mode","net_terms_days","deposit_required","deposit_funded","deposit_drawn","available"],"title":"DepositStatementOut"},"DepositTxnOut":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"amount":{"type":"string","title":"Amount"},"currency":{"type":"string","title":"Currency","default":"MXN"},"case_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Id"},"funded_after":{"type":"string","title":"Funded After"},"drawn_after":{"type":"string","title":"Drawn After"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","kind","amount","funded_after","drawn_after","created_at"],"title":"DepositTxnOut"},"DoctorApplicationCreate":{"properties":{"first_name":{"type":"string","maxLength":100,"minLength":2,"title":"First Name"},"last_name":{"type":"string","maxLength":100,"minLength":1,"title":"Last Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"type":"string","maxLength":40,"minLength":7,"title":"Phone"},"street":{"type":"string","maxLength":200,"minLength":1,"title":"Street"},"city":{"type":"string","maxLength":120,"minLength":1,"title":"City"},"state":{"type":"string","maxLength":120,"minLength":1,"title":"State"},"postal":{"type":"string","maxLength":12,"minLength":4,"title":"Postal"},"cedula":{"type":"string","maxLength":20,"minLength":4,"title":"Cedula"},"faculty":{"type":"string","maxLength":200,"minLength":3,"title":"Faculty"},"diploma":{"type":"string","maxLength":4000,"minLength":3,"title":"Diploma"},"years_practice":{"type":"integer","maximum":70.0,"minimum":0.0,"title":"Years Practice"},"lanes":{"items":{"$ref":"#/components/schemas/LaneYearsIn"},"type":"array","maxItems":6,"minItems":1,"title":"Lanes"},"availability":{"type":"string","enum":["video","data","both"],"title":"Availability"},"english":{"type":"boolean","title":"English"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"},"locale":{"type":"string","maxLength":8,"title":"Locale","default":"es"},"source":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Source"},"company_url":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company Url"}},"type":"object","required":["first_name","last_name","email","phone","street","city","state","postal","cedula","faculty","diploma","years_practice","lanes","availability","english"],"title":"DoctorApplicationCreate"},"DoctorApplicationCreated":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"id":{"type":"string","title":"Id"}},"type":"object","required":["id"],"title":"DoctorApplicationCreated"},"DoctorApplicationOut":{"properties":{"id":{"type":"string","title":"Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"street":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"postal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal"},"cedula":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cedula"},"faculty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Faculty"},"diploma":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Diploma"},"years_practice":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Years Practice"},"lanes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Lanes"},"availability":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Availability"},"english":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"English"},"applicant_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applicant Notes"},"admin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Notes"},"locale":{"type":"string","title":"Locale"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"status":{"type":"string","title":"Status"},"evaluation_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Evaluation Sent At"},"evaluation_received_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Evaluation Received At"},"proposed_levels":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Proposed Levels"},"level_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Level Overrides"},"evaluation_sheet":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evaluation Sheet"},"reviewer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","first_name","last_name","email","locale","status","created_at","updated_at"],"title":"DoctorApplicationOut"},"DoctorApplicationStatus":{"type":"string","enum":["new","in_review","contacted","approved","declined"],"title":"DoctorApplicationStatus","description":"A physician asking to be considered. Approval sends the vía form."},"DoctorApplicationUpdate":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/DoctorApplicationStatus"},{"type":"null"}]},"admin_notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Admin Notes"},"level_overrides":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Level Overrides"}},"type":"object","title":"DoctorApplicationUpdate"},"EFirmaPayloadIn":{"properties":{"protocol":{"items":{"$ref":"#/components/schemas/api__schemas__medico__ProtocolItem"},"type":"array","title":"Protocol"}},"type":"object","title":"EFirmaPayloadIn"},"EFirmaPayloadOut":{"properties":{"payload":{"type":"string","title":"Payload"},"lines_hash":{"type":"string","title":"Lines Hash"},"cert_b64":{"type":"string","title":"Cert B64"}},"type":"object","required":["payload","lines_hash","cert_b64"],"title":"EFirmaPayloadOut"},"EmailDnsRecord":{"properties":{"record":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Record"},"type":{"type":"string","title":"Type"},"name":{"type":"string","title":"Name"},"value":{"type":"string","title":"Value"},"ttl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ttl"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","required":["type","name","value"],"title":"EmailDnsRecord","description":"One DNS record the tenant must add to authenticate their sending domain."},"EmailDomainOut":{"properties":{"configured":{"type":"boolean","title":"Configured","default":false},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"provisioned":{"type":"boolean","title":"Provisioned","default":false},"records":{"items":{"$ref":"#/components/schemas/EmailDnsRecord"},"type":"array","title":"Records","default":[]}},"type":"object","title":"EmailDomainOut","description":"Resend sending-domain state for the Email tab's DNS-records panel."},"EvaluationSubmit":{"properties":{"specialty":{"type":"string","maxLength":40,"minLength":1,"title":"Specialty"},"specialty_other":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Specialty Other"},"lanes":{"additionalProperties":true,"type":"object","title":"Lanes"}},"type":"object","required":["specialty"],"title":"EvaluationSubmit"},"EventListOut":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"data":{"items":{"$ref":"#/components/schemas/EventOut"},"type":"array","title":"Data"}},"type":"object","required":["total","limit","offset"],"title":"EventListOut"},"EventOut":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","type","created_at"],"title":"EventOut","description":"A single event we dispatched to this affiliate (same non-PHI envelope as\nthe signed webhook payload)."},"ExceptionIn":{"properties":{"reason":{"type":"string","enum":["refused","bad_address","warm","other"],"title":"Reason"},"note":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Note"}},"type":"object","required":["reason"],"title":"ExceptionIn","description":"A pharmacy marks a shipped parcel it cannot complete as-is."},"ExternalRefIn":{"properties":{"external_ref":{"type":"string","maxLength":120,"minLength":1,"title":"External Ref"}},"type":"object","required":["external_ref"],"title":"ExternalRefIn","description":"The referring affiliate's opaque id for this patient, from ``?ref=``."},"ExternalRefOut":{"properties":{"linked":{"type":"boolean","title":"Linked"}},"type":"object","required":["linked"],"title":"ExternalRefOut","description":"Whether the account is now attributed to the supplied reference.\n\n``False`` means the ref was malformed, or another patient of the same\naffiliate already holds it, or this account is already bound to a different\none. Never an error: attribution is the affiliate's concern, not something\nthe patient should ever see or be blocked by."},"FeeConfigOut":{"properties":{"currency":{"type":"string","title":"Currency"},"setup_fee":{"type":"number","title":"Setup Fee"},"monthly_platform_fee":{"type":"number","title":"Monthly Platform Fee"},"per_case_fee":{"type":"number","title":"Per Case Fee"},"network_review_credit":{"type":"number","title":"Network Review Credit","default":0.0},"consult_video_doctor":{"type":"number","title":"Consult Video Doctor","default":0.0},"consult_video_reviewer":{"type":"number","title":"Consult Video Reviewer","default":0.0},"consult_voice_doctor":{"type":"number","title":"Consult Voice Doctor","default":0.0},"consult_voice_reviewer":{"type":"number","title":"Consult Voice Reviewer","default":0.0},"payment_processing_pct":{"type":"number","title":"Payment Processing Pct"},"payment_processing_flat":{"type":"number","title":"Payment Processing Flat"},"processing_connect_pct":{"type":"number","title":"Processing Connect Pct","default":2.0},"med_markup_pct":{"type":"number","title":"Med Markup Pct"},"managed_response_fee":{"type":"number","title":"Managed Response Fee","default":0.0},"managed_monthly_base":{"type":"number","title":"Managed Monthly Base","default":0.0},"managed_included_responses":{"type":"integer","title":"Managed Included Responses","default":0},"cs_escalation_fee":{"type":"number","title":"Cs Escalation Fee","default":0.0},"shipping_fee":{"type":"number","title":"Shipping Fee","default":0.0},"monthly_tiers":{"items":{"$ref":"#/components/schemas/MonthlyTier"},"type":"array","title":"Monthly Tiers"},"comms_tiers":{"items":{"$ref":"#/components/schemas/CommsTier"},"type":"array","title":"Comms Tiers"},"deposit_levels":{"items":{"$ref":"#/components/schemas/DepositLevel"},"type":"array","title":"Deposit Levels"},"monthly_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Monthly Tier"},"comms_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comms Tier"},"plans":{"items":{"$ref":"#/components/schemas/PlanOut"},"type":"array","title":"Plans"},"plan_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Key"},"extra_setup_fee":{"type":"number","title":"Extra Setup Fee","default":0.0},"rs_monthly_fee":{"type":"number","title":"Rs Monthly Fee","default":0.0},"iva_pct":{"type":"number","title":"Iva Pct","default":16.0},"wl_api_fee":{"type":"number","title":"Wl Api Fee","default":0.0},"wl_landing_fee":{"type":"number","title":"Wl Landing Fee","default":0.0},"wl_lane_landing_fee":{"type":"number","title":"Wl Lane Landing Fee","default":0.0},"wl_comms_fee":{"type":"number","title":"Wl Comms Fee","default":0.0},"wl_ai_fee":{"type":"number","title":"Wl Ai Fee","default":0.0},"mxn_per_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mxn Per Usd"},"starter_promo_lanes":{"type":"integer","title":"Starter Promo Lanes","default":0},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["currency","setup_fee","monthly_platform_fee","per_case_fee","payment_processing_pct","payment_processing_flat","med_markup_pct"],"title":"FeeConfigOut"},"FeeConfigUpdate":{"properties":{"currency":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Currency"},"mxn_per_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mxn Per Usd"},"starter_promo_lanes":{"anyOf":[{"type":"integer","maximum":4.0,"minimum":0.0},{"type":"null"}],"title":"Starter Promo Lanes"},"setup_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Setup Fee"},"monthly_platform_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Platform Fee"},"per_case_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Per Case Fee"},"network_review_credit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Network Review Credit"},"consult_video_doctor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Consult Video Doctor"},"consult_video_reviewer":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Consult Video Reviewer"},"consult_voice_doctor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Consult Voice Doctor"},"consult_voice_reviewer":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Consult Voice Reviewer"},"payment_processing_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Payment Processing Pct"},"payment_processing_flat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Payment Processing Flat"},"processing_connect_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Processing Connect Pct"},"med_markup_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Med Markup Pct"},"managed_response_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Managed Response Fee"},"managed_monthly_base":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Managed Monthly Base"},"managed_included_responses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Managed Included Responses"},"cs_escalation_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cs Escalation Fee"},"shipping_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shipping Fee"},"monthly_tiers":{"anyOf":[{"items":{"$ref":"#/components/schemas/MonthlyTier"},"type":"array"},{"type":"null"}],"title":"Monthly Tiers"},"comms_tiers":{"anyOf":[{"items":{"$ref":"#/components/schemas/CommsTier"},"type":"array"},{"type":"null"}],"title":"Comms Tiers"},"deposit_levels":{"anyOf":[{"items":{"$ref":"#/components/schemas/DepositLevel"},"type":"array"},{"type":"null"}],"title":"Deposit Levels"},"monthly_tier":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Monthly Tier"},"comms_tier":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Comms Tier"},"plans":{"anyOf":[{"items":{"$ref":"#/components/schemas/PlanOut"},"type":"array"},{"type":"null"}],"title":"Plans"},"plan_key":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Plan Key"},"extra_setup_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Extra Setup Fee"},"rs_monthly_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rs Monthly Fee"},"iva_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Iva Pct"},"wl_api_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Wl Api Fee"},"wl_landing_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Wl Landing Fee"},"wl_lane_landing_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Wl Lane Landing Fee"},"wl_comms_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Wl Comms Fee"},"wl_ai_fee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Wl Ai Fee"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","title":"FeeConfigUpdate"},"FollowUp":{"properties":{"basic_labs":{"type":"boolean","title":"Basic Labs","default":false},"video_voice":{"type":"boolean","title":"Video Voice","default":false},"labs":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Labs"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"refills_allowed":{"type":"integer","maximum":2.0,"minimum":0.0,"title":"Refills Allowed","default":0},"refill_interval_days":{"type":"integer","maximum":90.0,"minimum":7.0,"title":"Refill Interval Days","default":30}},"type":"object","title":"FollowUp","description":"Attached to an Approve: what must happen before the next fulfillment."},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"lang":{"type":"string","maxLength":5,"title":"Lang","default":"es"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest","description":"Public request for a password-reset link. Always answered 200 (no enumeration)."},"FormIn":{"properties":{"ua":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Ua"},"ip":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Ip"},"sec_fetch_dest":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Sec Fetch Dest"},"sec_purpose":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Sec Purpose"},"sec_fetch_user":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Sec Fetch User"},"name":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Name"},"contact":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Contact"},"seg":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Seg"},"privacidad":{"type":"boolean","title":"Privacidad","default":false},"src":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Src"},"lang":{"anyOf":[{"type":"string","maxLength":5},{"type":"null"}],"title":"Lang"},"best_time":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Best Time"},"company_url":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Company Url"}},"type":"object","title":"FormIn"},"FormulaIngredient":{"properties":{"rx":{"type":"string","maxLength":200,"minLength":1,"title":"Rx"},"strength":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Strength"},"unit":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Unit"},"medication_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Medication Id"},"ratio":{"anyOf":[{"type":"string","maxLength":12},{"type":"null"}],"title":"Ratio"}},"type":"object","required":["rx"],"title":"FormulaIngredient","description":"One active in a compounded preparation."},"FulfillmentCreated":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"lane":{"type":"string","title":"Lane"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","status","lane","created_at"],"title":"FulfillmentCreated","description":"Confirmation returned once a fulfillment order is accepted."},"FulfillmentIntakeIn":{"properties":{"lane":{"type":"string","enum":["trt","hrt","glp1","longevity","peptides"],"title":"Lane"},"locale":{"$ref":"#/components/schemas/Locale","default":"es"},"external_ref":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"External Ref"},"patient_alias":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Patient Alias"},"items":{"items":{"$ref":"#/components/schemas/FulfillmentItemIn"},"type":"array","minItems":1,"title":"Items"},"ship_to":{"$ref":"#/components/schemas/ShipToIn"},"consent":{"$ref":"#/components/schemas/ConsentTokenIn"}},"type":"object","required":["lane","items","ship_to","consent"],"title":"FulfillmentIntakeIn","description":"An already-approved script + shipping, submitted for direct fulfillment.\n\nUsed by affiliates that run their own medical review (e.g. a platform under\nits own Responsable Sanitario) and just need DocEnLinea's pharmacy network\nto compound + ship. Skips the DocEnLinea reviewer entirely — the order lands\nstraight in the pharmacy queue for its lane."},"FulfillmentItemIn":{"properties":{"rx":{"type":"string","maxLength":200,"minLength":1,"title":"Rx"},"strength":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Strength"},"form":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Form"},"quantity":{"anyOf":[{"type":"integer","maximum":999.0,"minimum":1.0},{"type":"null"}],"title":"Quantity"},"dose":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Dose"},"instructions":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Instructions"}},"type":"object","required":["rx"],"title":"FulfillmentItemIn","description":"One approved medication line the pharmacy must dispense."},"FulfillmentListOut":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"data":{"items":{"$ref":"#/components/schemas/FulfillmentOut"},"type":"array","title":"Data"}},"type":"object","required":["total","limit","offset"],"title":"FulfillmentListOut"},"FulfillmentOut":{"properties":{"id":{"type":"string","title":"Id"},"case_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Id"},"status":{"type":"string","title":"Status"},"lane":{"type":"string","title":"Lane"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"},"tracking_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Number"},"tracking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Url"},"shipped_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipped At"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At"},"cancel_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","status","lane","created_at","updated_at"],"title":"FulfillmentOut","description":"Fulfillment order lifecycle (status + shipping), no clinical items/PHI."},"FulfillmentStatus":{"type":"string","enum":["new","assigned","compounding","ready","shipped","delivered","failed_delivery","refused","cancelled"],"title":"FulfillmentStatus","description":"Lifecycle of a fulfillment order relayed to a pharmacy/lab."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthHistoryOut":{"properties":{"body_comp":{"items":{"$ref":"#/components/schemas/HealthLogOut"},"type":"array","title":"Body Comp","default":[]},"vitals_check":{"items":{"$ref":"#/components/schemas/HealthLogOut"},"type":"array","title":"Vitals Check","default":[]}},"type":"object","title":"HealthHistoryOut"},"HealthLogOut":{"properties":{"id":{"type":"string","title":"Id"},"category":{"type":"string","title":"Category"},"lane":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lane"},"logged_at":{"type":"string","format":"date-time","title":"Logged At"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["id","category","logged_at","data"],"title":"HealthLogOut"},"IncomingItem":{"properties":{"case_id":{"type":"string","title":"Case Id"},"lane":{"type":"string","title":"Lane"},"patient_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Alias"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"affiliate_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Name"},"payment_state":{"type":"string","title":"Payment State"},"items":{"items":{"$ref":"#/components/schemas/OrderItem"},"type":"array","title":"Items","default":[]},"routes":{"items":{"$ref":"#/components/schemas/IncomingRoute"},"type":"array","title":"Routes","default":[]},"unassigned":{"type":"boolean","title":"Unassigned","default":false},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"waiting_days":{"type":"integer","title":"Waiting Days","default":0}},"type":"object","required":["case_id","lane","payment_state"],"title":"IncomingItem","description":"An approved case whose medication charge hasn't cleared yet.\n\nNot an order — no :class:`FulfillmentOrder` row exists until payment is\nverified, because nothing may reach a pharmacy before then. This is advance\nnotice only: it tells a supplier what is likely coming so they can stock for\nit, and carries no address and no receta. It becomes a real, actionable\norder the moment the charge clears."},"IncomingRoute":{"properties":{"pharmacy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pharmacy Id"},"pharmacy_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pharmacy Name"},"items":{"items":{"$ref":"#/components/schemas/OrderItem"},"type":"array","title":"Items","default":[]}},"type":"object","title":"IncomingRoute","description":"One destination an incoming case will split into on release.\n\nComputed from the same supplier grouping that builds the real orders, so\nthis is where the lines are actually going, not a guess. A null\n``pharmacy_id`` means no pharmacy lists those medications in its catalogue,\nso they will land in the shared claim queue instead of being routed."},"InfoLinksIn":{"properties":{"seg":{"type":"string","maxLength":10,"title":"Seg"},"ids":{"items":{"type":"string"},"type":"array","maxItems":2000,"title":"Ids"},"source":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Source"}},"type":"object","required":["seg","ids"],"title":"InfoLinksIn"},"InfoRequestCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":2,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"},"organization":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Organization"},"audience":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Audience"},"message":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Message"},"locale":{"$ref":"#/components/schemas/Locale","default":"es"},"source":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Source"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token"},"company_url":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company Url"}},"type":"object","required":["name","email"],"title":"InfoRequestCreate","description":"Public intake payload (from the site contact/affiliate form)."},"InfoRequestCreated":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"id":{"type":"string","title":"Id"}},"type":"object","required":["id"],"title":"InfoRequestCreated"},"InfoRequestOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"organization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization"},"audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audience"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"locale":{"$ref":"#/components/schemas/Locale"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"status":{"$ref":"#/components/schemas/InfoRequestStatus"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"lead_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Type"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Id"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"next_follow_up_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Follow Up At"},"lost_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lost Reason"},"converted_affiliate_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Converted Affiliate Id"},"converted_affiliate_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Converted Affiliate Name"},"activity_count":{"type":"integer","title":"Activity Count","default":0},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"}},"type":"object","required":["id","name","email","locale","status","created_at","updated_at"],"title":"InfoRequestOut"},"InfoRequestStatus":{"type":"string","enum":["new","in_review","contacted","converted","archived"],"title":"InfoRequestStatus"},"InfoRequestUpdate":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/InfoRequestStatus"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"},"lead_type":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Lead Type"},"owner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Id"},"next_follow_up_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Follow Up At"},"lost_reason":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Lost Reason"}},"type":"object","title":"InfoRequestUpdate"},"IntakeLegalOut":{"properties":{"consent":{"$ref":"#/components/schemas/ConsentBlockOut"},"attestations":{"$ref":"#/components/schemas/AttestationBlockOut"},"consult":{"$ref":"#/components/schemas/ConsultTermsOut"}},"type":"object","required":["consent","attestations","consult"],"title":"IntakeLegalOut","description":"Everything the consent step renders. No legal copy lives in the client."},"IntakeOption":{"properties":{"value":{"type":"string","maxLength":80,"minLength":1,"title":"Value"},"label_es":{"type":"string","maxLength":200,"minLength":1,"title":"Label Es"},"label_en":{"type":"string","maxLength":200,"minLength":1,"title":"Label En"},"label_fr":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Label Fr"}},"type":"object","required":["value","label_es","label_en"],"title":"IntakeOption"},"IntakeQuestionCreate":{"properties":{"lane":{"type":"string","title":"Lane"},"qkey":{"type":"string","maxLength":80,"minLength":1,"title":"Qkey"},"qtype":{"type":"string","title":"Qtype","default":"text"},"label_es":{"type":"string","maxLength":500,"minLength":1,"title":"Label Es"},"label_en":{"type":"string","maxLength":500,"minLength":1,"title":"Label En"},"label_fr":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Label Fr"},"help_es":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Help Es"},"help_en":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Help En"},"help_fr":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Help Fr"},"options":{"items":{"$ref":"#/components/schemas/IntakeOption"},"type":"array","title":"Options"},"required":{"type":"boolean","title":"Required","default":false},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["lane","qkey","label_es","label_en"],"title":"IntakeQuestionCreate"},"IntakeQuestionUpdate":{"properties":{"qkey":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Qkey"},"qtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qtype"},"label_es":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Label Es"},"label_en":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Label En"},"label_fr":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Label Fr"},"help_es":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Help Es"},"help_en":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Help En"},"help_fr":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Help Fr"},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/IntakeOption"},"type":"array"},{"type":"null"}],"title":"Options"},"required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Required"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"IntakeQuestionUpdate"},"IntakeReorderIn":{"properties":{"lane":{"type":"string","title":"Lane"},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"},"ids":{"items":{"type":"string"},"type":"array","title":"Ids"}},"type":"object","required":["lane"],"title":"IntakeReorderIn"},"IntakeSubmit":{"properties":{"lane":{"type":"string","title":"Lane"},"answers":{"additionalProperties":true,"type":"object","title":"Answers","default":{}},"consent":{"$ref":"#/components/schemas/ConsentAcceptIn"},"attestations":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Attestations","default":{}},"lang":{"type":"string","title":"Lang","default":"es"},"review_type":{"type":"string","enum":["review","video","voice"],"title":"Review Type","default":"review"},"consult_terms":{"anyOf":[{"$ref":"#/components/schemas/ConsultTermsAcceptIn"},{"type":"null"}]}},"type":"object","required":["lane","consent"],"title":"IntakeSubmit"},"IntakeSubmitResult":{"properties":{"case_id":{"type":"string","title":"Case Id"},"lane":{"type":"string","title":"Lane"},"status":{"type":"string","title":"Status"},"review_type":{"type":"string","title":"Review Type","default":"review"},"payment_status":{"type":"string","title":"Payment Status","default":"free"},"checkout_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Url"}},"type":"object","required":["case_id","lane","status"],"title":"IntakeSubmitResult"},"InterestIn":{"properties":{"ua":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Ua"},"ip":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Ip"},"sec_fetch_dest":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Sec Fetch Dest"},"sec_purpose":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Sec Purpose"},"sec_fetch_user":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Sec Fetch User"},"seg":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Seg"},"id":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Id"},"t":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"T"},"nonce":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Nonce"},"lang":{"anyOf":[{"type":"string","maxLength":5},{"type":"null"}],"title":"Lang"},"source":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Source"}},"type":"object","title":"InterestIn"},"JoinTokenOut":{"properties":{"session_id":{"type":"string","title":"Session Id"},"channel":{"type":"string","title":"Channel"},"uid":{"type":"integer","title":"Uid"},"token":{"type":"string","title":"Token"},"app_id":{"type":"string","title":"App Id"},"expires_at":{"type":"integer","title":"Expires At"},"kind":{"$ref":"#/components/schemas/ConsultKind"}},"type":"object","required":["session_id","channel","uid","token","app_id","expires_at","kind"],"title":"JoinTokenOut"},"Jurisdiction":{"type":"string","enum":["MX","US"],"title":"Jurisdiction"},"LabPanelCreate":{"properties":{"lane":{"type":"string","title":"Lane"},"tier":{"type":"string","title":"Tier","default":"basic"},"name_es":{"type":"string","maxLength":200,"minLength":1,"title":"Name Es"},"name_en":{"type":"string","maxLength":200,"minLength":1,"title":"Name En"},"name_fr":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name Fr"},"biomarkers":{"type":"string","maxLength":4000,"title":"Biomarkers","default":""},"prep_es":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Prep Es"},"prep_en":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Prep En"},"prep_fr":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Prep Fr"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["lane","name_es","name_en"],"title":"LabPanelCreate"},"LabPanelOut":{"properties":{"id":{"type":"string","title":"Id"},"lane":{"type":"string","title":"Lane"},"tier":{"type":"string","title":"Tier"},"position":{"type":"integer","title":"Position"},"name_es":{"type":"string","title":"Name Es"},"name_en":{"type":"string","title":"Name En"},"name_fr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Fr"},"biomarkers":{"type":"string","title":"Biomarkers"},"prep_es":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prep Es"},"prep_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prep En"},"prep_fr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prep Fr"},"active":{"type":"boolean","title":"Active"}},"type":"object","required":["id","lane","tier","position","name_es","name_en","biomarkers","prep_es","prep_en","active"],"title":"LabPanelOut"},"LabPanelUpdate":{"properties":{"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"},"name_es":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name Es"},"name_en":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name En"},"name_fr":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name Fr"},"biomarkers":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Biomarkers"},"prep_es":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Prep Es"},"prep_en":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Prep En"},"prep_fr":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Prep Fr"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"LabPanelUpdate"},"LandingConfigOut":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"lane":{"type":"string","title":"Lane","default":""},"curated":{"type":"boolean","title":"Curated","default":false},"lane_landing_enabled":{"type":"boolean","title":"Lane Landing Enabled","default":false},"available_lanes":{"items":{"type":"string"},"type":"array","title":"Available Lanes"},"status":{"type":"string","title":"Status","default":"draft"},"template_key":{"type":"string","title":"Template Key","default":"focus"},"default_locale":{"type":"string","title":"Default Locale","default":"es"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"has_hero":{"type":"boolean","title":"Has Hero","default":false},"rs_active":{"type":"boolean","title":"Rs Active","default":false},"rs_verified":{"type":"boolean","title":"Rs Verified","default":false},"can_publish":{"type":"boolean","title":"Can Publish","default":false},"public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Url"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"custom_domain_ready":{"type":"boolean","title":"Custom Domain Ready","default":false},"templates":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Templates"},"slots":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Slots"},"section_meta":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Section Meta"},"theme_meta":{"additionalProperties":true,"type":"object","title":"Theme Meta"},"content":{"additionalProperties":true,"type":"object","title":"Content"},"theme":{"additionalProperties":true,"type":"object","title":"Theme"}},"type":"object","required":["enabled"],"title":"LandingConfigOut","description":"Everything the console's Landing page tab needs in one call."},"LandingUpdate":{"properties":{"template_key":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Template Key"},"default_locale":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Default Locale"},"content":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content"},"theme":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Theme"}},"type":"object","title":"LandingUpdate","description":"Save the working draft (does not publish)."},"LaneOption":{"properties":{"lane":{"type":"string","title":"Lane"},"label_es":{"type":"string","title":"Label Es"},"label_en":{"type":"string","title":"Label En"},"case_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","required":["lane","label_es","label_en"],"title":"LaneOption"},"LanePrice":{"properties":{"lane":{"type":"string","title":"Lane"},"label":{"type":"string","title":"Label"},"cost":{"type":"number","title":"Cost"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"}},"type":"object","required":["lane","label","cost","price"],"title":"LanePrice"},"LaneYearsIn":{"properties":{"lane":{"type":"string","enum":["general","trt","hrt","glp1","peptides","longevity"],"title":"Lane"},"years":{"type":"integer","maximum":70.0,"minimum":0.0,"title":"Years"}},"type":"object","required":["lane","years"],"title":"LaneYearsIn"},"LeadConvert":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"type":{"$ref":"#/components/schemas/AffiliateType"},"parent_affiliate_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Affiliate Id"},"start_onboarding":{"type":"boolean","title":"Start Onboarding","default":true},"user_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"User Email"},"user_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Password"},"user_full_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"User Full Name"}},"type":"object","required":["type"],"title":"LeadConvert","description":"Convert a qualified lead (InfoRequest) into an Affiliate tenant."},"LeadReply":{"properties":{"subject":{"type":"string","maxLength":300,"minLength":1,"title":"Subject"},"body":{"type":"string","maxLength":20000,"minLength":1,"title":"Body"}},"type":"object","required":["subject","body"],"title":"LeadReply","description":"An in-console branded email reply to a lead (never leaves the platform)."},"LetterheadIn":{"properties":{"school":{"type":"string","maxLength":200,"title":"School","default":""},"address":{"type":"string","maxLength":500,"title":"Address","default":""}},"type":"object","title":"LetterheadIn","description":"The degree institution and office printed on this physician's receta."},"LineItem":{"properties":{"kind":{"type":"string","title":"Kind"},"description":{"type":"string","title":"Description"},"amount":{"type":"number","title":"Amount"}},"type":"object","required":["kind","description","amount"],"title":"LineItem"},"Locale":{"type":"string","enum":["es","en","fr"],"title":"Locale"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token"},"totp_code":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Totp Code"},"lang":{"type":"string","maxLength":5,"title":"Lang","default":"es"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"LoginResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserOut"},"mfa_enrollment_required":{"type":"boolean","title":"Mfa Enrollment Required","default":false},"email_verification_required":{"type":"boolean","title":"Email Verification Required","default":false}},"type":"object","required":["user"],"title":"LoginResponse"},"MedicationCreate":{"properties":{"lane":{"type":"string","title":"Lane"},"category":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Category"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"dosage":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Dosage"},"form":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Form"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"pay_descriptor":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Pay Descriptor"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"MXN"},"cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"}],"title":"Cost","default":"0"},"fee":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"}],"title":"Fee","default":"0"},"price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"}],"title":"Price","default":"0"},"avg_retail_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"}],"title":"Avg Retail Price","default":"0"},"unit_mg":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"}],"title":"Unit Mg","default":"0"},"active":{"type":"boolean","title":"Active","default":true},"shared":{"type":"boolean","title":"Shared","default":false}},"type":"object","required":["lane","name"],"title":"MedicationCreate"},"MedicationOut":{"properties":{"id":{"type":"string","title":"Id"},"pharmacy_id":{"type":"string","title":"Pharmacy Id"},"lane":{"type":"string","title":"Lane"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"name":{"type":"string","title":"Name"},"dosage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dosage"},"form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"pay_descriptor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pay Descriptor"},"currency":{"type":"string","title":"Currency"},"cost":{"type":"number","title":"Cost"},"fee":{"type":"number","title":"Fee"},"price":{"type":"number","title":"Price"},"avg_retail_price":{"type":"number","title":"Avg Retail Price","default":0.0},"unit_mg":{"type":"number","title":"Unit Mg","default":0.0},"active":{"type":"boolean","title":"Active"},"shared":{"type":"boolean","title":"Shared","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","pharmacy_id","lane","name","dosage","notes","currency","cost","fee","price","active","created_at"],"title":"MedicationOut"},"MedicationPaidIn":{"properties":{"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"MedicationPaidIn","description":"Affiliate self-attestation that a medication charge was collected off the\nplatform (their own processor). An admin must still verify before release."},"MedicationPaymentActionOut":{"properties":{"case_id":{"type":"string","title":"Case Id"},"med_payment_status":{"type":"string","title":"Med Payment Status"}},"type":"object","required":["case_id","med_payment_status"],"title":"MedicationPaymentActionOut"},"MedicationPaymentQueueRow":{"properties":{"case_id":{"type":"string","title":"Case Id"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"patient_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Alias"},"lane":{"type":"string","title":"Lane"},"affiliate_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Id"},"affiliate_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Name"},"med_payment_status":{"type":"string","title":"Med Payment Status"},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submitted At"}},"type":"object","required":["case_id","lane","med_payment_status"],"title":"MedicationPaymentQueueRow","description":"One case awaiting admin verification of a manually-collected med payment."},"MedicationUpdate":{"properties":{"lane":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lane"},"category":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Category"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"dosage":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Dosage"},"form":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Form"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"pay_descriptor":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Pay Descriptor"},"currency":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Currency"},"cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Cost"},"fee":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Fee"},"price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Price"},"avg_retail_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Avg Retail Price"},"unit_mg":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Unit Mg"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"shared":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Shared"}},"type":"object","title":"MedicationUpdate"},"MedicoOverview":{"properties":{"queue_open":{"type":"integer","title":"Queue Open"},"assigned_to_me":{"type":"integer","title":"Assigned To Me"},"approved_total":{"type":"integer","title":"Approved Total"},"on_hold":{"type":"integer","title":"On Hold","default":0},"review_waiting":{"type":"integer","title":"Review Waiting","default":0}},"type":"object","required":["queue_open","assigned_to_me","approved_total"],"title":"MedicoOverview"},"MessageResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"MessageResponse"},"MonthlyTier":{"properties":{"label":{"type":"string","title":"Label"},"amount":{"type":"number","title":"Amount","default":0.0}},"type":"object","required":["label"],"title":"MonthlyTier","description":"One selectable monthly platform-fee tier (e.g. Starter / Growth / Scale)."},"MoreInfoRequest":{"properties":{"basic_labs":{"type":"boolean","title":"Basic Labs","default":false},"video_voice":{"type":"boolean","title":"Video Voice","default":false},"labs":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Labs"},"message":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Message"}},"type":"object","title":"MoreInfoRequest","description":"Attached to a \"More info\" decision."},"OnboardingInvoiceOut":{"properties":{"id":{"type":"string","title":"Id"},"affiliate_id":{"type":"string","title":"Affiliate Id"},"affiliate_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Name"},"currency":{"type":"string","title":"Currency","default":"MXN"},"line_items":{"items":{"$ref":"#/components/schemas/QuoteLine"},"type":"array","title":"Line Items"},"subtotal":{"type":"number","title":"Subtotal","default":0.0},"iva_pct":{"type":"number","title":"Iva Pct","default":16.0},"iva_amount":{"type":"number","title":"Iva Amount","default":0.0},"total":{"type":"number","title":"Total","default":0.0},"setup_amount":{"type":"number","title":"Setup Amount","default":0.0},"remainder_amount":{"type":"number","title":"Remainder Amount","default":0.0},"status":{"type":"string","title":"Status","default":"draft"},"setup_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Setup Url"},"remainder_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remainder Url"},"setup_paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Setup Paid At"},"remainder_paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Remainder Paid At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","affiliate_id"],"title":"OnboardingInvoiceOut"},"OnboardingStepUpdate":{"properties":{"step":{"type":"string","maxLength":40,"minLength":1,"title":"Step"},"done":{"type":"boolean","title":"Done","default":true}},"type":"object","required":["step"],"title":"OnboardingStepUpdate","description":"Toggle a single onboarding checklist step, or mark the tenant active."},"OptionalIn":{"properties":{"ua":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Ua"},"ip":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Ip"},"sec_fetch_dest":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Sec Fetch Dest"},"sec_purpose":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Sec Purpose"},"sec_fetch_user":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Sec Fetch User"},"seg":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Seg"},"id":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Id"},"t":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"T"},"nonce":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Nonce"},"lang":{"anyOf":[{"type":"string","maxLength":5},{"type":"null"}],"title":"Lang"},"source":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Source"},"lead":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Lead"},"best_time":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Best Time"},"best_time_other":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Best Time Other"},"whatsapp":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Whatsapp"}},"type":"object","title":"OptionalIn"},"OrderDetailOut":{"properties":{"id":{"type":"string","title":"Id"},"lane":{"type":"string","title":"Lane"},"status":{"$ref":"#/components/schemas/FulfillmentStatus"},"locale":{"type":"string","title":"Locale"},"patient_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Alias"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"affiliate_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Name"},"pharmacy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pharmacy Id"},"pharmacy_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pharmacy Name"},"case_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Id"},"items":{"items":{"$ref":"#/components/schemas/OrderItem"},"type":"array","title":"Items","default":[]},"ship_to":{"anyOf":[{"$ref":"#/components/schemas/ShipTo"},{"type":"null"}]},"shipping":{"anyOf":[{"$ref":"#/components/schemas/ShippingInfo"},{"type":"null"}]},"has_rx":{"type":"boolean","title":"Has Rx","default":false},"rx_folio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rx Folio"},"delivery_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Reason"},"delivery_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Note"},"returned_intact":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Returned Intact"},"pharmacy_owed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pharmacy Owed"},"correction_used":{"type":"boolean","title":"Correction Used","default":false},"reship_fee":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reship Fee"},"reship_paid":{"type":"boolean","title":"Reship Paid","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","lane","status","locale","created_at","updated_at"],"title":"OrderDetailOut"},"OrderItem":{"properties":{"rx":{"type":"string","title":"Rx"},"strength":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strength"},"form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form"},"quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quantity"},"dose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dose"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"}},"type":"object","required":["rx"],"title":"OrderItem","description":"One line the pharmacy has to fill.\n\n``strength``, ``form`` and ``quantity`` are the dispensing half of the line —\nwhat goes in the box. ``dose`` and ``instructions`` are the patient's half.\nThe three dispensing fields were being stored on the order and then dropped\nhere, which left the pharmacy reading a bare medication name."},"OrderListItem":{"properties":{"id":{"type":"string","title":"Id"},"lane":{"type":"string","title":"Lane"},"status":{"$ref":"#/components/schemas/FulfillmentStatus"},"patient_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Alias"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"affiliate_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Name"},"pharmacy_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pharmacy Name"},"tracking_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Number"},"exception_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exception Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","lane","status","created_at","updated_at"],"title":"OrderListItem"},"OverviewCounts":{"properties":{"info_requests_total":{"type":"integer","title":"Info Requests Total"},"info_requests_new":{"type":"integer","title":"Info Requests New"},"affiliates":{"type":"integer","title":"Affiliates"},"reviewers":{"type":"integer","title":"Reviewers"}},"type":"object","required":["info_requests_total","info_requests_new","affiliates","reviewers"],"title":"OverviewCounts"},"PaceOut":{"properties":{"review_days":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Review Days"},"fulfill_days":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fulfill Days"},"deliver_days":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Deliver Days"},"samples":{"type":"integer","title":"Samples","default":0},"open_exceptions":{"type":"integer","title":"Open Exceptions","default":0},"stalled":{"type":"integer","title":"Stalled","default":0}},"type":"object","title":"PaceOut","description":"How long recent orders spent in review, at the pharmacy, and in transit."},"PatientCaseOrderOut":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"has_ship_to":{"type":"boolean","title":"Has Ship To","default":false},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"},"tracking_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Number"},"tracking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Url"},"ready_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ready At"},"shipped_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipped At"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At"},"cancel_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Reason"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","status","updated_at"],"title":"PatientCaseOrderOut","description":"The fulfillment order tied to a case — lifecycle + shipping, no clinical items.\n\nLets a super-admin follow a patient's shipment (pharmacy -> door) from the\nadmin console without impersonating the patient. Raw address is not returned;\n``has_ship_to`` just reports whether a destination is on file."},"PatientDetailOut":{"properties":{"id":{"type":"string","title":"Id"},"client_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Ref"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"status":{"$ref":"#/components/schemas/UserStatus"},"affiliate_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Id"},"affiliate_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Name"},"two_factor":{"type":"boolean","title":"Two Factor"},"tos_accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Tos Accepted At"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"cases":{"items":{"$ref":"#/components/schemas/api__schemas__admin_manage__PatientCaseOut"},"type":"array","title":"Cases"},"payments":{"items":{"$ref":"#/components/schemas/PatientPaymentOut"},"type":"array","title":"Payments"}},"type":"object","required":["id","email","full_name","phone","status","affiliate_id","affiliate_name","two_factor","tos_accepted_at","last_login_at","created_at"],"title":"PatientDetailOut"},"PatientFileKind":{"type":"string","enum":["lab","image","document"],"title":"PatientFileKind","description":"What a patient-uploaded file represents (drives UI grouping/icons)."},"PatientFileOut":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"$ref":"#/components/schemas/PatientFileKind"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"source":{"type":"string","title":"Source","default":"patient"},"case_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Id"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"}},"type":"object","required":["id","kind","filename","content_type","size_bytes","created_at"],"title":"PatientFileOut","description":"A patient-uploaded file's metadata (bytes fetched via the download route)."},"PatientIntakeState":{"properties":{"needs_intake":{"type":"boolean","title":"Needs Intake"},"needs_sex":{"type":"boolean","title":"Needs Sex","default":false},"sex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex"},"has_labs":{"type":"boolean","title":"Has Labs","default":false},"available_lanes":{"items":{"$ref":"#/components/schemas/LaneOption"},"type":"array","title":"Available Lanes"},"case_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Id"},"lane":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lane"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","required":["needs_intake","available_lanes"],"title":"PatientIntakeState","description":"Whether the patient still needs to complete intake, and what lanes exist."},"PatientOrderOut":{"properties":{"id":{"type":"string","title":"Id"},"lane":{"type":"string","title":"Lane"},"case_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Id"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"},"tracking_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Number"},"tracking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Url"},"ready_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ready At"},"shipped_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipped At"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At"},"cancel_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Reason"},"has_ship_to":{"type":"boolean","title":"Has Ship To","default":false}},"type":"object","required":["id","lane","status","created_at","updated_at"],"title":"PatientOrderOut","description":"A patient's fulfillment order (their shipment), safe for the portal.\n\nExposes the lifecycle stage and operational shipping metadata (carrier /\ntracking / timestamps) so the patient can follow their medication from the\npharmacy to their door. Clinical line items and the raw address are not\nreturned; ``has_ship_to`` just tells the UI whether an address is on file."},"PatientPaymentOut":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"lane":{"type":"string","title":"Lane"},"amount":{"type":"string","title":"Amount"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"refundable":{"type":"boolean","title":"Refundable","default":false},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","kind","lane","amount","currency","status","created_at"],"title":"PatientPaymentOut","description":"A patient charge — for the admin billing/refund view (no card data)."},"PatientSignupRequest":{"properties":{"affiliate_slug":{"type":"string","maxLength":200,"minLength":1,"title":"Affiliate Slug"},"full_name":{"type":"string","maxLength":200,"minLength":1,"title":"Full Name"},"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"},"phone":{"type":"string","maxLength":40,"minLength":3,"title":"Phone"},"dob":{"type":"string","format":"date","title":"Dob"},"sex":{"type":"string","maxLength":10,"minLength":1,"title":"Sex"},"accept_terms":{"type":"boolean","title":"Accept Terms"},"accept_disclaimer":{"type":"boolean","title":"Accept Disclaimer","default":false},"external_ref":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"External Ref"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token"},"lang":{"type":"string","maxLength":5,"title":"Lang","default":"es"}},"type":"object","required":["affiliate_slug","full_name","email","password","phone","dob","sex","accept_terms"],"title":"PatientSignupRequest","description":"Patient self-signup via an affiliate's white-label link (§3, §12).\n\nUnlike the invite-only admin/affiliate/pharma accounts, patients register\nthemselves; the ``affiliate_slug`` (from the link) binds them to that tenant."},"PatientStatusUpdate":{"properties":{"status":{"$ref":"#/components/schemas/UserStatus"}},"type":"object","required":["status"],"title":"PatientStatusUpdate"},"PatientSummaryOut":{"properties":{"id":{"type":"string","title":"Id"},"client_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Ref"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"status":{"$ref":"#/components/schemas/UserStatus"},"affiliate_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Id"},"affiliate_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Name"},"two_factor":{"type":"boolean","title":"Two Factor"},"cases_count":{"type":"integer","title":"Cases Count"},"last_activity":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","full_name","status","affiliate_id","affiliate_name","two_factor","cases_count","last_activity","created_at"],"title":"PatientSummaryOut"},"PaymentIn":{"properties":{"received_on":{"type":"string","format":"date","title":"Received On"},"amount":{"type":"number","exclusiveMinimum":0.0,"title":"Amount"},"method":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Method"},"reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Reference"},"note":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Note"}},"type":"object","required":["received_on","amount"],"title":"PaymentIn"},"PaymentOut":{"properties":{"id":{"type":"string","title":"Id"},"received_on":{"type":"string","format":"date","title":"Received On"},"amount":{"type":"number","title":"Amount"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["id","received_on","amount"],"title":"PaymentOut"},"PeriodCount":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"total":{"type":"integer","title":"Total"},"approved":{"type":"integer","title":"Approved"},"needs_info":{"type":"integer","title":"Needs Info"},"rejected":{"type":"integer","title":"Rejected"}},"type":"object","required":["key","label","total","approved","needs_info","rejected"],"title":"PeriodCount"},"PharmaOverview":{"properties":{"queue":{"type":"integer","title":"Queue","default":0},"active":{"type":"integer","title":"Active","default":0},"delivered":{"type":"integer","title":"Delivered","default":0},"incoming":{"type":"integer","title":"Incoming","default":0}},"type":"object","title":"PharmaOverview","description":"Counts for the console header cards."},"PharmaProfileOut":{"properties":{"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"admin_preview":{"type":"boolean","title":"Admin Preview","default":false},"lanes":{"items":{"type":"string"},"type":"array","title":"Lanes","default":[]},"pharmacy":{"anyOf":[{"$ref":"#/components/schemas/api__schemas__pharma__PharmacyOut"},{"type":"null"}]}},"type":"object","required":["email","role","status"],"title":"PharmaProfileOut","description":"Who is signed in + which pharmacy they represent."},"PharmacyCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"lanes":{"items":{"type":"string"},"type":"array","title":"Lanes"},"is_lab":{"type":"boolean","title":"Is Lab","default":false},"active":{"type":"boolean","title":"Active","default":true},"shipping_fee":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"}],"title":"Shipping Fee","default":"0"},"med_markup_kind":{"anyOf":[{"type":"string","enum":["flat","pct"]},{"type":"null"}],"title":"Med Markup Kind"},"med_markup_value":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Med Markup Value"},"user_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"User Email"},"user_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Password"},"user_full_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"User Full Name"}},"type":"object","required":["name"],"title":"PharmacyCreate"},"PharmacyPolicyOut":{"properties":{"version":{"type":"string","title":"Version"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"accepted":{"type":"boolean","title":"Accepted","default":false},"accepted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accepted At"}},"type":"object","required":["version","title","body"],"title":"PharmacyPolicyOut","description":"The fulfillment policy page. Spanish is the text that is recorded."},"PharmacyStatus":{"type":"string","enum":["pending","active","suspended","archived"],"title":"PharmacyStatus"},"PharmacyUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"lanes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Lanes"},"is_lab":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Lab"},"status":{"anyOf":[{"$ref":"#/components/schemas/PharmacyStatus"},{"type":"null"}]},"blend_charges":{"anyOf":[{"items":{"$ref":"#/components/schemas/BlendCharge"},"type":"array"},{"type":"null"}],"title":"Blend Charges"},"blend_rules":{"anyOf":[{"$ref":"#/components/schemas/BlendRules"},{"type":"null"}]},"shipping_fee":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Shipping Fee"},"med_markup_kind":{"anyOf":[{"type":"string","enum":["flat","pct"]},{"type":"null"}],"title":"Med Markup Kind"},"med_markup_value":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Med Markup Value"}},"type":"object","title":"PharmacyUpdate"},"PlanAddon":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"feature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feature"},"setup_fee":{"type":"number","title":"Setup Fee","default":0.0},"monthly_fee":{"type":"number","title":"Monthly Fee","default":0.0}},"type":"object","required":["key","label"],"title":"PlanAddon","description":"One à-la-carte add-on a plan offers (grants a feature for a fee)."},"PlanOut":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"desc":{"type":"string","title":"Desc","default":""},"monthly_fee":{"type":"number","title":"Monthly Fee","default":0.0},"setup_fee":{"type":"number","title":"Setup Fee","default":0.0},"per_case_fee":{"type":"number","title":"Per Case Fee","default":0.0},"rs_monthly_fee":{"type":"number","title":"Rs Monthly Fee","default":0.0},"processing_pct":{"type":"number","title":"Processing Pct","default":0.0},"lanes":{"type":"integer","title":"Lanes","default":0},"includes":{"items":{"type":"string"},"type":"array","title":"Includes"},"addons":{"items":{"$ref":"#/components/schemas/PlanAddon"},"type":"array","title":"Addons"}},"type":"object","required":["key","label"],"title":"PlanOut","description":"One selectable onboarding plan in the affiliate signup wizard."},"PlanQuoteIn":{"properties":{"plan_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Key"},"addon_keys":{"items":{"type":"string"},"type":"array","title":"Addon Keys"},"extra_setup_fee":{"type":"number","minimum":0.0,"title":"Extra Setup Fee","default":0.0},"discount_pct":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Discount Pct","default":0.0}},"type":"object","title":"PlanQuoteIn"},"PlanQuoteOut":{"properties":{"currency":{"type":"string","title":"Currency","default":"MXN"},"plan_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Key"},"plan_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Label"},"addon_keys":{"items":{"type":"string"},"type":"array","title":"Addon Keys"},"features":{"items":{"type":"string"},"type":"array","title":"Features"},"line_items":{"items":{"$ref":"#/components/schemas/QuoteLine"},"type":"array","title":"Line Items"},"setup_subtotal":{"type":"number","title":"Setup Subtotal","default":0.0},"monthly_subtotal":{"type":"number","title":"Monthly Subtotal","default":0.0},"discount_pct":{"type":"number","title":"Discount Pct","default":0.0},"discount_amount":{"type":"number","title":"Discount Amount","default":0.0},"subtotal":{"type":"number","title":"Subtotal","default":0.0},"iva_pct":{"type":"number","title":"Iva Pct","default":16.0},"iva_amount":{"type":"number","title":"Iva Amount","default":0.0},"total":{"type":"number","title":"Total","default":0.0},"setup_amount":{"type":"number","title":"Setup Amount","default":0.0},"remainder_amount":{"type":"number","title":"Remainder Amount","default":0.0}},"type":"object","title":"PlanQuoteOut"},"PortalUserCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"full_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["email","password"],"title":"PortalUserCreate"},"PortalUserOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"status":{"$ref":"#/components/schemas/UserStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","full_name","status","created_at"],"title":"PortalUserOut"},"PortalUserStatusUpdate":{"properties":{"status":{"$ref":"#/components/schemas/UserStatus"}},"type":"object","required":["status"],"title":"PortalUserStatusUpdate"},"PostalAddress":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"line1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Line1"},"line2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Line2"},"colonia":{"anyOf":[{"type":"string","maxLength":150},{"type":"null"}],"title":"Colonia"},"city":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Country"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"}},"type":"object","title":"PostalAddress"},"PracticeAcceptIn":{"properties":{"accept":{"type":"boolean","title":"Accept","default":false}},"type":"object","title":"PracticeAcceptIn"},"PreVisitIn":{"properties":{"answers":{"additionalProperties":{"type":"string"},"type":"object","title":"Answers","default":{}}},"type":"object","title":"PreVisitIn","description":"Pre-visit check-in answers submitted by the patient (free-text fields)."},"PreVisitOut":{"properties":{"answers":{"additionalProperties":{"type":"string"},"type":"object","title":"Answers","default":{}},"completed":{"type":"boolean","title":"Completed","default":false},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","title":"PreVisitOut","description":"The patient's pre-visit check-in for a booking (answers + completion)."},"PrescriptionOut":{"properties":{"case_id":{"type":"string","title":"Case Id"},"status":{"$ref":"#/components/schemas/ReviewCaseStatus"},"issued_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issued At"},"protocol":{"items":{"$ref":"#/components/schemas/ProtocolItemOut"},"type":"array","title":"Protocol"},"follow_up":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Follow Up"}},"type":"object","required":["case_id","status"],"title":"PrescriptionOut","description":"The issued protocol/prescription (``GET /cases/{id}/prescription``)."},"ProfileOut":{"properties":{"client_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Ref"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"email":{"type":"string","title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"dob":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dob"},"sex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"shipping_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"email_updates":{"type":"boolean","title":"Email Updates","default":true}},"type":"object","required":["email"],"title":"ProfileOut"},"ProfileUpdate":{"properties":{"full_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Full Name"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"},"dob":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Dob"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"shipping_address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"email_updates":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Updates"}},"type":"object","title":"ProfileUpdate"},"ProtocolCostEstimate":{"properties":{"index":{"type":"integer","title":"Index"},"cost":{"type":"number","title":"Cost","default":0.0},"basis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Basis"}},"type":"object","required":["index"],"title":"ProtocolCostEstimate"},"ProtocolCreate":{"properties":{"lane":{"type":"string","title":"Lane"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"pay_descriptor":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Pay Descriptor"},"section":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Section"},"active":{"type":"boolean","title":"Active","default":true},"shared":{"type":"boolean","title":"Shared","default":false},"is_starter":{"type":"boolean","title":"Is Starter","default":false},"refill_days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Refill Days"},"markup_kind":{"type":"string","title":"Markup Kind","default":"pct"},"markup_value":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"}],"title":"Markup Value","default":"0"},"items":{"items":{"$ref":"#/components/schemas/api__schemas__admin_manage__ProtocolItem"},"type":"array","title":"Items"}},"type":"object","required":["lane","name"],"title":"ProtocolCreate"},"ProtocolEstimateIn":{"properties":{"lane":{"type":"string","title":"Lane"},"items":{"items":{"$ref":"#/components/schemas/ProtocolEstimateItem"},"type":"array","maxItems":50,"title":"Items"}},"type":"object","required":["lane"],"title":"ProtocolEstimateIn"},"ProtocolEstimateItem":{"properties":{"index":{"type":"integer","title":"Index","default":0},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"dose":{"anyOf":[{"type":"string","maxLength":600},{"type":"null"}],"title":"Dose"},"quantity":{"type":"integer","maximum":999.0,"minimum":1.0,"title":"Quantity","default":1}},"type":"object","required":["name"],"title":"ProtocolEstimateItem","description":"One uncatalogued protocol line to AI-estimate a cost for."},"ProtocolEstimateOut":{"properties":{"currency":{"type":"string","title":"Currency","default":"MXN"},"estimates":{"items":{"$ref":"#/components/schemas/ProtocolCostEstimate"},"type":"array","title":"Estimates"}},"type":"object","title":"ProtocolEstimateOut"},"ProtocolItem-Output":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"dose":{"anyOf":[{"type":"string","maxLength":600},{"type":"null"}],"title":"Dose"},"instructions":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Instructions"},"medication_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Medication Id"},"quantity":{"type":"integer","maximum":999.0,"minimum":1.0,"title":"Quantity","default":1},"dose_mg":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Dose Mg"}},"type":"object","required":["name"],"title":"ProtocolItem"},"ProtocolItemOut":{"properties":{"rx":{"type":"string","title":"Rx"},"strength":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strength"},"form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form"},"quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quantity"},"dose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dose"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"}},"type":"object","required":["rx"],"title":"ProtocolItemOut","description":"One line of the issued prescription, as the pharmacy will fill it.\n\nAdditive to the published contract: existing integrations that read only\n``rx``/``dose``/``instructions`` are unaffected, and a client that wants to\nrender a complete medication record now has the dispensing half of the line\n(``strength``, ``form``, ``quantity``) instead of having to infer it."},"ProtocolLinePricing":{"properties":{"name":{"type":"string","title":"Name"},"dosage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dosage"},"basis":{"type":"string","title":"Basis","default":"unit"},"quantity":{"type":"integer","title":"Quantity","default":1},"dose_mg":{"type":"number","title":"Dose Mg","default":0.0},"unit_mg":{"type":"number","title":"Unit Mg","default":0.0},"priced":{"type":"boolean","title":"Priced","default":false},"unit_cost":{"type":"number","title":"Unit Cost","default":0.0},"unit_price":{"type":"number","title":"Unit Price","default":0.0},"line_cost":{"type":"number","title":"Line Cost","default":0.0},"line_price":{"type":"number","title":"Line Price","default":0.0}},"type":"object","required":["name"],"title":"ProtocolLinePricing"},"ProtocolOut":{"properties":{"id":{"type":"string","title":"Id"},"lane":{"type":"string","title":"Lane"},"name":{"type":"string","title":"Name"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"pay_descriptor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pay Descriptor"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"},"active":{"type":"boolean","title":"Active"},"shared":{"type":"boolean","title":"Shared","default":false},"is_starter":{"type":"boolean","title":"Is Starter","default":false},"refill_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Refill Days"},"markup_kind":{"type":"string","title":"Markup Kind","default":"pct"},"markup_value":{"type":"number","title":"Markup Value","default":0.0},"items":{"items":{"$ref":"#/components/schemas/ProtocolItem-Output"},"type":"array","title":"Items"},"pricing":{"anyOf":[{"$ref":"#/components/schemas/ProtocolPricing"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","lane","name","notes","active","items","created_at"],"title":"ProtocolOut"},"ProtocolPriceIn":{"properties":{"lane":{"type":"string","title":"Lane"},"items":{"items":{"$ref":"#/components/schemas/ProtocolPriceItem"},"type":"array","title":"Items"},"markup_kind":{"type":"string","enum":["pct","flat"],"title":"Markup Kind","default":"pct"},"markup_value":{"type":"number","minimum":0.0,"title":"Markup Value","default":0.0},"use_ai":{"type":"boolean","title":"Use Ai","default":true}},"type":"object","required":["lane"],"title":"ProtocolPriceIn","description":"Ask the platform to price the current (possibly edited) protocol.\n\nCatalog-linked lines price deterministically from the pharmacy catalog; any\ntyped/unlinked line is AI-estimated (name + dosage) and marked up. Recomputed\non demand as the reviewer adjusts doses/medications."},"ProtocolPriceItem":{"properties":{"rx":{"type":"string","maxLength":200,"minLength":1,"title":"Rx"},"dose":{"anyOf":[{"type":"string","maxLength":600},{"type":"null"}],"title":"Dose"},"strength":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Strength"},"form":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Form"},"pack":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Pack"},"dose_mg":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Dose Mg"},"quantity":{"type":"integer","maximum":999.0,"minimum":1.0,"title":"Quantity","default":1},"medication_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Medication Id"},"ingredients":{"items":{"$ref":"#/components/schemas/FormulaIngredient"},"type":"array","title":"Ingredients"},"container":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Container"},"quote_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Quote Cost"}},"type":"object","required":["rx"],"title":"ProtocolPriceItem","description":"One protocol line to price (mirrors the decision protocol shape)."},"ProtocolPriceLine":{"properties":{"name":{"type":"string","title":"Name"},"source":{"type":"string","enum":["catalog","ai","none"],"title":"Source","default":"none"},"cost":{"type":"number","title":"Cost","default":0.0},"price":{"type":"number","title":"Price","default":0.0},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"medication_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Medication Id"}},"type":"object","required":["name"],"title":"ProtocolPriceLine"},"ProtocolPriceOut":{"properties":{"currency":{"type":"string","title":"Currency","default":"MXN"},"total_cost":{"type":"number","title":"Total Cost","default":0.0},"total_price":{"type":"number","title":"Total Price","default":0.0},"ai_used":{"type":"boolean","title":"Ai Used","default":false},"unpriced":{"type":"integer","title":"Unpriced","default":0},"lines":{"items":{"$ref":"#/components/schemas/ProtocolPriceLine"},"type":"array","title":"Lines"}},"type":"object","title":"ProtocolPriceOut"},"ProtocolPricing":{"properties":{"currency":{"type":"string","title":"Currency","default":"MXN"},"markup_kind":{"type":"string","title":"Markup Kind","default":"pct"},"markup_value":{"type":"number","title":"Markup Value","default":0.0},"total_cost":{"type":"number","title":"Total Cost","default":0.0},"total_price":{"type":"number","title":"Total Price","default":0.0},"total_retail":{"type":"number","title":"Total Retail","default":0.0},"client_price":{"type":"number","title":"Client Price","default":0.0},"margin":{"type":"number","title":"Margin","default":0.0},"priced_lines":{"type":"integer","title":"Priced Lines","default":0},"unpriced_lines":{"type":"integer","title":"Unpriced Lines","default":0},"lines":{"items":{"$ref":"#/components/schemas/ProtocolLinePricing"},"type":"array","title":"Lines"}},"type":"object","title":"ProtocolPricing"},"ProtocolUpdate":{"properties":{"lane":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lane"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"pay_descriptor":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Pay Descriptor"},"section":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Section"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"shared":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Shared"},"is_starter":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Starter"},"refill_days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Refill Days"},"markup_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markup Kind"},"markup_value":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Markup Value"},"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/api__schemas__admin_manage__ProtocolItem"},"type":"array"},{"type":"null"}],"title":"Items"}},"type":"object","title":"ProtocolUpdate"},"PublicBrand":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"primary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Color"},"accent_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent Color"},"font_family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Font Family"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"font_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Font Url"},"favicon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Favicon Url"}},"type":"object","required":["enabled"],"title":"PublicBrand","description":"Unauthenticated brand tokens for the patient-facing surfaces.\n\nWhen ``enabled`` is false (white-label off or unknown slug), consumers fall\nback to the default DocEnLinea look.\n\n``enabled`` and ``slug`` are independent, and consumers must treat them that\nway. An active tenant on a verified custom domain returns its ``slug`` even\nwith ``enabled`` false: the host still identifies whose portal this is, and\nsome tenants keep DocEnLinea's brand on purpose so patients can tell who the\nmedical reviewer is. Only ``enabled`` governs repainting the page."},"QuoteLine":{"properties":{"label":{"type":"string","title":"Label"},"amount":{"type":"number","title":"Amount"},"kind":{"type":"string","title":"Kind"}},"type":"object","required":["label","amount","kind"],"title":"QuoteLine"},"RecoveryCapIn":{"properties":{"cap_amount":{"type":"number","minimum":0.0,"title":"Cap Amount"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["cap_amount"],"title":"RecoveryCapIn","description":"Admin's discretionary early stop on the running ceiling."},"RecoveryConvertIn":{"properties":{"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","title":"RecoveryConvertIn"},"RefillPlanOut":{"properties":{"id":{"type":"string","title":"Id"},"lane":{"type":"string","title":"Lane"},"status":{"type":"string","title":"Status"},"refills_allowed":{"type":"integer","title":"Refills Allowed"},"refills_used":{"type":"integer","title":"Refills Used"},"refills_remaining":{"type":"integer","title":"Refills Remaining"},"interval_days":{"type":"integer","title":"Interval Days"},"next_refill_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Refill At"},"orderable_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Orderable At"},"days_until_out":{"type":"integer","title":"Days Until Out","default":0},"require_labs":{"type":"boolean","title":"Require Labs","default":false},"require_consult":{"type":"boolean","title":"Require Consult","default":false},"gate_satisfied":{"type":"boolean","title":"Gate Satisfied","default":true},"due":{"type":"boolean","title":"Due","default":false},"can_reorder":{"type":"boolean","title":"Can Reorder","default":false},"has_ship_to":{"type":"boolean","title":"Has Ship To","default":false},"auto_pay":{"type":"boolean","title":"Auto Pay","default":false},"safety_hold":{"type":"boolean","title":"Safety Hold","default":false}},"type":"object","required":["id","lane","status","refills_allowed","refills_used","refills_remaining","interval_days"],"title":"RefillPlanOut","description":"A reviewer-authorized ongoing refill, safe for the portal.\n\nShows how many refills remain, when the next one is due, what (if anything)\nthe patient must complete first (labs/consult), and whether it can be\nreordered right now. No clinical line items are returned."},"ReportClearIn":{"properties":{"note":{"type":"string","maxLength":4000,"minLength":1,"title":"Note"}},"type":"object","required":["note"],"title":"ReportClearIn","description":"Releasing a safety hold. The note is mandatory — see the endpoint."},"ResendVerificationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"lang":{"type":"string","maxLength":5,"title":"Lang","default":"es"}},"type":"object","required":["email"],"title":"ResendVerificationRequest","description":"Public resend (pre-login). Always answered 200 to avoid account enumeration."},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"}},"type":"object","required":["token","password"],"title":"ResetPasswordRequest","description":"Complete a reset from an emailed, short-lived reset token."},"ReshipIn":{"properties":{"carrier":{"type":"string","maxLength":80,"minLength":1,"title":"Carrier"},"tracking_number":{"type":"string","maxLength":80,"minLength":1,"title":"Tracking Number"},"tracking_url":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Tracking Url"}},"type":"object","required":["carrier","tracking_number"],"title":"ReshipIn","description":"Send a failed delivery again. Carrier and tracking are required."},"ResolveIn":{"properties":{"note":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Note"}},"type":"object","title":"ResolveIn","description":"Close an open delivery exception. The note is operational."},"ResponderCreate":{"properties":{"full_name":{"type":"string","maxLength":200,"minLength":1,"title":"Full Name"},"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"password":{"type":"string","maxLength":200,"minLength":8,"title":"Password"}},"type":"object","required":["full_name","email","password"],"title":"ResponderCreate"},"ResponderRow":{"properties":{"id":{"type":"string","title":"Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"email":{"type":"string","title":"Email"},"status":{"type":"string","title":"Status"},"cross_tenant":{"type":"boolean","title":"Cross Tenant","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","status","created_at"],"title":"ResponderRow","description":"A communications agent (person) who answers client emails."},"ResponsableSanitario":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"cedula":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cedula"},"especialidad":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Especialidad"},"aviso_funcionamiento":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aviso Funcionamiento"},"aviso_publicidad":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aviso Publicidad"},"compliance_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compliance Url"},"active":{"type":"boolean","title":"Active","default":false}},"type":"object","title":"ResponsableSanitario","description":"The affiliate's OWN Responsable Sanitario (Art. 19 RLGSMP).\n\nProvisioned per tenant (never DocEnLinea's). ``active`` gates whether the\nconsole builds a live COFEPRIS footer from it."},"ResponsableSanitarioIn":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"cedula":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Cedula"},"especialidad":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Especialidad"},"aviso_funcionamiento":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Aviso Funcionamiento"},"aviso_publicidad":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Aviso Publicidad"},"compliance_url":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Compliance Url"},"active":{"type":"boolean","title":"Active","default":false},"verified":{"type":"boolean","title":"Verified","default":false}},"type":"object","title":"ResponsableSanitarioIn","description":"Admin-provisioned Responsable Sanitario for an affiliate (Art. 19 RLGSMP).\n\nSet when the affiliate purchases the service. All fields optional so it can\nbe saved progressively; ``active`` gates whether their console builds a live\nfooter from it."},"ReturnReceivedIn":{"properties":{"intact":{"type":"boolean","title":"Intact"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","required":["intact"],"title":"ReturnReceivedIn","description":"An admin records that a failed delivery came back, and whether it is intact."},"ReviewCaseStatus":{"type":"string","enum":["new","assigned","in_review","needs_info","approved","rejected","escalated","cancelled"],"title":"ReviewCaseStatus"},"ReviewMode":{"type":"string","enum":["data","video","voice"],"title":"ReviewMode","description":"How the affiliate wants the case reviewed."},"ReviewerBookingOut":{"properties":{"id":{"type":"string","title":"Id"},"case_id":{"type":"string","title":"Case Id"},"lane":{"type":"string","title":"Lane"},"kind":{"$ref":"#/components/schemas/ConsultKind"},"status":{"type":"string","title":"Status"},"scheduled_start":{"type":"string","format":"date-time","title":"Scheduled Start"},"duration_min":{"type":"integer","title":"Duration Min"},"patient_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Alias"},"previsit":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Previsit"},"previsit_done":{"type":"boolean","title":"Previsit Done","default":false},"patient_waiting":{"type":"boolean","title":"Patient Waiting","default":false},"missed":{"type":"boolean","title":"Missed","default":false},"patient_showed":{"type":"boolean","title":"Patient Showed","default":false}},"type":"object","required":["id","case_id","lane","kind","status","scheduled_start","duration_min"],"title":"ReviewerBookingOut","description":"A scheduled consult on the reviewer's calendar — upcoming, or recently missed."},"ReviewerCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"full_name":{"type":"string","maxLength":200,"minLength":1,"title":"Full Name"},"cedula":{"type":"string","maxLength":50,"minLength":1,"title":"Cedula"},"titulo_institucion":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Titulo Institucion"},"consultorio_address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Consultorio Address"},"lanes":{"items":{"type":"string"},"type":"array","title":"Lanes"},"languages":{"items":{"type":"string"},"type":"array","title":"Languages"},"takes_consults":{"type":"boolean","title":"Takes Consults","default":false},"category":{"type":"string","title":"Category","default":"doctor"},"affiliate_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"},"takes_network_cases":{"type":"boolean","title":"Takes Network Cases","default":false},"pay_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pay Level"},"monthly_salary":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Monthly Salary"},"review_fee":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Review Fee"},"salary_starts_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Salary Starts On"},"salary_ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Salary Ends On"},"engagement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engagement"},"tax_regime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Regime"},"payroll_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payroll State"},"isn_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Isn Rate"},"verified":{"type":"boolean","title":"Verified","default":false}},"type":"object","required":["email","full_name","cedula"],"title":"ReviewerCreate"},"ReviewerOut":{"properties":{"id":{"type":"string","title":"Id"},"user_account_id":{"type":"string","title":"User Account Id"},"email":{"type":"string","title":"Email"},"full_name":{"type":"string","title":"Full Name"},"cedula":{"type":"string","title":"Cedula"},"titulo_institucion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Titulo Institucion"},"consultorio_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consultorio Address"},"has_signature":{"type":"boolean","title":"Has Signature","default":false},"signing_method":{"type":"string","title":"Signing Method","default":"facsimile"},"has_efirma_cert":{"type":"boolean","title":"Has Efirma Cert","default":false},"efirma_cert_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Efirma Cert Serial"},"efirma_cert_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Efirma Cert Subject"},"efirma_cert_not_after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Efirma Cert Not After"},"efirma_enabled":{"type":"boolean","title":"Efirma Enabled","default":false},"lanes":{"items":{"type":"string"},"type":"array","title":"Lanes"},"lane_levels":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lane Levels"},"pay_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pay Level"},"monthly_salary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Monthly Salary"},"review_fee":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Fee"},"salary_starts_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Salary Starts On"},"salary_ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Salary Ends On"},"engagement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engagement"},"tax_regime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Regime"},"payroll_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payroll State"},"isn_rate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Isn Rate"},"languages":{"items":{"type":"string"},"type":"array","title":"Languages"},"takes_consults":{"type":"boolean","title":"Takes Consults","default":false},"category":{"type":"string","title":"Category","default":"doctor"},"affiliate_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Id"},"affiliate_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Name"},"takes_network_cases":{"type":"boolean","title":"Takes Network Cases","default":false},"status":{"$ref":"#/components/schemas/ReviewerStatus"},"online_now":{"type":"boolean","title":"Online Now"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"availability":{"items":{"$ref":"#/components/schemas/AvailabilitySlot"},"type":"array","title":"Availability"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","user_account_id","email","full_name","cedula","lanes","status","online_now","verified_at","timezone","availability","created_at"],"title":"ReviewerOut"},"ReviewerProfileOut":{"properties":{"name":{"type":"string","title":"Name"},"cedula":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cedula"},"lanes":{"items":{"type":"string"},"type":"array","title":"Lanes"},"status":{"type":"string","title":"Status"},"online_now":{"type":"boolean","title":"Online Now","default":false},"admin_preview":{"type":"boolean","title":"Admin Preview","default":false},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"availability":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Availability"},"school":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"file_complete":{"type":"boolean","title":"File Complete","default":false},"agreement_accepted":{"type":"boolean","title":"Agreement Accepted","default":false},"guidelines_accepted":{"type":"boolean","title":"Guidelines Accepted","default":false},"license_accepted":{"type":"boolean","title":"License Accepted","default":false},"signature_on_file":{"type":"boolean","title":"Signature On File","default":false},"signature_attested":{"type":"boolean","title":"Signature Attested","default":false},"agreement_text":{"type":"string","title":"Agreement Text","default":""},"guidelines_text":{"type":"string","title":"Guidelines Text","default":""},"guidelines_text_en":{"type":"string","title":"Guidelines Text En","default":""},"license_text":{"type":"string","title":"License Text","default":""},"license_text_en":{"type":"string","title":"License Text En","default":""},"signature_text":{"type":"string","title":"Signature Text","default":""},"signing_method":{"type":"string","enum":["facsimile","efirma"],"title":"Signing Method","default":"facsimile"},"efirma_platform":{"type":"boolean","title":"Efirma Platform","default":false},"efirma_cert_on_file":{"type":"boolean","title":"Efirma Cert On File","default":false},"efirma_cert_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Efirma Cert Serial"},"efirma_sign":{"type":"boolean","title":"Efirma Sign","default":false},"efirma_cert_ready":{"type":"boolean","title":"Efirma Cert Ready","default":false},"bot_contact":{"anyOf":[{"type":"string","enum":["call","whatsapp"]},{"type":"null"}],"title":"Bot Contact"}},"type":"object","required":["name","status"],"title":"ReviewerProfileOut","description":"The signed-in reviewer's profile for the panel header."},"ReviewerReportOut":{"properties":{"id":{"type":"string","title":"Id"},"case_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Id"},"lane":{"type":"string","title":"Lane"},"source":{"type":"string","title":"Source"},"reported_at":{"type":"string","format":"date-time","title":"Reported At"},"severity":{"type":"string","title":"Severity"},"symptoms":{"items":{"type":"string"},"type":"array","title":"Symptoms"},"red_flags":{"items":{"type":"string"},"type":"array","title":"Red Flags"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"triage_level":{"type":"string","title":"Triage Level"},"triage_source":{"type":"string","title":"Triage Source"},"triage_rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triage Rationale"},"triage_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triage Model"},"cleared_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cleared At"},"cleared_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cleared By"},"cleared_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cleared Note"}},"type":"object","required":["id","lane","source","reported_at","severity","triage_level","triage_source"],"title":"ReviewerReportOut","description":"A side-effect report as the clinician sees it.\n\nUnlike the patient's view this carries ``triage_rationale``, ``triage_source``\nand ``triage_model`` — the reviewer is the person who has to judge whether\nthe classification was right, and cannot do that from a colour alone."},"ReviewerStatus":{"type":"string","enum":["pending","verified","suspended"],"title":"ReviewerStatus"},"ReviewerUpdate":{"properties":{"full_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Full Name"},"cedula":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Cedula"},"titulo_institucion":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Titulo Institucion"},"consultorio_address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Consultorio Address"},"lanes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Lanes"},"languages":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Languages"},"takes_consults":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Takes Consults"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"affiliate_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Affiliate Id"},"takes_network_cases":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Takes Network Cases"},"status":{"anyOf":[{"$ref":"#/components/schemas/ReviewerStatus"},{"type":"null"}]},"online_now":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Online Now"},"signing_method":{"anyOf":[{"type":"string","enum":["facsimile","efirma"]},{"type":"null"}],"title":"Signing Method"},"pay_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pay Level"},"monthly_salary":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Monthly Salary"},"review_fee":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Review Fee"},"salary_starts_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Salary Starts On"},"salary_ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Salary Ends On"},"engagement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engagement"},"tax_regime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Regime"},"payroll_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payroll State"},"isn_rate":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"title":"Isn Rate"}},"type":"object","title":"ReviewerUpdate"},"RevokeConsentIn":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason"},"revoked_by":{"type":"string","enum":["patient","affiliate"],"title":"Revoked By","default":"affiliate"}},"type":"object","title":"RevokeConsentIn"},"RevokeConsentOut":{"properties":{"id":{"type":"string","title":"Id"},"consent_status":{"type":"string","title":"Consent Status"},"revoked_at":{"type":"string","title":"Revoked At"}},"type":"object","required":["id","consent_status","revoked_at"],"title":"RevokeConsentOut"},"SecretRotated":{"properties":{"signing_secret":{"type":"string","title":"Signing Secret"}},"type":"object","required":["signing_secret"],"title":"SecretRotated"},"SessionStartIn":{"properties":{"kind":{"$ref":"#/components/schemas/ConsultKind"}},"type":"object","required":["kind"],"title":"SessionStartIn"},"SetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"}},"type":"object","required":["token","password"],"title":"SetPasswordRequest","description":"Invited user completing their account from an emailed setup token."},"SexIn":{"properties":{"sex":{"type":"string","title":"Sex"}},"type":"object","required":["sex"],"title":"SexIn"},"ShipTo":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"address1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address1"},"address2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address2"},"colonia":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Colonia"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ShipTo","description":"Destination address the pharmacy ships to (supplied by the affiliate)."},"ShipToIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Email"},"address1":{"type":"string","maxLength":200,"minLength":1,"title":"Address1"},"address2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Address2"},"city":{"type":"string","maxLength":120,"minLength":1,"title":"City"},"state":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"State"},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Postal Code"},"country":{"type":"string","maxLength":2,"title":"Country","default":"MX"},"notes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name","address1","city"],"title":"ShipToIn","description":"Where the pharmacy ships the order. Patient name + address = PHI."},"ShippingInfo":{"properties":{"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"},"tracking_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Number"},"tracking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Url"},"ready_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ready At"},"shipped_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipped At"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At"},"cancel_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Reason"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"tracking_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Status"},"tracking_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Detail"},"tracking_checked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Checked At"},"watch_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Watch Note"},"exception_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exception Reason"},"exception_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exception Note"},"exception_opened_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exception Opened At"},"exception_resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exception Resolved At"}},"type":"object","title":"ShippingInfo"},"SignaturePreviewOut":{"properties":{"content_type":{"type":"string","title":"Content Type"},"image_base64":{"type":"string","title":"Image Base64"}},"type":"object","required":["content_type","image_base64"],"title":"SignaturePreviewOut"},"SigningMethodIn":{"properties":{"method":{"type":"string","enum":["facsimile","efirma"],"title":"Method"}},"type":"object","required":["method"],"title":"SigningMethodIn"},"StarterDocAcceptIn":{"properties":{"doc_version_id":{"type":"string","title":"Doc Version Id"},"text_hash":{"type":"string","maxLength":100,"minLength":1,"title":"Text Hash"},"items":{"items":{"type":"string"},"type":"array","title":"Items"}},"type":"object","required":["doc_version_id","text_hash"],"title":"StarterDocAcceptIn","description":"Echo of exactly what was shown on screen, per document."},"StarterDocOut":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"version":{"type":"string","title":"Version"},"locale":{"$ref":"#/components/schemas/Locale"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"text_hash":{"type":"string","title":"Text Hash"},"items":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Items"},"accepted":{"type":"boolean","title":"Accepted","default":false},"accepted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accepted At"}},"type":"object","required":["id","kind","version","locale","title","body","text_hash"],"title":"StarterDocOut"},"StarterDocsAcceptIn":{"properties":{"accept":{"items":{"$ref":"#/components/schemas/StarterDocAcceptIn"},"type":"array","minItems":1,"title":"Accept"}},"type":"object","required":["accept"],"title":"StarterDocsAcceptIn"},"StarterGate":{"properties":{"key":{"type":"string","title":"Key"},"done":{"type":"boolean","title":"Done"}},"type":"object","required":["key","done"],"title":"StarterGate"},"StarterLaneIn":{"properties":{"lanes":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Lanes"}},"type":"object","required":["lanes"],"title":"StarterLaneIn","description":"The lanes the subscriber chooses to operate.\n\nUnknown lanes are refused rather than dropped (the opposite of the\nsegmentation fields on signup): this one is an entitlement, and silently\nignoring part of the request would leave them live on lanes they didn't\npick. The count is checked against their allowance in the router, which is\nthe only place that knows their plan."},"StarterLaneQuote":{"properties":{"currency":{"type":"string","title":"Currency","default":"USD"},"starter_1_monthly":{"type":"number","title":"Starter 1 Monthly","default":0},"starter_2_monthly":{"type":"number","title":"Starter 2 Monthly","default":0},"starter_2_lanes":{"type":"integer","title":"Starter 2 Lanes","default":2},"extra_lane_monthly":{"type":"number","title":"Extra Lane Monthly","default":0},"all_lanes":{"type":"integer","title":"All Lanes","default":4},"all_lanes_monthly":{"type":"number","title":"All Lanes Monthly","default":0},"upgrades":{"items":{"type":"string"},"type":"array","title":"Upgrades","default":[]}},"type":"object","title":"StarterLaneQuote","description":"What 1 lane, 2 lanes, an extra lane, and every lane will cost."},"StarterSignupCreated":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"affiliate_id":{"type":"string","title":"Affiliate Id"},"slug":{"type":"string","title":"Slug"},"portal_url":{"type":"string","title":"Portal Url"},"email_verification_required":{"type":"boolean","title":"Email Verification Required","default":true}},"type":"object","required":["affiliate_id","slug","portal_url"],"title":"StarterSignupCreated"},"StarterSignupIn":{"properties":{"affiliate_type":{"type":"string","maxLength":40,"title":"Affiliate Type"},"first_name":{"type":"string","maxLength":100,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":100,"minLength":1,"title":"Last Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"type":"string","maxLength":40,"minLength":6,"title":"Phone"},"organization":{"type":"string","maxLength":200,"minLength":2,"title":"Organization"},"country":{"type":"string","maxLength":80,"minLength":2,"title":"Country"},"website":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Website"},"social":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Social"},"audience_size":{"type":"string","maxLength":120,"minLength":1,"title":"Audience Size"},"follower_counts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Follower Counts"},"audience_gender":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Audience Gender"},"content_focus":{"items":{"type":"string"},"type":"array","title":"Content Focus"},"reserved_lanes":{"items":{"type":"string"},"type":"array","title":"Reserved Lanes"},"password":{"type":"string","maxLength":200,"minLength":1,"title":"Password"},"accept_starter_terms":{"type":"boolean","title":"Accept Starter Terms","default":false},"accept_privacy":{"type":"boolean","title":"Accept Privacy","default":false},"locale":{"$ref":"#/components/schemas/Locale","default":"es"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token"},"company_url":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company Url"}},"type":"object","required":["affiliate_type","first_name","last_name","email","phone","organization","country","audience_size","password"],"title":"StarterSignupIn","description":"Public starter signup, posted by the site's server-side form handler.\n\nFull contact is mandatory — this creates a real tenant, not a lead. A social\nprofile and an audience size are required for a creator, whose audience IS\nthe business."},"StarterStatusOut":{"properties":{"is_starter":{"type":"boolean","title":"Is Starter"},"affiliate_id":{"type":"string","title":"Affiliate Id"},"affiliate_name":{"type":"string","title":"Affiliate Name"},"affiliate_type":{"type":"string","title":"Affiliate Type"},"status":{"type":"string","title":"Status"},"gates":{"items":{"$ref":"#/components/schemas/StarterGate"},"type":"array","title":"Gates","default":[]},"next":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"},"complete":{"type":"boolean","title":"Complete","default":false},"lanes":{"items":{"type":"string"},"type":"array","title":"Lanes","default":[]},"lanes_available":{"items":{"type":"string"},"type":"array","title":"Lanes Available","default":["trt","hrt","glp1","longevity"]},"lane_allowance":{"type":"integer","title":"Lane Allowance","default":1},"reserved_lanes":{"items":{"type":"string"},"type":"array","title":"Reserved Lanes","default":[]},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified","default":false},"documents":{"items":{"$ref":"#/components/schemas/StarterDocOut"},"type":"array","title":"Documents","default":[]},"recovery":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Recovery"},"plan":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Plan"},"lane_quote":{"anyOf":[{"$ref":"#/components/schemas/StarterLaneQuote"},{"type":"null"}]},"plans":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Plans","default":[]},"plan_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Key"},"handling_pct":{"type":"number","title":"Handling Pct","default":2}},"type":"object","required":["is_starter","affiliate_id","affiliate_name","affiliate_type","status"],"title":"StarterStatusOut","description":"Everything the affiliate console needs to render the onboarding block."},"SupportAskIn":{"properties":{"question":{"type":"string","maxLength":2000,"minLength":1,"title":"Question"},"lang":{"type":"string","title":"Lang","default":"es"},"history":{"items":{"$ref":"#/components/schemas/SupportTurn"},"type":"array","title":"History"}},"type":"object","required":["question"],"title":"SupportAskIn"},"SupportAskOut":{"properties":{"answer":{"type":"string","title":"Answer"},"resolved":{"type":"boolean","title":"Resolved"},"escalate_suggested":{"type":"boolean","title":"Escalate Suggested"}},"type":"object","required":["answer","resolved","escalate_suggested"],"title":"SupportAskOut"},"SupportEscalateIn":{"properties":{"question":{"type":"string","maxLength":4000,"minLength":1,"title":"Question"},"lang":{"type":"string","title":"Lang","default":"es"},"history":{"items":{"$ref":"#/components/schemas/SupportTurn"},"type":"array","title":"History"},"contact_email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Contact Email"}},"type":"object","required":["question"],"title":"SupportEscalateIn"},"SupportEscalateOut":{"properties":{"ok":{"type":"boolean","title":"Ok"},"contact_email":{"type":"string","title":"Contact Email"}},"type":"object","required":["ok","contact_email"],"title":"SupportEscalateOut"},"SupportFaqItem":{"properties":{"id":{"type":"string","title":"Id"},"q":{"type":"string","title":"Q"},"a":{"type":"string","title":"A"}},"type":"object","required":["id","q","a"],"title":"SupportFaqItem"},"SupportInfoOut":{"properties":{"eligible":{"type":"boolean","title":"Eligible"},"ai_enabled":{"type":"boolean","title":"Ai Enabled"},"contact_email":{"type":"string","title":"Contact Email"},"faq":{"items":{"$ref":"#/components/schemas/SupportFaqItem"},"type":"array","title":"Faq"}},"type":"object","required":["eligible","ai_enabled","contact_email"],"title":"SupportInfoOut"},"SupportTurn":{"properties":{"role":{"type":"string","pattern":"^(user|assistant)$","title":"Role"},"content":{"type":"string","maxLength":4000,"title":"Content"}},"type":"object","required":["role","content"],"title":"SupportTurn"},"TenantOption":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"type":{"$ref":"#/components/schemas/AffiliateType"},"status":{"$ref":"#/components/schemas/AffiliateStatus"},"white_label":{"type":"boolean","title":"White Label","default":false},"api_access":{"type":"boolean","title":"Api Access","default":false},"comms_access":{"type":"boolean","title":"Comms Access","default":false},"landing_enabled":{"type":"boolean","title":"Landing Enabled","default":false},"lane_landing_enabled":{"type":"boolean","title":"Lane Landing Enabled","default":false}},"type":"object","required":["id","name","slug","type","status"],"title":"TenantOption","description":"Lightweight affiliate summary for the super-admin tenant picker."},"TotpActivatedResponse":{"properties":{"totp_enabled":{"type":"boolean","title":"Totp Enabled"},"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes"}},"type":"object","required":["totp_enabled","recovery_codes"],"title":"TotpActivatedResponse"},"TotpEnrollResponse":{"properties":{"secret":{"type":"string","title":"Secret"},"otpauth_uri":{"type":"string","title":"Otpauth Uri"},"qr_svg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qr Svg"}},"type":"object","required":["secret","otpauth_uri"],"title":"TotpEnrollResponse"},"TotpVerifyRequest":{"properties":{"code":{"type":"string","maxLength":16,"minLength":6,"title":"Code"}},"type":"object","required":["code"],"title":"TotpVerifyRequest"},"TranscriptIn":{"properties":{"text":{"type":"string","maxLength":4000,"minLength":1,"title":"Text"},"speaker":{"type":"string","maxLength":16,"title":"Speaker","default":"reviewer"}},"type":"object","required":["text"],"title":"TranscriptIn"},"UpgradeRequestIn":{"properties":{"kind":{"type":"string","maxLength":20,"title":"Kind","default":"upgrade"},"requested":{"anyOf":[{"type":"string","maxLength":400},{"type":"null"}],"title":"Requested"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"}},"type":"object","title":"UpgradeRequestIn"},"UpgradeRequestOut":{"properties":{"id":{"type":"string","title":"Id"},"affiliate_id":{"type":"string","title":"Affiliate Id"},"affiliate_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Name"},"kind":{"type":"string","title":"Kind"},"requested":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"status":{"type":"string","title":"Status"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"handled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Handled At"}},"type":"object","required":["id","affiliate_id","kind","status"],"title":"UpgradeRequestOut"},"UpgradeRequestUpdate":{"properties":{"status":{"type":"string","maxLength":20,"title":"Status"}},"type":"object","required":["status"],"title":"UpgradeRequestUpdate"},"UserOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"role":{"$ref":"#/components/schemas/UserRole"},"status":{"$ref":"#/components/schemas/UserStatus"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"affiliate_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Id"},"totp_enabled":{"type":"boolean","title":"Totp Enabled"},"email_verified":{"type":"boolean","title":"Email Verified"},"is_superadmin":{"type":"boolean","title":"Is Superadmin","default":false},"admin_perms":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Admin Perms"}},"type":"object","required":["id","email","role","status","totp_enabled","email_verified"],"title":"UserOut"},"UserRole":{"type":"string","enum":["admin","reviewer","affiliate","patient","pharma","comms"],"title":"UserRole"},"UserStatus":{"type":"string","enum":["invited","active","disabled"],"title":"UserStatus"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyIn":{"properties":{"seg":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Seg"},"id":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Id"},"t":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"T"}},"type":"object","title":"VerifyIn"},"VitalsCheckIn":{"properties":{"hr":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hr"},"hrv":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hrv"},"resp_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Resp Rate"},"spo2":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spo2"},"bp_sys":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bp Sys"},"bp_dia":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bp Dia"},"stress":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Stress"},"method":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Method"},"confidence":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Confidence"},"lane":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Lane"}},"type":"object","title":"VitalsCheckIn","description":"Camera rPPG vitals reading. All optional; clamped/aliased server-side."},"WebhookCreate":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"}},"type":"object","required":["url"],"title":"WebhookCreate"},"WebhookCreated":{"properties":{"webhook":{"$ref":"#/components/schemas/WebhookOut"},"signing_secret":{"type":"string","title":"Signing Secret"}},"type":"object","required":["webhook","signing_secret"],"title":"WebhookCreated","description":"Returned once on creation — ``signing_secret`` is shown a single time."},"WebhookOut":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"status":{"$ref":"#/components/schemas/WebhookStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","url","events","status","created_at"],"title":"WebhookOut"},"WebhookStatus":{"type":"string","enum":["active","disabled"],"title":"WebhookStatus"},"WebhookUpdate":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Events"},"status":{"anyOf":[{"$ref":"#/components/schemas/WebhookStatus"},{"type":"null"}]}},"type":"object","title":"WebhookUpdate","description":"Partial update. Omitted fields are left alone.\n\nChanging ``url`` re-points the whole event stream, so it forces a signing-secret\nrotation in the same call (see :class:`WebhookUpdated`) — the previous recipient's\ncopy stops working and the new endpoint must be configured deliberately."},"WebhookUpdated":{"properties":{"webhook":{"$ref":"#/components/schemas/WebhookOut"},"signing_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signing Secret"}},"type":"object","required":["webhook"],"title":"WebhookUpdated","description":"Result of a PATCH. ``signing_secret`` is present **only** when the URL\nchanged — it is shown once, exactly like creation."},"WhiteLabelOut":{"properties":{"white_label":{"type":"boolean","title":"White Label"},"custom_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain"},"custom_domain_verified":{"type":"boolean","title":"Custom Domain Verified","default":false},"cloudflare_managed":{"type":"boolean","title":"Cloudflare Managed","default":false},"custom_domain_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain Status"},"custom_domain_ssl_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain Ssl Status"},"custom_domain_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain Error"},"custom_domain_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain Detail"},"email_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Domain"},"email_domain_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Domain Status"},"inbound_email_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Email Domain"},"inbound_domain_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Domain Status"},"from_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Name"},"from_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Email"},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To"},"has_favicon":{"type":"boolean","title":"Has Favicon","default":false},"cname_target":{"type":"string","title":"Cname Target"},"default_inbound_domain":{"type":"string","title":"Default Inbound Domain"},"reply_address_preview":{"type":"string","title":"Reply Address Preview"},"inbound_routable":{"type":"boolean","title":"Inbound Routable","default":true}},"type":"object","required":["white_label","cname_target","default_inbound_domain","reply_address_preview"],"title":"WhiteLabelOut","description":"Current full white-label config plus the DNS/setup targets the tenant\nneeds to point their own domain and email at us."},"WhiteLabelUpdate":{"properties":{"custom_domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Custom Domain"},"email_domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email Domain"},"inbound_email_domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Inbound Email Domain"},"from_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"From Name"},"from_email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"From Email"},"reply_to":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Reply To"}},"type":"object","title":"WhiteLabelUpdate","description":"Self-service white-label changes. Setting ``custom_domain`` drops the\nverified flag until an admin/ops confirms the Cloudflare custom hostname."},"api__schemas__admin_manage__AffiliateOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"type":{"$ref":"#/components/schemas/AffiliateType"},"jurisdiction":{"$ref":"#/components/schemas/Jurisdiction","default":"MX"},"locations":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Locations"},"parent_affiliate_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Affiliate Id"},"parent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Name"},"status":{"$ref":"#/components/schemas/AffiliateStatus"},"white_label":{"type":"boolean","title":"White Label"},"api_access":{"type":"boolean","title":"Api Access"},"comms_access":{"type":"boolean","title":"Comms Access","default":false},"support_ai_access":{"type":"boolean","title":"Support Ai Access","default":false},"landing_enabled":{"type":"boolean","title":"Landing Enabled","default":false},"lane_landing_enabled":{"type":"boolean","title":"Lane Landing Enabled","default":false},"rs_managed":{"type":"boolean","title":"Rs Managed","default":false},"rs_verified":{"type":"boolean","title":"Rs Verified","default":false},"review_release_delay_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Review Release Delay Minutes","default":0},"comms_mode":{"type":"string","title":"Comms Mode","default":"self"},"from_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Name"},"from_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Email"},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To"},"custom_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain"},"custom_domain_verified":{"type":"boolean","title":"Custom Domain Verified","default":false},"email_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Domain"},"inbound_email_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Email Domain"},"users_count":{"type":"integer","title":"Users Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"lanes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Lanes"},"lane_allowance":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lane Allowance"},"reserved_lanes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Reserved Lanes"},"audience_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audience Size"},"audience_size_num":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audience Size Num"},"follower_counts":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Follower Counts"},"patient_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patient Count"},"conversion_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Conversion Pct"},"audience_gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audience Gender"},"content_focus":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Content Focus"},"responsable_sanitario":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Responsable Sanitario"},"stripe_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Account Id"},"stripe_charges_enabled":{"type":"boolean","title":"Stripe Charges Enabled","default":false},"payout_cadence":{"type":"string","title":"Payout Cadence","default":"monthly"},"payout_hold_days":{"type":"integer","title":"Payout Hold Days","default":7},"reserve_pct":{"type":"string","title":"Reserve Pct","default":"0"},"payment_mode":{"type":"string","title":"Payment Mode","default":"docenlinea_collected"},"net_terms_days":{"type":"integer","title":"Net Terms Days","default":15},"deposit_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deposit Level"},"deposit_required":{"type":"string","title":"Deposit Required","default":"0"},"deposit_funded":{"type":"string","title":"Deposit Funded","default":"0"},"deposit_drawn":{"type":"string","title":"Deposit Drawn","default":"0"},"rfc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rfc"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"tax_regime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Regime"},"cfdi_use":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cfdi Use"},"tax_postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Postal Code"},"has_tax_doc":{"type":"boolean","title":"Has Tax Doc","default":false},"review_prices":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Review Prices"},"call_price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Price"},"child_count":{"type":"integer","title":"Child Count","default":0},"source_lead_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Lead Id"},"onboarding":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Onboarding"}},"type":"object","required":["id","name","slug","type","status","white_label","api_access","users_count","created_at"],"title":"AffiliateOut"},"api__schemas__admin_manage__IntakeQuestionOut":{"properties":{"id":{"type":"string","title":"Id"},"lane":{"type":"string","title":"Lane"},"position":{"type":"integer","title":"Position"},"qkey":{"type":"string","title":"Qkey"},"qtype":{"type":"string","title":"Qtype"},"label_es":{"type":"string","title":"Label Es"},"label_en":{"type":"string","title":"Label En"},"label_fr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Fr"},"help_es":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Help Es"},"help_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Help En"},"help_fr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Help Fr"},"options":{"items":{"$ref":"#/components/schemas/IntakeOption"},"type":"array","title":"Options"},"required":{"type":"boolean","title":"Required"},"active":{"type":"boolean","title":"Active"}},"type":"object","required":["id","lane","position","qkey","qtype","label_es","label_en","help_es","help_en","options","required","active"],"title":"IntakeQuestionOut"},"api__schemas__admin_manage__PatientCaseOut":{"properties":{"id":{"type":"string","title":"Id"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"lane":{"type":"string","title":"Lane"},"path":{"type":"string","title":"Path"},"mode":{"type":"string","title":"Mode"},"status":{"type":"string","title":"Status"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"needs_labs":{"type":"boolean","title":"Needs Labs"},"needs_call":{"type":"boolean","title":"Needs Call"},"has_prescription":{"type":"boolean","title":"Has Prescription"},"consent_revoked":{"type":"boolean","title":"Consent Revoked"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"order":{"anyOf":[{"$ref":"#/components/schemas/PatientCaseOrderOut"},{"type":"null"}]}},"type":"object","required":["id","external_ref","lane","path","mode","status","outcome","needs_labs","needs_call","has_prescription","consent_revoked","created_at","updated_at"],"title":"PatientCaseOut","description":"One case in a patient's pipeline — process only, no PHI."},"api__schemas__admin_manage__PharmacyOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"status":{"$ref":"#/components/schemas/PharmacyStatus"},"lanes":{"items":{"type":"string"},"type":"array","title":"Lanes"},"is_lab":{"type":"boolean","title":"Is Lab"},"medications_count":{"type":"integer","title":"Medications Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"blend_charges":{"items":{"$ref":"#/components/schemas/BlendCharge"},"type":"array","title":"Blend Charges"},"blend_rules":{"anyOf":[{"$ref":"#/components/schemas/BlendRules"},{"type":"null"}]},"shipping_fee":{"type":"number","title":"Shipping Fee","default":0},"med_markup_kind":{"anyOf":[{"type":"string","enum":["flat","pct"]},{"type":"null"}],"title":"Med Markup Kind"},"med_markup_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Med Markup Value"}},"type":"object","required":["id","name","slug","status","lanes","is_lab","medications_count","created_at"],"title":"PharmacyOut"},"api__schemas__admin_manage__ProtocolItem":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"dose":{"anyOf":[{"type":"string","maxLength":600},{"type":"null"}],"title":"Dose"},"instructions":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Instructions"},"medication_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Medication Id"},"quantity":{"type":"integer","maximum":999.0,"minimum":1.0,"title":"Quantity","default":1},"dose_mg":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Dose Mg"}},"type":"object","required":["name"],"title":"ProtocolItem"},"api__schemas__affiliate__AffiliateOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"type":{"$ref":"#/components/schemas/AffiliateType"},"jurisdiction":{"$ref":"#/components/schemas/Jurisdiction"},"status":{"$ref":"#/components/schemas/AffiliateStatus"},"white_label":{"type":"boolean","title":"White Label"},"brand_applied":{"type":"boolean","title":"Brand Applied","default":false},"own_logo":{"type":"string","title":"Own Logo","default":"now"},"api_access":{"type":"boolean","title":"Api Access","default":false},"comms_access":{"type":"boolean","title":"Comms Access","default":false},"landing_enabled":{"type":"boolean","title":"Landing Enabled","default":false},"lane_landing_enabled":{"type":"boolean","title":"Lane Landing Enabled","default":false},"lanes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Lanes"},"custom_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain"},"custom_domain_verified":{"type":"boolean","title":"Custom Domain Verified","default":false}},"type":"object","required":["id","name","slug","type","jurisdiction","status","white_label"],"title":"AffiliateOut"},"api__schemas__billing__CaseListItem":{"properties":{"id":{"type":"string","title":"Id"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"patient_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Alias"},"lane":{"type":"string","title":"Lane"},"path":{"type":"string","title":"Path"},"mode":{"type":"string","title":"Mode"},"status":{"type":"string","title":"Status"},"med_payment_status":{"type":"string","title":"Med Payment Status","default":"none"},"profile_hold":{"type":"boolean","title":"Profile Hold","default":false},"fulfillment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fulfillment Status"},"tracking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","lane","path","mode","status","created_at","updated_at"],"title":"CaseListItem"},"api__schemas__intake__SideEffectOptionsOut":{"properties":{"lane":{"type":"string","title":"Lane"},"severities":{"items":{"type":"string"},"type":"array","title":"Severities"},"symptoms":{"items":{"type":"string"},"type":"array","title":"Symptoms"},"red_flags":{"items":{"type":"string"},"type":"array","title":"Red Flags"}},"type":"object","required":["lane","severities","symptoms","red_flags"],"title":"SideEffectOptionsOut","description":"The vocabulary a partner should collect against, for one lane."},"api__schemas__intake__SideEffectReportIn":{"properties":{"severity":{"type":"string","maxLength":12,"title":"Severity","default":"mild"},"symptoms":{"items":{"type":"string"},"type":"array","maxItems":60,"title":"Symptoms"},"red_flags":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Red Flags"},"note":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Note"},"reported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reported At"}},"type":"object","title":"SideEffectReportIn","description":"A side-effect report forwarded by an affiliate on a patient's behalf.\n\n``severity``, ``symptoms`` and ``red_flags`` are a closed vocabulary served\nby ``GET /v1/side-effects/options`` — unknown keys are dropped rather than\nrejected, so a partner on an older vocabulary still gets its report stored\nand triaged instead of losing it to a 422."},"api__schemas__intake__SideEffectReportOut":{"properties":{"id":{"type":"string","title":"Id"},"case_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Id"},"lane":{"type":"string","title":"Lane"},"source":{"type":"string","title":"Source"},"reported_at":{"type":"string","format":"date-time","title":"Reported At"},"severity":{"type":"string","title":"Severity"},"symptoms":{"items":{"type":"string"},"type":"array","title":"Symptoms"},"red_flags":{"items":{"type":"string"},"type":"array","title":"Red Flags"},"triage_level":{"type":"string","title":"Triage Level"},"triage_source":{"type":"string","title":"Triage Source"},"refills_halted":{"type":"boolean","title":"Refills Halted","default":false},"cleared_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cleared At"}},"type":"object","required":["id","lane","source","reported_at","severity","triage_level","triage_source"],"title":"SideEffectReportOut","description":"A stored report and what the platform did with it.\n\n``refills_halted`` is the actionable field: when true the partner should\nstop offering a reorder in its own UI, because ours will refuse it."},"api__schemas__medico__CaseListItem":{"properties":{"id":{"type":"string","title":"Id"},"lane":{"type":"string","title":"Lane"},"path":{"$ref":"#/components/schemas/CasePath"},"mode":{"$ref":"#/components/schemas/ReviewMode"},"status":{"$ref":"#/components/schemas/ReviewCaseStatus"},"locale":{"$ref":"#/components/schemas/Locale"},"patient_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Alias"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"affiliate_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Name"},"assigned_reviewer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned Reviewer Id"},"has_active_session":{"type":"boolean","title":"Has Active Session","default":false},"needs_call":{"type":"boolean","title":"Needs Call","default":false},"profile_hold":{"type":"boolean","title":"Profile Hold","default":false},"safety_hold":{"type":"boolean","title":"Safety Hold","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","lane","path","mode","status","locale","created_at","updated_at"],"title":"CaseListItem"},"api__schemas__medico__CaseNoteOut":{"properties":{"id":{"type":"string","title":"Id"},"text":{"type":"string","title":"Text"},"shared":{"type":"boolean","title":"Shared"},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","text","shared","created_at"],"title":"CaseNoteOut"},"api__schemas__medico__ProtocolItem":{"properties":{"rx":{"type":"string","maxLength":200,"minLength":1,"title":"Rx"},"strength":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Strength"},"form":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Form"},"dose":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Dose"},"instructions":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Instructions"},"medication_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Medication Id"},"pack":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Pack"},"ingredients":{"items":{"$ref":"#/components/schemas/FormulaIngredient"},"type":"array","title":"Ingredients"},"container":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Container"},"quote_cost":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Quote Cost"},"price_source":{"anyOf":[{"type":"string","enum":["calculated","quoted"]},{"type":"null"}],"title":"Price Source"},"pharmacy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pharmacy Id"},"ratio":{"anyOf":[{"type":"string","maxLength":12},{"type":"null"}],"title":"Ratio"},"dose_mg":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Dose Mg"},"quantity":{"anyOf":[{"type":"integer","maximum":999.0,"minimum":1.0},{"type":"null"}],"title":"Quantity"}},"type":"object","required":["rx"],"title":"ProtocolItem"},"api__schemas__patient__CaseNoteOut":{"properties":{"id":{"type":"string","title":"Id"},"text":{"type":"string","title":"Text"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","text","created_at"],"title":"CaseNoteOut","description":"A médico note the patient is allowed to see (shared notes only)."},"api__schemas__patient__IntakeQuestionOut":{"properties":{"qkey":{"type":"string","title":"Qkey"},"qtype":{"type":"string","title":"Qtype"},"label_es":{"type":"string","title":"Label Es"},"label_en":{"type":"string","title":"Label En"},"label_fr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Fr"},"help_es":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Help Es"},"help_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Help En"},"help_fr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Help Fr"},"options":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Options"},"required":{"type":"boolean","title":"Required","default":false},"max_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Value"}},"type":"object","required":["qkey","qtype","label_es","label_en"],"title":"IntakeQuestionOut"},"api__schemas__patient__PatientCaseOut":{"properties":{"id":{"type":"string","title":"Id"},"lane":{"type":"string","title":"Lane"},"status":{"type":"string","title":"Status"},"payment_status":{"type":"string","title":"Payment Status","default":"free"},"med_payment_status":{"type":"string","title":"Med Payment Status","default":"none"},"med_payable":{"type":"boolean","title":"Med Payable","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Decided At"},"questionnaire":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Questionnaire"},"decision":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Decision"},"call_active":{"type":"boolean","title":"Call Active","default":false},"call_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Kind"},"call_requested":{"type":"boolean","title":"Call Requested","default":false},"call_payment_status":{"type":"string","title":"Call Payment Status","default":"none"},"call_price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Price"},"call_payable":{"type":"boolean","title":"Call Payable","default":false},"consult_waitlist":{"type":"boolean","title":"Consult Waitlist","default":false},"profile_hold":{"type":"boolean","title":"Profile Hold","default":false},"pay_descriptor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pay Descriptor"},"med_subtotal":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Med Subtotal"},"med_shipping":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Med Shipping"},"med_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Med Total"},"med_quarter_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Med Quarter Total"}},"type":"object","required":["id","lane","status","created_at"],"title":"PatientCaseOut","description":"A patient's own case, sanitized for the patient portal (no reviewer PII)."},"api__schemas__patient__SideEffectOptionsOut":{"properties":{"lane":{"type":"string","title":"Lane"},"severities":{"items":{"type":"string"},"type":"array","title":"Severities"},"symptoms":{"items":{"type":"string"},"type":"array","title":"Symptoms"},"red_flags":{"items":{"type":"string"},"type":"array","title":"Red Flags"}},"type":"object","required":["lane","severities","symptoms","red_flags"],"title":"SideEffectOptionsOut","description":"The closed vocabulary a patient may report against, for one lane.\n\nServed rather than hardcoded in the panel so the floor that halts a refill\nand the checkboxes that feed it can never drift apart."},"api__schemas__patient__SideEffectReportIn":{"properties":{"case_id":{"type":"string","title":"Case Id"},"severity":{"type":"string","maxLength":12,"title":"Severity","default":"mild"},"symptoms":{"items":{"type":"string"},"type":"array","maxItems":60,"title":"Symptoms"},"red_flags":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Red Flags"},"note":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Note"}},"type":"object","required":["case_id"],"title":"SideEffectReportIn"},"api__schemas__patient__SideEffectReportOut":{"properties":{"id":{"type":"string","title":"Id"},"case_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Id"},"lane":{"type":"string","title":"Lane"},"reported_at":{"type":"string","format":"date-time","title":"Reported At"},"severity":{"type":"string","title":"Severity"},"symptoms":{"items":{"type":"string"},"type":"array","title":"Symptoms"},"red_flags":{"items":{"type":"string"},"type":"array","title":"Red Flags"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"triage_level":{"type":"string","title":"Triage Level"},"cleared":{"type":"boolean","title":"Cleared","default":false}},"type":"object","required":["id","lane","reported_at","severity","triage_level"],"title":"SideEffectReportOut","description":"A report as its author may see it.\n\nCarries the triage level because the patient is told plainly when a report\nis what halted their refill — but never the reviewer-facing rationale."},"api__schemas__pharma__PharmacyOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"status":{"type":"string","title":"Status"},"is_lab":{"type":"boolean","title":"Is Lab"},"lanes":{"items":{"type":"string"},"type":"array","title":"Lanes","default":[]}},"type":"object","required":["id","name","slug","status","is_lab"],"title":"PharmacyOut"}}}}