{"openapi":"3.1.0","info":{"title":"EH Core V3 API - DEV","summary":"API to provide data to the UI","description":"\nEH Core V3 API is the eh-webapp backend. 🚀\n","version":"0.1.0"},"paths":{"/api/v3/admin/analytics/patients-list":{"post":{"tags":["support"],"summary":"Patient Query","description":"[DEPRECATED] Query patients and pair with health history and consent acknowledgement.","operationId":"patient_query_api_v3_admin_analytics_patients_list_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientQuerySchema"}}},"required":true},"responses":{"200":{"description":"[DEPRECATED] Use a dedicated reporting tool instead.","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/api/v3/admin/auth/send-verification-email":{"post":{"tags":["admin","support"],"summary":"Admin Send Verification Email","operationId":"admin_send_verification_email_api_v3_admin_auth_send_verification_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminVerificationEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/billing/":{"get":{"tags":["Billing"],"summary":"Billing counts per period or day","description":"Billing counts for the Endless Health Billing view.\n\nCredit columns and the breakdown by test panel, collection method, and\nactivation flow are included only for a single organization with the\ncredits feature on. The all-organizations view has neither.","operationId":"query_billing_api_v3_admin_billing__get","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Organization ID","title":"Organization Id"},"description":"Organization ID"},{"name":"panel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Panel ID","title":"Panel Id"},"description":"Panel ID"},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tags (comma-separated)","title":"Tags"},"description":"Tags (comma-separated)"},{"name":"daily_info","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Show daily instead of aggregated stats","default":false,"title":"Daily Info"},"description":"Show daily instead of aggregated stats"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BillingRowSchema"},"title":"Response Query Billing Api V3 Admin Billing  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/billing/tags/{organization_id}":{"get":{"tags":["Billing"],"summary":"Get Tags","operationId":"get_tags_api_v3_admin_billing_tags__organization_id__get","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"integer","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/bulk-registration/":{"post":{"tags":["admin"],"summary":"Deprecated: bulk registration via CSV upload; use the Google Workflow directly","description":"Validates a CSV of activation codes and enqueues a bulk_registration_workflow per row. This endpoint is no longer the preferred registration path and will be removed.","operationId":"admin_bulk_registration_api_v3_admin_bulk_registration__post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_admin_bulk_registration_api_v3_admin_bulk_registration__post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/api/v3/admin/bulk-registration/create-update-ph-data":{"post":{"tags":["admin"],"summary":"Create Update Ph Data","operationId":"create_update_ph_data_api_v3_admin_bulk_registration_create_update_ph_data_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PHDataSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/campaigns/":{"get":{"tags":["admin","campaigns"],"summary":"List Campaigns","description":"List campaigns joined with their campaign details. Requires\norganization:view_organization permission.","operationId":"list_campaigns_api_v3_admin_campaigns__get","parameters":[{"name":"parent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by sponsoring organization id","title":"Parent Id"},"description":"Filter by sponsoring organization id"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CampaignStatus"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active flag","title":"Active"},"description":"Filter by active flag"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignResponseSchema"},"title":"Response List Campaigns Api V3 Admin Campaigns  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin","campaigns"],"summary":"Create Campaign","description":"Create a campaign in one call: creates the underlying Organization row\n(organization_type=CAMPAIGN) and its CampaignDetails extension, then\ncommits both together.","operationId":"create_campaign_api_v3_admin_campaigns__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreateRequestSchema"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/campaigns/{organization_id}":{"get":{"tags":["admin","campaigns"],"summary":"Get Campaign","description":"Get a single campaign by its organization id.","operationId":"get_campaign_api_v3_admin_campaigns__organization_id__get","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"integer","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["admin","campaigns"],"summary":"Update Campaign","description":"Partially update a campaign's organization fields (name, active,\nparent_id for reparenting) and/or its campaign details (status, dates,\ngoal_screened, description).","operationId":"update_campaign_api_v3_admin_campaigns__organization_id__patch","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"integer","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpdateRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/patient/health-history/{coach_client_id}/validate":{"get":{"tags":["admin"],"summary":"Validate Coach Client Safe Zone","description":"Validate safe zone for a coach's assigned client.\n\nSecurity:\n- Superusers can view all clients' health history\n- Staff of the same organization can view client health history\n- Coaches can only view health history for clients they are assigned to","operationId":"validate_coach_client_safe_zone_api_v3_admin_patient_health_history__coach_client_id__validate_get","parameters":[{"name":"coach_client_id","in":"path","required":true,"schema":{"type":"integer","title":"Coach Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/results/{coach_client_id}/historical":{"get":{"tags":["admin"],"summary":"Get Coach Client Historical Results","operationId":"get_coach_client_historical_results_api_v3_admin_results__coach_client_id__historical_get","parameters":[{"name":"coach_client_id","in":"path","required":true,"schema":{"type":"integer","title":"Coach Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderSimplifiedSchema"},"title":"Response Get Coach Client Historical Results Api V3 Admin Results  Coach Client Id  Historical Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/coach-clients/":{"get":{"tags":["coach-clients"],"summary":"List Coach Clients","operationId":"list_coach_clients_api_v3_admin_coach_clients__get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"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/CoachClientResponseSchema"},"title":"Response List Coach Clients Api V3 Admin Coach Clients  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/coach-clients/{coach_client_id}":{"get":{"tags":["coach-clients"],"summary":"Get Coach Client","operationId":"get_coach_client_api_v3_admin_coach_clients__coach_client_id__get","parameters":[{"name":"coach_client_id","in":"path","required":true,"schema":{"type":"integer","title":"Coach Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachClientResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/coach-clients/{coach_client_id}/assign-coach":{"patch":{"tags":["coach-clients"],"summary":"Assign Coach To Coach Client","operationId":"assign_coach_to_coach_client_api_v3_admin_coach_clients__coach_client_id__assign_coach_patch","parameters":[{"name":"coach_client_id","in":"path","required":true,"schema":{"type":"integer","title":"Coach Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignCoachRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignCoachRequestSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/coach-clients/available-client-report-filenames/{coach_client_id}":{"get":{"tags":["coach-clients"],"summary":"Get Available Client Report Filenames","operationId":"get_available_client_report_filenames_api_v3_admin_coach_clients_available_client_report_filenames__coach_client_id__get","parameters":[{"name":"coach_client_id","in":"path","required":true,"schema":{"type":"integer","title":"Coach Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/coach-clients/client-lab-report/{filename}":{"get":{"tags":["coach-clients"],"summary":"Get Client Lab Report","operationId":"get_client_lab_report_api_v3_admin_coach_clients_client_lab_report__filename__get","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/coach-clients/summary/{coach_client_id}":{"get":{"tags":["coach-clients"],"summary":"Get Client Ai Summary","operationId":"get_client_ai_summary_api_v3_admin_coach_clients_summary__coach_client_id__get","parameters":[{"name":"coach_client_id","in":"path","required":true,"schema":{"type":"integer","title":"Coach Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/coaches/":{"get":{"tags":["coaches"],"summary":"List Coaches","operationId":"list_coaches_api_v3_admin_coaches__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CoachResponseSchema"},"type":"array","title":"Response List Coaches Api V3 Admin Coaches  Get"}}}},"404":{"description":"Not found"}}},"post":{"tags":["coaches"],"summary":"Create Coach","operationId":"create_coach_api_v3_admin_coaches__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachCreateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/credits/events":{"get":{"tags":["Admin Credits"],"summary":"GRANT and ADJUST events of an organization","description":"GRANT and ADJUST events of an organization, newest first.\n\nSuperusers only. CONSUME events are left out. Errors: 403 when the user is\nnot a superuser.","operationId":"list_credit_events_api_v3_admin_credits_events_get","parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"integer","description":"Organization ID","title":"Organization Id"},"description":"Organization ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreditEventResponseSchema"},"title":"Response List Credit Events Api V3 Admin Credits Events Get"}}}},"404":{"description":"Not found"},"403":{"description":"Not a superuser"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/credits/grants":{"post":{"tags":["Admin Credits"],"summary":"Grant credits to an organization","description":"Grant credits to the GENERAL pool of an organization.\n\nSuperusers only; the GRANT records the signed-in user's email. Errors: 400\nwhen expires_at is before available_on, 403 when the user is not a\nsuperuser or the credits feature is off for the organization, 404 when the\norganization does not exist.","operationId":"create_credit_grant_api_v3_admin_credits_grants_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditGrantCreateSchema"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditEventResponseSchema"}}}},"404":{"description":"Organization not found"},"400":{"description":"expires_at is before available_on"},"403":{"description":"Not a superuser, or credits are off for the organization"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/credits/adjustments":{"post":{"tags":["Admin Credits"],"summary":"Adjust the credits of a GRANT","description":"Add a positive or negative ADJUST to a GRANT.\n\nSuperusers only; the ADJUST records the signed-in user's email. The credits\nfeature is not checked: a GRANT can only be written through /grants, which\nchecks it. Errors: 400 when the event is not a GRANT, credits is 0, the\nGRANT is cancelled, credits are added to an expired GRANT, or the total\nwould go below 0, 403 when the user is not a superuser, 404 when the grant\ndoes not exist.","operationId":"create_credit_adjustment_api_v3_admin_credits_adjustments_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAdjustCreateSchema"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditEventResponseSchema"}}}},"404":{"description":"Grant not found"},"400":{"description":"Not a GRANT, credits is 0, the GRANT is cancelled, credits are added to an expired GRANT, or the total would go below 0"},"403":{"description":"Not a superuser"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/credits/summary":{"get":{"tags":["Admin Credits"],"summary":"Credits summary of an organization","description":"Balance of every pool of an organization that has a GRANT.\n\nSuperusers only. The credits feature is not checked, so a superuser can\nstill read the balance after it is switched off. An empty list means no\nGRANT. Errors: 403 when the user is not a superuser.","operationId":"get_credit_summary_api_v3_admin_credits_summary_get","parameters":[{"name":"organization_id","in":"query","required":true,"schema":{"type":"integer","description":"Organization ID","title":"Organization Id"},"description":"Organization ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreditPoolSummarySchema"},"title":"Response Get Credit Summary Api V3 Admin Credits Summary Get"}}}},"404":{"description":"Not found"},"403":{"description":"Not a superuser"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/data-share/":{"get":{"tags":["admin"],"summary":"Data Share","operationId":"data_share_api_v3_admin_data_share__get","deprecated":true,"parameters":[{"name":"site_name","in":"query","required":true,"schema":{"type":"string","title":"Site Name"}},{"name":"start","in":"query","required":true,"schema":{"type":"string","title":"Start"}},{"name":"end","in":"query","required":true,"schema":{"type":"string","title":"End"}}],"responses":{"200":{"description":"[DEPRECATED] This endpoint is no longer actively used. ","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/easypost/rates-preview":{"post":{"tags":["easypost"],"summary":"Preview EasyPost rates and the label selection","description":"Superuser diagnostic. Fetches live EasyPost stateless rates for a destination and shows every rate, which one the real label logic selects, and why each other rate was excluded. Nothing is bought or stored. Uses EasyPost's `/beta/rates` endpoint, which is a beta API. `messages` passes through any carrier messages EasyPost returns, and may be empty.","operationId":"rates_preview_api_v3_admin_easypost_rates_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EasyPostRatesPreviewRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EasyPostRatesPreviewResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/email-templates/approve":{"post":{"tags":["admin","email-templates"],"summary":"Bulk approve email templates","description":"Approve one or more email templates by id (cross-organization customer support).\nSets approved_by to the authenticated user's email.","operationId":"approve_email_templates_bulk_api_v3_admin_email_templates_approve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkApproveEmailTemplatesRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkApproveEmailTemplatesResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/associate-kit-to-kit-order/":{"post":{"tags":["kit-assembly","admin"],"summary":"Admin Associate Kit To Kit Order","operationId":"admin_associate_kit_to_kit_order_api_v3_admin_associate_kit_to_kit_order__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitAssociationPayloadSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/kit-orders/query":{"get":{"tags":["kit-assembly"],"summary":"External Kit Orders Query","operationId":"external_kit_orders_query_api_v3_admin_kit_orders_query_get","parameters":[{"name":"created_at_start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Created At Start Date"}},{"name":"created_at_end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Created At End Date"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/KitOrderEvents"},{"type":"null"}],"title":"Status"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"order_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"created_at","title":"Order By"}},{"name":"order_direction","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderDirection"},{"type":"null"}],"default":"asc","title":"Order Direction"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"organization_identifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Identifier"}}],"responses":{"200":{"description":"External kit orders stats","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KitOrderQueryResponseSchema"},"title":"Response External Kit Orders Query Api V3 Admin Kit Orders Query Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/kit-orders/{tracking_number}":{"get":{"tags":["kit-assembly"],"summary":"Get Kit Order By Tracking Number","operationId":"get_kit_order_by_tracking_number_api_v3_admin_kit_orders__tracking_number__get","parameters":[{"name":"tracking_number","in":"path","required":true,"schema":{"type":"string","title":"Tracking Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitOrderQueryResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/kit-orders":{"post":{"tags":["kit-assembly"],"summary":"Create Kit Order","description":"Create a kit order for a test panel and run its shipping side effects.\n\nThe collection method and sample type come from the panel (the first child for\na superpanel), and a superpanel order also creates its items. A panel that does\nnot define them yet takes the values sent in the body or the historic defaults.\n\nInputs:\n    kit_order_data: recipient, address, test panel, optional collection values\n        and the expedited flag.\n    user: the signed-in user, who needs a kit order create permission.\n\nOutput:\n    The created kit order.\n\nRaises:\n    HTTPException: 400 for an unknown panel, a panel that is not configured, a\n        collection value that differs from the panel's or a pair that is not\n        allowed; 403 when the feature or expedited shipping is not enabled.","operationId":"create_kit_order_api_v3_admin_kit_orders_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminExternalKitOrderCreationRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalKitOrderSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/features/evaluate":{"post":{"tags":["admin","features"],"summary":"Evaluate feature flags for an organization","description":"Evaluate requested flags for an organization chosen by the admin.\n\nOnly organization overrides apply. The admin's own user overrides do not,\nso the result matches the organization checks of the admin routes.\n\nInputs:\n    body: Organization id and canonical feature keys.\n    feature_service: Feature evaluation.\nOutput:\n    Requested feature keys mapped to enabled state and config.","operationId":"evaluate_organization_features_api_v3_admin_features_evaluate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminFeatureEvaluateRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"$ref":"#/components/schemas/EvaluatedFeatureSchema"},"type":"object","title":"Response Evaluate Organization Features Api V3 Admin Features Evaluate Post"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/features":{"get":{"tags":["admin","features"],"summary":"List Features","description":"List all feature definitions.","operationId":"list_features_api_v3_admin_features_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FeatureSchema"},"type":"array","title":"Response List Features Api V3 Admin Features Get"}}}},"404":{"description":"Not found"}}},"post":{"tags":["admin","features"],"summary":"Create Feature","description":"Create a new feature definition.\n\nNote: Features should typically be defined in code (feature_constants.py)\nand seeded via CLI. This endpoint is for exceptional cases.","operationId":"create_feature_api_v3_admin_features_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureCreateSchema"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/features/{feature_key}":{"get":{"tags":["admin","features"],"summary":"Get Feature","description":"Get a specific feature definition.","operationId":"get_feature_api_v3_admin_features__feature_key__get","parameters":[{"name":"feature_key","in":"path","required":true,"schema":{"type":"string","title":"Feature Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["admin","features"],"summary":"Update Feature","description":"Update a feature definition.\n\nNote: Consider updating feature_constants.py and re-seeding instead.","operationId":"update_feature_api_v3_admin_features__feature_key__patch","parameters":[{"name":"feature_key","in":"path","required":true,"schema":{"type":"string","title":"Feature Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureUpdateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/features/overrides/organization/{organization_id}":{"get":{"tags":["admin","features"],"summary":"List Organization Overrides","description":"List all feature overrides for a specific organization.","operationId":"list_organization_overrides_api_v3_admin_features_overrides_organization__organization_id__get","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"integer","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FeatureOverrideSchema"},"title":"Response List Organization Overrides Api V3 Admin Features Overrides Organization  Organization Id  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/features/{feature_key}/overrides/organization/{organization_id}":{"patch":{"tags":["admin","features"],"summary":"Upsert Organization Override","description":"Create or update a feature override for a specific organization.","operationId":"upsert_organization_override_api_v3_admin_features__feature_key__overrides_organization__organization_id__patch","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"integer","title":"Organization Id"}},{"name":"feature_key","in":"path","required":true,"schema":{"type":"string","title":"Feature Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureOverrideUpsertSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureOverrideSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin","features"],"summary":"Delete Organization Override","description":"Delete a feature override for an organization.\n\nThis will cause the feature to fall back to its default state.","operationId":"delete_organization_override_api_v3_admin_features__feature_key__overrides_organization__organization_id__delete","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"integer","title":"Organization Id"}},{"name":"feature_key","in":"path","required":true,"schema":{"type":"string","title":"Feature Key"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/features/overrides/user/{user_id}":{"get":{"tags":["admin","features"],"summary":"List User Overrides","description":"List all feature overrides for a specific user.","operationId":"list_user_overrides_api_v3_admin_features_overrides_user__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FeatureOverrideSchema"},"title":"Response List User Overrides Api V3 Admin Features Overrides User  User Id  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/features/{feature_key}/overrides/user/{user_id}":{"patch":{"tags":["admin","features"],"summary":"Upsert User Override","description":"Create or update a feature override for a specific user.","operationId":"upsert_user_override_api_v3_admin_features__feature_key__overrides_user__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"feature_key","in":"path","required":true,"schema":{"type":"string","title":"Feature Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureOverrideUpsertSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureOverrideSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin","features"],"summary":"Delete User Override","description":"Delete a feature override for a user (falls back to default).","operationId":"delete_user_override_api_v3_admin_features__feature_key__overrides_user__user_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"feature_key","in":"path","required":true,"schema":{"type":"string","title":"Feature Key"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/kit-tracking/":{"get":{"tags":["kit-tracking"],"summary":"List kit orders with outbound tracking that are not yet activated","description":"List kit tracking rows (superuser only).\n\nInputs:\n    query: Filters, sort and paging query parameters.\n\nOutput:\n    A page of kit tracking rows and the total matching count.\n\nRaises:\n    HTTPException: 400 when ``start_date`` is after ``end_date``.","operationId":"list_kit_tracking_api_v3_admin_kit_tracking__get","parameters":[{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/KitTrackingSortField","default":"date"}},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/KitTrackingSortOrder","default":"desc"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"}},{"name":"organization","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/KitTrackingStatus"},{"type":"null"}],"title":"Status"}},{"name":"kit_component","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kit Component"}},{"name":"panel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Panel Id"}},{"name":"carrier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitTrackingListResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/kit-tracking/export":{"get":{"tags":["kit-tracking"],"summary":"Export kit tracking rows as CSV","description":"Stream all matching kit tracking rows as CSV (superuser only).\n\nInputs:\n    query: Filter and sort query parameters (no paging).\n\nOutput:\n    A streamed ``text/csv`` attachment.\n\nRaises:\n    HTTPException: 400 when ``start_date`` is after ``end_date``.","operationId":"export_kit_tracking_api_v3_admin_kit_tracking_export_get","parameters":[{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/KitTrackingSortField","default":"date"}},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/KitTrackingSortOrder","default":"desc"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"}},{"name":"organization","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/KitTrackingStatus"},{"type":"null"}],"title":"Status"}},{"name":"kit_component","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kit Component"}},{"name":"panel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Panel Id"}},{"name":"carrier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"}}],"responses":{"200":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/kit-tracking/filter-options":{"get":{"tags":["kit-tracking"],"summary":"Distinct carriers and kit components for the filter dropdowns","description":"Return filter dropdown values (superuser only).\n\nInputs:\n    None.\n\nOutput:\n    Sorted carriers and kit components.","operationId":"get_kit_tracking_filter_options_api_v3_admin_kit_tracking_filter_options_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitTrackingFilterOptionsResponseSchema"}}}},"404":{"description":"Not found"}}}},"/api/v3/admin/label-creation/":{"post":{"tags":["label_creation"],"summary":"Create Labels","description":"Create kit labels and return them as a zip.\n\nFlow: validate the panels, generate and render the labels, store the zip in\nGoogle Storage, charge one kit credit per new event kit, then commit the new\norder-lookup rows with their credit events. Schema rules (counts, child\ncount, zero labels) are enforced by LabelCreationSchema and answer 422\nbefore this function runs. Panel and token checks answer 400.","operationId":"create_labels_api_v3_admin_label_creation__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelCreationSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/lims/get-tests/{order_id}":{"get":{"tags":["admin"],"summary":"Get Order Tests","description":"Return explicit panel tests for the preemptive LIMS order lookup.\n\nInputs:\n    order_id: Order code attached to the specimen.\n    order_lookup_service: Looks up the specimen and its assigned panel.\nOutput:\n    Explicit tests with their method, units and specimen metadata. Unknown\n    barcodes and parent kit labels are rejected.","operationId":"get_order_tests_api_v3_admin_lims_get_tests__order_id__get","security":[{"X-API-KEY":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/order-lookup/":{"post":{"tags":["admin"],"summary":"Create Order Lookup","operationId":"create_order_lookup_api_v3_admin_order_lookup__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderLookupSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"X-API-KEY":[]}]}},"/api/v3/admin/organizations/":{"get":{"tags":["admin","organizations"],"summary":"List Organizations","description":"Get list of all organizations.\nRequires organization:view_organization permission.","operationId":"list_organizations_api_v3_admin_organizations__get","parameters":[{"name":"organization_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/OrganizationType"},{"type":"null"}],"description":"Filter to a single organization type.","title":"Organization Type"},"description":"Filter to a single organization type."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationResponseLimitedSchema"},"title":"Response List Organizations Api V3 Admin Organizations  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin","organizations"],"summary":"Create Organization","operationId":"create_organization_api_v3_admin_organizations__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreateRequestSchema"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/organizations/{organization_id}/email-templates":{"get":{"tags":["admin","organizations"],"summary":"List email templates for an organization","description":"List all email templates for a partner organization (newest first).\nUsed by eh-admin Customer Support template approval tool.","operationId":"list_organization_email_templates_api_v3_admin_organizations__organization_id__email_templates_get","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"integer","title":"Organization Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrganizationEmailTemplateSchema"},"title":"Response List Organization Email Templates Api V3 Admin Organizations  Organization Id  Email Templates Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/organizations/{organization_id}":{"patch":{"tags":["admin","organizations"],"summary":"Update Organization","description":"Update non-sensitive organization fields (name, active, configs,\nregistration_site_id). Does not accept identifier, api_key,\nsso_provider_id, organization_type, or parent_id - those are either\nimmutable or managed through the dedicated campaign endpoints.","operationId":"update_organization_api_v3_admin_organizations__organization_id__patch","parameters":[{"name":"organization_id","in":"path","required":true,"schema":{"type":"integer","title":"Organization Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/organizations/types":{"get":{"tags":["admin","organizations"],"summary":"List the organization types catalog","description":"Get the organization types catalog so admin UIs can list the vocabulary\ninstead of hardcoding it. Requires organization:view_organization\npermission.","operationId":"list_organization_types_api_v3_admin_organizations_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganizationTypeSchema"},"type":"array","title":"Response List Organization Types Api V3 Admin Organizations Types Get"}}}},"404":{"description":"Not found"}}}},"/api/v3/admin/patient-appointments/":{"get":{"tags":["admin","patient-appointments"],"summary":"List Patient Appointments","description":"List patient appointments with flexible filtering.\n\nAccess control:\n- Staff: Can view appointments within their organization (automatically filtered)\n- Coaches: Can view appointments for their assigned patients only\n- Superusers: Can view all appointments","operationId":"list_patient_appointments_api_v3_admin_patient_appointments__get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by patient user_id","title":"User Id"},"description":"Filter by patient user_id"},{"name":"coach_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by coach_id","title":"Coach Id"},"description":"Filter by coach_id"},{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by organization_id","title":"Organization Id"},"description":"Filter by organization_id"},{"name":"start_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter from this start time. Can be combined with time_frame.","title":"Start Time"},"description":"Filter from this start time. Can be combined with time_frame."},{"name":"end_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter until this end time. Can be combined with time_frame.","title":"End Time"},"description":"Filter until this end time. Can be combined with time_frame."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by appointment status","title":"Status"},"description":"Filter by appointment status"},{"name":"time_frame","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AppointmentTimeFrame"},{"type":"null"}],"description":"Filter by time frame: 'upcoming' (end_time >= now) or 'past' (end_time < now). Can be combined with start_time and end_time for additional filtering.","title":"Time Frame"},"description":"Filter by time frame: 'upcoming' (end_time >= now) or 'past' (end_time < now). Can be combined with start_time and end_time for additional filtering."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of results","default":100,"title":"Limit"},"description":"Maximum number of results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of results to skip","default":0,"title":"Offset"},"description":"Number of results to skip"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PatientAppointmentResponseSchema"},"title":"Response List Patient Appointments Api V3 Admin Patient Appointments  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/patient-appointments/{appointment_id}/attended":{"patch":{"tags":["admin","patient-appointments"],"summary":"Mark Appointment Attended","description":"Mark an appointment as attended or not attended.\n\nAccess control:\n- Staff: Can mark appointments within their organization\n- Coaches: Can mark appointments for their assigned patients only\n- Superusers: Can mark any appointment","operationId":"mark_appointment_attended_api_v3_admin_patient_appointments__appointment_id__attended_patch","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkAppointmentAttendedSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientAppointmentResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/health-history/latest-form-entry/{user_id}":{"get":{"tags":["patient-health-history"],"summary":"Get Latest Form Entry","operationId":"get_latest_form_entry_api_v3_admin_health_history_latest_form_entry__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestFormEntryResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/ph-data/":{"post":{"tags":["admin-ph-data"],"summary":"Create Ph Data","operationId":"create_ph_data_api_v3_admin_ph_data__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PHDataSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["admin-ph-data","support"],"summary":"Get Ph Data By Email","operationId":"get_ph_data_by_email_api_v3_admin_ph_data__get","parameters":[{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":10,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":0,"title":"Offset"}},{"name":"with_requisitions","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"title":"With Requisitions"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/ph-data/name/":{"get":{"tags":["admin-ph-data","support"],"summary":"Get Ph Data By Name","operationId":"get_ph_data_by_name_api_v3_admin_ph_data_name__get","parameters":[{"name":"first_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"}},{"name":"last_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":10,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/ph-data/{user_id}":{"put":{"tags":["admin-ph-data"],"summary":"Update Ph Data","operationId":"update_ph_data_api_v3_admin_ph_data__user_id__put","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PHDataUpdateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/physicians/pending-approval/":{"get":{"tags":["physicians-admin"],"summary":"Get Physician Pending Approval","operationId":"get_physician_pending_approval_api_v3_admin_physicians_pending_approval__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/admin/physicians/pending-review/":{"get":{"tags":["physicians-admin"],"summary":"Get Physician Pending Review","operationId":"get_physician_pending_review_api_v3_admin_physicians_pending_review__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/admin/physicians/test-approval/{requisition_id}":{"put":{"tags":["physicians-admin"],"summary":"Physician Admin Test Approval","operationId":"physician_admin_test_approval_api_v3_admin_physicians_test_approval__requisition_id__put","parameters":[{"name":"requisition_id","in":"path","required":true,"schema":{"type":"integer","title":"Requisition Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewOrderSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/physicians/test-review/{requisition_id}":{"put":{"tags":["physicians-admin"],"summary":"Review Physician Admin Order","operationId":"review_physician_admin_order_api_v3_admin_physicians_test_review__requisition_id__put","parameters":[{"name":"requisition_id","in":"path","required":true,"schema":{"type":"integer","title":"Requisition Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NoteSchema"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/physicians/latest-lab-report/{requisition_id}":{"get":{"tags":["physicians-admin"],"summary":"Get Latest Lab Report","operationId":"get_latest_lab_report_api_v3_admin_physicians_latest_lab_report__requisition_id__get","parameters":[{"name":"requisition_id","in":"path","required":true,"schema":{"type":"integer","title":"Requisition Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/physicians/billing-numbers":{"get":{"tags":["physicians-admin"],"summary":"Get Billing Numbers","operationId":"get_billing_numbers_api_v3_admin_physicians_billing_numbers_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/physicians/billing/counters/":{"get":{"tags":["physicians-admin"],"summary":"Get Dashboard Counters","operationId":"get_dashboard_counters_api_v3_admin_physicians_billing_counters__get","parameters":[{"name":"start_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Start Date"}},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","format":"date","title":"End Date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":10,"title":"limit of items to count","default":10}},{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/physicians/report/counters/":{"get":{"tags":["physicians-admin"],"summary":"Get Physician Counters","operationId":"get_physician_counters_api_v3_admin_physicians_report_counters__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/admin/requisition-tags/":{"get":{"tags":["requisition-tags"],"summary":"Get All Tags From Organization","operationId":"get_all_tags_from_organization_api_v3_admin_requisition_tags__get","parameters":[{"name":"organization_identifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Identifier"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/requisition-tags/{order_lookup_id}":{"get":{"tags":["requisition-tags"],"summary":"Get Tags For Order Lookup","description":"Fetch tags from RS for the kit identified by order_lookup_id.","operationId":"get_tags_for_order_lookup_api_v3_admin_requisition_tags__order_lookup_id__get","parameters":[{"name":"order_lookup_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Lookup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["requisition-tags"],"summary":"Append Tags For Order Lookup","description":"Append tags in RS first, then commit locally only on RS success.","operationId":"append_tags_for_order_lookup_api_v3_admin_requisition_tags__order_lookup_id__post","parameters":[{"name":"order_lookup_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Lookup Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendTagsSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/requisitions/{order_lookup_id}":{"get":{"tags":["admin-requisitions"],"summary":"Get User Requisition","description":"Return the RS requisition for the kit identified by order_lookup_id.\n\nReplaces the UserOrders-based GET /{user_order_id} — reads registration_information\nto find the requisition_id, then fetches the full requisition from RS.\n\nBuilt as a direct parity replacement for the old endpoint; no active frontend callers\nwere found at the time of writing. Marked deprecated and log to Sentry if used.","operationId":"get_user_requisition_api_v1_admin_requisitions__order_lookup_id__get","deprecated":true,"security":[{"X-API-KEY":[]}],"parameters":[{"name":"order_lookup_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Lookup Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/requisitions/":{"get":{"tags":["admin-requisitions"],"summary":"Get Requisitions","operationId":"get_requisitions_api_v1_admin_requisitions__get","parameters":[{"name":"created_at_start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Created At Start Date"}},{"name":"created_at_end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Created At End Date"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/UserOrderQueryStatusSchema"},{"type":"null"}],"title":"Status"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"order_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"requisition_id","title":"Order By"}},{"name":"order_direction","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderDirection"},{"type":"null"}],"default":"asc","title":"Order Direction"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"organization_identifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Identifier"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}},{"name":"biomarker","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Biomarker"}},{"name":"biomarker_start","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Biomarker Start"}},{"name":"biomarker_end","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Biomarker End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOrdersResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/requisitions/find-for-user/":{"get":{"tags":["admin-requisitions"],"summary":"Find Requisition For User","description":"Check if a requisition is fully linked for this patient + kit.\n\nReturns two signals:\n- rs_requisition_id: set as soon as RS has the requisition (use to skip order creation).\n- requisition_id: set only when both RS and CORE DB agree — safe for the tag endpoint.\n\nPolling exits only when requisition_id is non-null (webhook has completed).\nRaises 404 if the activation_code has no matching order_lookup.","operationId":"find_requisition_for_user_api_v1_admin_requisitions_find_for_user__get","parameters":[{"name":"patient_external_id","in":"query","required":true,"schema":{"type":"integer","title":"Patient External Id"}},{"name":"activation_code","in":"query","required":true,"schema":{"type":"string","title":"Activation Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/sample-templates/csv":{"get":{"tags":["admin"],"summary":"Download Sample Csv","operationId":"download_sample_csv_api_v3_admin_sample_templates_csv_get","parameters":[{"name":"template_name","in":"query","required":false,"schema":{"type":"string","default":"results_upload.csv","title":"Template Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/sandbox/order/{order_id}/external-kit-order-status":{"get":{"tags":["admin"],"summary":"Get External Kit Order Status","operationId":"get_external_kit_order_status_api_v3_admin_sandbox_order__order_id__external_kit_order_status_get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/sandbox/order/{order_id}/requisition-status":{"get":{"tags":["admin"],"summary":"Get Order Requisition Status","operationId":"get_order_requisition_status_api_v3_admin_sandbox_order__order_id__requisition_status_get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/subscriptions/square":{"post":{"tags":["admin","subscriptions"],"summary":"Create a Square subscription","description":"Create one subscription through the Square Subscriptions API.","operationId":"create_admin_square_subscription_api_v3_admin_subscriptions_square_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSquareSubscriptionCreateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSquareSubscriptionCreateResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/subscriptions/checkout-session":{"post":{"tags":["admin","subscriptions"],"summary":"Create Admin Checkout Session","operationId":"create_admin_checkout_session_api_v3_admin_subscriptions_checkout_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSquareCheckoutRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SquareCheckoutResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/subscriptions/create-custom-subscription":{"post":{"tags":["admin","subscriptions"],"summary":"Create Subscription","operationId":"create_subscription_api_v3_admin_subscriptions_create_custom_subscription_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCreationRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/subscriptions/{provider}/plans":{"get":{"tags":["admin","subscriptions","admin","subscriptions"],"summary":"List all subscription plans for a provider","description":"List every subscription plan for the provider, including hidden ones.","operationId":"list_subscription_plans_api_v3_admin_subscriptions__provider__plans_get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"$ref":"#/components/schemas/SubscriptionProvider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPlanAdminListResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/subscriptions/{provider}/plans/{plan_id}":{"patch":{"tags":["admin","subscriptions","admin","subscriptions"],"summary":"Hide or show a subscription plan","description":"Toggle a plan's visibility. active=False hides it from the plans listing,\nactive=True shows it again. For Square this flips present_at_all_locations.","operationId":"update_subscription_plan_visibility_api_v3_admin_subscriptions__provider__plans__plan_id__patch","parameters":[{"name":"provider","in":"path","required":true,"schema":{"$ref":"#/components/schemas/SubscriptionProvider"}},{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanVisibilityUpdateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPlanVisibilityResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/support/validate-firebase-user/":{"get":{"tags":["support"],"summary":"Validate Email In Firebase","operationId":"validate_email_in_firebase_api_v3_admin_support_validate_firebase_user__get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/support/tracking-number/":{"get":{"tags":["support"],"summary":"Get Linked Tracking Number","operationId":"get_linked_tracking_number_api_v3_admin_support_tracking_number__get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/support/order-lookup/":{"get":{"tags":["support"],"summary":"Get Order Lookup Order Id By Activation Code","operationId":"get_order_lookup_order_id_by_activation_code_api_v3_admin_support_order_lookup__get","parameters":[{"name":"activation_code","in":"query","required":true,"schema":{"type":"string","title":"Activation Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/test-panel/calculation-methods":{"get":{"tags":["admin"],"summary":"Get Panel Calculation Methods","operationId":"get_panel_calculation_methods_api_v3_admin_test_panel_calculation_methods_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/admin/test-panel/":{"get":{"tags":["admin"],"summary":"List all test panels","description":"List test panels of every organization with their tests.\n\nlab_credits is included for superusers on every panel (null when not\nset) and omitted for everyone else, so non-superusers never see another\norganization's credits. The credits feature is not evaluated here: the\nadmin portal checks it for the selected organization before showing the\ncolumn, and evaluating it per organization made one query per org.","operationId":"get_all_test_panels_api_v3_admin_test_panel__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TestPanelResponse"},"type":"array","title":"Response Get All Test Panels Api V3 Admin Test Panel  Get"}}}},"404":{"description":"Not found"}}},"post":{"tags":["admin"],"summary":"Create a regular test panel","description":"Create a regular panel with its collection method, sample type and tests.\n\nInputs:\n    data: Organization, panel name, collection settings, ordered tests,\n        optional calculation selections and lab credits.\n    db: Database session for the panel and audit transactions.\n    user: Administrator creating the panel.\n    test_panel_service: Panel lookup and persistence service.\n    audit_log_service: Records the creation event.\n    feature_service: Resolves organization credit eligibility.\nOutput:\n    The saved panel in the same shape as the list endpoint. Raises 400\n    for an unsupported collection pair, a duplicate panel or name, or\n    lab credits supplied when the organization cannot use them.","operationId":"create_test_panel_api_v3_admin_test_panel__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestPanelCreationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestPanelResponse"}}}},"404":{"description":"Not found"},"400":{"description":"Duplicate panel, pair not allowed or invalid credit fields"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/test-panel/superpanels":{"post":{"tags":["admin"],"summary":"Create a superpanel with its child panels","description":"Create a superpanel (a parent panel plus one child panel per device).\n\nInputs:\n    data: Organization, parent name, collection method, the new children\n        (name, sample type, backup devices, lab credits, tests) and the ids of\n        existing panels to adopt as children (at least 2 panels in total).\nOutput:\n    The created superpanel with its device count, tests and children.\n    lab_credits (the superpanel's is its children's sum) is included only\n    when the credits feature is on.\n    Raises 400 when a superpanel rule is broken (including an existing panel\n    in existing_panel_ids that cannot be adopted: not found in the\n    organization, already in a superpanel, a superpanel itself, inactive,\n    without a collection method or sample type, without lab credits while\n    the credits feature is on, with another collection\n    method), a child sets lab_credits while the credits feature is off, or a child\n    has no lab_credits while it is on, and\n    409 when a concurrent request\n    created the same organization and display name first. Raises 422 when\n    the request itself is invalid: fewer than 2 panels, an existing panel id used twice, a name used twice,\n    a repeated test inside a child, or a biomarker (whatever its unit) in more\n    than one panel of the superpanel (new or existing), in which case the\n    message lists every repeated biomarker id.","operationId":"create_superpanel_api_v3_admin_test_panel_superpanels_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperpanelCreationRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperpanelResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/test-panel/combos":{"get":{"tags":["admin"],"summary":"Get Existing Biomarker Units Combos","operationId":"get_existing_biomarker_units_combos_api_v3_admin_test_panel_combos_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/admin/test-panel/biomarkers":{"get":{"tags":["admin"],"summary":"Get Biomarkers","operationId":"get_biomarkers_api_v3_admin_test_panel_biomarkers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/admin/test-panel/units":{"get":{"tags":["admin"],"summary":"Get Biomarker Units","operationId":"get_biomarker_units_api_v3_admin_test_panel_units_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/admin/results/file-upload":{"post":{"tags":["admin"],"summary":"File Upload","operationId":"file_upload_api_v3_admin_results_file_upload_post","parameters":[{"name":"filename","in":"query","required":true,"schema":{"type":"string","title":"Filename"}},{"name":"is_local","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Is Local"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/results/":{"post":{"tags":["admin"],"summary":"Send Results","operationId":"send_results_api_v3_admin_results__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequisitionResultSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"X-API-KEY":[]}]}},"/api/v3/admin/results/update-status":{"post":{"tags":["admin"],"summary":"Update Status","operationId":"update_status_api_v3_admin_results_update_status_post","security":[{"X-API-KEY":[]}],"parameters":[{"name":"activation_code","in":"query","required":true,"schema":{"type":"string","title":"Activation Code"}},{"name":"status","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OrderStatusEnum"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/results/{activation_code}/send-results":{"post":{"tags":["admin"],"summary":"Send Result For Activation Code","description":"@deprecated — no active callers; UI entry point removed from admin dashboard.","operationId":"send_result_for_activation_code_api_v3_admin_results__activation_code__send_results_post","deprecated":true,"security":[{"X-API-KEY":[]}],"parameters":[{"name":"activation_code","in":"path","required":true,"schema":{"type":"string","title":"Activation Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultUploadSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/results/reject-sample":{"post":{"tags":["admin"],"summary":"Reject Sample For Activation Code","description":"@deprecated — no active callers; UI entry point removed from admin dashboard.","operationId":"reject_sample_for_activation_code_api_v3_admin_results_reject_sample_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SampleRejectionSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true,"security":[{"X-API-KEY":[]}]}},"/api/v3/admin/users-orders/{user_order_id}":{"get":{"tags":["admin-user-orders"],"summary":"Get User Order","description":"@deprecated Use GET /api/v1/admin/requisitions/{order_lookup_id} instead.","operationId":"get_user_order_api_v3_admin_users_orders__user_order_id__get","deprecated":true,"security":[{"X-API-KEY":[]}],"parameters":[{"name":"user_order_id","in":"path","required":true,"schema":{"type":"integer","title":"User Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/users-orders/":{"get":{"tags":["admin-user-orders"],"summary":"Get User Orders","description":"@deprecated Use GET /api/v1/admin/requisitions/ instead.","operationId":"get_user_orders_api_v3_admin_users_orders__get","deprecated":true,"parameters":[{"name":"created_at_start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Created At Start Date"}},{"name":"created_at_end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Created At End Date"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/UserOrderQueryStatusSchema"},{"type":"null"}],"title":"Status"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"order_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"requisition_id","title":"Order By"}},{"name":"order_direction","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderDirection"},{"type":"null"}],"default":"asc","title":"Order Direction"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"organization_identifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Identifier"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}},{"name":"biomarker","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Biomarker"}},{"name":"biomarker_start","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Biomarker Start"}},{"name":"biomarker_end","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Biomarker End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOrdersResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/users-orders/replace/{order_lookup_id}":{"post":{"tags":["admin-user-orders"],"summary":"Replace User Order","operationId":"replace_user_order_api_v3_admin_users_orders_replace__order_lookup_id__post","parameters":[{"name":"order_lookup_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Lookup Id"}},{"name":"new_activation_code","in":"query","required":true,"schema":{"type":"string","title":"New Activation Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/users-orders/find-for-user/":{"get":{"tags":["admin-user-orders"],"summary":"Find User Order For User","description":"@deprecated Use GET /api/v1/admin/requisitions/find-for-user/ instead.","operationId":"find_user_order_for_user_api_v3_admin_users_orders_find_for_user__get","deprecated":true,"parameters":[{"name":"ph_data_id","in":"query","required":true,"schema":{"type":"integer","title":"Ph Data Id"}},{"name":"activation_code","in":"query","required":true,"schema":{"type":"string","title":"Activation Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/users-orders/send-requisition/":{"post":{"tags":["admin-user-orders"],"summary":"Create Requisition For User Order","description":"Submit the requisition for an existing patient order.\n\nInputs:\n    data: Activation code and requisition and specimen collection details.\n    user_order_service: Finds the registered order.\n    order_lookup_service: Resolves the kit and its specimens.\n    requisitions_service: Builds and sends the RS order.\nOutput:\n    Response from the RS order-creation broker.","operationId":"create_requisition_for_user_order_api_v3_admin_users_orders_send_requisition__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRequisitionSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/users-orders/create-for-user/":{"post":{"tags":["admin-user-orders"],"summary":"Create User Order For User","description":"Register a kit and submit its requisition on behalf of a patient.\n\nInputs:\n    data: Order, panel and collection details supplied by the administrator.\n    user: Authenticated user creating the order.\n    db: Database session for the order.\n    ph_data_service: Looks up the patient.\n    order_lookup_service: Resolves and validates the kit.\n    order_processor: Registers the order and submits it to RS.\n    site_service: Resolves the ordering site.\n    test_panel_service: Resolves an optional panel override.\nOutput:\n    The newly registered patient order.","operationId":"create_user_order_for_user_api_v3_admin_users_orders_create_for_user__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserOrderSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/users/{user_id}":{"patch":{"tags":["admin","users"],"summary":"Admin Update User","operationId":"admin_update_user_api_v3_admin_users__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserUpdateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/coach_client_sessions/client/{client_id}":{"get":{"tags":["coach_client_sessions"],"summary":"Get Coach Client Sessions","operationId":"get_coach_client_sessions_api_v3_admin_coach_client_sessions_client__client_id__get","parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"integer","title":"Client Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CoachClientSessionSchema"},"title":"Response Get Coach Client Sessions Api V3 Admin Coach Client Sessions Client  Client Id  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/coach_client_sessions/{session_id}":{"get":{"tags":["coach_client_sessions"],"summary":"Get Coach Client Session","operationId":"get_coach_client_session_api_v3_admin_coach_client_sessions__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachClientSessionSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["coach_client_sessions"],"summary":"Update Coach Client Session","operationId":"update_coach_client_session_api_v3_admin_coach_client_sessions__session_id__put","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachClientSessionUpdateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachClientSessionSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/admin/coach_client_sessions/{coach_client_id}":{"post":{"tags":["coach_client_sessions"],"summary":"Create Coach Client Session","operationId":"create_coach_client_session_api_v3_admin_coach_client_sessions__coach_client_id__post","parameters":[{"name":"coach_client_id","in":"path","required":true,"schema":{"type":"integer","title":"Coach Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachClientSessionCreateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachClientSessionSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/staff/email-templates/":{"post":{"tags":["Staff Email Templates"],"summary":"Save Email Template","operationId":"save_email_template_api_v3_staff_email_templates__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateCreateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/staff/email-templates/locals":{"get":{"tags":["Staff Email Templates"],"summary":"Get Locales","operationId":"get_locales_api_v3_staff_email_templates_locals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/staff/email-templates/send-test":{"post":{"tags":["Staff Email Templates"],"summary":"Send Test Email","operationId":"send_test_email_api_v3_staff_email_templates_send_test_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTestEmailSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/staff/email-templates/variables/{template}":{"get":{"tags":["Staff Email Templates"],"summary":"Get Template Variables","description":"Get the required and optional Jinja variables for an email template.","operationId":"get_template_variables_api_v3_staff_email_templates_variables__template__get","parameters":[{"name":"template","in":"path","required":true,"schema":{"$ref":"#/components/schemas/EmailTemplatesEnum"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateVariablesResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/staff/email-templates/validate":{"post":{"tags":["Staff Email Templates"],"summary":"Validate Template Html","description":"Validate that HTML contains all required Jinja variables for a template.\nReturns 400 if any required variables are missing.","operationId":"validate_template_html_api_v3_staff_email_templates_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateTemplateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateTemplateResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/staff/email-templates/pending-approval":{"get":{"tags":["Staff Email Templates"],"summary":"Get Pending Approval Templates","description":"Get all email templates that have not been approved yet.","operationId":"get_pending_approval_templates_api_v3_staff_email_templates_pending_approval_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingApprovalTemplatesResponse"}}}},"404":{"description":"Not found"}}}},"/api/v3/staff/email-templates/send-by-id":{"post":{"tags":["Staff Email Templates"],"summary":"Send Template By Id","description":"Send an email using a template ID with provided context data.","operationId":"send_template_by_id_api_v3_staff_email_templates_send_by_id_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTemplateByIdSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/staff/email-templates/{template_id}/approve":{"post":{"tags":["Staff Email Templates"],"summary":"Approve Template","description":"Approve an email template by setting the approved_by field.","operationId":"approve_template_api_v3_staff_email_templates__template_id__approve_post","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveTemplateSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/staff/email-templates/{template}/{locale}":{"get":{"tags":["Staff Email Templates"],"summary":"Get Email Template","operationId":"get_email_template_api_v3_staff_email_templates__template___locale__get","parameters":[{"name":"template","in":"path","required":true,"schema":{"$ref":"#/components/schemas/EmailTemplatesEnum"}},{"name":"locale","in":"path","required":true,"schema":{"$ref":"#/components/schemas/LocalesEnum"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/staff/email-templates/{template_id}/enabled":{"patch":{"tags":["Staff Email Templates"],"summary":"Set Template Enabled","description":"Set the enabled status of an email template.","operationId":"set_template_enabled_api_v3_staff_email_templates__template_id__enabled_patch","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTemplateEnabledSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/staff/billing/":{"get":{"tags":["Staff Billing"],"summary":"Billing counts of the user's organization","description":"Billing counts for the user's organization.\n\nCredit columns and the breakdown by test panel, collection method, and\nactivation flow are included only when the credits feature is on for the\norganization. 403 when the user has no organization.","operationId":"query_billing_staff_api_v3_staff_billing__get","parameters":[{"name":"panel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Panel ID","title":"Panel Id"},"description":"Panel ID"},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tags (comma-separated)","title":"Tags"},"description":"Tags (comma-separated)"},{"name":"daily_info","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Show daily instead of aggregated stats","default":false,"title":"Daily Info"},"description":"Show daily instead of aggregated stats"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BillingRowSchema"},"title":"Response Query Billing Staff Api V3 Staff Billing  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/staff/billing/credits":{"get":{"tags":["Staff Billing"],"summary":"Credits summary of the user's organization","description":"Credits summary for the Mass Testing admin portal Billing view.\n\nOutput: one balance per pool of the user's organization that has a\nGRANT: granted, used, and remaining credits of the batches valid today,\nthe batch that expires next, and every GRANT with its status (SCHEDULED\nuntil it is released) and any usage that went over it, newest first. An\nempty list means no prepaid credits. 403 when the credits feature is off\nfor the organization or the user has no organization.","operationId":"get_credit_summary_staff_api_v3_staff_billing_credits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CreditPoolSummarySchema"},"type":"array","title":"Response Get Credit Summary Staff Api V3 Staff Billing Credits Get"}}}},"404":{"description":"Not found"}}}},"/api/v3/staff/test-panel/":{"get":{"tags":["Staff Test Panels"],"summary":"List the organization's test panels","description":"List the organization's test panels, superpanels with their children.\n\nInputs:\n    user: Signed-in user; its organization (or its site's) is listed.\n    test_panel_service: Loads panels, their tests and device counts.\nOutput:\n    The panels with ordered tests, optional calculation selections, and\n    device information. Child panels are listed with their parent ID and\n    can be ordered on their own. Lab credits are omitted.","operationId":"get_test_panels_api_v3_staff_test_panel__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TestPanelResponse"},"type":"array","title":"Response Get Test Panels Api V3 Staff Test Panel  Get"}}}},"404":{"description":"Not found"}}}},"/api/v3/auth/":{"get":{"tags":["Authentication"],"summary":"Get User Info","operationId":"get_user_info_api_v3_auth__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserBaseSchema"}}}},"404":{"description":"Not found"}}},"post":{"tags":["Authentication"],"summary":"Login","operationId":"login_api_v3_auth__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCreationRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLoginResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Authentication"],"summary":"Logout","operationId":"logout_api_v3_auth__delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/auth/2fa":{"post":{"tags":["Authentication"],"summary":"Login 2Fa","description":"Authenticate a Firebase credential and start the portal's email challenge.\n\nInputs are the Firebase token and locale, the resolved request site, and the\nservices for user lookup, feature evaluation and email delivery.\nReturns an empty 200 after initiating the challenge, or user data and a\nsession cookie when the development superuser shortcut applies.","operationId":"login_2fa_api_v3_auth_2fa_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCreationRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/validate-otp":{"post":{"tags":["Authentication"],"summary":"Validate Otp","operationId":"validate_otp_api_v3_auth_validate_otp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTPValidationRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLoginResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/update-user-verification":{"patch":{"tags":["Authentication"],"summary":"Update User Verification","operationId":"update_user_verification_api_v3_auth_update_user_verification_patch","parameters":[{"name":"firebase_user","in":"query","required":false,"schema":{"title":"Firebase User"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/verify-email":{"post":{"tags":["Authentication"],"summary":"Verify Email","operationId":"verify_email_api_v3_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/send-verification-email":{"post":{"tags":["Authentication"],"summary":"Send Verification Email","operationId":"send_verification_email_api_v3_auth_send_verification_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationEmailRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/send-password-reset-email":{"post":{"tags":["Authentication"],"summary":"Send Password Reset Email","operationId":"send_password_reset_email_api_v3_auth_send_password_reset_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/reset-password":{"post":{"tags":["Authentication"],"summary":"Reset Password","operationId":"reset_password_api_v3_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetDataSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/google/calendar/connect":{"get":{"tags":["Authentication"],"summary":"Google Connect","description":"Start Google OAuth consent (Calendar, offline access) for the authenticated coach.\nWe operate in popup mode only: we encode the FE origin (when available) into\n`state` together with `popup=1`. The callback will notify the opener via\npostMessage and close the popup. No FE redirects are performed by the server.","operationId":"google_connect_api_v3_auth_google_calendar_connect_get","parameters":[{"name":"popup","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Popup"}},{"name":"origin_param","in":"query","required":false,"schema":{"type":"string","title":"Origin Param"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/google/calendar/callback":{"get":{"tags":["Authentication"],"summary":"Google Callback","description":"Handle Google OAuth callback: exchange code -> tokens and persist refresh token.\nIn popup mode, the callback returns a tiny HTML page that postMessages\n`{ type: 'google-calendar-connected', success: true|false }` to the opener's\norigin (parsed from `state`) and immediately closes the popup. No redirects.","operationId":"google_callback_api_v3_auth_google_calendar_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/biomarkers/ranges":{"get":{"tags":["biomarkers"],"summary":"Get Biomarkers Ranges","operationId":"get_biomarkers_ranges_api_v3_biomarkers_ranges_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/chatbot/stream":{"post":{"tags":["Chatbot"],"summary":"Post Message Stream","operationId":"post_message_stream_api_v3_chatbot_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/chatbot/escalations":{"post":{"tags":["Chatbot"],"summary":"Create Chatbot Escalation","operationId":"create_chatbot_escalation_api_v3_chatbot_escalations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatbotEscalationRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/coach/availability/coaches":{"get":{"tags":["coach-availability"],"summary":"List Public Coaches","description":"List coaches for the current user's organization (public for portal).\nReturns minimal info to render a selection page.","operationId":"list_public_coaches_api_v3_coach_availability_coaches_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Public Coaches Api V3 Coach Availability Coaches Get"}}}},"404":{"description":"Not found"}}}},"/api/v3/coach/availability/":{"get":{"tags":["coach-availability"],"summary":"Get Coach Availability","operationId":"get_coach_availability_api_v3_coach_availability__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CoachAvailabilityDBSchema"},"type":"array","title":"Response Get Coach Availability Api V3 Coach Availability  Get"}}}},"404":{"description":"Not found"}}},"post":{"tags":["coach-availability"],"summary":"Create Coach Availability","operationId":"create_coach_availability_api_v3_coach_availability__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachAvailabilityCreateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachAvailabilityResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/coach/availability/assigned":{"get":{"tags":["coach-availability"],"summary":"Get Assigned Coach","description":"Return the assigned coach for the logged-in user.\nIf multiple relationships exist, choose the latest with a coach.\nReturns both the coach record id and the coach's user_id.","operationId":"get_assigned_coach_api_v3_coach_availability_assigned_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Assigned Coach Api V3 Coach Availability Assigned Get"}}}},"404":{"description":"Not found"}}}},"/api/v3/coach/availability/{user_id}":{"get":{"tags":["coach-availability"],"summary":"Get Coach Availability By User Id","operationId":"get_coach_availability_by_user_id_api_v3_coach_availability__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CoachAvailabilityDBSchema"},"title":"Response Get Coach Availability By User Id Api V3 Coach Availability  User Id  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/coach/availability/freebusy/me":{"get":{"tags":["coach-availability"],"summary":"Get My Freebusy","operationId":"get_my_freebusy_api_v3_coach_availability_freebusy_me_get","parameters":[{"name":"start_time","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Start time for free/busy query","title":"Start Time"},"description":"Start time for free/busy query"},{"name":"end_time","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"End time for free/busy query","title":"End Time"},"description":"End time for free/busy query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get My Freebusy Api V3 Coach Availability Freebusy Me Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/coach/availability/freebusy/{coach_id}":{"get":{"tags":["coach-availability"],"summary":"Get Coach Freebusy","description":"Get coach free/busy information combining availability and appointments.\nAccessible by:\n- The coach themselves (user_id == coach_id)\n- Admin or staff users\n- Users assigned to this coach\n- Users registered but don't have a coach assigned","operationId":"get_coach_freebusy_api_v3_coach_availability_freebusy__coach_id__get","parameters":[{"name":"coach_id","in":"path","required":true,"schema":{"type":"integer","title":"Coach Id"}},{"name":"start_time","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Start time for free/busy query","title":"Start Time"},"description":"Start time for free/busy query"},{"name":"end_time","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"End time for free/busy query","title":"End Time"},"description":"End time for free/busy query"},{"name":"enforce_patient_view","in":"query","required":false,"schema":{"type":"boolean","description":"Force patient booking rules (4-day min) regardless of staff status","default":false,"title":"Enforce Patient View"},"description":"Force patient booking rules (4-day min) regardless of staff status"},{"name":"patient_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Explicit patient user_id to enforce booking rules for","title":"Patient Id"},"description":"Explicit patient user_id to enforce booking rules for"},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Reschedule token to determine session duration from existing appointment","title":"Token"},"description":"Reschedule token to determine session duration from existing appointment"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Coach Freebusy Api V3 Coach Availability Freebusy  Coach Id  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/coach/availability/refresh":{"post":{"tags":["coach-availability"],"summary":"Refresh Coach Availability","operationId":"refresh_coach_availability_api_v3_coach_availability_refresh_post","parameters":[{"name":"coach_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Coach user_id to refresh. If omitted and caller is a patient, we'll use their assigned coach.","title":"Coach User Id"},"description":"Coach user_id to refresh. If omitted and caller is a patient, we'll use their assigned coach."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CoachAvailabilityDBSchema"},"title":"Response Refresh Coach Availability Api V3 Coach Availability Refresh Post"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/coach/availability/{event_id}":{"put":{"tags":["coach-availability"],"summary":"Update Coach Availability","operationId":"update_coach_availability_api_v3_coach_availability__event_id__put","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachAvailabilityUpdateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoachAvailabilityResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["coach-availability"],"summary":"Delete Coach Availability","operationId":"delete_coach_availability_api_v3_coach_availability__event_id__delete","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"instance_date","in":"query","required":false,"schema":{"type":"string","title":"Instance Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Coach Availability Api V3 Coach Availability  Event Id  Delete"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/coach/availability/webhook":{"post":{"tags":["coach-availability"],"summary":"Coach Availability Webhook","operationId":"coach_availability_webhook_api_v3_coach_availability_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Coach Availability Webhook Api V3 Coach Availability Webhook Post"}}}},"404":{"description":"Not found"}}}},"/api/v3/data-intelligence/requisitions/stats":{"get":{"tags":["data-intelligence"],"summary":"Requisitions Stats","operationId":"requisitions_stats_api_v3_data_intelligence_requisitions_stats_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD format","title":"Start Date"},"description":"YYYY-MM-DD format"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD format","title":"End Date"},"description":"YYYY-MM-DD format"},{"name":"tag","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"String of just letters and underscore","title":"Tag"},"description":"String of just letters and underscore"}],"responses":{"200":{"description":"Requisitions stats","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/data-intelligence/event/stats-count":{"get":{"tags":["data-intelligence"],"summary":"Event Stat Counts","operationId":"event_stat_counts_api_v3_data_intelligence_event_stats_count_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD format","title":"Start Date"},"description":"YYYY-MM-DD format"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD format","title":"End Date"},"description":"YYYY-MM-DD format"},{"name":"tag","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"String of just letters and underscore","title":"Tag"},"description":"String of just letters and underscore"}],"responses":{"200":{"description":"Requisitions stats","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/data-intelligence/event/stats-times":{"get":{"tags":["data-intelligence"],"summary":"Event Stat Times","operationId":"event_stat_times_api_v3_data_intelligence_event_stats_times_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD format","title":"Start Date"},"description":"YYYY-MM-DD format"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD format","title":"End Date"},"description":"YYYY-MM-DD format"}],"responses":{"200":{"description":"Requisitions stats","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/data-intelligence/event/snapshot/":{"get":{"tags":["data-intelligence"],"summary":"Events By Date","operationId":"events_by_date_api_v3_data_intelligence_event_snapshot__get","deprecated":true,"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"type":"string","format":"date","description":"YYYY-MM-DD format","title":"Start Date"},"description":"YYYY-MM-DD format"},{"name":"end_date","in":"query","required":false,"schema":{"type":"string","format":"date","description":"YYYY-MM-DD format","title":"End Date"},"description":"YYYY-MM-DD format"}],"responses":{"200":{"description":"[DEPRECATED] Order status snapshot by date range — use /event/stats-times instead","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/data-intelligence/requisition-results/stats/{biomarker}":{"get":{"tags":["data-intelligence"],"summary":"Requisitions Results Stats","operationId":"requisitions_results_stats_api_v3_data_intelligence_requisition_results_stats__biomarker__get","parameters":[{"name":"biomarker","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Biomarkers"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD format","title":"Start Date"},"description":"YYYY-MM-DD format"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD format","title":"End Date"},"description":"YYYY-MM-DD format"},{"name":"tag","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"String of just letters and underscore","title":"Tag"},"description":"String of just letters and underscore"}],"responses":{"200":{"description":"Requisition results stats by biomarker","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/data-intelligence/requisition-results/stats/{biomarker}/result-range":{"get":{"tags":["data-intelligence"],"summary":"Stats Range","operationId":"stats_range_api_v3_data_intelligence_requisition_results_stats__biomarker__result_range_get","parameters":[{"name":"biomarker","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Biomarkers"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD format","title":"Start Date"},"description":"YYYY-MM-DD format"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD format","title":"End Date"},"description":"YYYY-MM-DD format"},{"name":"tag","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"String of just letters and underscore","title":"Tag"},"description":"String of just letters and underscore"},{"name":"start_includes","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Start Includes"}},{"name":"end_includes","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"End Includes"}},{"name":"start_result","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start Result"}},{"name":"end_result","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"End Result"}}],"responses":{"200":{"description":"Requisition results within range by biomarker","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/data-intelligence/external-kit-orders/stats":{"post":{"tags":["data-intelligence"],"summary":"External Kit Orders Stats","operationId":"external_kit_orders_stats_api_v3_data_intelligence_external_kit_orders_stats_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalKitOrdersStatsBody","default":{"rejected_order_lookup_ids":[]}}}}},"responses":{"200":{"description":"External kit orders stats","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/data-intelligence/result/contact-information":{"post":{"tags":["data-intelligence"],"summary":"Result Query","operationId":"result_query_api_v3_data_intelligence_result_contact_information_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultQuerySchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/easypost/shipments":{"get":{"tags":["easypost"],"summary":"Get EasyPost shipments","description":"Retrieve a list of shipments from EasyPost API with pagination support","operationId":"get_shipments_api_v3_easypost_shipments_get","security":[{"X-API-KEY":[]}],"parameters":[{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of shipments to retrieve (1-100)","default":5,"title":"Page Size"},"description":"Number of shipments to retrieve (1-100)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EasyPostShipmentsDetailedResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/easypost/shipments/{shipment_id}":{"get":{"tags":["easypost"],"summary":"Get EasyPost shipment by ID","description":"Retrieve a specific shipment by its ID from EasyPost API","operationId":"get_shipment_by_id_api_v3_easypost_shipments__shipment_id__get","security":[{"X-API-KEY":[]}],"parameters":[{"name":"shipment_id","in":"path","required":true,"schema":{"type":"string","description":"The EasyPost shipment ID","title":"Shipment Id"},"description":"The EasyPost shipment ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EasyPostShipmentDetailSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/easypost/shipping-label":{"post":{"tags":["easypost"],"summary":"Create shipping label","description":"Create a new shipping label with cheapest rate selection and automatic purchase","operationId":"create_shipping_label_api_v3_easypost_shipping_label_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EasyPostShippingLabelSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingLabelResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"X-API-KEY":[]}]}},"/api/v3/easypost/return-label":{"post":{"tags":["easypost"],"summary":"Create return label","description":"Create a new return label with optional overnight shipping rate selection and automatic purchase","operationId":"create_return_label_api_v3_easypost_return_label_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EasyPostReturnLabelSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingLabelResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"X-API-KEY":[]}]}},"/api/v3/easypost/address/verify":{"post":{"tags":["easypost"],"summary":"Verify address","description":"Verify an address using EasyPost API","operationId":"verify_address_api_v3_easypost_address_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressValidationRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressValidationResponseSchema"}}}},"404":{"description":"Not found"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v2/external/order-kit":{"post":{"tags":["external-kit-orders"],"summary":"Create External Kit Order","operationId":"create_external_kit_order_api_v2_external_order_kit_post","security":[{"X-API-KEY":[]}],"parameters":[{"name":"accept-language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalKitOrderCreationRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalKitOrderSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v2/external/order/{external_order_id}":{"get":{"tags":["external-kit-orders"],"summary":"Get External Kit Order","description":"Get external kit order by ID.\n\nSECURITY NOTE: This endpoint is restricted to workflow access only.\nExternal kit orders contain sensitive personal information and should\nonly be accessed by authorized workflows for legitimate business purposes.","operationId":"get_external_kit_order_api_v2_external_order__external_order_id__get","security":[{"X-API-KEY":[]}],"parameters":[{"name":"external_order_id","in":"path","required":true,"schema":{"type":"integer","title":"External Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalKitOrderSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v2/external/replace-kit":{"post":{"tags":["external-kit-orders"],"summary":"Replace External Kit Order","operationId":"replace_external_kit_order_api_v2_external_replace_kit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalKitOrderReplaceRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalKitOrderSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/evaluate":{"post":{"tags":["features"],"summary":"Evaluate feature flags for the current portal site","description":"Evaluate requested flags for the visited or explicitly selected site.\n\nInputs:\n    body: Canonical feature keys and optional site_id fallback.\n    user: Session user, or None for anonymous callers.\n    request_site: Site resolved from Referer then Origin, if any.\n    site_service: Lookup for explicit site_id when headers do not resolve.\n    feature_service: Feature evaluation.\nOutput:\n    Requested feature keys mapped to enabled state and config.","operationId":"evaluate_site_features_api_v1_features_evaluate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureEvaluateRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"$ref":"#/components/schemas/EvaluatedFeatureSchema"},"type":"object","title":"Response Evaluate Site Features Api V1 Features Evaluate Post"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/webhook/forms/submit":{"post":{"tags":["form-webhooks"],"summary":"Handle Form","description":"Handle form submission webhook. Creates a form entry in RS.","operationId":"handle_form_api_v3_webhook_forms_submit_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/health-coaching/latest-session":{"get":{"tags":["health-coaching"],"summary":"Get Latest Session","operationId":"get_latest_session_api_v3_health_coaching_latest_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/health-coaching/sessions":{"get":{"tags":["health-coaching"],"summary":"Get User Sessions","operationId":"get_user_sessions_api_v3_health_coaching_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/lab-report-shares/":{"post":{"tags":["Lab report shares"],"summary":"Create Lab Report Share","description":"Create a share, email the recipient, and return the share status.\n\nInputs:\n    body: Recipient, signature, locale, and requisition ids.\n    request: Used for Origin/CSRF and truncated IP metadata.\n    Remaining arguments are FastAPI dependencies.\nOutput:\n    LabReportShareResponseSchema. Token is emailed, never returned.","operationId":"create_lab_report_share_api_v3_lab_report_shares__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabReportShareCreateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabReportShareResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Lab report shares"],"summary":"List Lab Report Shares","description":"List shares the patient created for a registered requisition.\n\nInputs:\n    requisition_id: Requisition whose shares should be listed.\n    Remaining arguments are FastAPI dependencies.\nOutput:\n    Newest-first list of LabReportShareResponseSchema.","operationId":"list_lab_report_shares_api_v3_lab_report_shares__get","parameters":[{"name":"requisition_id","in":"query","required":true,"schema":{"type":"integer","title":"Requisition Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LabReportShareResponseSchema"},"title":"Response List Lab Report Shares Api V3 Lab Report Shares  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/lab-report-shares/{share_id}/authorization":{"get":{"tags":["Lab report shares"],"summary":"Get Lab Report Share Authorization","description":"Return the stored HIPAA authorization copy for a share the patient owns.\n\nInputs:\n    share_id: Share public UUID.\n    Remaining arguments are FastAPI dependencies.\nOutput:\n    Authorization artifact schema.","operationId":"get_lab_report_share_authorization_api_v3_lab_report_shares__share_id__authorization_get","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Share Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/lab-report-shares/{share_id}/revoke":{"post":{"tags":["Lab report shares"],"summary":"Revoke Lab Report Share","description":"Revoke a share so the emailed download link stops working.\n\nInputs:\n    share_id: Share public UUID.\n    Remaining arguments are FastAPI dependencies.\nOutput:\n    Updated LabReportShareResponseSchema.","operationId":"revoke_lab_report_share_api_v3_lab_report_shares__share_id__revoke_post","parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Share Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabReportShareResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/lab-report-shares/admin/revoke-all":{"post":{"tags":["Lab report shares"],"summary":"Admin Revoke All Shares","description":"Emergency kill-switch helper for superusers.\n\nInputs:\n    organization_id: Optional organization filter.\n    creator_user_id: Optional patient user id filter.\n    Remaining arguments are FastAPI dependencies.\nOutput:\n    Dict with the number of shares revoked.","operationId":"admin_revoke_all_shares_api_v3_lab_report_shares_admin_revoke_all_post","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organization Id"}},{"name":"creator_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Creator User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/lab-report-shares/admin/withdraw-report":{"post":{"tags":["Lab report shares"],"summary":"Admin Withdraw Report Shares","description":"Mark unconsumed shares for a withdrawn report as WITHDRAWN.\n\nInputs:\n    report_id: Requisition-report id that was withdrawn.\n    Remaining arguments are FastAPI dependencies.\nOutput:\n    Dict with the number of shares withdrawn.","operationId":"admin_withdraw_report_shares_api_v3_lab_report_shares_admin_withdraw_report_post","parameters":[{"name":"report_id","in":"query","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/order-lookup/by-activation-code":{"post":{"tags":["order-lookup"],"summary":"Get Order Id","operationId":"get_order_id_api_v3_order_lookup_by_activation_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderLookupRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/order-lookup/by-order-id/{order_id}":{"get":{"tags":["order-lookup"],"summary":"Get By Order Id","description":"Look up the exact barcode and identify parent kit labels.\n\nInputs:\n    order_id: Barcode printed on a kit or sample label.\n    order_lookup_service: Finds the corresponding Core order lookup.\nOutput:\n    Lookup status and, on success, the codes and whether this is a parent kit.","operationId":"get_by_order_id_api_v3_order_lookup_by_order_id__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v4/order-lookup/site/{activation_code}":{"get":{"tags":["order-lookup"],"summary":"Get Test Panel Site","operationId":"get_test_panel_site_api_v4_order_lookup_site__activation_code__get","parameters":[{"name":"activation_code","in":"path","required":true,"schema":{"type":"string","title":"Activation Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v4/order-lookup/collection-method/{activation_code}":{"get":{"tags":["order-lookup"],"summary":"Get Collection Method","operationId":"get_collection_method_api_v4_order_lookup_collection_method__activation_code__get","parameters":[{"name":"activation_code","in":"path","required":true,"schema":{"type":"string","title":"Activation Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v4/order-lookup/registration-code/{activation_code}":{"get":{"tags":["order-lookup"],"summary":"Get Registration Code","operationId":"get_registration_code_api_v4_order_lookup_registration_code__activation_code__get","parameters":[{"name":"activation_code","in":"path","required":true,"schema":{"type":"string","title":"Activation Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v4/order-lookup/{activation_code}/validate":{"get":{"tags":["order-lookup"],"summary":"Validate an activation code for kit registration","description":"Returns lookup details needed to register a kit, including collection method and activation flow, plus whether registration is blocked, the required and backup device counts, and the return flow saved at registration (null when the kit is not registered yet).","operationId":"validate_registration_code_api_v4_order_lookup__activation_code__validate_get","parameters":[{"name":"activation_code","in":"path","required":true,"schema":{"type":"string","title":"Activation Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationOrderLookupValidationSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/organization/test-panels":{"get":{"tags":["organization","test-panels"],"summary":"Get Organization Test Panels","description":"Get organization test panels for user in session","operationId":"get_organization_test_panels_api_v3_organization_test_panels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrganizationTestPanelSchema"},"type":"array","title":"Response Get Organization Test Panels Api V3 Organization Test Panels Get"}}}},"404":{"description":"Not found"}}}},"/api/v3/patient-appointments/freebusy/{patient_id}":{"get":{"tags":["Patient Appointments"],"summary":"Get Patient Freebusy","description":"Get free/busy time slots for a patient within a date range.","operationId":"get_patient_freebusy_api_v3_patient_appointments_freebusy__patient_id__get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}},{"name":"start_time","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Start time for free/busy query","title":"Start Time"},"description":"Start time for free/busy query"},{"name":"end_time","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"End time for free/busy query","title":"End Time"},"description":"End time for free/busy query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FreeBusySlotSchema"},"title":"Response Get Patient Freebusy Api V3 Patient Appointments Freebusy  Patient Id  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/patient-appointments/{patient_id}":{"post":{"tags":["Patient Appointments"],"summary":"Schedule Appointment","description":"Schedule a new appointment for a patient.","operationId":"schedule_appointment_api_v3_patient_appointments__patient_id__post","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientAppointmentCreateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientAppointmentResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Patient Appointments"],"summary":"Get Patient Appointments","description":"Get all appointments for a patient within optional date range.","operationId":"get_patient_appointments_api_v3_patient_appointments__patient_id__get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}},{"name":"start_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter appointments from this start time. Can be combined with time_frame.","title":"Start Time"},"description":"Filter appointments from this start time. Can be combined with time_frame."},{"name":"end_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter appointments until this end time. Can be combined with time_frame.","title":"End Time"},"description":"Filter appointments until this end time. Can be combined with time_frame."},{"name":"time_frame","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AppointmentTimeFrame"},{"type":"null"}],"description":"Filter by time frame: 'upcoming' (end_time >= now) or 'past' (end_time < now). Can be combined with start_time and end_time for additional filtering.","title":"Time Frame"},"description":"Filter by time frame: 'upcoming' (end_time >= now) or 'past' (end_time < now). Can be combined with start_time and end_time for additional filtering."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of results","default":100,"title":"Limit"},"description":"Maximum number of results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of results to skip","default":0,"title":"Offset"},"description":"Number of results to skip"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PatientAppointmentResponseSchema"},"title":"Response Get Patient Appointments Api V3 Patient Appointments  Patient Id  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/patient-appointments/{patient_id}/{appointment_id}":{"put":{"tags":["Patient Appointments"],"summary":"Update Appointment","description":"Update an existing appointment for a patient.","operationId":"update_appointment_api_v3_patient_appointments__patient_id___appointment_id__put","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}},{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientAppointmentUpdateSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientAppointmentResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Patient Appointments"],"summary":"Cancel Appointment","description":"Cancel an appointment for a patient.","operationId":"cancel_appointment_api_v3_patient_appointments__patient_id___appointment_id__delete","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}},{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Patient Appointments"],"summary":"Get Appointment","description":"Get a specific appointment for a patient.","operationId":"get_appointment_api_v3_patient_appointments__patient_id___appointment_id__get","parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}},{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientAppointmentResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/patient-appointments/{appointment_id}/details":{"get":{"tags":["Patient Appointments"],"summary":"Get Appointment By Token","description":"Get appointment details using a cancel or reschedule token (public endpoint).","operationId":"get_appointment_by_token_api_v3_patient_appointments__appointment_id__details_get","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","description":"Cancel or reschedule token for the appointment","title":"Token"},"description":"Cancel or reschedule token for the appointment"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientAppointmentResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/patient-appointments/{appointment_id}/cancel":{"post":{"tags":["Patient Appointments"],"summary":"Cancel Appointment By Token","description":"Cancel an appointment using a cancel token (public endpoint).","operationId":"cancel_appointment_by_token_api_v3_patient_appointments__appointment_id__cancel_post","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","description":"Cancel token for the appointment","title":"Token"},"description":"Cancel token for the appointment"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/patient-appointments/{appointment_id}/reschedule":{"post":{"tags":["Patient Appointments"],"summary":"Reschedule Appointment By Token","description":"Reschedule an appointment using a reschedule token (public endpoint).","operationId":"reschedule_appointment_by_token_api_v3_patient_appointments__appointment_id__reschedule_post","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","description":"Reschedule token for the appointment","title":"Token"},"description":"Reschedule token for the appointment"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentRescheduleSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientAppointmentResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/patient/assessments/":{"put":{"tags":["patient-assessments"],"summary":"Upsert PREVENT ASCVD assessment inputs","description":"Upsert ASCVD form inputs for the signed-in patient (metric units).","operationId":"upsert_patient_assessment_api_v3_patient_assessments__put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentUpsertSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/patient/assessments/latest":{"get":{"tags":["patient-assessments"],"summary":"Get latest PREVENT ASCVD assessment","operationId":"get_latest_patient_assessment_api_v3_patient_assessments_latest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentResponseSchema"}}}},"404":{"description":"Not found"}}}},"/api/v3/patient/assessments/trend":{"get":{"tags":["patient-assessments"],"summary":"Get PREVENT ASCVD score trend","operationId":"get_patient_assessment_trend_api_v3_patient_assessments_trend_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentTrendResponseSchema"}}}},"404":{"description":"Not found"}}}},"/api/v3/patient/assessments/{requisition_id}/compute":{"post":{"tags":["patient-assessments"],"summary":"Compute PREVENT ASCVD score for a requisition","operationId":"compute_patient_assessment_api_v3_patient_assessments__requisition_id__compute_post","parameters":[{"name":"requisition_id","in":"path","required":true,"schema":{"type":"integer","title":"Requisition Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/patient/health-history/validate":{"get":{"tags":["patient-health-history"],"summary":"Validate Patient Health History","description":"Validate patient health history and return risk assessment.","operationId":"validate_patient_health_history_api_v3_patient_health_history_validate_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/patient/health-history/":{"post":{"tags":["patient-health-history"],"summary":"Add Patient Health History","description":"Add patient health history.","operationId":"add_patient_health_history_api_v3_patient_health_history__post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Health History Data"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/patient/health-history/latest-form-entry/":{"get":{"tags":["patient-health-history"],"summary":"Get Latest Form Entry","operationId":"get_latest_form_entry_api_v3_patient_health_history_latest_form_entry__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestFormEntryResponse"}}}},"404":{"description":"Not found"}}}},"/api/v4/patients/":{"get":{"tags":["Patients"],"summary":"Get Patient Information","operationId":"get_patient_information_api_v4_patients__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/ping/":{"get":{"tags":["Authentication"],"summary":"Read Main","operationId":"read_main_api_v3_ping__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v4/preregistration/test-panels":{"get":{"tags":["preregistration"],"summary":"Create Preregistration Org Test Panels","description":"List the tests and optional calculations available for preregistration.\n\nInputs:\n    organization: Organization identified by the request.\n    test_panel_service: Queries panels available to the organization.\nOutput:\n    Panel IDs, display names and tests, including supplemental method selections.","operationId":"create_preregistration_org_test_panels_api_v4_preregistration_test_panels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"security":[{"X-API-KEY":[]}]}},"/api/v4/preregistration/create":{"post":{"tags":["preregistration"],"summary":"Create Preregistration","operationId":"create_preregistration_api_v4_preregistration_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreregistrationCreationSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"X-API-KEY":[]}]}},"/api/v4/preregistration/confirm":{"post":{"tags":["preregistration"],"summary":"Confirm Preregistration","operationId":"confirm_preregistration_api_v4_preregistration_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreregistrationConfirmationSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/requisitions/latest":{"get":{"tags":["requisitions"],"summary":"Latest requisition order status","description":"Return the current order status for the authenticated patient.\n\nReads from RS plus local supporting tables (order_lookup,\nregistration_information, external_kit_order). When a kit was just\nregistered and RS has not created its requisition yet, data.pending_registration\ncarries that kit. Existing fields stay the RS latest kit.","operationId":"get_latest_requisition_status_api_v1_requisitions_latest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestRequisitionStatusResponseSchema"}}}},"404":{"description":"Not found"}}}},"/api/v1/requisitions/latest/registration":{"get":{"tags":["requisitions"],"summary":"Latest kit registration prefill","description":"Return kit registration prefill data for the authenticated patient.","operationId":"get_latest_registration_api_v1_requisitions_latest_registration_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationResponseSchema"}}}},"404":{"description":"Not found"}}}},"/api/v1/requisitions/latest/cancel":{"put":{"tags":["requisitions"],"summary":"Cancel latest requisition","description":"Cancel the authenticated patient's latest requisition.\n\nResolves the latest requisition from RS using the user id as patient external id.\nOnly ORDER_CREATED and MD_APPROVED statuses are cancellable.\nSyncs user_orders status and writes audit log while the legacy write path exists.","operationId":"cancel_latest_requisition_api_v1_requisitions_latest_cancel_put","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelRequisitionResponseSchema"}}}},"404":{"description":"Not found"}}}},"/api/v3/requisitions/webhook":{"post":{"tags":["requisitions-webhooks"],"summary":"Requisitions Webhook","operationId":"requisitions_webhook_api_v3_requisitions_webhook_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequisitionWebhookPayloadSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/results/":{"get":{"tags":["results"],"summary":"Deprecated: use GET /api/v3/results/historical or GET /api/v4/results/historical","description":"@deprecated No frontend callers. Use GET /api/v3/results/historical or /api/v4/results/historical.","operationId":"get_results_api_v3_results__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResultsResponseSchema"}}}},"404":{"description":"Not found"}},"deprecated":true}},"/api/v3/results/download-results":{"get":{"tags":["results"],"summary":"Download Pdf","description":"Download the latest issued PDF for the patient's last completed requisition.\n\nInputs:\n    ph_data: Authenticated patient's profile.\n    requisitions_service: Reads report metadata and files.\n    user_order_service: Resolves the patient's most recent completed order.\nOutput:\n    A PDF stream or an error when the order or report is unavailable.","operationId":"download_pdf_api_v3_results_download_results_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/results/download-lab-report/{requisition_id}":{"get":{"tags":["results"],"summary":"Download the most recent lab report PDF for a specific requisition","description":"Returns the most recent lab report PDF for the given requisition. The authenticated user must be the patient associated with the requisition.","operationId":"download_lab_report_api_v3_results_download_lab_report__requisition_id__get","parameters":[{"name":"requisition_id","in":"path","required":true,"schema":{"type":"integer","title":"Requisition Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/results/has-results":{"get":{"tags":["results"],"summary":"Whether the patient has completed test results","operationId":"has_results_api_v3_results_has_results_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserHasResultsResponseSchema"}}}},"404":{"description":"Not found"}}}},"/api/v3/results/historical":{"get":{"tags":["results"],"summary":"Get Historical Results","description":"Build the V2 patient view from completed orders and their issued reports.\n\nInputs:\n    requisitions_service: Retrieves the patient's requisitions, report metadata\n        and released results together in batches.\n    user_order_service: Locates completed orders linked to the profile.\n    ph_data: Authenticated patient's profile.\n    biomarkers_service: Supplies configured reference ranges.\n    user_results_service: Maps results to reference ranges or lab-issued values.\nOutput:\n    The patient's historical orders, specimen results, and current PDF per order.","operationId":"get_historical_results_api_v3_results_historical_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrderSimplifiedSchema"},"type":"array","title":"Response Get Historical Results Api V3 Results Historical Get"}}}},"404":{"description":"Not found"}}}},"/api/v4/results/historical":{"get":{"tags":["results"],"summary":"Get Historical Results V4","description":"List the signed-in patient's released results and current PDFs.\n\nInputs:\n    user: Signed-in patient whose matching RS records supply the requisitions.\n    requisitions_service: Retrieves patients and their completed requisitions.\n    registration_information_service: Resolves the panel name for each order.\nOutput:\n    Requisitions newest first with specimen results, withdrawals and current PDFs.","operationId":"get_historical_results_v4_api_v4_results_historical_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/HistoricalRequisitionsSchema"},"type":"array","title":"Response Get Historical Results V4 Api V4 Results Historical Get"}}}},"404":{"description":"Not found"}}}},"/api/v4/return-pickups":{"post":{"tags":["return-pickups"],"summary":"Schedule a UPS pickup for a kit return","description":"Creates a UPS pickup for the return label with this tracking number and returns the rates to choose from. No session is needed. Repeating the same request returns the existing pickup (200); a different request while one is active is 409 PICKUP_CONFLICT. 404 RETURN_LABEL_NOT_FOUND for an unknown tracking number or a replaced kit; 422 LABEL_MISSING_SHIPMENT; 409 LABEL_ALREADY_SHIPPED once the carrier scanned the label; 403 PICKUP_DISABLED when pickup is off for the kit's organization (or the signed-in user's overrides) or not offered for the kit's collection method. Errors are `detail = {\"code\", \"message\"}` with fixed messages; an expired or invalid session is 401. Without a session, the pickup's `address` and `id` are null.","operationId":"create_return_pickup_api_v4_return_pickups_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnPickupCreateRequestSchema"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserShippingPickupDetailResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v4/return-pickups/get":{"post":{"tags":["return-pickups"],"summary":"Get a kit return pickup","description":"Returns the pickup of the return label with this tracking number: the newest active one, else the newest. No session is needed, and it is not gated by the pickup flag, a replaced kit or a carrier scan. With refresh=true, syncs it from EasyPost and includes the rates; canceled and expired pickups are not synced. A POST so the tracking number stays out of URLs and logs. 404 RETURN_LABEL_NOT_FOUND for an unknown tracking number, PICKUP_NOT_FOUND when the label has no pickup; 422 LABEL_MISSING_SHIPMENT. Errors are `detail = {\"code\", \"message\"}` with fixed messages; an expired or invalid session is 401. Without a session, the pickup's `address` and `id` are null.","operationId":"get_return_pickup_api_v4_return_pickups_get_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnPickupGetRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserShippingPickupDetailResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v4/return-pickups/contact":{"post":{"tags":["return-pickups"],"summary":"Get the contact details to prefill a kit return pickup","description":"Returns the name, phone and address of the kit order behind the return label with this tracking number, never the email. Only a signed-in caller gets them; without a session `contact` is null. Not gated by the pickup flag. A POST so the tracking number stays out of URLs and logs. 404 RETURN_LABEL_NOT_FOUND for an unknown tracking number; 422 LABEL_MISSING_SHIPMENT. Errors are `detail = {\"code\", \"message\"}` with fixed messages; an expired or invalid session is 401. Without a session, the pickup's `address` and `id` are null.","operationId":"get_return_pickup_contact_api_v4_return_pickups_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnPickupContactRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnPickupContactResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v4/return-pickups/buy":{"post":{"tags":["return-pickups"],"summary":"Choose a kit return pickup option","description":"Buys the chosen pickup service for the pickup of the return label with this tracking number and marks it SCHEDULED. No session is needed. 404 RETURN_LABEL_NOT_FOUND for an unknown tracking number or a replaced kit, PICKUP_NOT_FOUND when the label has no pickup; 422 LABEL_MISSING_SHIPMENT; 409 LABEL_ALREADY_SHIPPED once the carrier scanned the label; 403 PICKUP_DISABLED when pickup is off for the kit's organization (or the signed-in user's overrides). A canceled or expired pickup, or one already scheduled for a different service, returns 409. Errors are `detail = {\"code\", \"message\"}` with fixed messages; an expired or invalid session is 401. Without a session, the pickup's `address` and `id` are null.","operationId":"buy_return_pickup_api_v4_return_pickups_buy_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnPickupBuyRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserShippingPickupResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v4/return-pickups/cancel":{"post":{"tags":["return-pickups"],"summary":"Cancel a kit return pickup","description":"Cancels the pickup of the return label with this tracking number in EasyPost and marks it CANCELED. No session is needed, and it is not gated by the pickup flag, a replaced kit or a carrier scan. Canceled and expired pickups are returned unchanged. A pickup that was never bought is canceled on our side when EasyPost refuses to cancel it and does not show it as scheduled. 404 RETURN_LABEL_NOT_FOUND for an unknown tracking number, PICKUP_NOT_FOUND when the label has no pickup; 422 LABEL_MISSING_SHIPMENT. Errors are `detail = {\"code\", \"message\"}` with fixed messages; an expired or invalid session is 401. Without a session, the pickup's `address` and `id` are null.","operationId":"cancel_return_pickup_api_v4_return_pickups_cancel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnPickupCancelRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserShippingPickupResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v4/shipping-labels/return-label/{activation_code}":{"get":{"tags":["shipping-labels"],"summary":"Get the return label for a kit activation code","description":"Returns the carrier and tracking number of the kit's latest inbound label. Child codes are rejected. A 404 `detail` is {code, message}: code is ACTIVATION_CODE_NOT_FOUND for an unknown code and RETURN_LABEL_NOT_FOUND for a code with no return label. No login required.","operationId":"get_return_label_api_v4_shipping_labels_return_label__activation_code__get","parameters":[{"name":"activation_code","in":"path","required":true,"schema":{"type":"string","title":"Activation Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnLabelSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v4/shipping-labels/return-label/search":{"post":{"tags":["shipping-labels"],"summary":"Find a return label by tracking number","description":"Looks up an inbound return label by tracking number. No login required.","operationId":"search_return_label_api_v4_shipping_labels_return_label_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnLabelSearchSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnLabelSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/site/":{"get":{"tags":["sites"],"summary":"List Sites","operationId":"list_sites_api_v3_site__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SiteSchema"},"type":"array","title":"Response List Sites Api V3 Site  Get"}}}},"404":{"description":"Not found"}}},"post":{"tags":["sites"],"summary":"Create Site","operationId":"create_site_api_v3_site__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteCreateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/subscriptions/current":{"get":{"tags":["subscriptions"],"summary":"Get Current Subscription","operationId":"get_current_subscription_api_v3_subscriptions_current_get","parameters":[{"name":"fetch_details","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Fetch Details"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/subscriptions/products/{provider}":{"get":{"tags":["subscriptions"],"summary":"Get Products","operationId":"get_products_api_v3_subscriptions_products__provider__get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"$ref":"#/components/schemas/SubscriptionProvider"}},{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SubscriptionSortByEnum","default":"NAME"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionProductsResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/subscriptions/checkout-session/{provider}":{"post":{"tags":["subscriptions"],"summary":"Create Checkout Session","operationId":"create_checkout_session_api_v3_subscriptions_checkout_session__provider__post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"$ref":"#/components/schemas/SubscriptionProvider"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SquareCheckoutRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SquareCheckoutResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/subscriptions/checkout-session":{"get":{"tags":["subscriptions"],"summary":"Get Checkout Session","operationId":"get_checkout_session_api_v3_subscriptions_checkout_session_get","parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/subscriptions/{subscription_id}":{"get":{"tags":["subscriptions"],"summary":"Get Subscription By Id","operationId":"get_subscription_by_id_api_v3_subscriptions__subscription_id__get","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionByIdResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/subscriptions/order/{order_id}":{"get":{"tags":["subscriptions"],"summary":"Get Subscription By Order Id","operationId":"get_subscription_by_order_id_api_v3_subscriptions_order__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionByIdResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/subscriptions/validate-coupon":{"post":{"tags":["subscriptions"],"summary":"Validate Coupon And Get Variations","operationId":"validate_coupon_and_get_variations_api_v3_subscriptions_validate_coupon_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponValidationRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/feedback/":{"post":{"tags":["feedback"],"summary":"Create Feedback","operationId":"create_feedback_api_v3_feedback__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackCreationSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/user/kit-order/":{"post":{"tags":["user-kit-orders"],"summary":"Create User Kit Order","operationId":"create_user_kit_order_api_v3_user_kit_order__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserKitOrderCreateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/users-orders/validate":{"get":{"tags":["user-orders"],"summary":"Deprecated: unused — no replacement planned","description":"Orphaned endpoint with no known callers. Portal kit-registration blocking uses GET /api/v3/users-orders/latest instead.","operationId":"validate_user_can_order_api_v3_users_orders_validate_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"deprecated":true}},"/api/v3/users-orders/":{"post":{"tags":["user-orders"],"summary":"Create User Order","operationId":"create_user_order_api_v3_users_orders__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOrderCreationSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/users-orders/replace/{old_activation_code}":{"put":{"tags":["user-orders"],"summary":"[Deprecated] Replace user order — use POST /api/v3/admin/users-orders/replace/{order_lookup_id}","operationId":"replace_user_order_api_v3_users_orders_replace__old_activation_code__put","deprecated":true,"parameters":[{"name":"old_activation_code","in":"path","required":true,"schema":{"type":"string","title":"Old Activation Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceUserOrderSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/users-orders/latest":{"get":{"tags":["user-orders"],"summary":"[Deprecated] Latest user order status — use GET /api/v1/requisitions/latest","operationId":"get_latest_order_api_v3_users_orders_latest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"deprecated":true}},"/api/v3/users-orders/latest/cancel":{"put":{"tags":["user-orders"],"summary":"[Deprecated] Cancel latest order — use PUT /api/v1/requisitions/latest/cancel","operationId":"cancel_latest_order_api_v3_users_orders_latest_cancel_put","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}},"deprecated":true}},"/api/v3/users-orders/latest/registration":{"get":{"tags":["user-orders"],"summary":"Deprecated: use GET /api/v1/requisitions/latest/registration","description":"Same behavior as before; prefer the requisitions route while user_orders is phased out.","operationId":"get_latest_registration_api_v3_users_orders_latest_registration_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationResponseSchema"}}}},"404":{"description":"Not found"}},"deprecated":true}},"/api/v4/users-orders/can-register":{"get":{"tags":["user-orders"],"summary":"Check whether an email may register another kit","description":"Unauthenticated pre-check for concurrent kit registration limits. Keyed by email (supports no-login registration). Active kits are counted from RS (patient-global). Feature evaluation uses the request site organization. Advisory only — POST /register re-enforces the limit.","operationId":"can_register_kit_api_v4_users_orders_can_register_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","description":"Patient email used for registration","format":"email","title":"Email"},"description":"Patient email used for registration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConcurrentKitLimitResultSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v4/users-orders/register":{"post":{"tags":["user-orders"],"summary":"Register User Order","operationId":"register_user_order_api_v4_users_orders_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterKitSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/users/":{"get":{"tags":["users"],"summary":"List Users","operationId":"list_users_api_v3_users__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}},"put":{"tags":["users"],"summary":"Update User","operationId":"update_user_api_v3_users__put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/users/{user_id}":{"get":{"tags":["users"],"summary":"Get User By Id","description":"Get user information by ID.\nAccessible by:\n- The user themselves (user_id == user.id)\n- Admin or staff users\n- Users assigned to this coach (for coach users)","operationId":"get_user_by_id_api_v3_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/users/locale/":{"get":{"tags":["users"],"summary":"Get Locale","operationId":"get_locale_api_v3_users_locale__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/users/update-locale/":{"put":{"tags":["users"],"summary":"Update User Locale","operationId":"update_user_locale_api_v3_users_update_locale__put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLocaleUpdateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/events/{event_id}":{"get":{"tags":["webhook-outbound"],"summary":"Get Webhook Event For Dispatch","description":"Get raw webhook event data for dispatch (internal use only).","operationId":"get_webhook_event_for_dispatch_api_v1_webhooks_events__event_id__get","security":[{"X-API-KEY":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/events/dispatch":{"post":{"tags":["webhook-outbound"],"summary":"Dispatch Webhooks For Event","description":"Dispatch webhooks to all active subscriptions for an organization (internal use only).","operationId":"dispatch_webhooks_for_event_api_v1_webhooks_events_dispatch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDispatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDispatchResultResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"X-API-KEY":[]}]}},"/api/v3/webhook/stripe":{"post":{"tags":["webhooks"],"summary":"Stripe Webhook","operationId":"stripe_webhook_api_v3_webhook_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/webhook/square":{"post":{"tags":["webhooks"],"summary":"Square Webhook","operationId":"square_webhook_api_v3_webhook_square_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/webhook/easypost":{"post":{"tags":["webhooks"],"summary":"Easypost Webhook","operationId":"easypost_webhook_api_v3_webhook_easypost_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v3/webhook/sendgrid":{"post":{"tags":["webhooks"],"summary":"Sendgrid Event Webhook","description":"Verify SendGrid events and apply delivery outcomes to lab-report shares.\n\nInputs:\n    request: Raw signed webhook body and signature headers.\n    Remaining arguments are FastAPI dependencies.\nOutput:\n    Acknowledgement dict. Invalid signatures return 403.","operationId":"sendgrid_event_webhook_api_v3_webhook_sendgrid_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/secure-lab-report-download":{"post":{"tags":["Secure lab report download"],"summary":"Download Secure Lab Report","description":"Issue a one-use PDF or zip after token and demographic match.\n\nInputs:\n    body: Token plus first name, last name, and date of birth.\n    request: Must not include __session or Authorization.\n    Remaining arguments are FastAPI dependencies.\nOutput:\n    File Response. Any failure is a generic 404.","operationId":"download_secure_lab_report_api_secure_lab_report_download_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecureLabReportDownloadSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/mobile":{"post":{"tags":["Mobile Authentication"],"summary":"Mobile Login","description":"Mobile login: Firebase ID token + explicit site_id (no Origin/Referer).\n\nReturns access JWT (2 weeks, typ=mobile). Does not set the web __session cookie.","operationId":"mobile_login_api_v3_auth_mobile_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileSessionCreationRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMobileLoginResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/mobile/refresh":{"post":{"tags":["Mobile Authentication"],"summary":"Mobile Refresh","description":"Mint a new mobile access JWT from a Firebase ID token.","operationId":"mobile_refresh_api_v3_auth_mobile_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileRefreshRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileRefreshResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/mobile/signup":{"post":{"tags":["Mobile Authentication"],"summary":"Start mobile signup","description":"Looks up the email in Firebase and returns one of four statuses. When the address is free, upserts a Core user and ph_data row (new users are inactive). A verified Firebase account returns account_exists; if a Core user already exists and is inactive, it is activated. Does not create a Firebase account.","operationId":"mobile_signup_api_v3_auth_mobile_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileSignupRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileSignupResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/mobile/verification-code":{"post":{"tags":["Mobile Authentication"],"summary":"Send a mobile signup verification code","description":"Emails a six-digit code for the second signup step. Serves both the first send and every resend, refusing to issue another within 45 seconds of the last one. Always reports sent=true so the endpoint cannot be used to discover which addresses have an account; cooldown_seconds is the time left before a resend will be honored.","operationId":"mobile_verification_code_api_v3_auth_mobile_verification_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileVerificationCodeRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileVerificationCodeResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/mobile/account":{"post":{"tags":["Mobile Authentication"],"summary":"Finish mobile signup","description":"Consumes the emailed verification code, creates the Firebase account (already marked verified, since the code proves ownership of the address) and activates the Core user. Looks up the address first so an existing login is account_exists without a create attempt. Sends the same welcome email as web, in the language already stored on the user; a send failure does not fail create. Does not create a session; the app signs in the same way as login. On failure, detail.code distinguishes invalid_code, code_expired, weak_password and account_exists.","operationId":"mobile_account_api_v3_auth_mobile_account_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAccountCreationRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAccountCreationResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Mobile Authentication"],"summary":"Delete the signed-in mobile account","description":"For Apple-linked accounts, requires a fresh authorization code in the body, exchanges and revokes Apple tokens, then removes the Firebase login, anonymizes the Core user and PHData tombstones, and writes an audit log. Owned rows and lab results are not deleted.","operationId":"delete_mobile_account_api_v3_auth_mobile_account_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileDeleteAccountRequestSchema","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileDeleteAccountResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/mobile/password-reset/code":{"post":{"tags":["Mobile Authentication"],"summary":"Send a mobile password-reset code","description":"Always returns the same 200 body. Emails a six-digit code only when both a Core user and a Firebase user exist, including SSO-only accounts. A Core user with no Firebase account, a deleted user, and an unknown address get that body and no email. A resend inside the cooldown returns the seconds still left and does not email. A delivery failure returns that body without leaving a code stored.","operationId":"mobile_password_reset_code_api_v3_auth_mobile_password_reset_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileVerificationCodeRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileVerificationCodeResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/mobile/password-reset/verify":{"post":{"tags":["Mobile Authentication"],"summary":"Verify a mobile password-reset code","description":"Consumes the emailed code and returns a short-lived MOBILE_PASSWORD_RESET token. A wrong code is invalid_code and an expired code is code_expired. Signup codes are not accepted. Unused MOBILE_PASSWORD_RESET rows for this user are burned first; web PASSWORD_RESET links are left in place.","operationId":"mobile_password_reset_verify_api_v3_auth_mobile_password_reset_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobilePasswordResetVerifyRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobilePasswordResetVerifyResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/auth/mobile/password-reset/password":{"post":{"tags":["Mobile Authentication"],"summary":"Set a new password after mobile reset verification","description":"Consumes the MOBILE_PASSWORD_RESET token and updates the Firebase password. A rejected password leaves the token unused. A missing Firebase user burns the token. Other Firebase failures leave it unused. Web PASSWORD_RESET tokens are not accepted, and other reset tokens are not burned. Sessions are not revoked.","operationId":"mobile_password_reset_password_api_v3_auth_mobile_password_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetDataSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobilePasswordResetPasswordResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v3/mobile/push-tokens":{"put":{"tags":["Mobile Push Notifications"],"summary":"Register or refresh a mobile push token","description":"Registers the device Expo push token for the signed-in user with eh-notifications. Re-registering the same token refreshes metadata; registering a token already owned by another user moves it.","operationId":"register_push_token_api_v3_mobile_push_tokens_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobilePushTokenRegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushTokenResponse"}}}},"404":{"description":"Not found"},"401":{"description":"No valid session"},"422":{"description":"Invalid body or Expo push token"},"502":{"description":"Notifications service rejected the request"},"503":{"description":"Notifications service unavailable"}}},"delete":{"tags":["Mobile Push Notifications"],"summary":"Unregister a mobile push token","description":"Marks the Expo push token inactive in eh-notifications (for example on sign-out). Unknown tokens are a no-op.","operationId":"unregister_push_token_api_v3_mobile_push_tokens_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobilePushTokenUnregisterRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"401":{"description":"No valid session"},"422":{"description":"Invalid body or Expo push token"},"502":{"description":"Notifications service rejected the request"},"503":{"description":"Notifications service unavailable"}}}},"/api/v3/e2e/seed-user-results":{"post":{"tags":["E2E"],"summary":"Seed E2E User Results","operationId":"seed_e2e_user_results_api_v3_e2e_seed_user_results_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/E2ESeedResultsRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/E2ESeedResultsResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"X-E2E-Key":[]}]}},"/api/v3/e2e/firebase-user":{"delete":{"tags":["E2E"],"summary":"Delete E2E Firebase User","operationId":"delete_e2e_firebase_user_api_v3_e2e_firebase_user_delete","security":[{"X-E2E-Key":[]}],"parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/E2ETeardownResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddressValidationRequestSchema":{"properties":{"street_address":{"type":"string","title":"Street Address"},"street_address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address 2"},"city":{"type":"string","title":"City"},"state":{"$ref":"#/components/schemas/States"},"zip_code":{"type":"string","title":"Zip Code"},"country":{"type":"string","title":"Country","default":"US"}},"type":"object","required":["street_address","city","state","zip_code"],"title":"AddressValidationRequestSchema"},"AddressValidationResponseSchema":{"properties":{"valid":{"type":"boolean","title":"Valid"},"address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address"}},"type":"object","required":["valid"],"title":"AddressValidationResponseSchema"},"AdminExternalKitOrderCreationRequestSchema":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"phone_number":{"type":"integer","title":"Phone Number"},"street_address":{"type":"string","title":"Street Address"},"street_address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address 2"},"city":{"type":"string","title":"City"},"state":{"$ref":"#/components/schemas/States"},"zip_code":{"type":"string","title":"Zip Code"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"test_panel_id":{"type":"integer","title":"Test Panel Id"},"sample_type":{"anyOf":[{"$ref":"#/components/schemas/SampleTypes"},{"type":"null"}]},"sample_collection_method":{"anyOf":[{"$ref":"#/components/schemas/CollectionMethods"},{"type":"null"}]},"expedited":{"type":"boolean","title":"Expedited","default":false}},"type":"object","required":["email","first_name","last_name","phone_number","street_address","city","state","zip_code","test_panel_id"],"title":"AdminExternalKitOrderCreationRequestSchema"},"AdminFeatureEvaluateRequestSchema":{"properties":{"organization_id":{"type":"integer","title":"Organization Id"},"feature_keys":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Feature Keys","description":"Canonical feature keys to evaluate for this organization."}},"type":"object","required":["organization_id","feature_keys"],"title":"AdminFeatureEvaluateRequestSchema","description":"Request body for evaluating feature flags for an organization."},"AdminOrganizationEmailTemplateSchema":{"properties":{"id":{"type":"integer","title":"Id"},"organization_id":{"type":"integer","title":"Organization Id"},"template":{"type":"string","title":"Template"},"locale":{"$ref":"#/components/schemas/LocalesEnum"},"subject":{"type":"string","title":"Subject"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["id","organization_id","template","locale","subject","created_at","approved_by","enabled"],"title":"AdminOrganizationEmailTemplateSchema","description":"Email template row for admin customer-support approval list (no body content)."},"AdminSquareCheckoutRequestSchema":{"properties":{"organization_id":{"type":"integer","title":"Organization Id"},"subscription_variation_id":{"type":"string","title":"Subscription Variation Id"},"user_id":{"type":"integer","title":"User Id"},"provider":{"$ref":"#/components/schemas/SubscriptionProvider","default":"SQUARE"},"price_override":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Override","description":"Price override in cents (e.g., 1000 = $10.00). Use null to use the default price from the subscription variation."},"redirect_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Redirect Url","description":"URL to redirect after checkout completion. Must be a valid HTTP/HTTPS URL."}},"type":"object","required":["organization_id","subscription_variation_id","user_id"],"title":"AdminSquareCheckoutRequestSchema","examples":[{"organization_id":0,"provider":"SQUARE","redirect_url":"https://example.com/redirect","subscription_variation_id":"123","user_id":0},{"organization_id":0,"price_override":1000,"provider":"SQUARE","subscription_variation_id":"123","user_id":0}]},"AdminSquareSubscriptionCreateResponseSchema":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"data":{"$ref":"#/components/schemas/SquareCreatedSubscriptionSchema"}},"type":"object","required":["status","message","data"],"title":"AdminSquareSubscriptionCreateResponseSchema"},"AdminSquareSubscriptionCreateSchema":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"card_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Id"},"location_id":{"type":"string","title":"Location Id"},"plan_variation_id":{"type":"string","title":"Plan Variation Id"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"}},"type":"object","required":["customer_id","location_id","plan_variation_id"],"title":"AdminSquareSubscriptionCreateSchema"},"AdminUserOrderSchema":{"properties":{"sample_draw_context":{"additionalProperties":{"$ref":"#/components/schemas/SampleDrawContext"},"type":"object","title":"Sample Draw Context","description":"Draw observations keyed by the specimen ID sent to the lab (the kit order ID for a single sample, or each child activation code)."},"activation_code":{"type":"string","title":"Activation Code"},"ph_data_id":{"type":"integer","title":"Ph Data Id"},"site_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Site Id"},"is_fasting":{"type":"boolean","title":"Is Fasting"},"acknowledged_terms":{"type":"boolean","title":"Acknowledged Terms"},"accepted_responsibility":{"type":"boolean","title":"Accepted Responsibility"},"acknowledged_news_letter":{"type":"boolean","title":"Acknowledged News Letter"},"signed_document":{"type":"boolean","title":"Signed Document"},"collection_location":{"$ref":"#/components/schemas/States"},"collection_timestamp":{"type":"string","format":"date-time","title":"Collection Timestamp"},"race":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Race"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"test_panel_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Test Panel Id"}},"type":"object","required":["activation_code","ph_data_id","is_fasting","acknowledged_terms","accepted_responsibility","acknowledged_news_letter","signed_document","collection_location","collection_timestamp"],"title":"AdminUserOrderSchema"},"AdminUserUpdateSchema":{"properties":{"site_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Site Id","default":0},"organization_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organization Id","default":0},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":false},"is_superuser":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Superuser","default":false},"roles":{"anyOf":[{"items":{"$ref":"#/components/schemas/Roles"},"type":"array"},{"type":"null"}],"title":"Roles"},"locale":{"anyOf":[{"$ref":"#/components/schemas/UserLocaleEnum"},{"type":"null"}],"default":"en"}},"type":"object","title":"AdminUserUpdateSchema"},"AdminVerificationEmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"referer":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Referer"}},"type":"object","required":["email"],"title":"AdminVerificationEmailRequest"},"AppendTagsSchema":{"properties":{"tags":{"items":{"type":"string","pattern":"^[a-zA-Z0-9_ \\-]+$"},"type":"array","title":"Tags"}},"type":"object","required":["tags"],"title":"AppendTagsSchema"},"AppointmentRescheduleSchema":{"properties":{"new_start_time":{"type":"string","format":"date-time","title":"New Start Time"},"new_end_time":{"type":"string","format":"date-time","title":"New End Time"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"}},"type":"object","required":["new_start_time","new_end_time"],"title":"AppointmentRescheduleSchema"},"AppointmentTimeFrame":{"type":"string","enum":["PAST","UPCOMING"],"title":"AppointmentTimeFrame","description":"Time frame filters for appointments.\n\n- PAST: Appointments where end_time < now (the appointment has ended)\n- UPCOMING: Appointments where end_time >= now (the appointment hasn't ended yet)"},"ApproveTemplateSchema":{"properties":{"id":{"type":"integer","title":"Id"},"template":{"type":"string","title":"Template"},"approved_by":{"type":"string","title":"Approved By"}},"type":"object","required":["id","template","approved_by"],"title":"ApproveTemplateSchema","description":"Response schema for approving a template."},"AssessmentResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"patient_id":{"type":"integer","title":"Patient Id"},"requisition_id":{"type":"integer","title":"Requisition Id"},"height_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height Cm"},"weight_kg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight Kg"},"body_mass_index":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Body Mass Index"},"age_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Age Years"},"current_smoking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Current Smoking"},"diabetes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Diabetes"},"blood_pressure_medication":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Blood Pressure Medication"},"statin_medication":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Statin Medication"},"systolic_blood_pressure":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Systolic Blood Pressure"},"diastolic_blood_pressure":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Diastolic Blood Pressure"},"systolic_blood_pressure_estimated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Systolic Blood Pressure Estimated"},"ascvd_10_year_risk_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ascvd 10 Year Risk Percent"},"ascvd_30_year_risk_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ascvd 30 Year Risk Percent"},"risk_band":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Band"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"primary_horizon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Horizon"},"primary_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Primary Pct"},"risk_band_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Band Label"},"advocate_unlock":{"type":"boolean","title":"Advocate Unlock","default":false},"score_available":{"type":"boolean","title":"Score Available","default":false},"outside_calculator_range":{"items":{"type":"string"},"type":"array","title":"Outside Calculator Range"},"missing_for_score":{"items":{"type":"string"},"type":"array","title":"Missing For Score"}},"type":"object","required":["id","patient_id","requisition_id","created_at","updated_at"],"title":"AssessmentResponseSchema"},"AssessmentTrendPointSchema":{"properties":{"requisition_id":{"type":"integer","title":"Requisition Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"primary_horizon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Horizon"},"primary_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Primary Pct"},"ascvd_10_year_risk_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ascvd 10 Year Risk Percent"},"ascvd_30_year_risk_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ascvd 30 Year Risk Percent"},"risk_band":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Band"},"risk_band_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Band Label"},"systolic_blood_pressure_estimated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Systolic Blood Pressure Estimated"}},"type":"object","required":["requisition_id","created_at"],"title":"AssessmentTrendPointSchema"},"AssessmentTrendResponseSchema":{"properties":{"points":{"items":{"$ref":"#/components/schemas/AssessmentTrendPointSchema"},"type":"array","title":"Points"}},"type":"object","required":["points"],"title":"AssessmentTrendResponseSchema"},"AssessmentUpsertSchema":{"properties":{"requisition_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requisition Id"},"height_cm":{"type":"number","title":"Height Cm"},"weight_kg":{"type":"number","title":"Weight Kg"},"current_smoking":{"type":"boolean","title":"Current Smoking"},"diabetes":{"type":"boolean","title":"Diabetes"},"blood_pressure_medication":{"type":"boolean","title":"Blood Pressure Medication"},"statin_medication":{"type":"boolean","title":"Statin Medication"},"systolic_blood_pressure":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Systolic Blood Pressure"},"diastolic_blood_pressure":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Diastolic Blood Pressure"},"systolic_blood_pressure_estimated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Systolic Blood Pressure Estimated"}},"type":"object","required":["height_cm","weight_kg","current_smoking","diabetes","blood_pressure_medication","statin_medication"],"title":"AssessmentUpsertSchema","description":"PREVENT ASCVD form inputs (metric)."},"AssignCoachRequestSchema":{"properties":{"coach_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Coach Id"}},"type":"object","title":"AssignCoachRequestSchema"},"BillingBreakdownRowSchema":{"properties":{"kits_ordered":{"type":"integer","title":"Kits Ordered"},"shipping_outbound":{"type":"integer","title":"Shipping Outbound"},"shipping_inbound":{"type":"integer","title":"Shipping Inbound"},"test_processed":{"type":"integer","title":"Test Processed"},"lab_credits_used":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lab Credits Used"},"kit_credits_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kit Credits Used"},"backup_devices_shipped":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Backup Devices Shipped"},"unmapped_samples":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unmapped Samples"},"kits_awaiting_label":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kits Awaiting Label"},"test_panel_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Test Panel Id"},"test_panel_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Panel Name"},"collection_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection Method"},"activation_flow":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activation Flow"}},"type":"object","required":["kits_ordered","shipping_outbound","shipping_inbound","test_processed","test_panel_id","test_panel_name","collection_method","activation_flow"],"title":"BillingBreakdownRowSchema","description":"Counts of one test panel, collection method, and activation flow.\n\ncollection_method and activation_flow are raw values; each portal maps them\nto the display names it uses elsewhere."},"BillingRowSchema":{"properties":{"kits_ordered":{"type":"integer","title":"Kits Ordered"},"shipping_outbound":{"type":"integer","title":"Shipping Outbound"},"shipping_inbound":{"type":"integer","title":"Shipping Inbound"},"test_processed":{"type":"integer","title":"Test Processed"},"lab_credits_used":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lab Credits Used"},"kit_credits_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kit Credits Used"},"backup_devices_shipped":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Backup Devices Shipped"},"unmapped_samples":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unmapped Samples"},"kits_awaiting_label":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kits Awaiting Label"},"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"breakdown":{"anyOf":[{"items":{"$ref":"#/components/schemas/BillingBreakdownRowSchema"},"type":"array"},{"type":"null"}],"title":"Breakdown"}},"type":"object","required":["kits_ordered","shipping_outbound","shipping_inbound","test_processed","period_start","period_end"],"title":"BillingRowSchema","description":"Billing counts of one period, or of one day with daily_info."},"BiomarkerQueryOperationEnum":{"type":"string","enum":["AND","OR"],"title":"BiomarkerQueryOperationEnum"},"BiomarkerRestrictionsSchema":{"properties":{"calculation_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculation Method"},"biomarker":{"$ref":"#/components/schemas/Biomarkers"},"gte":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gte"},"lte":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lte"}},"type":"object","required":["biomarker"],"title":"BiomarkerRestrictionsSchema"},"BiomarkerResultSchema":{"properties":{"calculation_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculation Method"},"biomarker":{"$ref":"#/components/schemas/Biomarkers"},"value":{"type":"number","title":"Value"},"units":{"type":"string","title":"Units"},"out_of_range":{"anyOf":[{"$ref":"#/components/schemas/OutOfRangeEnum"},{"type":"null"}]}},"type":"object","required":["biomarker","value","units"],"title":"BiomarkerResultSchema"},"Biomarkers":{"type":"string","enum":["Apolipoprotein B","Chloride","Creatinine","HDL","Hemoglobin A1c","Hemoglobin A1c %","Lipoprotein(a)","Triglycerides","Total Cholesterol","Total Hemoglobin","Total Protein","Calcium Arsenazo","Blood Urea Nitrogen (BUN)","Sodium","Potassium","Albumin BCG","Alkaline Phosphatase (ALP)","Alanine Aminotransferase (ALT)","Aspartate Aminotransferase (AST)","Total Bilirubin","Glucose","hs-CRP","Apolipoprotein A1","Cystatin C","Homocystine","Anti-Mullerian hormone","Beta human chorionic gonadotropin","Ferritin","Free Prostate Specific Antigen","Free T3","Free T4","Follicle-stimulating hormone","High-sensitivity cardiac troponin T","Insulin-like growth factor 1","Insulin","Insulin 0.5 HR","Insulin 1 HR","Insulin 2 HR","Insulin 3 HR","Insulin Baseline","Luteinizing hormone","N-terminal pro-B-type natriuretic peptide","Prolactin","Sex Hormone Binding Globulin","Thyroid Peroxidase Antibodies","Total Prostate Specific Antigen","Thyroid Stimulating Hormone","Vitamin D","Total T3 (T3)","Total T4 (T4)","Cancer Antigen 125 (CA-125)","White Blood Cell Count (WBC)","Red Blood Cell Count (RBC)","Hemoglobin Content (HGB)","Hematocrit (HCT)","Mean Red Blood Cell Volume (MCV)","Mean Corpuscular Hemoglobin (MCH)","Mean Corpuscular Hemoglobin Concentration (MCHC)","Platelet Count (PLT)","Neutrophil Ratio (NEUT%)","Lymphocyte Ratio (LYMPH%)","Monocyte Ratio (MONO%)","Eosinophil Ratio (EO%)","Basophil Ratio (BASO%)","Neutrophil Count (NEUT#)","Lymphocyte Count (LYMPH#)","Monocyte Count (MONO#)","Eosinophil Count (EO#)","Basophil Count (BASO#)","Immature Granulocyte Ratio (IG%)","Immature Granulocyte Count (IG#)","Antibody Synthesizing Lymphocyte Ratio (AS-LYMP%)","Antibody Synthesizing Lymphocyte Count (AS-LYMP#)","Neutrophil Reactivity Intensity (NEUT-RI)","Neutrophil Granularity Intensity (NEUT-GI)","Red Blood Cell Distribution Width Standard Deviation (RDW-SD)","Red Blood Cell Distribution Width Coefficient of Variation (RDW-CV)","Microcytic Red Blood Cell Ratio (MICROR)","Macrocytic Red Blood Cell Ratio (MACROR)","Platelet Distribution Width (PDW)","Mean Platelet Volume (MPV)","Platelet Large Cell Ratio (P-LCR)","Plateletcrit (PCT)","Reticulocyte Ratio (RET%)","Reticulocyte Count (RET#)","Immature Reticulocyte Fraction (IRF)","Low Fluorescence Intensity (LFR)","Middle Fluorescence Intensity (MFR)","High Fluorescence Intensity (HFR)","Reticulocyte Hemoglobin Equivalent (RET-HE)","Red Blood Cell Hemoglobin Equivalent (RBC-HE)","Hypo Haemoglobinised Red Blood Cells (HYPO-HE)","Hyper Haemoglobinised Red Blood Cells (HYPER-HE)","Delta Haemoglobinised Red Blood Cells (DELTA-HE)","Immature Platelet Fraction (IPF)","Immature Platelet Count (IPF#)","White Blood Cell Count Body Fluids (WBC-BF)","Red Blood Cell Count Body Fluids (RBC-BF)","Mononuclear Cell Count (MN#)","Mononuclear Cell Ratio (MN%)","Polymorphonuclear Cell Count (PMN#)","Polymorphonuclear Cell Ratio (PMN%)","Total Nucleated Cell Count Body Fluids (TC-BF#)","Cortisol","Estradiol","Progesterone","Testosterone","DHEAS","C-Peptide (CPEP)","Gamma-Glutamyl Transferase (GGT)","Carbon Dioxide (CO2)","Folate (FOL)","Iron (FE)","Vitamin B12 (B12)","Unsaturated Iron Binding Capacity (UIBC)","Lipase (LIP)","Amylase (AMY)","Magnesium (MG)","Uric Acid (URIC)","Direct Bilirubin (DBIL)","Glycated Serum Protein (GSP)","eGFR","LDL","Atherogenic Index of Plasma (AIP)","ApoB/ApoA1 Ratio","HDL/ApoA1 Ratio","LDL/ApoB Ratio","LDL/HDL Ratio","Non-HDL","Non-HDL/ApoB Ratio","Remnant Cholesterol","TC/HDL Ratio","TG/HDL Ratio","Very Low-Density Lipoprotein Cholesterol (VLDL-C)","Estimated Average Glucose (eAG)","Homeostasis Model Assessment of Beta-Cell Function (HOMA-B)","Homeostasis Model Assessment of Insulin Resistance (HOMA-IR)","McAuley Index","Quantitative Insulin Sensitivity Check Index (QUICKI)","Triglyceride-Glucose Index (TyG)","A/G Ratio","AST/ALT Ratio","Fibrosis-4 Index (FIB-4)","Globulin","BUN/Cre Ratio","Albumin-Corrected Calcium","Anion Gap","Calculated Osmolality","FT3/FT4 Ratio","TSH/FT4 Ratio","Bioavailable Testosterone","Cortisol/DHEAS Ratio","E2/P4 Ratio","Free Androgen Index (FAI)","Free Testosterone","Insulin-Like Growth Factor 1 Z-Score (IGF-1 Z-Score)","Free Testosterone Percent","T/E2 Ratio","LH/FSH Ratio","Neutrophil/Lymphocyte Ratio","Platelet/Lymphocyte Ratio","Free PSA Percent","Lymphocyte/Monocyte Ratio","Monocyte/Lymphocyte Ratio","Systemic Inflammation Response Index (SIRI)","Atherogenic Coefficient","LDL-C/Total Cholesterol Ratio","Triglycerides/ApoB Ratio","Non-HDL-C/Total Cholesterol Ratio","Monocyte/HDL-C Ratio","Neutrophil/HDL-C Ratio","Total Bilirubin/Albumin Ratio","Ferritin/Albumin Ratio","hs-CRP/Albumin Ratio","RDW-CV/MCV Ratio","Estimated Average Glucose (from Fructosamine)","Glycation Gap","Albumin-Corrected Fructosamine"],"title":"Biomarkers","description":"Canonical result identifiers, including instrument calculation inputs.\n\nAlternate labels reuse existing members: ApoB/APOLIPOPROTEIN_B,\nHDL-C/HDL, LDL-C/LDL, fasting glucose/GLUCOSE, and HbA1c/\nHEMOGLOBIN_A1C_PERCENT. Do not create new members for display synonyms.\nNew non-ratio identifiers use full names with standard abbreviations in\nparentheses or familiar short names. Ratios use short labels where appropriate.\nPercentage results spell out Percent. Existing identifiers retain their\nserialized spelling for compatibility with stored results."},"Body_admin_bulk_registration_api_v3_admin_bulk_registration__post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"data":{"$ref":"#/components/schemas/BulkRegistrationSchema"}},"type":"object","required":["file","data"],"title":"Body_admin_bulk_registration_api_v3_admin_bulk_registration__post"},"BulkApproveEmailTemplatesRequestSchema":{"properties":{"template_ids":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Template Ids"}},"type":"object","required":["template_ids"],"title":"BulkApproveEmailTemplatesRequestSchema","description":"Bulk approve email templates by database id."},"BulkApproveEmailTemplatesResponseSchema":{"properties":{"approved_count":{"type":"integer","title":"Approved Count"},"failed_ids":{"items":{"type":"integer"},"type":"array","title":"Failed Ids","default":[]}},"type":"object","required":["approved_count"],"title":"BulkApproveEmailTemplatesResponseSchema","description":"Result of bulk email template approval."},"BulkRegistrationSchema":{"properties":{"event_name":{"type":"string","title":"Event Name"},"event_start_date":{"type":"string","format":"date","title":"Event Start Date"},"event_end_date":{"type":"string","format":"date","title":"Event End Date"},"event_location":{"$ref":"#/components/schemas/States"}},"type":"object","required":["event_name","event_start_date","event_end_date","event_location"],"title":"BulkRegistrationSchema"},"CampaignCreateRequestSchema":{"properties":{"name":{"type":"string","title":"Name","description":"Campaign name"},"identifier":{"type":"string","pattern":"^[A-Z0-9_]+$","title":"Identifier","description":"Campaign identifier in UPPER_SNAKE_CASE format. Unique across all organizations."},"parent_id":{"type":"integer","title":"Parent Id","description":"Id of the sponsoring organization (must not itself be a CAMPAIGN)."},"configs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configs","description":"Organization configurations for this campaign (validated against OrganizationConfigSchema when the Organization row is created)"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"API key for this campaign (auto-generated if not provided)"},"active":{"type":"boolean","title":"Active","description":"Whether the campaign is active on creation. Defaults to inactive.","default":false},"status":{"$ref":"#/components/schemas/CampaignStatus","default":"DRAFT"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"goal_screened":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Goal Screened"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name","identifier","parent_id"],"title":"CampaignCreateRequestSchema"},"CampaignDetailsResponseSchema":{"properties":{"status":{"$ref":"#/components/schemas/CampaignStatus"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"goal_screened":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Goal Screened"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["status","start_date","end_date","goal_screened","description","created_at","updated_at"],"title":"CampaignDetailsResponseSchema"},"CampaignResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"identifier":{"type":"string","title":"Identifier"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id"},"active":{"type":"boolean","title":"Active"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"campaign":{"$ref":"#/components/schemas/CampaignDetailsResponseSchema"}},"type":"object","required":["id","name","identifier","parent_id","active","api_key","created_at","updated_at","campaign"],"title":"CampaignResponseSchema"},"CampaignStatus":{"type":"string","enum":["DRAFT","ACTIVE","PAUSED","COMPLETED","ARCHIVED"],"title":"CampaignStatus"},"CampaignUpdateRequestSchema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id","description":"Reparent this campaign to a different organization (must not itself be a CAMPAIGN, and cannot be the campaign itself)."},"status":{"anyOf":[{"$ref":"#/components/schemas/CampaignStatus"},{"type":"null"}]},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"goal_screened":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Goal Screened"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"CampaignUpdateRequestSchema","description":"Partial update for a campaign. Covers both the organization row\n(name/active/parent_id) and its CampaignDetails extension."},"CancelRequisitionResponseSchema":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["status","message"],"title":"CancelRequisitionResponseSchema","description":"Envelope for requisition cancel endpoints."},"ChatRequestSchema":{"properties":{"chat_id":{"type":"string","format":"uuid","title":"Chat Id"},"activation_code":{"type":"string","title":"Activation Code"},"registration_code":{"type":"string","title":"Registration Code"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"base64_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base64 Image"},"current_step":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Step"},"current_step_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Step Title"},"current_step_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Step Description"},"total_steps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Steps"}},"type":"object","required":["chat_id","activation_code","registration_code"],"title":"ChatRequestSchema"},"ChatbotEscalationRequestSchema":{"properties":{"chat_id":{"type":"string","format":"uuid","title":"Chat Id"},"activation_code":{"type":"string","title":"Activation Code"},"registration_code":{"type":"string","title":"Registration Code"},"user_message":{"type":"string","title":"User Message"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"}},"type":"object","required":["chat_id","activation_code","registration_code","user_message"],"title":"ChatbotEscalationRequestSchema"},"CheckoutSessionResponseSchema":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/CheckoutSessionSchema"},{"type":"null"}]}},"type":"object","required":["status","message","data"],"title":"CheckoutSessionResponseSchema"},"CheckoutSessionSchema":{"properties":{"id":{"type":"string","title":"Id"},"amount_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Total"},"client_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Reference Id"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"customer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer"},"customer_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Email"},"mode":{"type":"string","title":"Mode"},"payment_intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Intent"},"payment_status":{"type":"string","title":"Payment Status"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"subscription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription"},"created":{"type":"integer","title":"Created"},"expires_at":{"type":"integer","title":"Expires At"},"cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Url"},"success_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Url"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["id","mode","payment_status","created","expires_at"],"title":"CheckoutSessionSchema"},"CoachAvailabilityCreateSchema":{"properties":{"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"start_time":{"type":"string","format":"date-time","title":"Start Time"},"end_time":{"type":"string","format":"date-time","title":"End Time"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","default":"UTC"},"is_available":{"type":"boolean","title":"Is Available","default":true},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"is_recurring":{"type":"boolean","title":"Is Recurring","default":false},"recurrence_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurrence Rule"},"max_bookings":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Bookings"},"booking_duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Booking Duration"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"external_calendar_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Calendar Id"},"external_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Event Id"}},"type":"object","required":["start_time","end_time"],"title":"CoachAvailabilityCreateSchema"},"CoachAvailabilityDBSchema":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"start_time":{"type":"string","format":"date-time","title":"Start Time"},"end_time":{"type":"string","format":"date-time","title":"End Time"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"is_available":{"type":"boolean","title":"Is Available"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"is_recurring":{"type":"boolean","title":"Is Recurring"},"recurrence_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurrence Rule"},"max_bookings":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Bookings"},"booking_duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Booking Duration"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"external_calendar_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Calendar Id"},"external_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Event 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","user_id","start_time","end_time","is_available","is_recurring","created_at","updated_at"],"title":"CoachAvailabilityDBSchema"},"CoachAvailabilityResponseSchema":{"properties":{"id":{"type":"string","title":"Id"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"start":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"End"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"transparency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transparency"},"recurrence":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Recurrence"},"created":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created"},"updated":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated"},"htmlLink":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Htmllink"}},"type":"object","required":["id"],"title":"CoachAvailabilityResponseSchema"},"CoachAvailabilityUpdateSchema":{"properties":{"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"is_available":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Available"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"is_recurring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Recurring"},"recurrence_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurrence Rule"},"max_bookings":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Bookings"},"booking_duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Booking Duration"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"external_calendar_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Calendar Id"},"external_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Event Id"}},"type":"object","title":"CoachAvailabilityUpdateSchema"},"CoachClientResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"organization_id":{"type":"integer","title":"Organization Id"},"coach_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Coach Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"date_of_birth":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Date Of Birth"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","default":""},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","default":""},"email_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Id","default":""},"phone_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Phone Number"},"street_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address","default":""},"street_address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address 2","default":""},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","default":""},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","default":""},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"subscription_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subscription Id"},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status","default":""},"subscription_created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Subscription Created At"},"coach_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coach First Name","default":""},"coach_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coach Last Name","default":""},"coach_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coach Email","default":""},"has_health_history_form":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Health History Form","default":false},"latest_order_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Order Id"},"latest_order_status":{"anyOf":[{"$ref":"#/components/schemas/OrderStatusEnum"},{"type":"null"}],"default":""},"latest_order_created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Order Created At"},"activation_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activation Code","default":""},"next_appointment_start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Appointment Start Time"},"next_appointment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Appointment Status","default":""},"next_appointment_was_rescheduled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Next Appointment Was Rescheduled","default":false},"next_appointment_end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Appointment End Time"},"next_appointment_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Appointment Timezone"},"appointment_duration_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Appointment Duration Minutes"},"resulted_orders_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Resulted Orders Count"},"sessions_completed_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sessions Completed Count"},"upcoming_session_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upcoming Session Status","default":""},"upcoming_session_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Upcoming Session Datetime"}},"type":"object","required":["id","user_id","organization_id","coach_id","created_at","updated_at"],"title":"CoachClientResponseSchema"},"CoachClientSessionCreateSchema":{"properties":{"title":{"type":"string","title":"Title"},"notes":{"$ref":"#/components/schemas/SessionNotesSchema-Input"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"}},"type":"object","required":["title","notes"],"title":"CoachClientSessionCreateSchema"},"CoachClientSessionSchema":{"properties":{"id":{"type":"integer","title":"Id"},"coach_id":{"type":"integer","title":"Coach Id"},"coach_client_id":{"type":"integer","title":"Coach Client Id"},"title":{"type":"string","title":"Title"},"organization_id":{"type":"integer","title":"Organization Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"notes":{"$ref":"#/components/schemas/SessionNotesSchema-Output"}},"type":"object","required":["id","coach_id","coach_client_id","title","organization_id","created_at","updated_at","notes"],"title":"CoachClientSessionSchema"},"CoachClientSessionUpdateSchema":{"properties":{"title":{"type":"string","title":"Title"},"notes":{"$ref":"#/components/schemas/SessionNotesSchema-Input"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"}},"type":"object","required":["title","notes"],"title":"CoachClientSessionUpdateSchema"},"CoachCreateSchema":{"properties":{"user_id":{"type":"integer","title":"User Id"},"organization_id":{"type":"integer","title":"Organization Id"}},"type":"object","required":["user_id","organization_id"],"title":"CoachCreateSchema"},"CoachResponseSchema":{"properties":{"user_id":{"type":"integer","title":"User Id"},"organization_id":{"type":"integer","title":"Organization Id"},"id":{"type":"integer","title":"Id"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["user_id","organization_id","id","email"],"title":"CoachResponseSchema"},"CoachSchema":{"properties":{"user_id":{"type":"integer","title":"User Id"},"organization_id":{"type":"integer","title":"Organization Id"},"id":{"type":"integer","title":"Id"}},"type":"object","required":["user_id","organization_id","id"],"title":"CoachSchema"},"CollectionMethods":{"type":"string","enum":["ADX_CARD","EH_CASSETTE_V1","REDDROP","TASSO","VACUTAINER"],"title":"CollectionMethods"},"ConcurrentKitLimitResultSchema":{"properties":{"can_register":{"type":"boolean","title":"Can Register"},"active_count":{"type":"integer","title":"Active Count"},"max_active_kits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Active Kits"}},"type":"object","required":["can_register","active_count"],"title":"ConcurrentKitLimitResultSchema","description":"Result of evaluating concurrent kit registration limits for a user.\n\n``max_active_kits`` is null when the entitlement is disabled/missing\n(unlimited). When enabled, it is the configured cap (default 1)."},"CouponValidationRequestSchema":{"properties":{"coupon_code":{"type":"string","title":"Coupon Code","description":"Coupon code to validate"}},"type":"object","required":["coupon_code"],"title":"CouponValidationRequestSchema"},"CreateOrderLookupSchema":{"properties":{"panel_id":{"type":"integer","title":"Panel Id"},"activation_code":{"type":"string","title":"Activation Code"},"order_id":{"type":"string","title":"Order Id"},"sample_type":{"$ref":"#/components/schemas/SampleTypes"},"collection_method":{"$ref":"#/components/schemas/CollectionMethods"},"tags":{"anyOf":[{"items":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$"},"type":"array"},{"type":"null"}],"title":"Tags"},"activation_flow":{"$ref":"#/components/schemas/KitActivationFlow","default":"UNKNOWN"}},"type":"object","required":["panel_id","activation_code","order_id","sample_type","collection_method"],"title":"CreateOrderLookupSchema"},"CreditAdjustCreateSchema":{"properties":{"grant_event_id":{"type":"integer","title":"Grant Event Id"},"credits":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,8}|(?=[\\d.]{1,11}0*$)\\d{0,8}\\.\\d{0,2}0*$)"}],"title":"Credits"},"reason":{"type":"string","maxLength":500,"minLength":1,"title":"Reason"}},"type":"object","required":["grant_event_id","credits","reason"],"title":"CreditAdjustCreateSchema","description":"Request to adjust a GRANT by a positive or negative, non-zero amount."},"CreditBatchSchema":{"properties":{"event_id":{"type":"integer","title":"Event Id"},"released_on":{"type":"string","format":"date","title":"Released On"},"expires_at":{"type":"string","format":"date","title":"Expires At"},"granted":{"type":"number","title":"Granted"},"used":{"type":"number","title":"Used"},"expired":{"type":"number","title":"Expired"},"remaining":{"type":"number","title":"Remaining"},"over":{"type":"number","title":"Over"},"status":{"$ref":"#/components/schemas/CreditBatchStatus"}},"type":"object","required":["event_id","released_on","expires_at","granted","used","expired","remaining","over","status"],"title":"CreditBatchSchema","description":"One GRANT and what is left of it today.\n\nreleased_on is the day it became usable (the GRANT's occurred_at).\ngranted includes the ADJUSTs naming it. used includes earlier usage the\nbatch covered on release. remaining = granted - used - expired.\nover is usage beyond every usable batch while this was the latest one\nreleased: a note of where overage started, not taken from remaining.\nThe next GRANT covers it in its own used."},"CreditBatchStatus":{"type":"string","enum":["SCHEDULED","CANCELLED","ACTIVE","USED_UP","EXPIRED"],"title":"CreditBatchStatus","description":"Where a batch stands today.\n\nSCHEDULED: granted, but released after today; not yet usable.\nCANCELLED: its GRANT and ADJUSTs add up to 0 or less; treated as never\n    granted.\nACTIVE: not yet expired, with credits left.\nUSED_UP: not yet expired, with nothing left.\nEXPIRED: its expires_at, the last usable day, is before today."},"CreditEventResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"event_type":{"$ref":"#/components/schemas/CreditEventType"},"credit_type":{"$ref":"#/components/schemas/CreditType"},"credits":{"type":"number","title":"Credits"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"expires_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expires At"},"grant_event_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Grant Event Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","event_type","credit_type","credits","occurred_at","expires_at","grant_event_id","reason","created_by","created_at"],"title":"CreditEventResponseSchema","description":"A GRANT or ADJUST as listed to an admin."},"CreditEventType":{"type":"string","enum":["GRANT","CONSUME","ADJUST"],"title":"CreditEventType","description":"Kind of credit movement in credit_events.\n\nGRANT: a batch of credits released to an organization once it is paid;\n    positive, with the last day it can be used.\nCONSUME: credits used by a completed result, a kit's first outbound\n    label, or an event kit's code being created; negative, or 0 for a\n    panel set to 0 lab credits. A result whose panel has no lab credit\n    count gets no event until the count is set and reconcile runs.\nADJUST: correction of a GRANT's credits, naming it in grant_event_id;\n    positive or negative.\n\nGRANT and ADJUST are entered by a superuser in the admin portal and\ncarry a reason."},"CreditGrantCreateSchema":{"properties":{"organization_id":{"type":"integer","title":"Organization Id"},"credit_type":{"$ref":"#/components/schemas/CreditType"},"credits":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,8}|(?=[\\d.]{1,11}0*$)\\d{0,8}\\.\\d{0,2}0*$)"}],"title":"Credits"},"available_on":{"type":"string","format":"date","title":"Available On"},"expires_at":{"type":"string","format":"date","title":"Expires At"},"reason":{"type":"string","maxLength":500,"minLength":1,"title":"Reason"}},"type":"object","required":["organization_id","credit_type","credits","available_on","expires_at","reason"],"title":"CreditGrantCreateSchema","description":"Request to grant credits to an organization's GENERAL pool.\n\navailable_on is the first usable day and expires_at the last, both UTC\ndates; expires_at may equal available_on but not precede it."},"CreditPool":{"type":"string","enum":["GENERAL","RESTRICTED"],"title":"CreditPool","description":"Pool of a movement, within its credit type.\n\nGENERAL: the balance usable for any Laboratory Test (LAB; the LSA calls it\n    the \"fungible Lab Credit balance\") or any agreed Kit type (KIT; a\n    commitment counts Kits \"across agreed types\"). Kit usage per collection\n    method and flow is read from the charged kit order or order lookup, not\n    from the pool.\nRESTRICTED: Restricted Lab Credits (LSA Section 8.4(a)), usable only for\n    the test panel in restricted_test_panel_id, with a balance per panel.\n    LAB only.\n\nTODO: Only the structure for RESTRICTED exists. Restricted credits can be\ngranted, but no test consumes them yet: every lab CONSUME draws GENERAL.\nCharging a restricted panel from its own pool needs the per-organization\nlist of restricted panels."},"CreditPoolSummarySchema":{"properties":{"credit_type":{"$ref":"#/components/schemas/CreditType"},"pool":{"$ref":"#/components/schemas/CreditPool"},"restricted_test_panel_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Restricted Test Panel Id"},"valid_granted":{"type":"number","title":"Valid Granted"},"valid_used":{"type":"number","title":"Valid Used"},"valid_remaining":{"type":"number","title":"Valid Remaining"},"expiring_next":{"anyOf":[{"$ref":"#/components/schemas/CreditBatchSchema"},{"type":"null"}]},"batches":{"items":{"$ref":"#/components/schemas/CreditBatchSchema"},"type":"array","title":"Batches"}},"type":"object","required":["credit_type","pool","restricted_test_panel_id","valid_granted","valid_used","valid_remaining","expiring_next","batches"],"title":"CreditPoolSummarySchema","description":"Balance of one pool today, from its valid batches.\n\nA valid batch is a GRANT released by today, not yet expired, and not\ncancelled. Expired batches are left out, so used and granted stay\ncomparable after a batch expires.\n\nvalid_granted: credits of the valid batches, with their ADJUSTs.\nvalid_used: what was drawn from the valid batches.\nvalid_remaining: what the valid batches have left, less usage no batch\n    has covered yet; negative while usage is over the prepaid credits.\n    The batch in use when usage went over notes it in over.\nexpiring_next: the ACTIVE batch that expires soonest.\nbatches: every GRANT, newest first, SCHEDULED and CANCELLED ones\n    included. The ACTIVE and USED_UP ones add up to valid_granted and\n    valid_used."},"CreditType":{"type":"string","enum":["LAB","KIT"],"title":"CreditType","description":"Credit a movement applies to. Each credit type has its own balance."},"CustomSubscriptionDetailsSchema":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"subscription_id":{"type":"string","title":"Subscription Id"},"price_id":{"type":"string","title":"Price Id"},"status":{"type":"string","title":"Status"},"type":{"$ref":"#/components/schemas/SubscriptionType"},"provider":{"$ref":"#/components/schemas/SubscriptionProvider"},"amount_paid":{"type":"number","title":"Amount Paid"},"current_period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"}},"type":"object","required":["customer_id","subscription_id","price_id","status","type","provider","amount_paid"],"title":"CustomSubscriptionDetailsSchema"},"CustomSubscriptionUserSchema":{"properties":{"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"phone_number":{"type":"integer","title":"Phone Number"},"street_address":{"type":"string","title":"Street Address"},"street_address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address 2"},"city":{"type":"string","title":"City"},"state":{"$ref":"#/components/schemas/States"},"zip_code":{"type":"string","title":"Zip Code"}},"type":"object","required":["first_name","last_name","email","phone_number","street_address","city","state","zip_code"],"title":"CustomSubscriptionUserSchema"},"DevicesCountSchema":{"properties":{"required_devices":{"type":"integer","title":"Required Devices"},"backup_devices":{"type":"integer","title":"Backup Devices"}},"type":"object","required":["required_devices","backup_devices"],"title":"DevicesCountSchema","description":"Device counts for an activation code.\n\nrequired_devices: child codes, or 1 for a code with no children.\nbackup_devices: backup devices on the child panels, or on the code's own panel\nwhen it has no children."},"E2ESeedBiomarkerSchema":{"properties":{"name":{"type":"string","title":"Name"},"value":{"type":"number","title":"Value"}},"type":"object","required":["name","value"],"title":"E2ESeedBiomarkerSchema"},"E2ESeedResultsRequestSchema":{"properties":{"email":{"type":"string","title":"Email","description":"Disposable e2e signup email to seed results for"}},"type":"object","required":["email"],"title":"E2ESeedResultsRequestSchema"},"E2ESeedResultsResponseSchema":{"properties":{"email":{"type":"string","title":"Email"},"user_order_id":{"type":"integer","title":"User Order Id"},"requisition_id":{"type":"integer","title":"Requisition Id"},"biomarkers":{"items":{"$ref":"#/components/schemas/E2ESeedBiomarkerSchema"},"type":"array","title":"Biomarkers"}},"type":"object","required":["email","user_order_id","requisition_id","biomarkers"],"title":"E2ESeedResultsResponseSchema"},"E2ETeardownResponseSchema":{"properties":{"email":{"type":"string","title":"Email"},"firebase_deleted":{"type":"boolean","title":"Firebase Deleted"},"db_deleted":{"type":"boolean","title":"Db Deleted"},"rs_requisitions_deleted":{"type":"integer","title":"Rs Requisitions Deleted","default":0},"rs_patient_deleted":{"type":"boolean","title":"Rs Patient Deleted","default":false}},"type":"object","required":["email","firebase_deleted","db_deleted"],"title":"E2ETeardownResponseSchema"},"EasyPostAddressSchema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"street1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street1"},"street2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"EasyPostAddressSchema","description":"Schema for address validation when creating shipments"},"EasyPostParcelSchema":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"length":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Length"},"width":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height"},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight"}},"type":"object","title":"EasyPostParcelSchema","description":"Schema for parcel validation when creating shipments"},"EasyPostPreviewMessageSchema":{"properties":{"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EasyPostPreviewMessageSchema","description":"Per-carrier message returned by EasyPost alongside rates."},"EasyPostPreviewRateSchema":{"properties":{"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"},"service":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service"},"carrier_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier Account Id"},"rate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate"},"retail_rate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retail Rate"},"list_rate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"List Rate"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"delivery_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delivery Days"},"est_delivery_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Est Delivery Days"},"delivery_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Date"},"delivery_date_guaranteed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Delivery Date Guaranteed"},"selected":{"type":"boolean","title":"Selected"},"passed_carrier_filter":{"type":"boolean","title":"Passed Carrier Filter"},"excluded_reason":{"anyOf":[{"type":"string","enum":["carrier_not_allowed","service_not_allowed","delivery_days_missing","delivery_days_over_target","not_cheapest"]},{"type":"null"}],"title":"Excluded Reason"}},"type":"object","required":["selected","passed_carrier_filter"],"title":"EasyPostPreviewRateSchema","description":"One EasyPost rate in the preview, with selection annotations."},"EasyPostRatesPreviewInputsAppliedSchema":{"properties":{"overnight":{"type":"boolean","title":"Overnight"},"overnight_defaulted":{"type":"boolean","title":"Overnight Defaulted"},"overnight_ignored":{"type":"boolean","title":"Overnight Ignored"},"expedited":{"type":"boolean","title":"Expedited"},"expedited_target_delivery_days":{"type":"integer","title":"Expedited Target Delivery Days"},"organization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization"},"allowed_carriers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Carriers"},"allowed_carriers_source":{"type":"string","enum":["organization","request","none"],"title":"Allowed Carriers Source"},"allowed_inbound_services":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Inbound Services"},"allowed_inbound_services_source":{"type":"string","enum":["organization","request","none"],"title":"Allowed Inbound Services Source"},"allowed_inbound_services_applied":{"type":"boolean","title":"Allowed Inbound Services Applied"},"is_return":{"type":"boolean","title":"Is Return"},"parcel":{"additionalProperties":true,"type":"object","title":"Parcel"},"from_address":{"additionalProperties":true,"type":"object","title":"From Address"}},"type":"object","required":["overnight","overnight_defaulted","overnight_ignored","expedited","expedited_target_delivery_days","organization","allowed_carriers","allowed_carriers_source","allowed_inbound_services","allowed_inbound_services_source","allowed_inbound_services_applied","is_return","parcel","from_address"],"title":"EasyPostRatesPreviewInputsAppliedSchema","description":"The effective inputs the preview used (and where each came from)."},"EasyPostRatesPreviewRequestSchema":{"properties":{"to_address":{"$ref":"#/components/schemas/EasyPostAddressSchema"},"label_type":{"type":"string","enum":["outbound","inbound"],"title":"Label Type"},"overnight":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overnight"},"expedited":{"type":"boolean","title":"Expedited","default":false},"collection_method":{"anyOf":[{"$ref":"#/components/schemas/CollectionMethods"},{"type":"null"}]},"parcel":{"anyOf":[{"$ref":"#/components/schemas/EasyPostParcelSchema"},{"type":"null"}]},"organization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization"},"allowed_carriers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Carriers"},"allowed_inbound_services":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Inbound Services"}},"type":"object","required":["to_address","label_type"],"title":"EasyPostRatesPreviewRequestSchema","description":"Request for the superuser rates preview (no shipment is created)."},"EasyPostRatesPreviewResponseSchema":{"properties":{"mode":{"anyOf":[{"type":"string","enum":["test","production"]},{"type":"null"}],"title":"Mode"},"label_type":{"type":"string","enum":["outbound","inbound"],"title":"Label Type"},"inputs_applied":{"$ref":"#/components/schemas/EasyPostRatesPreviewInputsAppliedSchema"},"selected_rate":{"anyOf":[{"$ref":"#/components/schemas/EasyPostPreviewRateSchema"},{"type":"null"}]},"selection_reason":{"anyOf":[{"type":"string","enum":["overnight","expedited","cheapest"]},{"type":"null"}],"title":"Selection Reason"},"selection_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selection Error"},"messages":{"items":{"$ref":"#/components/schemas/EasyPostPreviewMessageSchema"},"type":"array","title":"Messages"},"rates":{"items":{"$ref":"#/components/schemas/EasyPostPreviewRateSchema"},"type":"array","title":"Rates"}},"type":"object","required":["mode","label_type","inputs_applied","selected_rate","selection_reason","selection_error","messages","rates"],"title":"EasyPostRatesPreviewResponseSchema","description":"Response of the rates preview."},"EasyPostReturnLabelSchema":{"properties":{"external_kit_order_id":{"type":"integer","title":"External Kit Order Id"}},"type":"object","required":["external_kit_order_id"],"title":"EasyPostReturnLabelSchema","description":"Return label request. Overnight now comes from the collection method;\na legacy ``overnight`` field in the body is ignored."},"EasyPostShipmentDetailSchema":{"properties":{"id":{"type":"string","title":"Id"},"tracking_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Code"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"batch_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Id"},"batch_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Status"},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier"},"service":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service"},"rate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"delivery_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delivery Days"},"est_delivery_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Est Delivery Date"},"from_address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"From Address"},"to_address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"To Address"},"parcel":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parcel"},"postage_label":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Postage Label"},"tracker":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tracker"},"rates":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Rates"},"selected_rate":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Selected Rate"},"fees":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Fees"},"customs_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Customs Info"},"scan_form":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Scan Form"},"forms":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Forms"},"messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Messages"},"options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Options"},"insurance":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Insurance"},"order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Id"},"refund_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refund Status"},"return_address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Return Address"},"buyer_address":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Buyer Address"},"usps_zone":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usps Zone"},"is_return":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Return"},"object":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object"}},"type":"object","required":["id"],"title":"EasyPostShipmentDetailSchema","description":"Schema for individual shipment details"},"EasyPostShipmentsDetailedResponseSchema":{"properties":{"shipments":{"items":{"$ref":"#/components/schemas/EasyPostShipmentDetailSchema"},"type":"array","title":"Shipments"},"has_more":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has More"}},"type":"object","required":["shipments"],"title":"EasyPostShipmentsDetailedResponseSchema","description":"Schema for detailed shipments response with pagination"},"EasyPostShippingLabelSchema":{"properties":{"external_kit_order_id":{"type":"integer","title":"External Kit Order Id"}},"type":"object","required":["external_kit_order_id"],"title":"EasyPostShippingLabelSchema"},"EmailTemplateCreateSchema":{"properties":{"template":{"$ref":"#/components/schemas/EmailTemplatesEnum"},"subject":{"type":"string","title":"Subject"},"blocks":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Blocks"},"html_body":{"type":"string","title":"Html Body"},"locale":{"$ref":"#/components/schemas/LocalesEnum"}},"type":"object","required":["template","subject","blocks","html_body","locale"],"title":"EmailTemplateCreateSchema"},"EmailTemplateSchema":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"template":{"type":"string","title":"Template"},"subject":{"type":"string","title":"Subject"},"blocks":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Blocks"},"html_body":{"type":"string","title":"Html Body"},"locale":{"$ref":"#/components/schemas/LocalesEnum"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["template","subject","blocks","html_body","locale"],"title":"EmailTemplateSchema"},"EmailTemplatesEnum":{"type":"string","enum":["2fa_email","verification_email","password_reset","mobile_verification_code","account_creation","account_creation_mass_testing","order_confirmation","kit_ordered","kit_ordered_internal","kit_shipped_finger_stick","kit_shipped_shoulder_test","kit_shipped_eh_cassette","kit_out_for_delivery","kit_delivered","kit_shipment_failed","kit_order_replacement","kit_order_early_replacement","kit_activation_first_reminder","kit_activation_second_reminder","card_registered","card_registered_event_testing","lab_reject_sample","results_ready","results_ready_sign_up","results_ready_health_history_pending","coach_appointment_confirmation","coach_appointment_rescheduled","coach_appointment_cancelled","coach_appointment_coach_notification","coach_appointment_coach_rescheduled","coach_appointment_coach_cancelled","coach_appointment_reminder","coaching_session_reminder","book_session","book_next_session","book_new_session","book_session_no_coach_assigned","book_session_no_subscription","subscription_confirmation","subscription_cancellation","subscription_renewal","health_form_reminder","escalation","post_coaching_no_subscription","post_coaching_plan_ready","sign_up_no_subscription_reminder","webhook_needs_ph_data","template_change_request","lab_report_share_recipient"],"title":"EmailTemplatesEnum"},"ErrorResponseSchema":{"properties":{"error_code":{"type":"string","title":"Error Code"},"message":{"type":"string","title":"Message"},"status":{"type":"integer","title":"Status"},"errors":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","required":["error_code","message","status"],"title":"ErrorResponseSchema","description":"Minimum error structure"},"EvaluatedFeatureSchema":{"properties":{"key":{"type":"string","title":"Key"},"type":{"$ref":"#/components/schemas/FeatureType"},"enabled":{"type":"boolean","title":"Enabled"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"}},"type":"object","required":["key","type","enabled"],"title":"EvaluatedFeatureSchema","description":"Schema for an evaluated feature returned to client"},"ExternalKitOrderCreationRequestSchema":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"phone_number":{"type":"integer","title":"Phone Number"},"street_address":{"type":"string","title":"Street Address"},"street_address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address 2"},"city":{"type":"string","title":"City"},"state":{"$ref":"#/components/schemas/States"},"zip_code":{"type":"string","title":"Zip Code"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},"type":"object","required":["email","first_name","last_name","phone_number","street_address","city","state","zip_code"],"title":"ExternalKitOrderCreationRequestSchema"},"ExternalKitOrderReplaceRequestSchema":{"properties":{"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"phone_number":{"type":"integer","title":"Phone Number"},"street_address":{"type":"string","title":"Street Address"},"street_address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address 2"},"city":{"type":"string","title":"City"},"state":{"$ref":"#/components/schemas/States"},"zip_code":{"type":"string","title":"Zip Code"},"activation_code":{"type":"string","title":"Activation Code"}},"type":"object","required":["email","first_name","last_name","phone_number","street_address","city","state","zip_code","activation_code"],"title":"ExternalKitOrderReplaceRequestSchema"},"ExternalKitOrderSchema":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"phone_number":{"type":"integer","title":"Phone Number"},"street_address":{"type":"string","title":"Street Address"},"street_address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address 2"},"city":{"type":"string","title":"City"},"state":{"$ref":"#/components/schemas/States"},"zip_code":{"type":"string","title":"Zip Code"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"id":{"type":"integer","title":"Id"},"test_panel_id":{"type":"integer","title":"Test Panel Id"},"order_lookup_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Lookup Id"},"sample_type":{"type":"string","title":"Sample Type"},"sample_collection_method":{"type":"string","title":"Sample Collection Method"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"expedited":{"type":"boolean","title":"Expedited","default":false}},"type":"object","required":["email","first_name","last_name","phone_number","street_address","city","state","zip_code","id","test_panel_id","sample_type","sample_collection_method"],"title":"ExternalKitOrderSchema"},"ExternalKitOrdersStatsBody":{"properties":{"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"tag":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9_-]+$"},{"type":"null"}],"title":"Tag"},"rejected_order_lookup_ids":{"items":{"type":"integer"},"type":"array","title":"Rejected Order Lookup Ids","default":[]}},"type":"object","title":"ExternalKitOrdersStatsBody"},"FeatureCreateSchema":{"properties":{"key":{"type":"string","maxLength":255,"minLength":1,"title":"Key"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"type":{"$ref":"#/components/schemas/FeatureType"},"default_enabled":{"type":"boolean","title":"Default Enabled"},"config_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Schema"},"default_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Config"}},"type":"object","required":["key","name","type","default_enabled"],"title":"FeatureCreateSchema","description":"Schema for creating a new feature definition"},"FeatureEvaluateRequestSchema":{"properties":{"feature_keys":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Feature Keys","description":"Canonical feature keys to evaluate for this site and user."},"site_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Site Id","description":"Portal site when Referer/Origin do not resolve one. Ignored when those headers already match a site."}},"type":"object","required":["feature_keys"],"title":"FeatureEvaluateRequestSchema","description":"Request body for authenticated site-context feature evaluation."},"FeatureOverrideSchema":{"properties":{"id":{"type":"integer","title":"Id"},"feature_id":{"type":"integer","title":"Feature Id"},"environment":{"type":"string","title":"Environment"},"scope_type":{"$ref":"#/components/schemas/FeatureOverrideScopeType"},"scope_id":{"type":"integer","title":"Scope Id"},"enabled":{"type":"boolean","title":"Enabled"},"config_override":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Override"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","feature_id","environment","scope_type","scope_id","enabled","created_at","updated_at"],"title":"FeatureOverrideSchema","description":"Schema for feature override"},"FeatureOverrideScopeType":{"type":"string","enum":["ORGANIZATION","USER"],"title":"FeatureOverrideScopeType","description":"Feature override scope type - defines targeting level"},"FeatureOverrideUpsertSchema":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"config_override":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Override"}},"type":"object","required":["enabled"],"title":"FeatureOverrideUpsertSchema","description":"Schema for upserting a feature override (create or update)"},"FeatureSchema":{"properties":{"id":{"type":"integer","title":"Id"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/FeatureType"},"default_enabled":{"type":"boolean","title":"Default Enabled"},"config_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Schema"},"default_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Config"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","key","name","type","default_enabled","created_at","updated_at"],"title":"FeatureSchema","description":"Schema for feature definition"},"FeatureType":{"type":"string","enum":["RELEASE_FLAG","ENTITLEMENT"],"title":"FeatureType","description":"Feature type enum - defines whether feature is a release flag or entitlement"},"FeatureUpdateSchema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"type":{"anyOf":[{"$ref":"#/components/schemas/FeatureType"},{"type":"null"}]},"default_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Default Enabled"},"config_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Schema"},"default_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Default Config"}},"type":"object","title":"FeatureUpdateSchema","description":"Schema for updating a feature definition"},"FeedbackCreationSchema":{"properties":{"source":{"type":"string","title":"Source"},"message":{"type":"string","title":"Message"},"url":{"type":"string","title":"Url"}},"type":"object","required":["source","message","url"],"title":"FeedbackCreationSchema"},"FlaggedRange":{"properties":{"calculation_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculation Method"},"id":{"type":"integer","title":"Id"},"biomarker_id":{"type":"integer","title":"Biomarker Id"},"identfier":{"type":"string","title":"Identfier"},"units":{"type":"string","title":"Units"},"start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"End"},"label":{"type":"string","title":"Label"},"sex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex"},"text":{"type":"string","title":"Text"},"risk_level":{"type":"string","title":"Risk Level"},"is_result_range":{"type":"boolean","title":"Is Result Range"}},"type":"object","required":["id","biomarker_id","identfier","units","start","end","label","sex","text","risk_level","is_result_range"],"title":"FlaggedRange"},"FormEntryResponseData":{"properties":{"form_id":{"type":"integer","title":"Form Id"},"form_name":{"type":"string","title":"Form Name"},"form_data":{"additionalProperties":true,"type":"object","title":"Form Data"},"form_entry_id":{"type":"integer","title":"Form Entry Id"},"client_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Client User Id"},"responder_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Responder User Id"},"responder_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Responder Role"},"organization_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organization Id"}},"type":"object","required":["form_id","form_name","form_entry_id"],"title":"FormEntryResponseData","description":"Response schema for form entry data returned from RS."},"FreeBusySlotSchema":{"properties":{"id":{"type":"integer","title":"Id"},"start_time":{"type":"string","format":"date-time","title":"Start Time"},"end_time":{"type":"string","format":"date-time","title":"End Time"},"status":{"type":"string","title":"Status"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"coach_id":{"type":"integer","title":"Coach Id"}},"type":"object","required":["id","start_time","end_time","status","coach_id"],"title":"FreeBusySlotSchema"},"GoogleCredentialsSchema":{"properties":{"idToken":{"type":"string","title":"Idtoken"},"accessToken":{"type":"string","title":"Accesstoken"},"pendingToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pendingtoken"},"providerId":{"type":"string","title":"Providerid"},"signInMethod":{"type":"string","title":"Signinmethod"}},"type":"object","required":["idToken","accessToken","providerId","signInMethod"],"title":"GoogleCredentialsSchema"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HistoricalRequisitionsSchema":{"properties":{"requisition_id":{"type":"integer","title":"Requisition Id"},"reported_at":{"type":"string","format":"date-time","title":"Reported At"},"is_fasting":{"type":"boolean","title":"Is Fasting"},"results":{"items":{"$ref":"#/components/schemas/HistoricalResultSchema"},"type":"array","title":"Results"},"lab_report":{"anyOf":[{"$ref":"#/components/schemas/IssuedReportSchema"},{"type":"null"}]},"patient_sex":{"type":"string","title":"Patient Sex"},"patient_dob":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Dob"},"patient_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient First Name"},"patient_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Last Name"},"panel_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Panel Display Name"}},"type":"object","required":["requisition_id","reported_at","is_fasting","results","patient_sex"],"title":"HistoricalRequisitionsSchema"},"HistoricalResultSchema":{"properties":{"calculation_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculation Method"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"out_of_range":{"anyOf":[{"$ref":"#/components/schemas/OutOfBoundsEnum"},{"type":"null"}]},"withdrawn":{"type":"boolean","title":"Withdrawn","default":false},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"flag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flag"},"sample_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Id"},"biomarker":{"$ref":"#/components/schemas/Biomarkers"},"biomarker_units":{"$ref":"#/components/schemas/Units"}},"type":"object","required":["value","biomarker","biomarker_units"],"title":"HistoricalResultSchema"},"IssuedReportSchema":{"properties":{"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"sample_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Id"}},"type":"object","required":["id","created_at"],"title":"IssuedReportSchema"},"KitActivationFlow":{"type":"string","enum":["UNKNOWN","AT_HOME","EVENT"],"title":"KitActivationFlow","description":"Intended kit activation flow assigned to an order lookup.\n\nUNKNOWN covers historical and unclassified records. Later consumers may\ndefine their own fallback; this value object does not imply one."},"KitAssociationPayloadSchema":{"properties":{"tracking_number":{"type":"string","title":"Tracking Number"},"order_id":{"type":"string","title":"Order Id"}},"type":"object","required":["tracking_number","order_id"],"title":"KitAssociationPayloadSchema"},"KitOrderEvents":{"type":"string","enum":["CREATED","LABEL_CREATED","LINKED","SHIPPED","DELIVERED","REGISTERED","DISCARDED","ERROR"],"title":"KitOrderEvents"},"KitOrderQueryResponseSchema":{"properties":{"created_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Created At"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Phone Number"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"street_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address"},"street_address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address 2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"tracking_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Number"},"sample_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Type"},"organization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization"},"order_lookup":{"anyOf":[{"$ref":"#/components/schemas/OrderLookupSchema"},{"type":"null"}]},"latest_outbound_label":{"anyOf":[{"$ref":"#/components/schemas/ShippingLabelSchema"},{"type":"null"}]},"latest_return_label":{"anyOf":[{"$ref":"#/components/schemas/ShippingLabelSchema"},{"type":"null"}]},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"}},"type":"object","required":["created_at","first_name","last_name","email","phone_number","status","reason","street_address","street_address_2","city","state","zip_code","tracking_number","sample_type","organization","order_lookup","latest_outbound_label","latest_return_label"],"title":"KitOrderQueryResponseSchema"},"KitTrackingFilterOptionsResponseSchema":{"properties":{"carriers":{"items":{"type":"string"},"type":"array","title":"Carriers"},"kit_components":{"items":{"type":"string"},"type":"array","title":"Kit Components"}},"type":"object","required":["carriers","kit_components"],"title":"KitTrackingFilterOptionsResponseSchema","description":"Distinct values available for the kit tracking filter dropdowns."},"KitTrackingItemResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"organization":{"type":"string","title":"Organization"},"organization_name":{"type":"string","title":"Organization Name"},"kit_components":{"type":"string","title":"Kit Components"},"panel":{"type":"string","title":"Panel"},"tracking_number":{"type":"string","title":"Tracking Number"},"tracking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Url"},"carrier":{"type":"string","title":"Carrier"},"status":{"$ref":"#/components/schemas/KitTrackingStatus"},"activation_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activation Code"}},"type":"object","required":["id","created_at","organization","organization_name","kit_components","panel","tracking_number","tracking_url","carrier","status","activation_code"],"title":"KitTrackingItemResponseSchema","description":"One kit order row in the kit tracking list."},"KitTrackingListResponseSchema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/KitTrackingItemResponseSchema"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"KitTrackingListResponseSchema","description":"A page of kit tracking rows and the total matching count."},"KitTrackingSortField":{"type":"string","enum":["date","order_id","organization","panel","carrier","status"],"title":"KitTrackingSortField","description":"Columns the kit tracking list can be sorted by."},"KitTrackingSortOrder":{"type":"string","enum":["asc","desc"],"title":"KitTrackingSortOrder","description":"Sort direction for the kit tracking list."},"KitTrackingStatus":{"type":"string","enum":["LINKED","NOT_LINKED"],"title":"KitTrackingStatus","description":"Whether a kit tracking row has a carrier tracking number linked."},"LabReportShareCreateSchema":{"properties":{"requisition_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requisition Id"},"requisition_ids":{"items":{"type":"integer"},"type":"array","title":"Requisition Ids"},"recipient_name":{"type":"string","maxLength":100,"minLength":1,"title":"Recipient Name"},"recipient_email":{"type":"string","format":"email","title":"Recipient Email"},"legal_basis":{"type":"string","const":"HIPAA_AUTHORIZATION_164_508","title":"Legal Basis","default":"HIPAA_AUTHORIZATION_164_508"},"authorization_text_version":{"type":"string","title":"Authorization Text Version","default":"v1"},"typed_signature":{"type":"string","maxLength":201,"minLength":1,"title":"Typed Signature"},"locale":{"type":"string","title":"Locale","default":"en"}},"type":"object","required":["recipient_name","recipient_email","typed_signature"],"title":"LabReportShareCreateSchema"},"LabReportShareResponseSchema":{"properties":{"public_id":{"type":"string","format":"uuid","title":"Public Id"},"external_requisition_id":{"type":"integer","title":"External Requisition Id"},"report_id":{"type":"integer","title":"Report Id"},"report_ids":{"items":{"type":"integer"},"type":"array","title":"Report Ids"},"report_sha256":{"type":"string","title":"Report Sha256"},"report_generation":{"type":"integer","title":"Report Generation"},"state":{"type":"string","title":"State"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"email_accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Email Accepted At"},"email_delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Email Delivered At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"locked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Locked At"},"downloaded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Downloaded At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"recipient_email_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Email Domain"}},"type":"object","required":["public_id","external_requisition_id","report_id","report_sha256","report_generation","state","expires_at","created_at"],"title":"LabReportShareResponseSchema"},"LabelCreationChildSchema":{"properties":{"test_panel_id":{"type":"integer","title":"Test Panel Id"},"sample_type":{"$ref":"#/components/schemas/SampleTypes"},"collection_method":{"$ref":"#/components/schemas/CollectionMethods"},"number_of_large_labels":{"type":"integer","minimum":0.0,"title":"Number Of Large Labels"},"number_of_small_labels":{"type":"integer","minimum":0.0,"title":"Number Of Small Labels"}},"type":"object","required":["test_panel_id","sample_type","collection_method","number_of_large_labels","number_of_small_labels"],"title":"LabelCreationChildSchema","description":"One child node under each parent kit: its own panel and label counts."},"LabelCreationSchema":{"properties":{"ticket_id":{"type":"string","title":"Ticket Id"},"number_of_order_lookups":{"type":"integer","minimum":1.0,"title":"Number Of Order Lookups"},"number_of_large_labels":{"type":"integer","minimum":0.0,"title":"Number Of Large Labels"},"number_of_small_labels":{"type":"integer","minimum":0.0,"title":"Number Of Small Labels"},"test_panel_id":{"type":"integer","title":"Test Panel Id"},"sample_type":{"$ref":"#/components/schemas/SampleTypes"},"collection_method":{"$ref":"#/components/schemas/CollectionMethods"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"activation_flow":{"$ref":"#/components/schemas/KitActivationFlow","default":"UNKNOWN"},"domain":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Domain","default":"https://web.endless.health/app/kit/register"},"custom_url_template":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Custom Url Template"},"children":{"anyOf":[{"items":{"$ref":"#/components/schemas/LabelCreationChildSchema"},"type":"array"},{"type":"null"}],"title":"Children"}},"type":"object","required":["ticket_id","number_of_order_lookups","number_of_large_labels","number_of_small_labels","test_panel_id","sample_type","collection_method"],"title":"LabelCreationSchema","description":"Request body for POST /v3/admin/label-creation.\n\nThe root fields describe the parent kit. `children` is optional: when it is\nabsent or empty, the request creates single kits as it always has."},"LateReturnAcknowledgment":{"type":"string","enum":["ACKNOWLEDGED","NOT_REQUIRED","UNKNOWN"],"title":"LateReturnAcknowledgment","description":"Whether the patient confirmed a late-return warning before registering.\n\nACKNOWLEDGED: the warning showed and the patient continued.\nNOT_REQUIRED: the warning did not apply to this registration.\nUNKNOWN: old or mobile clients that do not send the value."},"LatestFormEntryResponse":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/FormEntryResponseData"},{"type":"null"}]}},"type":"object","required":["status","message"],"title":"LatestFormEntryResponse","description":"Response schema for latest form entry endpoint."},"LatestRequisitionDataSchema":{"properties":{"requisition":{"anyOf":[{"$ref":"#/components/schemas/RequisitionSchema"},{"type":"null"}]},"requisition_note":{"anyOf":[{"$ref":"#/components/schemas/RequisitionNoteResponseSchema"},{"type":"null"}]},"activation_code":{"type":"string","title":"Activation Code"},"has_external_kit":{"type":"boolean","title":"Has External Kit"},"is_replace_requested":{"type":"boolean","title":"Is Replace Requested"},"replace_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Replace Requested At"},"has_replacement":{"type":"boolean","title":"Has Replacement"},"pending_registration":{"anyOf":[{"$ref":"#/components/schemas/PendingRegistrationSchema"},{"type":"null"}]}},"type":"object","required":["activation_code","has_external_kit","is_replace_requested","has_replacement"],"title":"LatestRequisitionDataSchema","description":"Portal latest order status."},"LatestRequisitionStatusResponseSchema":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/LatestRequisitionDataSchema"},{"type":"null"}]}},"type":"object","required":["status","message"],"title":"LatestRequisitionStatusResponseSchema","description":"Envelope for GET /api/v1/requisitions/latest."},"LocalesEnum":{"type":"string","enum":["en","es"],"title":"LocalesEnum"},"MarkAppointmentAttendedSchema":{"properties":{"attended":{"type":"boolean","title":"Attended"}},"type":"object","required":["attended"],"title":"MarkAppointmentAttendedSchema"},"MobileAccountCreationRequestSchema":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","title":"Code"},"password":{"type":"string","title":"Password"},"site_id":{"type":"integer","title":"Site Id"},"locale":{"anyOf":[{"$ref":"#/components/schemas/LocalesEnum"},{"type":"null"}],"default":"en"}},"type":"object","required":["email","code","password","site_id"],"title":"MobileAccountCreationRequestSchema","description":"Final step. Consumes the code and creates the Firebase account."},"MobileAccountCreationResponseSchema":{"properties":{"created":{"type":"boolean","title":"Created","default":true}},"type":"object","title":"MobileAccountCreationResponseSchema","description":"Account exists in Firebase and Core. The app signs in separately."},"MobileDeleteAccountRequestSchema":{"properties":{"apple_authorization_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apple Authorization Code"},"platform":{"anyOf":[{"type":"string","enum":["ios","android"]},{"type":"null"}],"title":"Platform"}},"type":"object","title":"MobileDeleteAccountRequestSchema","description":"Optional Apple re-auth payload for Sign in with Apple account deletion.\n\nRequired when the Firebase user has provider ``apple.com``. Non-Apple\naccounts may omit both fields."},"MobileDeleteAccountResponseSchema":{"properties":{"deleted":{"type":"boolean","title":"Deleted","default":true}},"type":"object","title":"MobileDeleteAccountResponseSchema","description":"Account login and PII were removed. Lab records stay with the lab."},"MobilePasswordResetPasswordResponseSchema":{"properties":{"reset":{"type":"boolean","title":"Reset","default":true}},"type":"object","title":"MobilePasswordResetPasswordResponseSchema"},"MobilePasswordResetVerifyRequestSchema":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","title":"Code"},"site_id":{"type":"integer","title":"Site Id"}},"type":"object","required":["email","code","site_id"],"title":"MobilePasswordResetVerifyRequestSchema"},"MobilePasswordResetVerifyResponseSchema":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"MobilePasswordResetVerifyResponseSchema"},"MobilePushTokenRegisterRequest":{"properties":{"expo_push_token":{"type":"string","maxLength":255,"minLength":1,"title":"Expo Push Token"},"platform":{"$ref":"#/components/schemas/PushPlatform"},"device_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Device Id"},"app_version":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"App Version"}},"type":"object","required":["expo_push_token","platform"],"title":"MobilePushTokenRegisterRequest","description":"Mobile app body for registering an Expo push token."},"MobilePushTokenUnregisterRequest":{"properties":{"expo_push_token":{"type":"string","maxLength":255,"minLength":1,"title":"Expo Push Token"}},"type":"object","required":["expo_push_token"],"title":"MobilePushTokenUnregisterRequest","description":"Mobile app body for unregistering an Expo push token (e.g. on logout)."},"MobileRefreshRequestSchema":{"properties":{"firebase_token":{"type":"string","title":"Firebase Token"}},"type":"object","required":["firebase_token"],"title":"MobileRefreshRequestSchema"},"MobileRefreshResponseSchema":{"properties":{"access_token":{"type":"string","title":"Access Token"}},"type":"object","required":["access_token"],"title":"MobileRefreshResponseSchema"},"MobileSessionCreationRequestSchema":{"properties":{"firebase_token":{"type":"string","title":"Firebase Token"},"site_id":{"type":"integer","title":"Site Id"},"locale":{"anyOf":[{"$ref":"#/components/schemas/LocalesEnum"},{"type":"null"}],"default":"en"}},"type":"object","required":["firebase_token","site_id"],"title":"MobileSessionCreationRequestSchema"},"MobileSignupRequestSchema":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"site_id":{"type":"integer","title":"Site Id"},"locale":{"anyOf":[{"$ref":"#/components/schemas/LocalesEnum"},{"type":"null"}],"default":"en"}},"type":"object","required":["email","site_id"],"title":"MobileSignupRequestSchema","description":"First step. Carries no password: the Firebase account is not created\nuntil the email address has been verified."},"MobileSignupResponseSchema":{"properties":{"status":{"$ref":"#/components/schemas/MobileSignupStatus"}},"type":"object","required":["status"],"title":"MobileSignupResponseSchema"},"MobileSignupStatus":{"type":"string","enum":["ready","account_exists","account_unavailable","verification_required"],"title":"MobileSignupStatus","description":"Outcome of the first mobile signup step.\n\nREADY is the only status that advances the app to the verification screen;\nthe other three are terminal for this attempt."},"MobileVerificationCodeRequestSchema":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"site_id":{"type":"integer","title":"Site Id"},"locale":{"anyOf":[{"$ref":"#/components/schemas/LocalesEnum"},{"type":"null"}],"default":"en"}},"type":"object","required":["email","site_id"],"title":"MobileVerificationCodeRequestSchema","description":"Sends a verification code. Used for both the first send and resends."},"MobileVerificationCodeResponseSchema":{"properties":{"sent":{"type":"boolean","title":"Sent","default":true},"cooldown_seconds":{"type":"integer","title":"Cooldown Seconds","default":45}},"type":"object","title":"MobileVerificationCodeResponseSchema","description":"Response for POST /auth/mobile/verification-code (step 2 send / resend).\n\n`sent` is always True so the client cannot tell whether the address\nresolved to a user. `cooldown_seconds` is the client-side resend timer;\nthe route still enforces cooldown from the previous token's created_at."},"NoteSchema":{"properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"contacted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Contacted"}},"type":"object","required":["note","contacted"],"title":"NoteSchema"},"OTPValidationRequestSchema":{"properties":{"firebase_token":{"type":"string","title":"Firebase Token"},"locale":{"anyOf":[{"$ref":"#/components/schemas/LocalesEnum"},{"type":"null"}],"default":"en"},"google_credentials":{"anyOf":[{"$ref":"#/components/schemas/GoogleCredentialsSchema"},{"type":"null"}]},"code":{"type":"string","title":"Code"}},"type":"object","required":["firebase_token","code"],"title":"OTPValidationRequestSchema"},"OrderDirection":{"type":"string","enum":["asc","desc"],"title":"OrderDirection"},"OrderLookupRequestSchema":{"properties":{"activation_code":{"type":"string","title":"Activation Code"}},"type":"object","required":["activation_code"],"title":"OrderLookupRequestSchema"},"OrderLookupSchema":{"properties":{"id":{"type":"integer","title":"Id"},"activation_code":{"type":"string","title":"Activation Code"},"order_id":{"type":"string","title":"Order Id"}},"type":"object","required":["id","activation_code","order_id"],"title":"OrderLookupSchema"},"OrderSchema":{"properties":{"id":{"type":"integer","title":"Id"},"result_status":{"type":"string","title":"Result Status"},"justification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Justification"},"requisition_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requisition Id"},"is_fasting":{"type":"boolean","title":"Is Fasting"},"accepted_responsibility":{"type":"boolean","title":"Accepted Responsibility"},"acknowledged_terms":{"type":"boolean","title":"Acknowledged Terms"},"acknowledged_news_letter":{"type":"boolean","title":"Acknowledged News Letter"},"signed_document":{"type":"boolean","title":"Signed Document"},"order_lookup_id":{"type":"integer","title":"Order Lookup Id"},"tested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Tested At"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"sex":{"type":"string","title":"Sex"}},"type":"object","required":["id","result_status","justification","requisition_id","is_fasting","accepted_responsibility","acknowledged_terms","acknowledged_news_letter","signed_document","order_lookup_id","first_name","last_name","sex"],"title":"OrderSchema"},"OrderSimplifiedSchema":{"properties":{"id":{"type":"integer","title":"Id"},"result_status":{"type":"string","title":"Result Status"},"requisition_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requisition Id"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"sex":{"type":"string","title":"Sex"},"biomarkers_data":{"title":"Biomarkers Data"},"received_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Received At"},"reported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reported At"},"lab_report":{"anyOf":[{"$ref":"#/components/schemas/IssuedReportSchema"},{"type":"null"}]},"uninterpreted_biomarkers_data":{"items":{"$ref":"#/components/schemas/UninterpretedResultSchema"},"type":"array","title":"Uninterpreted Biomarkers Data"}},"type":"object","required":["id","result_status","requisition_id","first_name","last_name","sex","biomarkers_data","received_at","reported_at"],"title":"OrderSimplifiedSchema"},"OrderStatusEnum":{"type":"string","enum":["ORDER_CREATED","MD_APPROVED","MD_REJECT","LAB_ACCEPT","LAB_REJECT","TEST_COMPLETE","ORDER_COMPLETE","ORDER_CANCELLED","MD_CONTACTED"],"title":"OrderStatusEnum"},"OrganizationConfigSchema":{"properties":{"auto_reorder_kit":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Reorder Kit","default":false},"body_health":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Body Health","default":false}},"type":"object","title":"OrganizationConfigSchema"},"OrganizationCreateRequestSchema":{"properties":{"name":{"type":"string","title":"Name","description":"Organization name"},"identifier":{"type":"string","pattern":"^[A-Z0-9_]+$","title":"Identifier","description":"Organization identifier in UPPER_SNAKE_CASE format (only uppercase letters, numbers, and underscores)"},"configs":{"anyOf":[{"$ref":"#/components/schemas/OrganizationConfigSchema"},{"type":"null"}],"description":"Organization configurations"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"API key for this organization (optional, will be auto-generated if not provided)"},"organization_type":{"$ref":"#/components/schemas/OrganizationType","description":"Type of organization row. See OrganizationType.","default":"ENTITY"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id","description":"Parent organization id. Required for CAMPAIGN; the parent must not itself be a CAMPAIGN."},"active":{"type":"boolean","title":"Active","description":"Whether the organization is active on creation. Defaults to inactive.","default":false}},"type":"object","required":["name","identifier"],"title":"OrganizationCreateRequestSchema","example":{"configs":{"auto_reorder_kit":false,"body_health":false,"webhooks_enabled":false},"identifier":"ENDLESS_HEALTH","name":"Endless Health"}},"OrganizationResponseLimitedSchema":{"properties":{"id":{"type":"integer","title":"Id"},"identifier":{"type":"string","title":"Identifier"},"name":{"type":"string","title":"Name"},"configs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Configs"},"organization_type":{"$ref":"#/components/schemas/OrganizationType"},"active":{"type":"boolean","title":"Active"}},"type":"object","required":["id","identifier","name","configs","organization_type","active"],"title":"OrganizationResponseLimitedSchema"},"OrganizationResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"identifier":{"type":"string","title":"Identifier"},"configs":{"additionalProperties":true,"type":"object","title":"Configs"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"organization_type":{"$ref":"#/components/schemas/OrganizationType"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id"},"active":{"type":"boolean","title":"Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","identifier","configs","api_key","organization_type","parent_id","active","created_at","updated_at"],"title":"OrganizationResponseSchema"},"OrganizationTestPanelSchema":{"properties":{"id":{"type":"integer","title":"Id"},"display_name":{"type":"string","title":"Display Name"}},"type":"object","required":["id","display_name"],"title":"OrganizationTestPanelSchema"},"OrganizationType":{"type":"string","enum":["ENTITY","SPONSOR","CAMPAIGN"],"title":"OrganizationType","description":"Discriminates the kind of organization row.\n\nENTITY: standalone customer account.\nSPONSOR: parent account that runs one or more campaigns.\nCAMPAIGN: a child organization for a single screening program; requires parent_id."},"OrganizationTypeSchema":{"properties":{"id":{"type":"integer","title":"Id"},"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","code","name","description","created_at","updated_at"],"title":"OrganizationTypeSchema","description":"Response schema for the `organization_types` catalog (see the\n`OrganizationType` model in organizations_model.py)."},"OrganizationUpdateSchema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"configs":{"anyOf":[{"$ref":"#/components/schemas/OrganizationConfigSchema"},{"type":"null"}]},"registration_site_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Registration Site Id"}},"type":"object","title":"OrganizationUpdateSchema","description":"Partial update payload for non-sensitive organization fields.\n\nDeliberately excludes identifier, api_key, sso_provider_id (sensitive/\nauth-relevant) and organization_type/parent_id (type changes are not\nsupported via this endpoint; use the campaign endpoints for reparenting)."},"OutOfBoundsEnum":{"type":"string","enum":["ABOVE","BELOW"],"title":"OutOfBoundsEnum"},"OutOfRangeEnum":{"type":"string","enum":["ABOVE","BELOW"],"title":"OutOfRangeEnum"},"PHDataSchema":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email_id":{"type":"string","title":"Email Id"},"site_id":{"type":"integer","title":"Site Id","default":1},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth"},"profile_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Image"},"height":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Height"},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight"},"country_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Country Code"},"phone_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Phone Number"},"street_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address"},"street_address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address 2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"test_card":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Card"},"race":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Race"},"sub_race":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sub Race"}},"type":"object","required":["email_id"],"title":"PHDataSchema"},"PHDataUpdateSchema":{"properties":{"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth"},"phone_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Phone Number"},"street_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address"},"street_address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address 2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Zip Code"}},"type":"object","title":"PHDataUpdateSchema"},"PanelCalculation":{"properties":{"calculation_method":{"type":"string","title":"Calculation Method"},"testosterone_assay":{"anyOf":[{"type":"string","enum":["E402","SCIEX_LC_MS"]},{"type":"null"}],"title":"Testosterone Assay"}},"type":"object","required":["calculation_method"],"title":"PanelCalculation"},"PasswordResetDataSchema":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["token","new_password"],"title":"PasswordResetDataSchema"},"PasswordResetRequestSchema":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"locale":{"anyOf":[{"$ref":"#/components/schemas/LocalesEnum"},{"type":"null"}],"default":"en"}},"type":"object","required":["email"],"title":"PasswordResetRequestSchema"},"PatientAppointmentCreateSchema":{"properties":{"coach_id":{"type":"integer","title":"Coach Id"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"is_available":{"type":"boolean","title":"Is Available","default":true},"status":{"anyOf":[{"$ref":"#/components/schemas/PatientAppointmentStatus"},{"type":"null"}],"default":"SCHEDULED"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"is_recurring":{"type":"boolean","title":"Is Recurring","default":false},"recurrence_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurrence Rule"},"max_bookings":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Bookings"},"booking_duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Booking Duration"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["coach_id"],"title":"PatientAppointmentCreateSchema"},"PatientAppointmentResponseSchema":{"properties":{"coach_id":{"type":"integer","title":"Coach Id"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"is_available":{"type":"boolean","title":"Is Available","default":true},"status":{"anyOf":[{"$ref":"#/components/schemas/PatientAppointmentStatus"},{"type":"null"}],"default":"SCHEDULED"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"is_recurring":{"type":"boolean","title":"Is Recurring","default":false},"recurrence_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurrence Rule"},"max_bookings":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Bookings"},"booking_duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Booking Duration"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"external_calendar_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Calendar Id"},"external_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Event Id"},"meeting_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meeting Link"},"cancel_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Link"},"reschedule_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reschedule Link"},"coach_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coach Name"},"session_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Session Number"},"upcoming_session_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upcoming Session Status"},"attended":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Attended"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["coach_id","id","user_id","created_at","updated_at"],"title":"PatientAppointmentResponseSchema"},"PatientAppointmentStatus":{"type":"string","enum":["SCHEDULED","CANCELED","NOT_ATTENDED","RESCHEDULED"],"title":"PatientAppointmentStatus"},"PatientAppointmentUpdateSchema":{"properties":{"coach_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Coach Id"},"start_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Time"},"end_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Time"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"is_available":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Available"},"status":{"anyOf":[{"$ref":"#/components/schemas/PatientAppointmentStatus"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"is_recurring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Recurring"},"recurrence_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recurrence Rule"},"max_bookings":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Bookings"},"booking_duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Booking Duration"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"cancellation_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancellation Reason"}},"type":"object","title":"PatientAppointmentUpdateSchema"},"PatientQuerySchema":{"properties":{"age_gte":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Age Gte"},"age_lte":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Age Lte"},"sex":{"anyOf":[{"$ref":"#/components/schemas/Sex"},{"type":"null"}]},"organization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization"},"states":{"anyOf":[{"items":{"$ref":"#/components/schemas/States"},"type":"array"},{"type":"string"},{"type":"null"}],"title":"States"},"zip_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"},{"type":"null"}],"title":"Zip Codes"},"biomarker_restrictions":{"anyOf":[{"items":{"$ref":"#/components/schemas/BiomarkerRestrictionsSchema"},"type":"array"},{"type":"null"}],"title":"Biomarker Restrictions"},"only_return_patients_with_history":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Only Return Patients With History","default":true},"return_csv":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Return Csv","default":false}},"type":"object","title":"PatientQuerySchema"},"PendingApprovalTemplatesResponse":{"properties":{"templates":{"items":{"$ref":"#/components/schemas/EmailTemplateSchema"},"type":"array","title":"Templates"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["templates","total"],"title":"PendingApprovalTemplatesResponse","description":"Response schema for listing templates pending approval."},"PendingRegistrationSchema":{"properties":{"activation_code":{"type":"string","title":"Activation Code"},"registered_at":{"type":"string","format":"date-time","title":"Registered At"}},"type":"object","required":["activation_code","registered_at"],"title":"PendingRegistrationSchema","description":"A kit registered in core before Requisition Service has created it.\n\nPresent only while registration_information.requisition_id is still NULL\nand the row is newer than the RS latest kit, within a short timeout."},"PickupAddressSchema":{"properties":{"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"street_address":{"type":"string","minLength":1,"title":"Street Address"},"street_address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address 2"},"city":{"type":"string","minLength":1,"title":"City"},"state":{"type":"string","minLength":1,"title":"State"},"zip_code":{"type":"string","minLength":1,"title":"Zip Code"},"country":{"type":"string","title":"Country","default":"US"},"phone":{"type":"string","minLength":1,"title":"Phone"}},"type":"object","required":["street_address","city","state","zip_code","phone"],"title":"PickupAddressSchema","description":"The partner's pickup address, as supplied by the activation flow."},"PickupContactAddressSchema":{"properties":{"street_address":{"type":"string","title":"Street Address"},"street_address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address 2"},"city":{"type":"string","title":"City"},"state":{"type":"string","title":"State"},"zip_code":{"type":"string","title":"Zip Code"}},"type":"object","required":["street_address","street_address_2","city","state","zip_code"],"title":"PickupContactAddressSchema","description":"Address stored on the kit order, as stored."},"PickupContactSchema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"address":{"$ref":"#/components/schemas/PickupContactAddressSchema"}},"type":"object","required":["name","phone","address"],"title":"PickupContactSchema","description":"Name, phone and address from the kit order; never the email."},"PlanVisibilityUpdateSchema":{"properties":{"active":{"type":"boolean","title":"Active","description":"True to show the plan, False to hide it from the plans listing."}},"type":"object","required":["active"],"title":"PlanVisibilityUpdateSchema","description":"Request body to hide/show a subscription plan (admin)."},"PreregistrationConfirmationSchema":{"properties":{"activation_code":{"type":"string","title":"Activation Code"},"registration_code":{"type":"string","title":"Registration Code"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"date_of_birth":{"type":"string","format":"date","title":"Date Of Birth"},"email":{"type":"string","title":"Email"}},"type":"object","required":["activation_code","registration_code","first_name","last_name","date_of_birth","email"],"title":"PreregistrationConfirmationSchema"},"PreregistrationCreationSchema":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"date_of_birth":{"type":"string","format":"date","title":"Date Of Birth"},"create_shipment":{"type":"boolean","title":"Create Shipment"},"enforce_email":{"type":"boolean","title":"Enforce Email","default":false},"activation_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activation Code"},"language":{"$ref":"#/components/schemas/LocalesEnum","default":"en"},"sex":{"anyOf":[{"$ref":"#/components/schemas/Sex"},{"type":"null"}]},"race":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Race"},"sub_race":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sub Race"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Phone"},"street_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address"},"street_address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address 2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"test_panel_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Test Panel Id"},"sample_type":{"anyOf":[{"$ref":"#/components/schemas/SampleTypes"},{"type":"null"}]},"sample_collection_method":{"anyOf":[{"$ref":"#/components/schemas/CollectionMethods"},{"type":"null"}]}},"type":"object","required":["first_name","last_name","date_of_birth","create_shipment"],"title":"PreregistrationCreationSchema"},"PushPlatform":{"type":"string","enum":["ios","android"],"title":"PushPlatform","description":"Mobile platform for an Expo push token."},"PushTokenResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"platform":{"$ref":"#/components/schemas/PushPlatform"},"is_active":{"type":"boolean","title":"Is Active"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"},"app_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Version"}},"type":"object","required":["id","user_id","platform","is_active"],"title":"PushTokenResponse","description":"Registered push token metadata (token value omitted)."},"RegisterKitSchema":{"properties":{"activation_code":{"type":"string","title":"Activation Code"},"registration_code":{"type":"string","title":"Registration Code"},"fasting":{"type":"boolean","title":"Fasting"},"collection_timestamp":{"type":"string","format":"date-time","title":"Collection Timestamp"},"collection_state":{"type":"string","title":"Collection State"},"accepted_acknowledgement":{"type":"boolean","title":"Accepted Acknowledgement"},"ph_data":{"$ref":"#/components/schemas/RegisterKitSchemaPHData"},"return_flow":{"anyOf":[{"$ref":"#/components/schemas/ReturnFlow"},{"type":"null"}]},"late_return_acknowledgment":{"anyOf":[{"$ref":"#/components/schemas/LateReturnAcknowledgment"},{"type":"null"}]}},"type":"object","required":["activation_code","registration_code","fasting","collection_timestamp","collection_state","accepted_acknowledgement","ph_data"],"title":"RegisterKitSchema"},"RegisterKitSchemaPHData":{"properties":{"sex":{"$ref":"#/components/schemas/Sex"},"date_of_birth":{"type":"string","format":"date","title":"Date Of Birth"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"type":"integer","title":"Phone"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"race":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Race"},"sub_race":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sub Race"}},"type":"object","required":["sex","date_of_birth","email","phone","first_name","last_name"],"title":"RegisterKitSchemaPHData"},"RegistrationDataSchema":{"properties":{"activation_code":{"type":"string","title":"Activation Code"},"acknowledged_terms":{"type":"boolean","title":"Acknowledged Terms"},"is_fasting":{"type":"boolean","title":"Is Fasting"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"gender":{"type":"string","title":"Gender"},"date_of_birth":{"type":"string","format":"date-time","title":"Date Of Birth"},"race":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Race"},"sub_race":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sub Race"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"accepted_responsibility":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Accepted Responsibility","default":false},"acknowledged_news_letter":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Acknowledged News Letter","default":false},"signed_document":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Signed Document","default":false},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},"type":"object","required":["activation_code","acknowledged_terms","is_fasting","first_name","last_name","gender","date_of_birth"],"title":"RegistrationDataSchema","description":"Kit registration prefill payload (portal; shared by requisitions and legacy user-orders)."},"RegistrationOrderLookupValidationSchema":{"properties":{"activation_code":{"type":"string","title":"Activation Code"},"registration_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Code"},"order_id":{"type":"string","title":"Order Id"},"sample_type":{"$ref":"#/components/schemas/SampleTypes"},"collection_method":{"$ref":"#/components/schemas/CollectionMethods"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"activation_flow":{"$ref":"#/components/schemas/KitActivationFlow","default":"UNKNOWN"},"block_registration":{"type":"boolean","title":"Block Registration"},"chatbot_enabled":{"type":"boolean","title":"Chatbot Enabled"},"chatbot_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Chatbot Config"},"devices_count":{"$ref":"#/components/schemas/DevicesCountSchema"},"return_flow":{"anyOf":[{"$ref":"#/components/schemas/ReturnFlow"},{"type":"null"}]}},"type":"object","required":["activation_code","registration_code","order_id","sample_type","collection_method","tags","block_registration","chatbot_enabled","devices_count"],"title":"RegistrationOrderLookupValidationSchema"},"RegistrationResponseSchema":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/RegistrationDataSchema"},{"type":"null"}]}},"type":"object","required":["status","message"],"title":"RegistrationResponseSchema","description":"Envelope for latest registration prefill endpoints."},"ReplaceUserOrderSchema":{"properties":{"new_activation_code":{"type":"string","title":"New Activation Code"}},"type":"object","required":["new_activation_code"],"title":"ReplaceUserOrderSchema"},"RequisitionMessageActionsEnum":{"type":"string","enum":["CREATE_REQUISITION","UPDATE_REQUISITION_STATUS","CREATE_REQUISITION_RESULTS"],"title":"RequisitionMessageActionsEnum"},"RequisitionNoteResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"requisition_id":{"type":"integer","title":"Requisition Id"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"contacted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Contacted"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","requisition_id","created_at"],"title":"RequisitionNoteResponseSchema","description":"Requisition note (portal; shared by requisitions and legacy user-orders)."},"RequisitionResultSchema":{"properties":{"requisition_id":{"type":"integer","title":"Requisition Id"},"report_filename":{"type":"string","title":"Report Filename"},"samples":{"items":{"$ref":"#/components/schemas/SampleResultSchema"},"type":"array","title":"Samples"}},"type":"object","required":["requisition_id","report_filename","samples"],"title":"RequisitionResultSchema"},"RequisitionSchema":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/RequisitionStatusEnum"},{"type":"null"}]},"id":{"type":"integer","title":"Id"},"organization":{"type":"string","title":"Organization"},"external_id":{"type":"string","title":"External Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"requisition_notes":{"anyOf":[{"items":{"$ref":"#/components/schemas/RequisitionNoteResponseSchema"},"type":"array"},{"type":"null"}],"title":"Requisition Notes"}},"type":"object","required":["status","id","organization","external_id","created_at","updated_at","reason","requisition_notes"],"title":"RequisitionSchema","description":"Requisition status payload (portal; shared by requisitions and legacy user-orders)."},"RequisitionStatusEnum":{"type":"string","enum":["ORDER_CREATED","MD_APPROVED","MD_REJECT","LAB_ACCEPT","LAB_REJECT","TEST_COMPLETE","ORDER_COMPLETE","ORDER_CANCELLED"],"title":"RequisitionStatusEnum"},"RequisitionWebhookDataSchema":{"properties":{"status":{"$ref":"#/components/schemas/RequisitionsWebhooksStatusEnum"},"action":{"$ref":"#/components/schemas/RequisitionMessageActionsEnum"},"requisition":{"$ref":"#/components/schemas/RequisitionWebhookRequisitionSchema"}},"type":"object","required":["status","action","requisition"],"title":"RequisitionWebhookDataSchema"},"RequisitionWebhookPayloadSchema":{"properties":{"data":{"$ref":"#/components/schemas/RequisitionWebhookDataSchema"},"original_message":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Original Message"}},"type":"object","required":["data","original_message"],"title":"RequisitionWebhookPayloadSchema"},"RequisitionWebhookRequisitionSampleSchema":{"properties":{"sample_id":{"type":"string","title":"Sample Id"}},"additionalProperties":true,"type":"object","required":["sample_id"],"title":"RequisitionWebhookRequisitionSampleSchema"},"RequisitionWebhookRequisitionSchema":{"properties":{"id":{"type":"integer","title":"Id"},"external_id":{"type":"integer","title":"External Id"},"status":{"type":"string","title":"Status"},"samples":{"items":{"$ref":"#/components/schemas/RequisitionWebhookRequisitionSampleSchema"},"type":"array","minItems":1,"title":"Samples"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"collection_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection Location"},"collection_timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection Timestamp"}},"additionalProperties":true,"type":"object","required":["id","external_id","status","samples"],"title":"RequisitionWebhookRequisitionSchema"},"RequisitionsWebhooksStatusEnum":{"type":"string","enum":["SUCCESS","ERROR"],"title":"RequisitionsWebhooksStatusEnum"},"ResultQuerySchema":{"properties":{"requisition_start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Requisition Start Date"},"requisition_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Requisition End Date"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"biomarker_filters":{"anyOf":[{"items":{"$ref":"#/components/schemas/BiomarkerRestrictionsSchema"},"type":"array"},{"type":"null"}],"title":"Biomarker Filters"},"query_selection":{"anyOf":[{"$ref":"#/components/schemas/BiomarkerQueryOperationEnum"},{"type":"null"}],"default":"OR"}},"type":"object","title":"ResultQuerySchema"},"ResultUploadSchema":{"properties":{"results":{"items":{"$ref":"#/components/schemas/BiomarkerResultSchema"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"ResultUploadSchema"},"ReturnFlow":{"type":"string","enum":["DROPOFF","PICKUP","UNKNOWN"],"title":"ReturnFlow","description":"How the patient will send the kit back, chosen on the return-flow step.\n\nUNKNOWN covers records created before the return flow existed, and clients\nthat do not send a choice."},"ReturnLabelSchema":{"properties":{"carrier":{"type":"string","title":"Carrier"},"tracking_number":{"type":"string","title":"Tracking Number"}},"type":"object","required":["carrier","tracking_number"],"title":"ReturnLabelSchema","description":"Carrier and tracking number of a kit's return label."},"ReturnLabelSearchSchema":{"properties":{"tracking_number":{"type":"string","maxLength":64,"minLength":1,"title":"Tracking Number"}},"type":"object","required":["tracking_number"],"title":"ReturnLabelSearchSchema","description":"Tracking number to look up."},"ReturnPickupBuyRequestSchema":{"properties":{"tracking_number":{"type":"string","maxLength":64,"minLength":1,"title":"Tracking Number"},"service":{"type":"string","maxLength":50,"minLength":1,"title":"Service"}},"additionalProperties":false,"type":"object","required":["tracking_number","service"],"title":"ReturnPickupBuyRequestSchema","description":"Request to buy a rate for the pickup of a return label."},"ReturnPickupCancelRequestSchema":{"properties":{"tracking_number":{"type":"string","maxLength":64,"minLength":1,"title":"Tracking Number"}},"additionalProperties":false,"type":"object","required":["tracking_number"],"title":"ReturnPickupCancelRequestSchema","description":"Request to cancel the pickup of a return label."},"ReturnPickupContactRequestSchema":{"properties":{"tracking_number":{"type":"string","maxLength":64,"minLength":1,"title":"Tracking Number"}},"additionalProperties":false,"type":"object","required":["tracking_number"],"title":"ReturnPickupContactRequestSchema","description":"Request for the kit order's contact details behind a return label."},"ReturnPickupContactResponseSchema":{"properties":{"contact":{"anyOf":[{"$ref":"#/components/schemas/PickupContactSchema"},{"type":"null"}]}},"type":"object","title":"ReturnPickupContactResponseSchema","description":"The contact, or null for an anonymous caller or a label with no kit order."},"ReturnPickupCreateRequestSchema":{"properties":{"min_datetime":{"type":"string","format":"date-time","title":"Min Datetime"},"max_datetime":{"type":"string","format":"date-time","title":"Max Datetime"},"address":{"$ref":"#/components/schemas/UserPickupAddressRequestSchema"},"instructions":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Instructions"},"tracking_number":{"type":"string","maxLength":64,"minLength":1,"title":"Tracking Number"}},"additionalProperties":false,"type":"object","required":["min_datetime","max_datetime","address","tracking_number"],"title":"ReturnPickupCreateRequestSchema","description":"Request to create a pickup for the return label with this tracking number.\n\nInherits the window validator and rejects extra fields, so a caller cannot\nchoose the shipment, a reference or is_account_address."},"ReturnPickupGetRequestSchema":{"properties":{"tracking_number":{"type":"string","maxLength":64,"minLength":1,"title":"Tracking Number"},"refresh":{"type":"boolean","title":"Refresh","default":false}},"additionalProperties":false,"type":"object","required":["tracking_number"],"title":"ReturnPickupGetRequestSchema","description":"Request to read the pickup of a return label, optionally synced first."},"ReviewOrderSchema":{"properties":{"status":{"$ref":"#/components/schemas/ReviewOrderStatusEnum"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["status","reason"],"title":"ReviewOrderSchema"},"ReviewOrderStatusEnum":{"type":"string","enum":["MD_APPROVED","MD_REJECT"],"title":"ReviewOrderStatusEnum"},"Roles":{"type":"string","enum":["staff","physician","kit_assembly","coach","developer","endless_health_admin","customer_support"],"title":"Roles"},"SampleDrawContext":{"properties":{"draw_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Draw Id"},"collection_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Collection Timestamp"},"is_timed_series":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Timed Series"},"is_fasting":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Fasting"},"pre_challenge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pre Challenge"},"acute_illness":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Acute Illness"},"dre":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Dre"}},"additionalProperties":false,"type":"object","title":"SampleDrawContext","description":"Observations recorded at the collection of one specimen."},"SampleRejectionSchema":{"properties":{"activation_code":{"type":"string","title":"Activation Code"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["activation_code"],"title":"SampleRejectionSchema"},"SampleResultSchema":{"properties":{"sample_id":{"type":"string","title":"Sample Id"},"results":{"items":{"$ref":"#/components/schemas/BiomarkerResultSchema"},"type":"array","title":"Results"}},"type":"object","required":["sample_id","results"],"title":"SampleResultSchema"},"SampleTypes":{"type":"string","enum":["SERUM_SEPARATOR","SERUM_SEPARATOR_SERUM","SERUM_SEPARATOR_BLOOD","HEPARIN_CAPILLARY_BLOOD","HEPARIN_CAPILLARY_PLASMA","HEPARIN_VENOUS_BLOOD","HEPARIN_VENOUS_PLASMA","EDTA_CAPILLARY_BLOOD","EDTA_CAPILLARY_PLASMA","EDTA_VENOUS_BLOOD","EDTA_VENOUS_PLASMA","UNKNOWN"],"title":"SampleTypes"},"SecureLabReportDownloadSchema":{"properties":{"token":{"type":"string","maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{43}$","title":"Token"},"first_name":{"type":"string","maxLength":100,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":100,"minLength":1,"title":"Last Name"},"date_of_birth":{"type":"string","format":"date","title":"Date Of Birth"}},"type":"object","required":["token","first_name","last_name","date_of_birth"],"title":"SecureLabReportDownloadSchema"},"SendRequisitionSchema":{"properties":{"sample_draw_context":{"additionalProperties":{"$ref":"#/components/schemas/SampleDrawContext"},"type":"object","title":"Sample Draw Context","description":"Draw observations keyed by the specimen ID sent to the lab (the kit order ID for a single sample, or each child activation code)."},"activation_code":{"type":"string","title":"Activation Code"},"collection_location":{"$ref":"#/components/schemas/States"},"collection_timestamp":{"type":"string","format":"date-time","title":"Collection Timestamp"},"requires_md_approval":{"type":"boolean","title":"Requires Md Approval","default":true}},"type":"object","required":["activation_code","collection_location","collection_timestamp"],"title":"SendRequisitionSchema"},"SendTemplateByIdSchema":{"properties":{"template_id":{"type":"integer","title":"Template Id"}},"type":"object","required":["template_id"],"title":"SendTemplateByIdSchema","description":"Request schema for sending an email using a template ID."},"SendTestEmailSchema":{"properties":{"subject":{"type":"string","title":"Subject"},"html_body":{"type":"string","title":"Html Body"}},"type":"object","required":["subject","html_body"],"title":"SendTestEmailSchema"},"SessionCreationRequestSchema":{"properties":{"firebase_token":{"type":"string","title":"Firebase Token"},"locale":{"anyOf":[{"$ref":"#/components/schemas/LocalesEnum"},{"type":"null"}],"default":"en"},"google_credentials":{"anyOf":[{"$ref":"#/components/schemas/GoogleCredentialsSchema"},{"type":"null"}]}},"type":"object","required":["firebase_token"],"title":"SessionCreationRequestSchema"},"SessionNotesSchema-Input":{"properties":{"provider_notes":{"type":"string","title":"Provider Notes"},"action_plan":{"type":"string","title":"Action Plan"},"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"assessment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment"}},"type":"object","required":["provider_notes","action_plan"],"title":"SessionNotesSchema","description":"Schema for session notes containing provider notes and action plan."},"SessionNotesSchema-Output":{"properties":{"provider_notes":{"type":"string","title":"Provider Notes"},"action_plan":{"type":"string","title":"Action Plan"}},"type":"object","required":["provider_notes","action_plan"],"title":"SessionNotesSchema","description":"Schema for session notes containing provider notes and action plan."},"SetTemplateEnabledSchema":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"SetTemplateEnabledSchema","description":"Request schema for setting a template's enabled state."},"Sex":{"type":"string","enum":["MALE","FEMALE"],"title":"Sex"},"ShippingLabelResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"external_kit_order_id":{"type":"integer","title":"External Kit Order Id"},"label_type":{"type":"string","title":"Label Type"},"carrier":{"type":"string","title":"Carrier"},"provider":{"type":"string","title":"Provider"},"tracking_number":{"type":"string","title":"Tracking Number"},"tracking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Url"},"label_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Label Cost"},"downloaded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Downloaded At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","external_kit_order_id","label_type","carrier","provider","tracking_number","created_at","updated_at"],"title":"ShippingLabelResponseSchema","description":"API response for a persisted shipping label row."},"ShippingLabelSchema":{"properties":{"id":{"type":"integer","title":"Id"},"label_type":{"type":"string","title":"Label Type"},"carrier":{"type":"string","title":"Carrier"},"provider":{"type":"string","title":"Provider"},"tracking_number":{"type":"string","title":"Tracking Number"},"tracking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracking Url"}},"type":"object","required":["id","label_type","carrier","provider","tracking_number","tracking_url"],"title":"ShippingLabelSchema"},"ShippingPickupStatus":{"type":"string","enum":["UNKNOWN","SCHEDULED","CANCELED","EXPIRED"],"title":"ShippingPickupStatus"},"SiteCreateSchema":{"properties":{"domain":{"type":"string","title":"Domain"},"name":{"type":"string","title":"Name"},"organization_id":{"type":"integer","title":"Organization Id"}},"type":"object","required":["domain","name","organization_id"],"title":"SiteCreateSchema"},"SiteSchema":{"properties":{"domain":{"type":"string","title":"Domain"},"name":{"type":"string","title":"Name"},"organization_id":{"type":"integer","title":"Organization Id"},"id":{"type":"integer","title":"Id"}},"type":"object","required":["domain","name","organization_id","id"],"title":"SiteSchema"},"SquareCheckoutRequestSchema":{"properties":{"subscription_variation_id":{"type":"string","title":"Subscription Variation Id"},"location_id":{"type":"string","title":"Location Id"},"coupon_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Coupon Id"}},"type":"object","required":["subscription_variation_id","location_id"],"title":"SquareCheckoutRequestSchema"},"SquareCheckoutResponseSchema":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["status","message","data"],"title":"SquareCheckoutResponseSchema"},"SquareCreatedSubscriptionSchema":{"properties":{"subscription_id":{"type":"string","title":"Subscription Id"},"customer_id":{"type":"string","title":"Customer Id"},"location_id":{"type":"string","title":"Location Id"},"plan_variation_id":{"type":"string","title":"Plan Variation Id"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"}},"type":"object","required":["subscription_id","customer_id","location_id","plan_variation_id"],"title":"SquareCreatedSubscriptionSchema"},"States":{"type":"string","enum":["AL","AK","AZ","AR","CA","CO","CT","DC","DE","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"],"title":"States"},"SubscriptionByIdResponseSchema":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionSchema"},{"type":"null"}]}},"type":"object","required":["status","message","data"],"title":"SubscriptionByIdResponseSchema"},"SubscriptionCreationRequestSchema":{"properties":{"user":{"$ref":"#/components/schemas/CustomSubscriptionUserSchema"},"site_id":{"type":"integer","title":"Site Id"},"organization_id":{"type":"integer","title":"Organization Id"},"subscription_details":{"$ref":"#/components/schemas/CustomSubscriptionDetailsSchema"},"send_initial_kit_order":{"type":"boolean","title":"Send Initial Kit Order","default":false},"kit_details":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionKitDetailsSchema"},{"type":"null"}]}},"type":"object","required":["user","site_id","organization_id","subscription_details"],"title":"SubscriptionCreationRequestSchema"},"SubscriptionKitDetailsSchema":{"properties":{"test_panel_id":{"type":"integer","title":"Test Panel Id"},"sample_type":{"$ref":"#/components/schemas/SampleTypes","default":"SERUM_SEPARATOR"},"sample_collection_method":{"$ref":"#/components/schemas/CollectionMethods","default":"ADX_CARD"}},"type":"object","required":["test_panel_id"],"title":"SubscriptionKitDetailsSchema","description":"Test panel and sample / collection options for the kit order created after subscription."},"SubscriptionPlanAdminListResponseSchema":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"data":{"items":{"$ref":"#/components/schemas/SubscriptionPlanAdminSchema"},"type":"array","title":"Data"}},"type":"object","required":["status","message","data"],"title":"SubscriptionPlanAdminListResponseSchema"},"SubscriptionPlanAdminSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"present_at_all_locations":{"type":"boolean","title":"Present At All Locations"}},"type":"object","required":["id","name","present_at_all_locations"],"title":"SubscriptionPlanAdminSchema","description":"Provider-agnostic admin view of a subscription plan and its visibility."},"SubscriptionPlanVisibilityResponseSchema":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"data":{"$ref":"#/components/schemas/SubscriptionPlanAdminSchema"}},"type":"object","required":["status","message","data"],"title":"SubscriptionPlanVisibilityResponseSchema"},"SubscriptionProductsResponseSchema":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Data"}},"type":"object","required":["status","message","data"],"title":"SubscriptionProductsResponseSchema"},"SubscriptionProvider":{"type":"string","enum":["SQUARE","STRIPE"],"title":"SubscriptionProvider"},"SubscriptionResponseSchema":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"data":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionSchema"},{"type":"null"}]}},"type":"object","required":["status","message","data"],"title":"SubscriptionResponseSchema"},"SubscriptionSchema":{"properties":{"subscription_id":{"type":"string","title":"Subscription Id"},"product_id":{"type":"string","title":"Product Id"},"price_id":{"type":"string","title":"Price Id"},"user_id":{"type":"integer","title":"User Id"},"organization_id":{"type":"integer","title":"Organization Id"},"customer_id":{"type":"string","title":"Customer Id"},"type":{"$ref":"#/components/schemas/SubscriptionType"},"provider":{"$ref":"#/components/schemas/SubscriptionProvider"},"current_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Status"},"current_period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","required":["subscription_id","product_id","price_id","user_id","organization_id","customer_id","type","provider"],"title":"SubscriptionSchema"},"SubscriptionSortByEnum":{"type":"string","enum":["NAME","PRICE"],"title":"SubscriptionSortByEnum"},"SubscriptionType":{"type":"string","enum":["HEALTH_COACHING"],"title":"SubscriptionType"},"SuperpanelChildCreationRequest":{"properties":{"display_name":{"type":"string","title":"Display Name"},"sample_type":{"$ref":"#/components/schemas/SampleTypes"},"number_of_backup_devices":{"type":"integer","minimum":0.0,"title":"Number Of Backup Devices","default":0},"lab_credits":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,8}|(?=[\\d.]{1,11}0*$)\\d{0,8}\\.\\d{0,2}0*$)"},{"type":"null"}],"title":"Lab Credits"},"tests":{"items":{"$ref":"#/components/schemas/TestPanelTestCreationRequest"},"type":"array","title":"Tests"},"panel_calculations":{"items":{"$ref":"#/components/schemas/PanelCalculation"},"type":"array","title":"Panel Calculations"}},"type":"object","required":["display_name","sample_type","tests"],"title":"SuperpanelChildCreationRequest"},"SuperpanelChildResponse":{"properties":{"id":{"type":"integer","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"sample_type":{"type":"string","title":"Sample Type"},"collection_method":{"type":"string","title":"Collection Method"},"number_of_backup_devices":{"type":"integer","title":"Number Of Backup Devices"},"tests":{"items":{"$ref":"#/components/schemas/TestPanelTestCreationRequest"},"type":"array","title":"Tests"},"panel_calculations":{"items":{"$ref":"#/components/schemas/PanelCalculation"},"type":"array","title":"Panel Calculations"},"lab_credits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lab Credits","description":"Lab credits per result release. Only present when the credits feature is on."}},"type":"object","required":["id","display_name","sample_type","collection_method","number_of_backup_devices","tests"],"title":"SuperpanelChildResponse"},"SuperpanelCreationRequest":{"properties":{"organization_id":{"type":"integer","title":"Organization Id"},"display_name":{"type":"string","title":"Display Name"},"collection_method":{"$ref":"#/components/schemas/CollectionMethods"},"children":{"items":{"$ref":"#/components/schemas/SuperpanelChildCreationRequest"},"type":"array","title":"Children"},"existing_panel_ids":{"items":{"type":"integer"},"type":"array","title":"Existing Panel Ids","description":"Ids of panels of the organization that become panels of this superpanel instead of being created."}},"type":"object","required":["organization_id","display_name","collection_method"],"title":"SuperpanelCreationRequest"},"SuperpanelResponse":{"properties":{"id":{"type":"integer","title":"Id"},"organization_id":{"type":"integer","title":"Organization Id"},"display_name":{"type":"string","title":"Display Name"},"collection_method":{"type":"string","title":"Collection Method"},"device_count":{"type":"integer","title":"Device Count"},"tests":{"items":{"$ref":"#/components/schemas/TestPanelTestCreationRequest"},"type":"array","title":"Tests"},"panel_calculations":{"items":{"$ref":"#/components/schemas/PanelCalculation"},"type":"array","title":"Panel Calculations"},"children":{"items":{"$ref":"#/components/schemas/SuperpanelChildResponse"},"type":"array","title":"Children"},"lab_credits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lab Credits","description":"Sum of the children's lab credits, or None when any child has none. Only present when the credits feature is on."}},"type":"object","required":["id","organization_id","display_name","collection_method","device_count","tests","children"],"title":"SuperpanelResponse"},"SurveyQuestions":{"properties":{"question":{"type":"string","title":"Question"},"answer":{"type":"string","title":"Answer"}},"type":"object","required":["question","answer"],"title":"SurveyQuestions"},"TemplateVariablesResponse":{"properties":{"template":{"$ref":"#/components/schemas/EmailTemplatesEnum"},"required":{"items":{"type":"string"},"type":"array","title":"Required"},"optional":{"items":{"type":"string"},"type":"array","title":"Optional"}},"type":"object","required":["template","required","optional"],"title":"TemplateVariablesResponse","description":"Response schema for template variables endpoint."},"TestPanelChildSummary":{"properties":{"id":{"type":"integer","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"sample_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Type"},"number_of_backup_devices":{"type":"integer","title":"Number Of Backup Devices"}},"type":"object","required":["id","display_name","number_of_backup_devices"],"title":"TestPanelChildSummary"},"TestPanelCreationRequest":{"properties":{"organization_id":{"type":"integer","title":"Organization Id"},"display_name":{"type":"string","title":"Display Name"},"collection_method":{"$ref":"#/components/schemas/CollectionMethods"},"sample_type":{"$ref":"#/components/schemas/SampleTypes"},"number_of_backup_devices":{"type":"integer","minimum":0.0,"title":"Number Of Backup Devices","default":0},"lab_credits":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,8}|(?=[\\d.]{1,11}0*$)\\d{0,8}\\.\\d{0,2}0*$)"},{"type":"null"}],"title":"Lab Credits"},"tests":{"items":{"$ref":"#/components/schemas/TestPanelTestCreationRequest"},"type":"array","title":"Tests"},"panel_calculations":{"items":{"$ref":"#/components/schemas/PanelCalculation"},"type":"array","title":"Panel Calculations"}},"type":"object","required":["organization_id","display_name","collection_method","sample_type","tests"],"title":"TestPanelCreationRequest"},"TestPanelResponse":{"properties":{"id":{"type":"integer","title":"Id"},"organization_id":{"type":"integer","title":"Organization Id"},"organization_name":{"type":"string","title":"Organization Name"},"display_name":{"type":"string","title":"Display Name"},"active":{"type":"boolean","title":"Active"},"collection_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection Method"},"sample_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Type"},"parent_panel_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Panel Id"},"number_of_backup_devices":{"type":"integer","title":"Number Of Backup Devices"},"device_count":{"type":"integer","title":"Device Count"},"children":{"items":{"$ref":"#/components/schemas/TestPanelChildSummary"},"type":"array","title":"Children"},"tests":{"items":{"$ref":"#/components/schemas/TestPanelTestResponse"},"type":"array","title":"Tests"},"panel_calculations":{"items":{"$ref":"#/components/schemas/PanelCalculation"},"type":"array","title":"Panel Calculations"},"lab_credits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lab Credits","description":"Lab credits per result release. Only present when the credits feature is on."}},"type":"object","required":["id","organization_id","organization_name","display_name","active","number_of_backup_devices","device_count","children","tests"],"title":"TestPanelResponse","description":"Panel shown in the admin Test Panels view; shared by the list and create routes.\n\nlab_credits is present only when the credits feature is on for the panel's\norganization. Serialize with exclude_unset so it is omitted otherwise."},"TestPanelTestCreationRequest":{"properties":{"calculation_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculation Method"},"testosterone_assay":{"anyOf":[{"type":"string","enum":["E402","SCIEX_LC_MS"]},{"type":"null"}],"title":"Testosterone Assay"},"biomarker_id":{"type":"integer","title":"Biomarker Id"},"units_id":{"type":"integer","title":"Units Id"}},"type":"object","required":["biomarker_id","units_id"],"title":"TestPanelTestCreationRequest"},"TestPanelTestResponse":{"properties":{"calculation_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculation Method"},"testosterone_assay":{"anyOf":[{"type":"string","enum":["E402","SCIEX_LC_MS"]},{"type":"null"}],"title":"Testosterone Assay"},"biomarker_id":{"type":"integer","title":"Biomarker Id"},"biomarker_name":{"type":"string","title":"Biomarker Name"},"units_id":{"type":"integer","title":"Units Id"},"units_name":{"type":"string","title":"Units Name"}},"type":"object","required":["biomarker_id","biomarker_name","units_id","units_name"],"title":"TestPanelTestResponse"},"UninterpretedResultSchema":{"properties":{"calculation_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculation Method"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"out_of_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Out Of Range"},"withdrawn":{"type":"boolean","title":"Withdrawn","default":false},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"flag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flag"},"sample_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Id"},"biomarker_id":{"type":"integer","title":"Biomarker Id"},"biomarker_name":{"type":"string","title":"Biomarker Name"},"units":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Units"}},"type":"object","required":["value","out_of_range","biomarker_id","biomarker_name","units"],"title":"UninterpretedResultSchema"},"Units":{"type":"string","enum":["nmol/L","mmol/L","µmol/L","mEq/L","mg/dL","mg/L","g/dL","g/L","%","10^3/µL","10^6/µL","fL","pg","FI","SI","mL/min/1.73 m^2","U/L","U/mL","ng/mL","ng/dL","ng/L","pg/mL","µU/mL","IU/mL","mIU/mL","µIU/mL","µg/dL","µg/L","ratio","unitless","mOsm/kg","SD","10^9/L","(10^9/L)/(mg/dL)","mg/g","(ng/mL)/(g/dL)","%/fL","percentage points","UNKNOWN"],"title":"Units"},"UserBaseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","default":""},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","default":""},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":false},"is_superuser":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Superuser","default":false},"is_staff":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Staff","default":false},"is_physician":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Physician","default":false},"is_kit_assembly":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Kit Assembly","default":false},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"}},"type":"object","required":["id","email","locale"],"title":"UserBaseSchema"},"UserHasResultsResponseSchema":{"properties":{"has_results":{"type":"boolean","title":"Has Results"},"last_tested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Tested At"}},"type":"object","required":["has_results","last_tested_at"],"title":"UserHasResultsResponseSchema"},"UserKitOrderCreateSchema":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"street_address":{"type":"string","title":"Street Address"},"street_address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address 2"},"city":{"type":"string","title":"City"},"state":{"type":"string","title":"State"},"zip_code":{"type":"string","title":"Zip Code"},"phone_number":{"type":"string","title":"Phone Number"},"quantity":{"type":"integer","title":"Quantity"},"accept_newsletter":{"type":"boolean","title":"Accept Newsletter"}},"type":"object","required":["first_name","last_name","street_address","street_address_2","city","state","zip_code","phone_number","quantity","accept_newsletter"],"title":"UserKitOrderCreateSchema"},"UserLocaleEnum":{"type":"string","enum":["en","es"],"title":"UserLocaleEnum"},"UserLocaleUpdateSchema":{"properties":{"locale":{"$ref":"#/components/schemas/UserLocaleEnum"}},"type":"object","required":["locale"],"title":"UserLocaleUpdateSchema"},"UserLoginResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"site_id":{"type":"integer","title":"Site Id"},"organization_identifier":{"type":"string","title":"Organization Identifier"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"is_superuser":{"type":"boolean","title":"Is Superuser","default":false},"roles":{"items":{"type":"string"},"type":"array","title":"Roles","default":[]},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","default":[]},"is_staff":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Staff","default":false},"is_physician":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Physician","default":false},"is_kit_assembly":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Kit Assembly","default":false},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"},"has_pending_token":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Pending Token","default":false},"features":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Features"}},"type":"object","required":["id","email","site_id","organization_identifier","first_name","last_name","locale"],"title":"UserLoginResponseSchema"},"UserMobileLoginResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"site_id":{"type":"integer","title":"Site Id"},"organization_identifier":{"type":"string","title":"Organization Identifier"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"is_superuser":{"type":"boolean","title":"Is Superuser","default":false},"roles":{"items":{"type":"string"},"type":"array","title":"Roles","default":[]},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","default":[]},"is_staff":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Staff","default":false},"is_physician":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Physician","default":false},"is_kit_assembly":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Kit Assembly","default":false},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"},"has_pending_token":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Pending Token","default":false},"features":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Features"},"access_token":{"type":"string","title":"Access Token"}},"type":"object","required":["id","email","site_id","organization_identifier","first_name","last_name","locale","access_token"],"title":"UserMobileLoginResponseSchema"},"UserOrderCreationSchema":{"properties":{"activation_code":{"type":"string","title":"Activation Code"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"gender":{"type":"string","title":"Gender"},"date_of_birth":{"type":"string","title":"Date Of Birth"},"is_fasting":{"type":"boolean","title":"Is Fasting"},"collection_location":{"$ref":"#/components/schemas/States"},"collection_timestamp":{"type":"string","format":"date-time","title":"Collection Timestamp"},"acknowledged_terms":{"type":"boolean","title":"Acknowledged Terms","default":false},"accepted_responsibility":{"type":"boolean","title":"Accepted Responsibility","default":false},"acknowledged_news_letter":{"type":"boolean","title":"Acknowledged News Letter","default":false},"signed_document":{"type":"boolean","title":"Signed Document","default":false},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"race":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Race"},"sub_race":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sub Race"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"family_history":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Family History"},"previous_diagnosis":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Previous Diagnosis"},"insurance_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insurance Provider"},"contact_about_results":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Contact About Results"},"consent_parent_first_last_names":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consent Parent First Last Names"},"guardian_relationship":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guardian Relationship"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"street_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address"},"street_address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address 2"},"survey":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SurveyQuestions"},"type":"object"},{"type":"null"}],"title":"Survey"},"from_admin_client":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"From Admin Client"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"}},"type":"object","required":["activation_code","first_name","last_name","gender","date_of_birth","is_fasting","collection_location","collection_timestamp"],"title":"UserOrderCreationSchema"},"UserOrderQueryStatusSchema":{"type":"string","enum":["TEST_REGISTERED","TEST_PROCESSING","REJECTED","REJECTED_REORDERED","RESULT_RELEASED","ORDER_CANCELLED"],"title":"UserOrderQueryStatusSchema"},"UserOrderResultSchema":{"properties":{"order_lookup_id":{"type":"integer","title":"Order Lookup Id"},"requisition_id":{"type":"integer","title":"Requisition Id"},"activation_code":{"type":"string","title":"Activation Code"},"registration_date":{"type":"string","format":"date-time","title":"Registration Date"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"status":{"type":"string","title":"Status"},"sample_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Type"},"test_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string"},{"type":"null"}],"title":"Test Date"},"rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejection Reason"},"md_approved":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Md Approved"},"lab_report_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lab Report Filename"},"return_tracking_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Tracking Number"},"return_tracking_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Tracking Url"},"return_carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Carrier"},"return_kit_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Kit Status"},"status_updated_on":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string"},{"type":"null"}],"title":"Status Updated On"},"has_replacement":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Replacement"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","required":["order_lookup_id","requisition_id","activation_code","registration_date","status"],"title":"UserOrderResultSchema"},"UserOrdersResponseSchema":{"properties":{"total":{"type":"integer","title":"Total"},"data":{"items":{"$ref":"#/components/schemas/UserOrderResultSchema"},"type":"array","title":"Data"},"page_size":{"type":"integer","title":"Page Size"},"current_page":{"type":"integer","title":"Current Page"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["total","data","page_size","current_page","total_pages"],"title":"UserOrdersResponseSchema"},"UserPickupAddressRequestSchema":{"properties":{"company_name":{"anyOf":[{"type":"string","maxLength":35},{"type":"null"}],"title":"Company Name"},"name":{"anyOf":[{"type":"string","maxLength":35},{"type":"null"}],"title":"Name"},"street_address":{"type":"string","maxLength":35,"minLength":1,"title":"Street Address"},"street_address_2":{"anyOf":[{"type":"string","maxLength":35},{"type":"null"}],"title":"Street Address 2"},"city":{"type":"string","maxLength":30,"minLength":1,"title":"City"},"state":{"type":"string","title":"State"},"zip_code":{"type":"string","pattern":"^\\d{5}(-\\d{4})?$","title":"Zip Code"},"country":{"type":"string","const":"US","title":"Country","default":"US"},"phone":{"type":"string","maxLength":20,"minLength":1,"title":"Phone"}},"additionalProperties":false,"type":"object","required":["street_address","city","state","zip_code","phone"],"title":"UserPickupAddressRequestSchema","description":"A pickup address sent by a portal user, bounded by UPS address limits.\n\nRequest only: stored rows and responses use PickupAddressSchema, so addresses\nsaved before these limits still read back."},"UserResultWithRangesSchema":{"properties":{"calculation_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculation Method"},"biomarker_id":{"type":"integer","title":"Biomarker Id"},"biomarker_name":{"type":"string","title":"Biomarker Name"},"value":{"type":"number","title":"Value"},"sample_id":{"type":"string","title":"Sample Id"},"ranges":{"items":{"$ref":"#/components/schemas/FlaggedRange"},"type":"array","title":"Ranges"},"current_range":{"$ref":"#/components/schemas/FlaggedRange"}},"type":"object","required":["biomarker_id","biomarker_name","value","sample_id","ranges","current_range"],"title":"UserResultWithRangesSchema"},"UserResultsResponseSchema":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"order":{"anyOf":[{"$ref":"#/components/schemas/OrderSchema"},{"type":"null"}]},"data":{"items":{"$ref":"#/components/schemas/UserResultWithRangesSchema"},"type":"array","title":"Data"},"uninterpreted_biomarkers_data":{"items":{"$ref":"#/components/schemas/UninterpretedResultSchema"},"type":"array","title":"Uninterpreted Biomarkers Data"}},"type":"object","required":["status","message","order","data"],"title":"UserResultsResponseSchema"},"UserSchema":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","default":""},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","default":""},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":false},"is_superuser":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Superuser","default":false},"is_staff":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Staff","default":false},"is_physician":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Physician","default":false},"is_kit_assembly":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Kit Assembly","default":false},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"},"site_id":{"type":"integer","title":"Site Id"},"organization_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organization Id"},"is_authorized":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Authorized","default":false},"roles":{"items":{"type":"string"},"type":"array","title":"Roles","default":[]},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions","default":[]},"date_joined":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Joined"}},"type":"object","required":["id","email","locale","site_id"],"title":"UserSchema"},"UserShippingPickupDetailResponseSchema":{"properties":{"pickup":{"$ref":"#/components/schemas/UserShippingPickupResponseSchema"},"rates":{"anyOf":[{"items":{"$ref":"#/components/schemas/UserShippingPickupRateSchema"},"type":"array"},{"type":"null"}],"title":"Rates"}},"type":"object","required":["pickup"],"title":"UserShippingPickupDetailResponseSchema","description":"A user's pickup, with rates when created or refreshed."},"UserShippingPickupRateSchema":{"properties":{"carrier":{"type":"string","title":"Carrier"},"service":{"type":"string","title":"Service"},"rate":{"type":"string","title":"Rate"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["carrier","service","rate","currency"],"title":"UserShippingPickupRateSchema","description":"One pickup option; EasyPost's rate id is left out (buy is keyed by service)."},"UserShippingPickupResponseSchema":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"status":{"$ref":"#/components/schemas/ShippingPickupStatus"},"confirmation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmation"},"service":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service"},"cost":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Cost"},"min_datetime":{"type":"string","format":"date-time","title":"Min Datetime"},"max_datetime":{"type":"string","format":"date-time","title":"Max Datetime"},"address":{"anyOf":[{"$ref":"#/components/schemas/PickupAddressSchema"},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"canceled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Canceled At"},"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","min_datetime","max_datetime","address","created_at","updated_at"],"title":"UserShippingPickupResponseSchema","description":"A pickup as a portal user sees it, without EasyPost or carrier account ids.\n\n``address`` and ``id`` are null for callers without a session."},"UserUpdateSchema":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"}},"type":"object","required":["first_name","last_name"],"title":"UserUpdateSchema"},"ValidateTemplateRequest":{"properties":{"template":{"$ref":"#/components/schemas/EmailTemplatesEnum"},"html_body":{"type":"string","title":"Html Body"}},"type":"object","required":["template","html_body"],"title":"ValidateTemplateRequest","description":"Request schema for validating HTML against a template's required variables."},"ValidateTemplateResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"missing_required":{"items":{"type":"string"},"type":"array","title":"Missing Required","default":[]},"missing_assets":{"items":{"type":"string"},"type":"array","title":"Missing Assets","default":[]},"found_variables":{"items":{"type":"string"},"type":"array","title":"Found Variables","default":[]},"expected_required":{"items":{"type":"string"},"type":"array","title":"Expected Required","default":[]},"expected_optional":{"items":{"type":"string"},"type":"array","title":"Expected Optional","default":[]}},"type":"object","required":["valid"],"title":"ValidateTemplateResponse","description":"Response schema for template validation."},"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"},"VerificationEmailRequestSchema":{"properties":{"activation_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activation Code"},"is_mass_testing":{"type":"boolean","title":"Is Mass Testing","default":false}},"type":"object","title":"VerificationEmailRequestSchema"},"VerifyEmailRequestSchema":{"properties":{"token":{"type":"string","title":"Token"},"is_mass_testing":{"type":"boolean","title":"Is Mass Testing","default":false}},"type":"object","required":["token"],"title":"VerifyEmailRequestSchema"},"WebhookDispatchRequest":{"properties":{"event_id":{"type":"string","title":"Event Id"},"event_type":{"$ref":"#/components/schemas/WebhookEventType"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"version":{"type":"string","title":"Version"},"event_data":{"additionalProperties":true,"type":"object","title":"Event Data"},"organization_id":{"type":"integer","title":"Organization Id"}},"type":"object","required":["event_id","event_type","occurred_at","version","event_data","organization_id"],"title":"WebhookDispatchRequest"},"WebhookDispatchResultResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true}},"type":"object","title":"WebhookDispatchResultResponse"},"WebhookEventResponse":{"properties":{"event_id":{"type":"string","title":"Event Id"},"organization_id":{"type":"integer","title":"Organization Id"},"event_type":{"$ref":"#/components/schemas/WebhookEventType"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"version":{"type":"string","title":"Version"},"event_data":{"additionalProperties":true,"type":"object","title":"Event Data"}},"type":"object","required":["event_id","organization_id","event_type","occurred_at","version","event_data"],"title":"WebhookEventResponse"},"WebhookEventType":{"type":"string","enum":["order.created","kit.linked","kit.shipped","kit.delivered","kit.activated","lab.processing","results.ready","sample.rejected"],"title":"WebhookEventType","description":"Standard webhook event types"}},"securitySchemes":{"X-API-KEY":{"type":"apiKey","in":"header","name":"X-API-KEY"},"X-E2E-Key":{"type":"apiKey","in":"header","name":"X-E2E-Key"}}}}