{"service":"opendoc-protocol","version":"1.0.0-headless","documentation":"https://docs.opendoc.com","openapi":"/protocol/openapi.json","agent_self_serve":{"sandbox_ready":true,"live_ready":false,"signup":"POST /developers/signup — returns a sandbox API key instantly (no approval)","sandbox":"sandbox keys transact against a synthetic provider with simulated (non-live) payments; no real money, no real PHI","how_to_go_live":"request a live key from OpenDoc; workforce-granted only","how_agents_get_authority":"a patient-granted agent token for real transactions (browser grant ceremony); see AGENT_HEADLESS_BOOTSTRAP.md","contact":"https://docs.opendoc.com"},"rate_limits":{"enforced":"per agent-token id (developer keys per key id; source IP for public discovery)","on_limit":{"status":429,"error_code":"rate_limited","retry_after_header":"Retry-After (seconds until the bucket refills)","retry_after_body_field":"error.retry_after_seconds"},"budget_introspection":"GET /agent-tokens/me (effectiveRemainingCents)"},"capabilities":{"mcp":true,"events":{"sse":true,"webhooks":true},"transaction_state_machine":"S0-S8","identity_assurance_levels":["IA0","IA1","IA2"],"consent_layers":2,"cash_price_invariant":true,"sure_price":true,"finality_sla":"/sla","anti_kickback_enforcement":true,"mass_revocation":true,"concentration_ceiling":0.25,"concentration_warning":0.2,"concentration_window_days":90,"concentration_min_window_commits":200,"concentration_denominator":"all_committed_transactions","concentration_enforced_at":"grant","attenuated_delegation":true,"standing_mandates":true,"simulate":true,"signed_price_lock":true,"signed_receipt":true,"jwks":"/.well-known/opendoc-protocol/jwks.json"},"auth":{"oidc":{"scheme":"Bearer JWT","status":"durable_identity_input","documentation":"Keycloak or another approved on-prem OIDC provider authenticates identity only; OpenDoc protocol authorization remains database-owned."},"agent_token":{"scheme":"Bearer","grant_path":"POST /agent-tokens","documentation":"Patient grants a scoped token via the marketplace UI or API. Agents may mint attenuated child tokens via POST /agent-tokens/children."}},"agent_ecosystems":{"registration":"workforce-managed registry (POST /admin/agent-ecosystems)","verified_when":"a token minted with an ecosystemId matching a registered active slug carries ecosystemVerified=true (echoed on POST /agent-tokens and GET /agent-tokens/me)","unregistered":"unregistered ecosystemIds are still accepted (back-compat) — their tokens carry ecosystemVerified=false","note":"the mass-revocation (Doctrine Amendment 4) and 25% concentration-ceiling (Amendment 3) guarantees are strongest for REGISTERED ecosystems: a self-declared id can be abandoned or forked at will, a registered identity cannot"},"events":{"types":["transaction.state_changed","transaction.escrowed","transaction.service_completed","transaction.funds_released","transaction.disputed","provider.availability_changed","provider.price_changed","provider.trust_state_changed","health_key.state_changed","receipt.finalized","market.threshold_reached","agent_ecosystem.revoked"],"sse_path":"/events","webhook_path":"/event-subscriptions","delivery":"at-least-once","dedupe_header":"x-opendoc-event-id","retry_schedule":["30s","2m","10m","1h","6h","24h"],"signature_header":"x-opendoc-signature","signature_scheme":"t=<unix_seconds>,v1=<hmac_sha256_hex(secret, t + \".\" + rawBody)>","signature_algorithm":"HMAC-SHA256-hex","legacy_signature_header":"x-opendoc-signature-legacy","deliveries_path":"/event-subscriptions/:id/deliveries","redeliver_path":"/event-subscriptions/:id/deliveries/:deliveryId/redeliver"},"permissions":["BOOK","CANCEL","READ_BOOKINGS","READ_TRANSACTIONS","READ_PROFILE","READ_CONSENT","READ_RECEIPTS","READ_HEALTH_KEY","READ_HEALTH_RECORDS","manage_catalog","manage_availability","view_bookings","submit_pos","manage_ehr_provider_link","accept_visit_outcomes"],"consents":{"layer_1":[{"key":"data_tier_2","description":"Read clinical-detail data tier"},{"key":"data_tier_3","description":"Read full data tier (PHI breadth)"}],"layer_2":[{"key":"BOOK","description":"Allow agents to complete bookings"},{"key":"CANCEL","description":"Allow agents to cancel bookings"},{"key":"GRANT_AGENT_TOKEN","description":"Allow granting agent tokens"},{"key":"SHARE_RECEIPT_INSURANCE","description":"Allow exporting insurance-format receipts"},{"key":"SHARE_PROJECTION","description":"Allow sharing visit projection"},{"key":"DISPUTE","description":"Allow filing disputes on patient's behalf"},{"key":"SHARE_RECORDS","description":"Allow minting a patient→recipient record-share access grant"},{"key":"LINK_EMPLOYER_BENEFIT","description":"Link this account to an employer funding benefit (scoped per employer)"}]},"error_shape":{"example":{"error":{"code":"authentication_required","message":"agent token required","correlationId":"abc123-..."}},"codes":["bad_request","authentication_required","payment_required","forbidden","not_found","conflict","gone","unprocessable_entity","rate_limited","internal_error","service_unavailable"]},"tools":[{"name":"find_care","toolset":"discovery","method":"POST","path":"/find-care","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"The one next-step function every OpenDoc door calls (ADR 0212 rule 14). Give it the patient's words and whatever you already know — a place, an age, a referral — and it returns ONE decision: the safety verdict, whether they named a thing or described a situation, the target (a service or a specialty, as codes), ranked candidates with their fulfillment tier, and a single question only when one is genuinely earned. It returns DATA and phrases nothing; safety is computed from the words and cannot be overridden by anything the caller asserts.","contract":{"request":{"def":{"type":"object","shape":{"words":{"def":{"type":"string","checks":[{},{},{}]},"type":"string"},"context":{"def":{"type":"optional","innerType":{"def":{"type":"object","shape":{"referral":{"def":{"type":"optional","innerType":{"def":{"type":"object","shape":{"service":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"},"from":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"}}},"type":"object"}},"type":"optional"},"ageYears":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{},{}]},"type":"number","isFinite":true}},"type":"optional"},"sex":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"male":"male","female":"female"}},"type":"enum","enum":{"male":"male","female":"female"},"options":["male","female"]}},"type":"optional"},"pregnant":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"}}},"type":"object"}},"type":"optional"},"location":{"def":{"type":"optional","innerType":{"def":{"type":"object","shape":{"state":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"},"city":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"},"postalCode":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"},"latitude":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{},{}]},"type":"number","isFinite":true}},"type":"optional"},"longitude":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{},{}]},"type":"number","isFinite":true}},"type":"optional"}}},"type":"object"}},"type":"optional"},"answer":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"questionId":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"selectedOptionIds":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"string","checks":[{}]},"type":"string"},"checks":[{}]},"type":"array","element":{"def":{"type":"string","checks":[{}]},"type":"string"}}},"type":"optional"},"freeText":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"nullable"}},"type":"optional"}}},"type":"object"},"checks":[{}]},"type":"array","element":{"def":{"type":"object","shape":{"questionId":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"selectedOptionIds":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"string","checks":[{}]},"type":"string"},"checks":[{}]},"type":"array","element":{"def":{"type":"string","checks":[{}]},"type":"string"}}},"type":"optional"},"freeText":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"nullable"}},"type":"optional"}}},"type":"object"}}},"type":"optional"},"search":{"def":{"type":"optional","innerType":{"def":{"type":"object","shape":{"anyDistance":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"rankingProfile":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"default_patient":"default_patient","near_me":"near_me","specialty":"specialty","procedure_service":"procedure_service","instant_book_first":"instant_book_first","price_sensitive":"price_sensitive","provider_name_exact":"provider_name_exact","admin_debug":"admin_debug"}},"type":"enum","enum":{"default_patient":"default_patient","near_me":"near_me","specialty":"specialty","procedure_service":"procedure_service","instant_book_first":"instant_book_first","price_sensitive":"price_sensitive","provider_name_exact":"provider_name_exact","admin_debug":"admin_debug"},"options":["default_patient","near_me","specialty","procedure_service","instant_book_first","price_sensitive","provider_name_exact","admin_debug"]}},"type":"optional"},"radiusMiles":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{},{}]},"type":"number","isFinite":true}},"type":"optional"},"minPriceCents":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true}},"type":"optional"},"maxPriceCents":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true}},"type":"optional"},"confirmedPriceOnly":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"bookableOnly":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"instantBookOnly":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"hasOpenAvailability":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"minProfileQuality":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{},{}]},"type":"number","isFinite":true}},"type":"optional"},"serviceType":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"modality":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"in_person":"in_person","virtual":"virtual"}},"type":"enum","enum":{"in_person":"in_person","virtual":"virtual"},"options":["in_person","virtual"]}},"type":"optional"}}},"type":"object"}},"type":"optional"},"limit":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{},{}]},"type":"number","isFinite":true}},"type":"optional"},"entityType":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"individual":"individual","organization":"organization","all":"all"}},"type":"enum","enum":{"individual":"individual","organization":"organization","all":"all"},"options":["individual","organization","all"]}},"type":"optional"},"surface":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"web":"web","ios":"ios","sms":"sms","agent":"agent"}},"type":"enum","enum":{"web":"web","ios":"ios","sms":"sms","agent":"agent"},"options":["web","ios","sms","agent"]}},"type":"optional"},"sessionId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{},{},{}]},"type":"string"}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"version":{"def":{"type":"literal","values":["find-care-v1"]},"type":"literal","values":{}},"decisionId":{"def":{"type":"string"},"type":"string"},"door":{"def":{"type":"enum","entries":{"search_bar":"search_bar","sms":"sms","agent":"agent"}},"type":"enum","enum":{"search_bar":"search_bar","sms":"sms","agent":"agent"},"options":["search_bar","sms","agent"]},"words":{"def":{"type":"string"},"type":"string"},"safety":{"def":{"type":"object","shape":{"level":{"def":{"type":"enum","entries":{"none":"none","urgent":"urgent","emergency":"emergency"}},"type":"enum","enum":{"none":"none","urgent":"urgent","emergency":"emergency"},"options":["none","urgent","emergency"]},"surface":{"def":{"type":"enum","entries":{"normal_results":"normal_results","urgent_guidance":"urgent_guidance","er_guidance":"er_guidance"}},"type":"enum","enum":{"normal_results":"normal_results","urgent_guidance":"urgent_guidance","er_guidance":"er_guidance"},"options":["normal_results","urgent_guidance","er_guidance"]},"reason":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"escalation":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"providersSuppressed":{"def":{"type":"boolean"},"type":"boolean"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"intent":{"def":{"type":"enum","entries":{"named":"named","described":"described"}},"type":"enum","enum":{"named":"named","described":"described"},"options":["named","described"]},"kind":{"def":{"type":"enum","entries":{"named_intent_shown":"named_intent_shown","first_visit_routed":"first_visit_routed","confirmation_asked":"confirmation_asked","directory_request":"directory_request","safety_guidance":"safety_guidance","unknown_option":"unknown_option"}},"type":"enum","enum":{"named_intent_shown":"named_intent_shown","first_visit_routed":"first_visit_routed","confirmation_asked":"confirmation_asked","directory_request":"directory_request","safety_guidance":"safety_guidance","unknown_option":"unknown_option"},"options":["named_intent_shown","first_visit_routed","confirmation_asked","directory_request","safety_guidance","unknown_option"]},"target":{"def":{"type":"object","shape":{"specialtyCode":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"subspecialtyCode":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"label":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"hsoId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"location":{"def":{"type":"object","shape":{"resolved":{"def":{"type":"boolean"},"type":"boolean"},"confirmed":{"def":{"type":"boolean"},"type":"boolean"},"label":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"candidates":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"npi":{"def":{"type":"string"},"type":"string"},"providerId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"name":{"def":{"type":"string"},"type":"string"},"photoUrl":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"tier":{"def":{"type":"enum","entries":{"book_now":"book_now","quote":"quote","request":"request"}},"type":"enum","enum":{"book_now":"book_now","quote":"quote","request":"request"},"options":["book_now","quote","request"]},"providerHsoId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"scpId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"hsoId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"hsoSlug":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"canonicalServiceKey":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"serviceName":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"bookabilityMode":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"actionMode":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"availabilitySlotId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"availabilityStartsAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"availabilityEndsAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"currency":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"checkedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"validUntil":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"specialty":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"city":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"state":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"postalCode":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"priceCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"type":"nullable"},"confirmationSlaMinutes":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"type":"nullable"},"distanceMiles":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"type":"nullable"},"latitude":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"type":"nullable"},"longitude":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"npi":{"def":{"type":"string"},"type":"string"},"providerId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"name":{"def":{"type":"string"},"type":"string"},"photoUrl":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"tier":{"def":{"type":"enum","entries":{"book_now":"book_now","quote":"quote","request":"request"}},"type":"enum","enum":{"book_now":"book_now","quote":"quote","request":"request"},"options":["book_now","quote","request"]},"providerHsoId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"scpId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"hsoId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"hsoSlug":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"canonicalServiceKey":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"serviceName":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"bookabilityMode":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"actionMode":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"availabilitySlotId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"availabilityStartsAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"availabilityEndsAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"currency":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"checkedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"validUntil":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"specialty":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"city":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"state":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"postalCode":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"priceCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"type":"nullable"},"confirmationSlaMinutes":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"type":"nullable"},"distanceMiles":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"type":"nullable"},"latitude":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"type":"nullable"},"longitude":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"question":{"def":{"type":"nullable","innerType":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"prompt":{"def":{"type":"string"},"type":"string"},"reason":{"def":{"type":"enum","entries":{"first_visit":"first_visit","which":"which"}},"type":"enum","enum":{"first_visit":"first_visit","which":"which"},"options":["first_visit","which"]},"options":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"label":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"label":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"nullable"},"widened":{"def":{"type":"null"},"type":"null"},"trace":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"meta":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"search","toolset":"discovery","method":"GET","path":"/search","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"CRE-routed semantic search across providers + HSOs. Returns individual clinicians by default; pass entityType=organization|all to include practice/organization NPIs.","contract":{"query":{"def":{"type":"object","shape":{"q":{"def":{"type":"default","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"defaultValue":""},"type":"default"},"handoff":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"},"anyDistance":{"def":{"type":"optional","innerType":{"def":{"type":"pipe","in":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]},"out":{"def":{"type":"transform"},"type":"transform"}},"type":"pipe","in":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]},"out":{"def":{"type":"transform"},"type":"transform"}}},"type":"optional"},"resetFilters":{"def":{"type":"optional","innerType":{"def":{"type":"pipe","in":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]},"out":{"def":{"type":"transform"},"type":"transform"}},"type":"pipe","in":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]},"out":{"def":{"type":"transform"},"type":"transform"}}},"type":"optional"},"resetLocation":{"def":{"type":"optional","innerType":{"def":{"type":"pipe","in":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]},"out":{"def":{"type":"transform"},"type":"transform"}},"type":"pipe","in":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]},"out":{"def":{"type":"transform"},"type":"transform"}}},"type":"optional"},"followUpAnswers":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"},"geo":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"lat":{"def":{"type":"optional","innerType":{"def":{"type":"number","coerce":true,"checks":[{},{}]},"type":"number","isFinite":true}},"type":"optional"},"lng":{"def":{"type":"optional","innerType":{"def":{"type":"number","coerce":true,"checks":[{},{}]},"type":"number","isFinite":true}},"type":"optional"},"radiusMiles":{"def":{"type":"optional","innerType":{"def":{"type":"number","coerce":true,"checks":[{},{}]},"type":"number","isFinite":true}},"type":"optional"},"state":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"},"postalCode":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"zip":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"minPriceCents":{"def":{"type":"optional","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true}},"type":"optional"},"maxPriceCents":{"def":{"type":"optional","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true}},"type":"optional"},"confirmedPriceOnly":{"def":{"type":"optional","innerType":{"def":{"type":"pipe","in":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]},"out":{"def":{"type":"transform"},"type":"transform"}},"type":"pipe","in":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]},"out":{"def":{"type":"transform"},"type":"transform"}}},"type":"optional"},"bookableOnly":{"def":{"type":"optional","innerType":{"def":{"type":"pipe","in":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]},"out":{"def":{"type":"transform"},"type":"transform"}},"type":"pipe","in":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]},"out":{"def":{"type":"transform"},"type":"transform"}}},"type":"optional"},"instantBookOnly":{"def":{"type":"optional","innerType":{"def":{"type":"pipe","in":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]},"out":{"def":{"type":"transform"},"type":"transform"}},"type":"pipe","in":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]},"out":{"def":{"type":"transform"},"type":"transform"}}},"type":"optional"},"hasOpenAvailability":{"def":{"type":"optional","innerType":{"def":{"type":"pipe","in":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]},"out":{"def":{"type":"transform"},"type":"transform"}},"type":"pipe","in":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]},"out":{"def":{"type":"transform"},"type":"transform"}}},"type":"optional"},"minProfileQuality":{"def":{"type":"optional","innerType":{"def":{"type":"number","coerce":true,"checks":[{},{}]},"type":"number","isFinite":true}},"type":"optional"},"serviceType":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"modality":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"in_person":"in_person","virtual":"virtual"}},"type":"enum","enum":{"in_person":"in_person","virtual":"virtual"},"options":["in_person","virtual"]}},"type":"optional"},"specialty":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"entityType":{"def":{"type":"default","innerType":{"def":{"type":"enum","entries":{"individual":"individual","organization":"organization","all":"all"}},"type":"enum","enum":{"individual":"individual","organization":"organization","all":"all"},"options":["individual","organization","all"]},"defaultValue":"individual"},"type":"default"},"rankingProfile":{"def":{"type":"default","innerType":{"def":{"type":"enum","entries":{"default_patient":"default_patient","near_me":"near_me","specialty":"specialty","procedure_service":"procedure_service","instant_book_first":"instant_book_first","price_sensitive":"price_sensitive","provider_name_exact":"provider_name_exact","admin_debug":"admin_debug"}},"type":"enum","enum":{"default_patient":"default_patient","near_me":"near_me","specialty":"specialty","procedure_service":"procedure_service","instant_book_first":"instant_book_first","price_sensitive":"price_sensitive","provider_name_exact":"provider_name_exact","admin_debug":"admin_debug"},"options":["default_patient","near_me","specialty","procedure_service","instant_book_first","price_sensitive","provider_name_exact","admin_debug"]},"defaultValue":"default_patient"},"type":"default"},"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{},{}]},"type":"number","isFinite":true},"defaultValue":25},"type":"default"},"sessionId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{},{},{}]},"type":"string"}},"type":"optional"}},"checks":[{"def":{"type":"custom","check":"custom","path":["q"]},"type":"custom"}]},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"serviceOffers":{"def":{"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"pagination":{"def":{"type":"object","shape":{"limit":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"offset":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"total":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"hasMore":{"def":{"type":"boolean"},"type":"boolean"}}},"type":"object"},"meta":{"def":{"type":"object","shape":{"query":{"def":{"type":"string"},"type":"string"},"geo":{"def":{"type":"string"},"type":"string"},"entityType":{"def":{"type":"enum","entries":{"individual":"individual","organization":"organization","all":"all"}},"type":"enum","enum":{"individual":"individual","organization":"organization","all":"all"},"options":["individual","organization","all"]},"rankingProfile":{"def":{"type":"string"},"type":"string"},"intent":{"def":{"type":"string"},"type":"string"},"tier":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"confidence":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"type":"nullable"}},"type":"optional"},"resolvedSpecialty":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"resolvedSubspecialty":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"purchasableServiceOfferCount":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"resolution":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"clarify":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"nullable"}},"type":"optional"},"coverage":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"nullable"}},"type":"optional"},"safety":{"def":{"type":"optional","innerType":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},{"name":"clinical_route","toolset":"discovery","method":"GET","path":"/clinical-route","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"Natural-language clinical routing: symptom/diagnosis → service lens → eligible specialists, with deterministic ER/urgent safety intercepts. SUPERSEDED by find_care, which decides this and the name, catalog and sub-specialty lanes in one call.","contract":{"query":{"def":{"type":"object","shape":{"q":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"state":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"},"lat":{"def":{"type":"optional","innerType":{"def":{"type":"number","coerce":true,"checks":[{},{}]},"type":"number","isFinite":true}},"type":"optional"},"lng":{"def":{"type":"optional","innerType":{"def":{"type":"number","coerce":true,"checks":[{},{}]},"type":"number","isFinite":true}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"query":{"def":{"type":"string"},"type":"string"},"tier":{"def":{"type":"string"},"type":"string"},"specialty":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"subspecialty":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"serviceLens":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"surface":{"def":{"type":"enum","entries":{"normal_results":"normal_results","urgent_guidance":"urgent_guidance","er_guidance":"er_guidance"}},"type":"enum","enum":{"normal_results":"normal_results","urgent_guidance":"urgent_guidance","er_guidance":"er_guidance"},"options":["normal_results","urgent_guidance","er_guidance"]},"confidence":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true},"providers":{"def":{"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"providerCount":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"alternatives":{"def":{"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"meta":{"def":{"type":"object","shape":{"query":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string"}},"type":"optional"},"intent":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string"}},"type":"optional"},"tier":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"confidence":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"type":"nullable"}},"type":"optional"},"resolvedSpecialty":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"resolvedSubspecialty":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}},"deprecated":true,"deprecation":{"since":"2026-09-05","link":"https://api.opendoc.com/protocol/openapi.json#/paths/~1find-care"}},{"name":"care_lane_care_plan","toolset":"discovery","method":"GET","path":"/search/care-plan","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"Read-only care-lane care-plan preview: diagnosis/specialty/procedure → provider search, symptom → guided intake, safety → guidance before provider ranking.","contract":{"query":{"def":{"type":"object","shape":{"q":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"followUpAnswers":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"providerSearch":{"def":{"type":"object","shape":{"allowed":{"def":{"type":"boolean"},"type":"boolean"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"followUp":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"meta":{"def":{"type":"object","shape":{"query":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string"}},"type":"optional"},"intent":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string"}},"type":"optional"},"tier":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"confidence":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"type":"nullable"}},"type":"optional"},"resolvedSpecialty":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"resolvedSubspecialty":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"text_concierge_turn","toolset":"discovery","method":"POST","path":"/text-concierge/turn","authority":"public","authRequired":"none","sideEffect":"simulate","signing":"none","description":"Run one OpenDoc Text Concierge turn: model-assisted conversation interpretation with guarded safety/action execution, provider search, office-request collection, and secure booking handoff.","contract":{"request":{"def":{"type":"object","shape":{"message":{"def":{"type":"string","checks":[{},{},{}]},"type":"string"},"session":{"def":{"type":"optional","innerType":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"optional"},"location":{"def":{"type":"optional","innerType":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"optional"},"phoneIdentity":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"session":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"outcome":{"def":{"type":"string"},"type":"string"},"reply":{"def":{"type":"string"},"type":"string"},"suggestedReplies":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"checks":[{},{}]},"type":"array","element":{"def":{"type":"string","checks":[{},{}]},"type":"string"}}},"type":"optional"},"messages":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"secureLinkRequired":{"def":{"type":"boolean"},"type":"boolean"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"list_hsos","toolset":"discovery","method":"GET","path":"/hsos","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"Catalog list with min-price aggregate.","contract":{"query":{"def":{"type":"object","shape":{"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{},{}]},"type":"number","isFinite":true},"defaultValue":50},"type":"default"},"offset":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true},"defaultValue":0},"type":"default"},"category":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"q":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"specialty":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"strictSpecialty":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"slug":{"def":{"type":"string"},"type":"string"},"title":{"def":{"type":"string"},"type":"string"},"description":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"category":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"serviceType":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"expectedDurationMinutes":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"}},"type":"optional"},"minCashPriceCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"offeringCount":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"directBookable":{"def":{"type":"boolean"},"type":"boolean"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"slug":{"def":{"type":"string"},"type":"string"},"title":{"def":{"type":"string"},"type":"string"},"description":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"category":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"serviceType":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"expectedDurationMinutes":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"}},"type":"optional"},"minCashPriceCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"offeringCount":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"directBookable":{"def":{"type":"boolean"},"type":"boolean"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"pagination":{"def":{"type":"object","shape":{"limit":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"offset":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"total":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"hasMore":{"def":{"type":"boolean"},"type":"boolean"}}},"type":"object"}}},"type":"object"}}},{"name":"search_catalog","toolset":"discovery","method":"GET","path":"/catalog/search","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"Bounded, relevance-ranked HSO catalog identity search across titles, synonyms, reviewed aliases, source IDs, and CPT. A match does not assert provider capability, offer, price, or availability.","contract":{"query":{"def":{"type":"object","shape":{"q":{"def":{"type":"string","checks":[{},{},{}]},"type":"string"},"specialty":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{},{}]},"type":"string"}},"type":"optional"},"category":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{},{}]},"type":"string"}},"type":"optional"},"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{},{}]},"type":"number","isFinite":true},"defaultValue":10},"type":"default"},"offset":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true},"defaultValue":0},"type":"default"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"hsoId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"},"slug":{"def":{"type":"string"},"type":"string"},"canonicalServiceKey":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"title":{"def":{"type":"string"},"type":"string"},"category":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"aliases":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"specialty":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"subspecialty":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"cpt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"serviceType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"matchKind":{"def":{"type":"enum","entries":{"exact":"exact","synonym":"synonym","tokens":"tokens","fuzzy":"fuzzy"}},"type":"enum","enum":{"exact":"exact","synonym":"synonym","tokens":"tokens","fuzzy":"fuzzy"},"options":["exact","synonym","tokens","fuzzy"]},"matchReason":{"def":{"type":"enum","entries":{"title_exact":"title_exact","cpt_exact":"cpt_exact","source_id_exact":"source_id_exact","alias_exact":"alias_exact","phrase":"phrase","all_salient_tokens":"all_salient_tokens","fuzzy":"fuzzy"}},"type":"enum","enum":{"title_exact":"title_exact","cpt_exact":"cpt_exact","source_id_exact":"source_id_exact","alias_exact":"alias_exact","phrase":"phrase","all_salient_tokens":"all_salient_tokens","fuzzy":"fuzzy"},"options":["title_exact","cpt_exact","source_id_exact","alias_exact","phrase","all_salient_tokens","fuzzy"]},"score":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true},"sourceIds":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"included":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"excluded":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"variantFacets":{"def":{"type":"object","shape":{"approaches":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"technologies":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"modalities":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"bodyRegions":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"contrasts":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}}}},"type":"object"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"hsoId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"},"slug":{"def":{"type":"string"},"type":"string"},"canonicalServiceKey":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"title":{"def":{"type":"string"},"type":"string"},"category":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"aliases":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"specialty":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"subspecialty":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"cpt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"serviceType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"matchKind":{"def":{"type":"enum","entries":{"exact":"exact","synonym":"synonym","tokens":"tokens","fuzzy":"fuzzy"}},"type":"enum","enum":{"exact":"exact","synonym":"synonym","tokens":"tokens","fuzzy":"fuzzy"},"options":["exact","synonym","tokens","fuzzy"]},"matchReason":{"def":{"type":"enum","entries":{"title_exact":"title_exact","cpt_exact":"cpt_exact","source_id_exact":"source_id_exact","alias_exact":"alias_exact","phrase":"phrase","all_salient_tokens":"all_salient_tokens","fuzzy":"fuzzy"}},"type":"enum","enum":{"title_exact":"title_exact","cpt_exact":"cpt_exact","source_id_exact":"source_id_exact","alias_exact":"alias_exact","phrase":"phrase","all_salient_tokens":"all_salient_tokens","fuzzy":"fuzzy"},"options":["title_exact","cpt_exact","source_id_exact","alias_exact","phrase","all_salient_tokens","fuzzy"]},"score":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true},"sourceIds":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"included":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"excluded":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"variantFacets":{"def":{"type":"object","shape":{"approaches":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"technologies":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"modalities":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"bodyRegions":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"contrasts":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}}}},"type":"object"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"pagination":{"def":{"type":"object","shape":{"limit":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"offset":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"total":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"hasMore":{"def":{"type":"boolean"},"type":"boolean"}}},"type":"object"}}},"type":"object"}}},{"name":"get_hso","toolset":"discovery","method":"GET","path":"/hsos/:slug","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"HSO detail + every provider offering it.","contract":{"query":{"def":{"type":"object","shape":{"specialty":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"strictSpecialty":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"true":"true","false":"false"}},"type":"enum","enum":{"true":"true","false":"false"},"options":["true","false"]}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"slug":{"def":{"type":"string"},"type":"string"},"title":{"def":{"type":"string"},"type":"string"},"description":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"category":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"serviceType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"canonicalServiceKey":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"serviceRequirement":{"def":{"type":"nullable","innerType":{"def":{"type":"object","shape":{"canonicalServiceKey":{"def":{"type":"string"},"type":"string"},"professionalEligibilitySpecialtyKeys":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"reviewedCapabilityFamilyCandidates":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"scopeSubspecialties":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"requiredCapabilityFamilyKeys":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"capabilityLogic":{"def":{"type":"nullable","innerType":{"def":{"type":"enum","entries":{"all_of":"all_of","any_of":"any_of"}},"type":"enum","enum":{"all_of":"all_of","any_of":"any_of"},"options":["all_of","any_of"]}},"type":"nullable"},"providerAttestationRequired":{"def":{"type":"boolean"},"type":"boolean"},"requirementVersion":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"reviewBasis":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"reviewStatus":{"def":{"type":"enum","entries":{"reviewed_exact":"reviewed_exact","reviewed_professional_eligibility_only":"reviewed_professional_eligibility_only","requires_service_level_clinical_review":"requires_service_level_clinical_review","requires_clinical_review_no_auto_assertion":"requires_clinical_review_no_auto_assertion"}},"type":"enum","enum":{"reviewed_exact":"reviewed_exact","reviewed_professional_eligibility_only":"reviewed_professional_eligibility_only","requires_service_level_clinical_review":"requires_service_level_clinical_review","requires_clinical_review_no_auto_assertion":"requires_clinical_review_no_auto_assertion"},"options":["reviewed_exact","reviewed_professional_eligibility_only","requires_service_level_clinical_review","requires_clinical_review_no_auto_assertion"]}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"nullable"},"scope":{"def":{"type":"object","shape":{"included":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"excluded":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"scopeTrigger":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"expectedDurationMinutes":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"minCashPriceCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"offeringCount":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"offerings":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"providerHsoId":{"def":{"type":"string"},"type":"string"},"cashPriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"feeCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"providerId":{"def":{"type":"string"},"type":"string"},"providerNpi":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"providerName":{"def":{"type":"string"},"type":"string"},"scpId":{"def":{"type":"string"},"type":"string"},"scpName":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"providerHsoId":{"def":{"type":"string"},"type":"string"},"cashPriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"feeCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"providerId":{"def":{"type":"string"},"type":"string"},"providerNpi":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"providerName":{"def":{"type":"string"},"type":"string"},"scpId":{"def":{"type":"string"},"type":"string"},"scpName":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"list_providers","toolset":"discovery","method":"GET","path":"/providers","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"Active providers with text search.","contract":{"query":{"def":{"type":"object","shape":{"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{},{}]},"type":"number","isFinite":true},"defaultValue":50},"type":"default"},"offset":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true},"defaultValue":0},"type":"default"},"specialty":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"q":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"npi":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"displayName":{"def":{"type":"string"},"type":"string"},"primarySpecialty":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"bioShort":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"photoUrl":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"npi":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"displayName":{"def":{"type":"string"},"type":"string"},"primarySpecialty":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"bioShort":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"photoUrl":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"pagination":{"def":{"type":"object","shape":{"limit":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"offset":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"total":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"hasMore":{"def":{"type":"boolean"},"type":"boolean"}}},"type":"object"}}},"type":"object"}}},{"name":"get_provider","toolset":"discovery","method":"GET","path":"/providers/:id","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"Provider detail + their full rate-card offerings. :id accepts the provider UUID or a 10-digit NPI (the key /search and /clinical-route results carry); an NPI that is not onboarded 404s with a pointer to /npi/{npi}.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"npi":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"displayName":{"def":{"type":"string"},"type":"string"},"primarySpecialty":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"secondarySpecialties":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}}},"type":"nullable"}},"type":"optional"},"bioShort":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"bioLong":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"photoUrl":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"offerings":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"providerHsoId":{"def":{"type":"string"},"type":"string"},"cashPriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"feeCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"hsoId":{"def":{"type":"string"},"type":"string"},"hsoSlug":{"def":{"type":"string"},"type":"string"},"hsoTitle":{"def":{"type":"string"},"type":"string"},"scpId":{"def":{"type":"string"},"type":"string"},"scpName":{"def":{"type":"string"},"type":"string"},"cancellationWindowHours":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"}},"type":"optional"},"lateCancellationPolicy":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"providerHsoId":{"def":{"type":"string"},"type":"string"},"cashPriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"feeCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"hsoId":{"def":{"type":"string"},"type":"string"},"hsoSlug":{"def":{"type":"string"},"type":"string"},"hsoTitle":{"def":{"type":"string"},"type":"string"},"scpId":{"def":{"type":"string"},"type":"string"},"scpName":{"def":{"type":"string"},"type":"string"},"cancellationWindowHours":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"}},"type":"optional"},"lateCancellationPolicy":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"credentials":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"optional"},"capabilityTruth":{"def":{"type":"optional","innerType":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"check_availability","toolset":"discovery","method":"GET","path":"/providers/:id/availability","authority":"public","authRequired":"none","sideEffect":"read","signing":"availability","description":"Offer-scoped bookability assertion and exact open slots in a window. Requires providerHsoId so provider-level time can never imply service-level bookability. :id accepts the provider UUID or a 10-digit NPI. Returns a signed availability attestation an agent can prove offline (ADRs 0158 and 0198).","contract":{"query":{"def":{"type":"object","shape":{"providerHsoId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"},"scpId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"}},"type":"optional"},"from":{"def":{"type":"optional","innerType":{"def":{"type":"date","coerce":true},"type":"date"}},"type":"optional"},"to":{"def":{"type":"optional","innerType":{"def":{"type":"date","coerce":true},"type":"date"}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"scpId":{"def":{"type":"string"},"type":"string"},"providerHsoId":{"def":{"type":"string"},"type":"string"},"startsAt":{"def":{"type":"string"},"type":"string"},"endsAt":{"def":{"type":"string"},"type":"string"},"source":{"def":{"type":"enum","entries":{"capacity_policy":"capacity_policy","provider_manual":"provider_manual","host_sync":"host_sync"}},"type":"enum","enum":{"capacity_policy":"capacity_policy","provider_manual":"provider_manual","host_sync":"host_sync"},"options":["capacity_policy","provider_manual","host_sync"]},"sourceCheckedAt":{"def":{"type":"string"},"type":"string"},"sourceExpiresAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"scpId":{"def":{"type":"string"},"type":"string"},"providerHsoId":{"def":{"type":"string"},"type":"string"},"startsAt":{"def":{"type":"string"},"type":"string"},"endsAt":{"def":{"type":"string"},"type":"string"},"source":{"def":{"type":"enum","entries":{"capacity_policy":"capacity_policy","provider_manual":"provider_manual","host_sync":"host_sync"}},"type":"enum","enum":{"capacity_policy":"capacity_policy","provider_manual":"provider_manual","host_sync":"host_sync"},"options":["capacity_policy","provider_manual","host_sync"]},"sourceCheckedAt":{"def":{"type":"string"},"type":"string"},"sourceExpiresAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"window":{"def":{"type":"object","shape":{"from":{"def":{"type":"string"},"type":"string"},"to":{"def":{"type":"string"},"type":"string"}}},"type":"object"},"assertion":{"def":{"type":"object","shape":{"providerHsoId":{"def":{"type":"string"},"type":"string"},"providerId":{"def":{"type":"string"},"type":"string"},"scpId":{"def":{"type":"string"},"type":"string"},"hsoId":{"def":{"type":"string"},"type":"string"},"offerVersion":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"mode":{"def":{"type":"enum","entries":{"instant_slot":"instant_slot","confirm_every_time":"confirm_every_time","unavailable":"unavailable"}},"type":"enum","enum":{"instant_slot":"instant_slot","confirm_every_time":"confirm_every_time","unavailable":"unavailable"},"options":["instant_slot","confirm_every_time","unavailable"]},"actionMode":{"def":{"type":"nullable","innerType":{"def":{"type":"enum","entries":{"instant_book":"instant_book","request_visit":"request_visit"}},"type":"enum","enum":{"instant_book":"instant_book","request_visit":"request_visit"},"options":["instant_book","request_visit"]}},"type":"nullable"},"holdable":{"def":{"type":"boolean"},"type":"boolean"},"checkedAt":{"def":{"type":"string"},"type":"string"},"validUntil":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"confirmationSlaMinutes":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"reasons":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"signed":{"def":{"type":"optional","innerType":{"def":{"type":"object","shape":{"jws":{"def":{"type":"string"},"type":"string"},"claims":{"def":{"type":"object","shape":{"type":{"def":{"type":"string"},"type":"string"},"issued_at":{"def":{"type":"string"},"type":"string"},"valid_until":{"def":{"type":"string"},"type":"string"},"issuer":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},{"name":"get_npi_profile","toolset":"discovery","method":"GET","path":"/npi/:npi","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"Public directory profile + activation state for ANY 10-digit NPI (9M+ providers), onboarded or not. The fallback pivot when get_provider 404s.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"npi":{"def":{"type":"string"},"type":"string"},"entityType":{"def":{"type":"enum","entries":{"individual":"individual","organization":"organization"}},"type":"enum","enum":{"individual":"individual","organization":"organization"},"options":["individual","organization"]},"displayName":{"def":{"type":"string"},"type":"string"},"organizationName":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"specialty":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"addressCity":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"addressState":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"addressZip":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"activation":{"def":{"type":"object","shape":{"activationState":{"def":{"type":"string"},"type":"string"},"providerId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"onboarded":{"def":{"type":"boolean"},"type":"boolean"},"actionMode":{"def":{"type":"enum","entries":{"instant_book":"instant_book","request_visit":"request_visit"}},"type":"enum","enum":{"instant_book":"instant_book","request_visit":"request_visit"},"options":["instant_book","request_visit"]},"priceAuthority":{"def":{"type":"string"},"type":"string"},"confirmedPriceCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"list_offers","toolset":"discovery","method":"GET","path":"/offers","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"Flat (provider × HSO × SCP) rate-card list. Pass providerHsoId for one exact offer, or an exact hsoId from search_catalog to preserve service identity; q uses bounded catalog retrieval plus provider-name text search. An offer does not assert a currently available slot.","contract":{"query":{"def":{"type":"object","shape":{"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{},{}]},"type":"number","isFinite":true},"defaultValue":50},"type":"default"},"offset":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true},"defaultValue":0},"type":"default"},"providerHsoId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"}},"type":"optional"},"hsoId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"}},"type":"optional"},"q":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"category":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"specialty":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"providerHsoId":{"def":{"type":"string"},"type":"string"},"cashPriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"ceilingPriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"feeCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"hsoId":{"def":{"type":"string"},"type":"string"},"hsoSlug":{"def":{"type":"string"},"type":"string"},"hsoTitle":{"def":{"type":"string"},"type":"string"},"providerId":{"def":{"type":"string"},"type":"string"},"providerNpi":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"providerName":{"def":{"type":"string"},"type":"string"},"scpId":{"def":{"type":"string"},"type":"string"},"scpName":{"def":{"type":"string"},"type":"string"},"scope":{"def":{"type":"object","shape":{"included":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"excluded":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"conditional":{"def":{"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"scopeTrigger":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"providerHsoId":{"def":{"type":"string"},"type":"string"},"cashPriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"ceilingPriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"feeCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"hsoId":{"def":{"type":"string"},"type":"string"},"hsoSlug":{"def":{"type":"string"},"type":"string"},"hsoTitle":{"def":{"type":"string"},"type":"string"},"providerId":{"def":{"type":"string"},"type":"string"},"providerNpi":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"providerName":{"def":{"type":"string"},"type":"string"},"scpId":{"def":{"type":"string"},"type":"string"},"scpName":{"def":{"type":"string"},"type":"string"},"scope":{"def":{"type":"object","shape":{"included":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"excluded":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"conditional":{"def":{"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"scopeTrigger":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"pagination":{"def":{"type":"object","shape":{"limit":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"offset":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"total":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"hasMore":{"def":{"type":"boolean"},"type":"boolean"}}},"type":"object"}}},"type":"object"}}},{"name":"get_sure_price","toolset":"discovery","method":"GET","path":"/sure-price","authority":"public","authRequired":"none","sideEffect":"read","signing":"sure_price","description":"Machine-verifiable ceiling guarantee per HSO × geo × payer. Returns a signed Sure Price attestation an agent can prove offline (ADR 0158).","contract":{"query":{"def":{"type":"object","shape":{"hsoSlug":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"hsoId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"}},"type":"optional"},"geo":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"payerRegime":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"nullable","innerType":{"def":{"type":"object","shape":{"hsoId":{"def":{"type":"string"},"type":"string"},"hsoSlug":{"def":{"type":"string"},"type":"string"},"hsoTitle":{"def":{"type":"string"},"type":"string"},"surePriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"cashPriceCents":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"}},"type":"optional"},"guarantee":{"def":{"type":"literal","values":["patient_never_pays_above_sure_price"]},"type":"literal","values":{}},"validUntil":{"def":{"type":"string"},"type":"string"},"geoScope":{"def":{"type":"string"},"type":"string"},"payerRegime":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"nullable"},"signed":{"def":{"type":"optional","innerType":{"def":{"type":"object","shape":{"jws":{"def":{"type":"string"},"type":"string"},"claims":{"def":{"type":"object","shape":{"type":{"def":{"type":"string"},"type":"string"},"issued_at":{"def":{"type":"string"},"type":"string"},"valid_until":{"def":{"type":"string"},"type":"string"},"issuer":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"optional"}}},"type":"object"}}},{"name":"get_registry_prices","toolset":"discovery","method":"GET","path":"/registry/prices","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"The Price Registry (ADR 0130): committed, escrow-backed, all-in cash prices per (service × market) cell with settlement-proof metadata and freshness. Committed prices only — estimates and phone-reported quotes are deliberately excluded. Filter by ?service={hso-slug} and/or ?market=us-{state}[-{city-slug}].","contract":{"query":{"def":{"type":"object","shape":{"service":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"market":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"},"include":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"resolved":"resolved","all":"all"}},"type":"enum","enum":{"resolved":"resolved","all":"all"},"options":["resolved","all"]}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"panelVersion":{"def":{"type":"string"},"type":"string"},"panelSize":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"generatedAt":{"def":{"type":"string"},"type":"string"},"doctrine":{"def":{"type":"string"},"type":"string"},"cells":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"service":{"def":{"type":"object","shape":{"slug":{"def":{"type":"string"},"type":"string"},"title":{"def":{"type":"string"},"type":"string"}}},"type":"object"},"market":{"def":{"type":"object","shape":{"key":{"def":{"type":"string"},"type":"string"},"state":{"def":{"type":"string"},"type":"string"},"city":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"status":{"def":{"type":"string"},"type":"string"},"citable":{"def":{"type":"boolean"},"type":"boolean"},"committedPrices":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"authority":{"def":{"type":"literal","values":["opendoc_confirmed"]},"type":"literal","values":{}},"npi":{"def":{"type":"string"},"type":"string"},"allInCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"bookable":{"def":{"type":"boolean"},"type":"boolean"},"settledCount180d":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"lastSettledAt":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"priceUpdatedAt":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"settlementWeight":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"authority":{"def":{"type":"literal","values":["opendoc_confirmed"]},"type":"literal","values":{}},"npi":{"def":{"type":"string"},"type":"string"},"allInCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"bookable":{"def":{"type":"boolean"},"type":"boolean"},"settledCount180d":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"lastSettledAt":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"priceUpdatedAt":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"settlementWeight":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"estimates":{"def":{"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"service":{"def":{"type":"object","shape":{"slug":{"def":{"type":"string"},"type":"string"},"title":{"def":{"type":"string"},"type":"string"}}},"type":"object"},"market":{"def":{"type":"object","shape":{"key":{"def":{"type":"string"},"type":"string"},"state":{"def":{"type":"string"},"type":"string"},"city":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"status":{"def":{"type":"string"},"type":"string"},"citable":{"def":{"type":"boolean"},"type":"boolean"},"committedPrices":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"authority":{"def":{"type":"literal","values":["opendoc_confirmed"]},"type":"literal","values":{}},"npi":{"def":{"type":"string"},"type":"string"},"allInCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"bookable":{"def":{"type":"boolean"},"type":"boolean"},"settledCount180d":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"lastSettledAt":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"priceUpdatedAt":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"settlementWeight":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"authority":{"def":{"type":"literal","values":["opendoc_confirmed"]},"type":"literal","values":{}},"npi":{"def":{"type":"string"},"type":"string"},"allInCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"bookable":{"def":{"type":"boolean"},"type":"boolean"},"settledCount180d":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"lastSettledAt":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"priceUpdatedAt":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"settlementWeight":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"estimates":{"def":{"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"get_registry_summary","toolset":"discovery","method":"GET","path":"/registry/summary","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"Per-market real-price density for the Price Registry: how many registry-panel services have a committed price in each market. The registry publishes its own coverage scoreboard.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"panelVersion":{"def":{"type":"string"},"type":"string"},"panelSize":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"generatedAt":{"def":{"type":"string"},"type":"string"},"markets":{"def":{"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"get_sla","toolset":"discovery","method":"GET","path":"/sla","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"Consumer-facing Finality SLA (ADR 0159): a trimmed, stable, citable reliability summary over a trailing window (?weeks=1..104, default 12) — clean-transaction rate (target ≥98%), dispute rate + resolution time, webhook delivery success rate, and price-lock honor rate. Aggregate-only, no per-booking detail; served cheaply from finality snapshots. The internal, cohort-detailed view is the workforce-gated GET /ops/finality-metrics.","contract":{"query":{"def":{"type":"object","shape":{"weeks":{"def":{"type":"optional","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{},{}]},"type":"number","isFinite":true}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"service":{"def":{"type":"literal","values":["opendoc-finality-sla"]},"type":"literal","values":{}},"window":{"def":{"type":"object","shape":{"weeks":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}}},"type":"object"},"computedAt":{"def":{"type":"string"},"type":"string"},"source":{"def":{"type":"enum","entries":{"snapshot":"snapshot","live":"live"}},"type":"enum","enum":{"snapshot":"snapshot","live":"live"},"options":["snapshot","live"]},"committed":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"cleanTransactionRate":{"def":{"type":"object","shape":{"pct":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true},"targetPct":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true},"meetsTarget":{"def":{"type":"boolean"},"type":"boolean"},"cleanTransactions":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"basis":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"disputes":{"def":{"type":"object","shape":{"ratePer100Committed":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true},"opened":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"resolvedRefund":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"resolvedRelease":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"open":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"avgHoursToResolve":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"webhookDelivery":{"def":{"type":"object","shape":{"eventDeliveryRatePct":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true},"attemptSuccessRatePct":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true},"autoPausedSubscriptions":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"windowDays":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"priceLockHonor":{"def":{"type":"object","shape":{"honorRatePct":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true},"committedMeasured":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"fromPersistedLock":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"breaches":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"measures":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"get_provider_sitemap_feed","toolset":"discovery","method":"GET","path":"/sitemap/providers","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"Bulk provider directory feed (the crawl-surface contract, ADR 0099): identity, geo, credentials, and — for activated providers — posted bookable all-in cash services. One response, 10-min cache.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"providers":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"npi":{"def":{"type":"string"},"type":"string"},"displayName":{"def":{"type":"string"},"type":"string"},"specialty":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"city":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"state":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"claimed":{"def":{"type":"boolean"},"type":"boolean"},"activated":{"def":{"type":"boolean"},"type":"boolean"},"services":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"name":{"def":{"type":"string"},"type":"string"},"priceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"bookable":{"def":{"type":"boolean"},"type":"boolean"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"name":{"def":{"type":"string"},"type":"string"},"priceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"bookable":{"def":{"type":"boolean"},"type":"boolean"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"npi":{"def":{"type":"string"},"type":"string"},"displayName":{"def":{"type":"string"},"type":"string"},"specialty":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"city":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"state":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"claimed":{"def":{"type":"boolean"},"type":"boolean"},"activated":{"def":{"type":"boolean"},"type":"boolean"},"services":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"name":{"def":{"type":"string"},"type":"string"},"priceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"bookable":{"def":{"type":"boolean"},"type":"boolean"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"name":{"def":{"type":"string"},"type":"string"},"priceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"bookable":{"def":{"type":"boolean"},"type":"boolean"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"type":"object"}}},"type":"object"}}},{"name":"get_price_benchmark","toolset":"discovery","method":"GET","path":"/price-benchmark","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"Factual Medicare (CMS PFS non-facility) reference amount for a HCPCS/CPT code — an attributed, dated benchmark, never an OpenDoc price. 404s when unseeded rather than inventing a number.","contract":{"query":{"def":{"type":"object","shape":{"cpt":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"zip":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"},"state":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"},"year":{"def":{"type":"optional","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{},{}]},"type":"number","isFinite":true}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"nullable","innerType":{"def":{"type":"object","shape":{"source":{"def":{"type":"literal","values":["medicare_pfs"]},"type":"literal","values":{}},"sourceLabel":{"def":{"type":"string"},"type":"string"},"cptCode":{"def":{"type":"string"},"type":"string"},"amountCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"locality":{"def":{"type":"string"},"type":"string"},"localityLabel":{"def":{"type":"string"},"type":"string"},"setting":{"def":{"type":"literal","values":["non_facility"]},"type":"literal","values":{}},"year":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"nullable"}}},"type":"object"}}},{"name":"get_trust","toolset":"discovery","method":"GET","path":"/trust/scp/:scpId","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"8-domain reliability state for an SCP.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"scpId":{"def":{"type":"string"},"type":"string"},"scpName":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"domains":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string"},"valueType":{"def":{"type":"object","shape":{"score":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true},"sampleCount":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"state":{"def":{"type":"enum","entries":{"observed":"observed","trusted":"trusted","restricted":"restricted"}},"type":"enum","enum":{"observed":"observed","trusted":"trusted","restricted":"restricted"},"options":["observed","trusted","restricted"]}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string"},"valueType":{"def":{"type":"object","shape":{"score":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true},"sampleCount":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"state":{"def":{"type":"enum","entries":{"observed":"observed","trusted":"trusted","restricted":"restricted"}},"type":"enum","enum":{"observed":"observed","trusted":"trusted","restricted":"restricted"},"options":["observed","trusted","restricted"]}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"overall":{"def":{"type":"object","shape":{"score":{"def":{"type":"number","checks":[]},"type":"number","isFinite":true},"state":{"def":{"type":"enum","entries":{"observed":"observed","trusted":"trusted","restricted":"restricted"}},"type":"enum","enum":{"observed":"observed","trusted":"trusted","restricted":"restricted"},"options":["observed","trusted","restricted"]},"sampleCount":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"list_specialties","toolset":"discovery","method":"GET","path":"/specialties","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"Distinct specialties with provider counts.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"specialty":{"def":{"type":"string"},"type":"string"},"providerCount":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"specialty":{"def":{"type":"string"},"type":"string"},"providerCount":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}}},"type":"object"}}}},"type":"object"}}},{"name":"protocol_jwks","toolset":"discovery","method":"GET","path":"/.well-known/opendoc-protocol/jwks.json","authority":"public","authRequired":"none","sideEffect":"read","signing":"none","description":"Published ES256 public keys for verifying signed price-locks and receipts offline (Doctrine §3)."},{"name":"declare_intent","toolset":"transaction","method":"POST","path":"/transactions/declare-intent","authority":"patient","authRequired":"identity_session","permission":"BOOK","sideEffect":"write","signing":"none","description":"S0 → S1. Declare booking intent.","contract":{"request":{"def":{"type":"object","shape":{"providerHsoId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"},"availabilitySlotId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"}},"type":"optional"},"hostBookingRef":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"scheduledAt":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":false,"local":false,"precision":null,"pattern":{}},"type":"string"}]},"type":"string"}},"type":"optional"},"episodeId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"}},"type":"optional"},"idempotencyKey":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"expectedPriceCents":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true}},"type":"optional"},"searchQueryLogId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"}},"type":"optional"},"channel":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"web":"web","sms":"sms","mode_b":"mode_b","prepay":"prepay","agent":"agent"}},"type":"enum","enum":{"web":"web","sms":"sms","mode_b":"mode_b","prepay":"prepay","agent":"agent"},"options":["web","sms","mode_b","prepay","agent"]}},"type":"optional"},"funnelSessionId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{},{},{}]},"type":"string"}},"type":"optional"}}},"type":"object"},"headers":[{"name":"Idempotency-Key","description":"Optional idempotency key. Wins over the body idempotencyKey field; a replayed request returns the original response with replayed: true instead of repeating the side effect."}],"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"transactionId":{"def":{"type":"string"},"type":"string"},"state":{"def":{"type":"literal","values":["S1_intent"]},"type":"literal","values":{}},"cashPriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"platformFeeCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"hsoTitle":{"def":{"type":"string"},"type":"string"},"replayed":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"},"successStatus":201}},{"name":"authorize","toolset":"transaction","method":"POST","path":"/transactions/:id/authorize","authority":"patient","authRequired":"identity_session","permission":"BOOK","sideEffect":"write","signing":"price_lock","description":"S1 → S2. HSO Instance born; price locked. Returns a signed price-lock.","contract":{"request":{"def":{"type":"object","shape":{"idempotencyKey":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"mandateId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"}},"type":"optional"}}},"type":"object"},"headers":[{"name":"Idempotency-Key","description":"Optional idempotency key. Wins over the body idempotencyKey field; a replayed request returns the original response with replayed: true instead of repeating the side effect."}],"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"transactionId":{"def":{"type":"string"},"type":"string"},"state":{"def":{"type":"literal","values":["S2_authorized"]},"type":"literal","values":{}},"replayed":{"def":{"type":"boolean"},"type":"boolean"},"priceLock":{"def":{"type":"optional","innerType":{"def":{"type":"object","shape":{"jws":{"def":{"type":"string"},"type":"string"},"claims":{"def":{"type":"object","shape":{"type":{"def":{"type":"string"},"type":"string"},"transaction_id":{"def":{"type":"string"},"type":"string"},"hso_offer_id":{"def":{"type":"string"},"type":"string"},"max_obligation_cents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"cancellation_terms_hash":{"def":{"type":"string"},"type":"string"},"valid_until":{"def":{"type":"string"},"type":"string"},"issued_at":{"def":{"type":"string"},"type":"string"},"issuer":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"simulate","toolset":"transaction","method":"POST","path":"/transactions/:id/simulate","authority":"patient","authRequired":"identity_session","permission":"READ_TRANSACTIONS","sideEffect":"simulate","signing":"price_lock","description":"Side-effect-free preview of authorize/commit: returns the exact signed price-lock and obligation with zero writes (Doctrine §2).","contract":{"request":{"def":{"type":"object","shape":{"action":{"def":{"type":"enum","entries":{"authorize":"authorize","commit":"commit"}},"type":"enum","enum":{"authorize":"authorize","commit":"commit"},"options":["authorize","commit"]}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"simulated":{"def":{"type":"boolean"},"type":"boolean"},"action":{"def":{"type":"enum","entries":{"authorize":"authorize","commit":"commit"}},"type":"enum","enum":{"authorize":"authorize","commit":"commit"},"options":["authorize","commit"]},"wouldTransitionTo":{"def":{"type":"string"},"type":"string"},"priceLock":{"def":{"type":"nullable","innerType":{"def":{"type":"object","shape":{"jws":{"def":{"type":"string"},"type":"string"},"claims":{"def":{"type":"object","shape":{"type":{"def":{"type":"string"},"type":"string"},"transaction_id":{"def":{"type":"string"},"type":"string"},"hso_offer_id":{"def":{"type":"string"},"type":"string"},"max_obligation_cents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"cancellation_terms_hash":{"def":{"type":"string"},"type":"string"},"valid_until":{"def":{"type":"string"},"type":"string"},"issued_at":{"def":{"type":"string"},"type":"string"},"issuer":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"nullable"},"consequence":{"def":{"type":"nullable","innerType":{"def":{"type":"object","shape":{"maxObligationCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"cancellationTermsHash":{"def":{"type":"string"},"type":"string"},"validUntil":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"accept_terms","toolset":"transaction","method":"POST","path":"/transactions/:id/accept-terms","authority":"patient","authRequired":"identity_session","permission":"BOOK","sideEffect":"write","signing":"none","description":"S2 → S3. Bind payment method.","contract":{"request":{"def":{"type":"object","shape":{"idempotencyKey":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"mandateId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"}},"type":"optional"},"useSavedPaymentMethod":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"applyGiftBalance":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"applyEmployerBalance":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"}}},"type":"object"},"headers":[{"name":"Idempotency-Key","description":"Optional idempotency key. Wins over the body idempotencyKey field; a replayed request returns the original response with replayed: true instead of repeating the side effect."}],"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"transactionId":{"def":{"type":"string"},"type":"string"},"state":{"def":{"type":"literal","values":["S3_terms_accepted"]},"type":"literal","values":{}},"replayed":{"def":{"type":"boolean"},"type":"boolean"},"payment":{"def":{"type":"object","shape":{"mode":{"def":{"type":"string"},"type":"string"},"state":{"def":{"type":"string"},"type":"string"},"status":{"def":{"type":"string"},"type":"string"},"isLive":{"def":{"type":"boolean"},"type":"boolean"},"commitAllowed":{"def":{"type":"boolean"},"type":"boolean"},"paymentIntentId":{"def":{"type":"string"},"type":"string"},"clientSecret":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"amountCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"applicationFeeCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"appliedGiftCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"appliedEmployerCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"commit","toolset":"transaction","method":"POST","path":"/transactions/:id/commit","authority":"patient","authRequired":"identity_session","permission":"BOOK","sideEffect":"write","signing":"none","description":"S3 → S4 atomic commit.","contract":{"request":{"def":{"type":"object","shape":{"idempotencyKey":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"mandateId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"}},"type":"optional"},"protectedPriceRequested":{"def":{"type":"optional","innerType":{"def":{"type":"boolean"},"type":"boolean"}},"type":"optional"},"protectedPriceTermsVersion":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"}},"checks":[{}]},"type":"object"},"headers":[{"name":"Idempotency-Key","description":"Optional idempotency key. Wins over the body idempotencyKey field; a replayed request returns the original response with replayed: true instead of repeating the side effect."}],"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"transactionId":{"def":{"type":"string"},"type":"string"},"state":{"def":{"type":"literal","values":["S4_committed"]},"type":"literal","values":{}},"replayed":{"def":{"type":"boolean"},"type":"boolean"},"payment":{"def":{"type":"object","shape":{"mode":{"def":{"type":"string"},"type":"string"},"state":{"def":{"type":"string"},"type":"string"},"status":{"def":{"type":"string"},"type":"string"},"isLive":{"def":{"type":"boolean"},"type":"boolean"},"commitAllowed":{"def":{"type":"boolean"},"type":"boolean"},"paymentIntentId":{"def":{"type":"string"},"type":"string"},"clientSecret":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"amountCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"applicationFeeCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"appliedGiftCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"appliedEmployerCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"protectedPriceRecord":{"def":{"type":"nullable","innerType":{"def":{"type":"object","shape":{"id":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"},"standardVersion":{"def":{"type":"string"},"type":"string"},"maximumPriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true},"finalObligationCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true}},"type":"nullable"},"currency":{"def":{"type":"string"},"type":"string"},"status":{"def":{"type":"string"},"type":"string"},"syncStatus":{"def":{"type":"enum","entries":{"verified":"verified","update_pending":"update_pending"}},"type":"enum","enum":{"verified":"verified","update_pending":"update_pending"},"options":["verified","update_pending"]},"currentRevisionNumber":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true},"lastVerifiedAt":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"get_transaction","toolset":"transaction","method":"GET","path":"/transactions/:id","authority":"patient","authRequired":"identity_session","permission":"READ_TRANSACTIONS","sideEffect":"read","signing":"none","description":"Read current state.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"transactionId":{"def":{"type":"string"},"type":"string"},"state":{"def":{"type":"string"},"type":"string"},"booking":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"status":{"def":{"type":"string"},"type":"string"},"cashPriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"scheduledFor":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"fulfilledAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"canceledAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"payment":{"def":{"type":"nullable","innerType":{"def":{"type":"object","shape":{"mode":{"def":{"type":"string"},"type":"string"},"state":{"def":{"type":"string"},"type":"string"},"status":{"def":{"type":"string"},"type":"string"},"isLive":{"def":{"type":"boolean"},"type":"boolean"},"commitAllowed":{"def":{"type":"boolean"},"type":"boolean"},"paymentIntentId":{"def":{"type":"string"},"type":"string"},"clientSecret":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"amountCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"applicationFeeCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"appliedGiftCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"appliedEmployerCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"cancel_booking","toolset":"transaction","method":"POST","path":"/bookings/:id/cancel","authority":"patient","authRequired":"identity_session","permission":"CANCEL","sideEffect":"write","signing":"none","description":"Cancel before fulfillment.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"status":{"def":{"type":"string"},"type":"string"},"refundSettlement":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"disposition":{"def":{"type":"enum","entries":{"full_refund":"full_refund","forfeit":"forfeit"}},"type":"enum","enum":{"full_refund":"full_refund","forfeit":"forfeit"},"options":["full_refund","forfeit"]}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"begin_save_payment_method","toolset":"patient","method":"POST","path":"/me/payment-methods/setup-intent","authority":"patient","authRequired":"identity_session","sideEffect":"write","signing":"none","description":"Begin the save-card ceremony: returns a Stripe SetupIntent clientSecret for Elements. Human-only. Once saved, transactions can pay off-session via accept-terms { useSavedPaymentMethod: true } — the headless payment path.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"clientSecret":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"stripeCustomerId":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"isStub":{"def":{"type":"boolean"},"type":"boolean"}}},"type":"object"}}},"type":"object"},"successStatus":201}},{"name":"get_payment_method","toolset":"patient","method":"GET","path":"/me/payment-methods","authority":"patient","authRequired":"identity_session","permission":"READ_PROFILE","sideEffect":"read","signing":"none","description":"Saved-card summary (hasSavedPaymentMethod + display fields only). Agent-readable so an agent can check for a card on file before promising to transact; chargeable ids are never returned.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"hasSavedPaymentMethod":{"def":{"type":"boolean"},"type":"boolean"},"card":{"def":{"type":"nullable","innerType":{"def":{"type":"object","shape":{"brand":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"last4":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"expMonth":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"expYear":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"}}},"type":"object"}},"type":"nullable"},"offSessionConsentedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}}},"type":"object"}}},"type":"object"}}},{"name":"remove_payment_method","toolset":"patient","method":"DELETE","path":"/me/payment-methods","authority":"patient","authRequired":"identity_session","sideEffect":"write","signing":"none","description":"Remove the saved card (detach + clear default). Human-only.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"removed":{"def":{"type":"boolean"},"type":"boolean"}}},"type":"object"}}},"type":"object"}}},{"name":"open_dispute","toolset":"transaction","method":"POST","path":"/me/bookings/:id/dispute","authority":"patient","authRequired":"identity_session","sideEffect":"write","signing":"none","description":"Patient asserts \"the service did not happen as defined\" on their own release-pending booking; the provider's held funds are frozen (remittance blocked — dispute blocks both release paths). Human-only: agent tokens are rejected by design. Binary outcome downstream: full refund (the provider's non-delivery obligation) or full release (the provider delivered).","contract":{"request":{"def":{"type":"object","shape":{"reason":{"def":{"type":"default","innerType":{"def":{"type":"literal","values":["service_not_delivered"]},"type":"literal","values":{}},"defaultValue":"service_not_delivered"},"type":"default"},"note":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"bookingId":{"def":{"type":"string"},"type":"string"},"disputeId":{"def":{"type":"string"},"type":"string"},"status":{"def":{"type":"literal","values":["open"]},"type":"literal","values":{}},"escrowFrozen":{"def":{"type":"boolean"},"type":"boolean"}}},"type":"object"}}},"type":"object"},"successStatus":201}},{"name":"resolve_dispute","toolset":"transaction","method":"POST","path":"/admin/bookings/:id/dispute/resolve","authority":"workforce","authRequired":"workforce","permission":"workforce.admin","sideEffect":"write","signing":"none","description":"Workforce-only resolution of an open dispute: full refund (the provider's non-delivery refund obligation, administered by Sherlock as the provider's agent) or full release (the provider met its committed delivery definition), required precedent note. Determined by impartially applying the provider's own Proof-of-Service definition; provider-side actors are excluded so a provider cannot grade its own delivery (ADR 0113).","contract":{"request":{"def":{"type":"object","shape":{"resolution":{"def":{"type":"enum","entries":{"refund":"refund","release":"release"}},"type":"enum","enum":{"refund":"refund","release":"release"},"options":["refund","release"]},"note":{"def":{"type":"string","checks":[{},{},{}]},"type":"string"},"approvalId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"bookingId":{"def":{"type":"string"},"type":"string"},"disputeId":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"resolution":{"def":{"type":"enum","entries":{"refund":"refund","release":"release"}},"type":"enum","enum":{"refund":"refund","release":"release"},"options":["refund","release"]},"status":{"def":{"type":"string"},"type":"string"},"bookingStatus":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"releaseStatus":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"submit_proof_of_service","toolset":"provider","method":"POST","path":"/admin/bookings/:id/fulfill","authority":"provider","authRequired":"identity_session","permission":"submit_pos","sideEffect":"write","signing":"receipt","description":"Submit proof of service for a held booking. Moves it to release_pending, stamps releaseEligibleAt, and issues the receipt. Funds stay held until patient Confirm & Release or auto-release.","contract":{"request":{"def":{"type":"object","shape":{"conditionalsFired":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"checks":[{}]},"type":"array","element":{"def":{"type":"string","checks":[{},{}]},"type":"string"}}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"bookingId":{"def":{"type":"string"},"type":"string"},"status":{"def":{"type":"string"},"type":"string"},"receiptId":{"def":{"type":"string"},"type":"string"},"receiptNumber":{"def":{"type":"string"},"type":"string"},"settlement":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"releaseEligibleAt":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"create_offer","toolset":"provider","method":"POST","path":"/offers","authority":"provider","authRequired":"identity_session","permission":"manage_catalog","sideEffect":"write","signing":"none","description":"Create or update a scoped provider/SCP catalog offer.","contract":{"request":{"def":{"type":"object","shape":{"providerId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"},"scpId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"},"hsoId":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"},"cashPriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true},"currency":{"def":{"type":"default","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"},"defaultValue":"usd"},"type":"default"},"payerType":{"def":{"type":"enum","entries":{"cash":"cash","medicare":"medicare","medicaid":"medicaid","self_pay_other":"self_pay_other"}},"type":"enum","enum":{"cash":"cash","medicare":"medicare","medicaid":"medicaid","self_pay_other":"self_pay_other"},"options":["cash","medicare","medicaid","self_pay_other"]},"bookable":{"def":{"type":"default","innerType":{"def":{"type":"boolean"},"type":"boolean"},"defaultValue":true},"type":"default"},"includedComponents":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"},"checks":[{}]},"type":"array","element":{"def":{"type":"string"},"type":"string"}}},"type":"optional"},"confirmFinalPrice":{"def":{"type":"optional","innerType":{"def":{"type":"literal","values":[true]},"type":"literal","values":{}}},"type":"optional"},"confirmScope":{"def":{"type":"optional","innerType":{"def":{"type":"literal","values":[true]},"type":"literal","values":{}}},"type":"optional"},"attestedBy":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"cancellationWindowHours":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{},{}]},"type":"number","isFinite":true}},"type":"optional"},"lateCancellationPolicy":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"full_refund":"full_refund","forfeit":"forfeit"}},"type":"enum","enum":{"full_refund":"full_refund","forfeit":"forfeit"},"options":["full_refund","forfeit"]}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"providerHsoId":{"def":{"type":"string"},"type":"string"},"providerId":{"def":{"type":"string"},"type":"string"},"scpId":{"def":{"type":"string"},"type":"string"},"hsoId":{"def":{"type":"string"},"type":"string"},"cashPriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"bookable":{"def":{"type":"boolean"},"type":"boolean"},"payerType":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"},"successStatus":201}},{"name":"create_health_key","toolset":"patient","method":"POST","path":"/health-keys","authority":"patient","authRequired":"identity_session","sideEffect":"write","signing":"none","description":"Create a Health Key (idempotent).","contract":{"request":{"def":{"type":"object","shape":{}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"state":{"def":{"type":"enum","entries":{"provisioning":"provisioning","ready":"ready","active":"active","revoked":"revoked"}},"type":"enum","enum":{"provisioning":"provisioning","ready":"ready","active":"active","revoked":"revoked"},"options":["provisioning","ready","active","revoked"]},"iaLevel":{"def":{"type":"union","options":[{"def":{"type":"literal","values":[0]},"type":"literal","values":{}},{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}}]},"type":"union","options":[{"def":{"type":"literal","values":[0]},"type":"literal","values":{}},{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}}]},"qrToken":{"def":{"type":"string"},"type":"string"},"qrTokenIssuedAt":{"def":{"type":"string"},"type":"string"},"ia2VerifiedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"revokedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"createdAt":{"def":{"type":"string"},"type":"string"},"updatedAt":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"},"successStatus":201}},{"name":"get_health_key","toolset":"patient","method":"GET","path":"/health-keys/me","authority":"patient","authRequired":"identity_session","permission":"READ_HEALTH_KEY","sideEffect":"read","signing":"none","description":"Read the patient's active Health Key.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"state":{"def":{"type":"enum","entries":{"provisioning":"provisioning","ready":"ready","active":"active","revoked":"revoked"}},"type":"enum","enum":{"provisioning":"provisioning","ready":"ready","active":"active","revoked":"revoked"},"options":["provisioning","ready","active","revoked"]},"iaLevel":{"def":{"type":"union","options":[{"def":{"type":"literal","values":[0]},"type":"literal","values":{}},{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}}]},"type":"union","options":[{"def":{"type":"literal","values":[0]},"type":"literal","values":{}},{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}}]},"qrToken":{"def":{"type":"string"},"type":"string"},"qrTokenIssuedAt":{"def":{"type":"string"},"type":"string"},"ia2VerifiedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"revokedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"createdAt":{"def":{"type":"string"},"type":"string"},"updatedAt":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"promote_ia2","toolset":"patient","method":"POST","path":"/health-keys/me/promote-ia2","authority":"patient","authRequired":"identity_session","sideEffect":"write","signing":"none","description":"Promote Health Key to IA2 (transactable).","contract":{"request":{"def":{"type":"object","shape":{"method":{"def":{"type":"enum","entries":{"gov_id_selfie":"gov_id_selfie","in_person":"in_person","workforce_attest":"workforce_attest"}},"type":"enum","enum":{"gov_id_selfie":"gov_id_selfie","in_person":"in_person","workforce_attest":"workforce_attest"},"options":["gov_id_selfie","in_person","workforce_attest"]}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"state":{"def":{"type":"enum","entries":{"provisioning":"provisioning","ready":"ready","active":"active","revoked":"revoked"}},"type":"enum","enum":{"provisioning":"provisioning","ready":"ready","active":"active","revoked":"revoked"},"options":["provisioning","ready","active","revoked"]},"iaLevel":{"def":{"type":"union","options":[{"def":{"type":"literal","values":[0]},"type":"literal","values":{}},{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}}]},"type":"union","options":[{"def":{"type":"literal","values":[0]},"type":"literal","values":{}},{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}}]},"qrToken":{"def":{"type":"string"},"type":"string"},"qrTokenIssuedAt":{"def":{"type":"string"},"type":"string"},"ia2VerifiedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"revokedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"createdAt":{"def":{"type":"string"},"type":"string"},"updatedAt":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"list_consent","toolset":"patient","method":"GET","path":"/me/consent","authority":"patient","authRequired":"identity_session","permission":"READ_CONSENT","sideEffect":"read","signing":"none","description":"List active Layer 1 + Layer 2 grants.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"layer":{"def":{"type":"union","options":[{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}}]},"type":"union","options":[{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}}]},"consentType":{"def":{"type":"string"},"type":"string"},"scope":{"def":{"type":"unknown"},"type":"unknown"},"grantedAt":{"def":{"type":"string"},"type":"string"},"expiresAt":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"revokedAt":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"layer":{"def":{"type":"union","options":[{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}}]},"type":"union","options":[{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}}]},"consentType":{"def":{"type":"string"},"type":"string"},"scope":{"def":{"type":"unknown"},"type":"unknown"},"grantedAt":{"def":{"type":"string"},"type":"string"},"expiresAt":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"revokedAt":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"type":"object"}}},{"name":"grant_consent","toolset":"patient","method":"POST","path":"/me/consent","authority":"patient","authRequired":"identity_session","sideEffect":"write","signing":"none","description":"Grant a data tier (Layer 1) or action (Layer 2) consent.","contract":{"request":{"def":{"type":"object","shape":{"layer":{"def":{"type":"union","options":[{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}}]},"type":"union","options":[{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}}]},"consentType":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"scope":{"def":{"type":"optional","innerType":{"def":{"type":"record","keyType":{"def":{"type":"string"},"type":"string"},"valueType":{"def":{"type":"unknown"},"type":"unknown"}},"type":"record","keyType":{"def":{"type":"string"},"type":"string"},"valueType":{"def":{"type":"unknown"},"type":"unknown"}}},"type":"optional"},"expiresAt":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":false,"local":false,"precision":null,"pattern":{}},"type":"string"}]},"type":"string"}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"layer":{"def":{"type":"union","options":[{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}}]},"type":"union","options":[{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}}]},"consentType":{"def":{"type":"string"},"type":"string"},"scope":{"def":{"type":"unknown"},"type":"unknown"},"grantedAt":{"def":{"type":"string"},"type":"string"},"expiresAt":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"revokedAt":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"},"successStatus":201}},{"name":"revoke_consent","toolset":"patient","method":"POST","path":"/me/consent/:id/revoke","authority":"patient","authRequired":"identity_session","sideEffect":"write","signing":"none","description":"Revoke a specific grant.","contract":{"request":{"def":{"type":"object","shape":{"reason":{"def":{"type":"string","checks":[{},{}]},"type":"string"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"revokedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}}},"type":"object"}}},"type":"object"}}},{"name":"get_my_profile","toolset":"patient","method":"GET","path":"/me/profile","authority":"patient","authRequired":"identity_session","permission":"READ_PROFILE","sideEffect":"read","signing":"none","description":"Read patient self-profile.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"givenName":{"def":{"type":"string"},"type":"string"},"familyName":{"def":{"type":"string"},"type":"string"},"dateOfBirth":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"email":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string"}},"type":"optional"},"phone":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"address":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"nullable"}},"type":"optional"},"createdAt":{"def":{"type":"string"},"type":"string"},"updatedAt":{"def":{"type":"string"},"type":"string"},"redacted":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"update_my_profile","toolset":"patient","method":"PATCH","path":"/me/profile","authority":"patient","authRequired":"identity_session","sideEffect":"write","signing":"none","description":"Patch patient self-profile.","contract":{"request":{"def":{"type":"object","shape":{"givenName":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"familyName":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"dateOfBirth":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"},"phone":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"type":"optional"},"address":{"def":{"type":"optional","innerType":{"def":{"type":"object","shape":{"line1":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"line2":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"optional"},"city":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"state":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"postalCode":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"country":{"def":{"type":"string","checks":[{},{}]},"type":"string"}}},"type":"object"}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"givenName":{"def":{"type":"string"},"type":"string"},"familyName":{"def":{"type":"string"},"type":"string"},"dateOfBirth":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"email":{"def":{"type":"optional","innerType":{"def":{"type":"string"},"type":"string"}},"type":"optional"},"phone":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"address":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"object","shape":{},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"nullable"}},"type":"optional"},"createdAt":{"def":{"type":"string"},"type":"string"},"updatedAt":{"def":{"type":"string"},"type":"string"},"redacted":{"def":{"type":"optional","innerType":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"list_my_bookings","toolset":"patient","method":"GET","path":"/me/bookings","authority":"patient","authRequired":"identity_session","permission":"READ_BOOKINGS","sideEffect":"read","signing":"none","description":"Patient's own booking history.","contract":{"query":{"def":{"type":"object","shape":{"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{},{}]},"type":"number","isFinite":true},"defaultValue":50},"type":"default"},"offset":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true},"defaultValue":0},"type":"default"},"status":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"pending_payment":"pending_payment","funds_held":"funds_held","confirmed":"confirmed","release_pending":"release_pending","fulfilled":"fulfilled","canceled":"canceled","refunded":"refunded"}},"type":"enum","enum":{"pending_payment":"pending_payment","funds_held":"funds_held","confirmed":"confirmed","release_pending":"release_pending","fulfilled":"fulfilled","canceled":"canceled","refunded":"refunded"},"options":["pending_payment","funds_held","confirmed","release_pending","fulfilled","canceled","refunded"]}},"type":"optional"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"status":{"def":{"type":"string"},"type":"string"},"cashPriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"scheduledFor":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"fulfilledAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"canceledAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"hsoTitle":{"def":{"type":"string"},"type":"string"},"providerName":{"def":{"type":"string"},"type":"string"},"stripePayoutsEnabled":{"def":{"type":"boolean"},"type":"boolean"},"closeoutAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"agentActivity":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"object","shape":{"agentTokenId":{"def":{"type":"string"},"type":"string"},"agentLabel":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"ecosystemId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"mandateId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"mandateLabel":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"status":{"def":{"type":"string"},"type":"string"},"cashPriceCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"scheduledFor":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"fulfilledAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"canceledAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"hsoTitle":{"def":{"type":"string"},"type":"string"},"providerName":{"def":{"type":"string"},"type":"string"},"stripePayoutsEnabled":{"def":{"type":"boolean"},"type":"boolean"},"closeoutAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"agentActivity":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"object","shape":{"agentTokenId":{"def":{"type":"string"},"type":"string"},"agentLabel":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"ecosystemId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"mandateId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"mandateLabel":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"pagination":{"def":{"type":"object","shape":{"limit":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"offset":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"hasMore":{"def":{"type":"boolean"},"type":"boolean"}}},"type":"object"}}},"type":"object"}}},{"name":"list_my_receipts","toolset":"patient","method":"GET","path":"/me/receipts","authority":"patient","authRequired":"identity_session","permission":"READ_RECEIPTS","sideEffect":"read","signing":"none","description":"List receipts (patient view).","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"bookingId":{"def":{"type":"string"},"type":"string"},"receiptNumber":{"def":{"type":"string"},"type":"string"},"issuedAt":{"def":{"type":"string"},"type":"string"},"hsaFsaEligible":{"def":{"type":"boolean"},"type":"boolean"},"totalCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"bookingId":{"def":{"type":"string"},"type":"string"},"receiptNumber":{"def":{"type":"string"},"type":"string"},"issuedAt":{"def":{"type":"string"},"type":"string"},"hsaFsaEligible":{"def":{"type":"boolean"},"type":"boolean"},"totalCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"type":"object"}}},{"name":"get_my_receipt","toolset":"patient","method":"GET","path":"/me/receipts/:id","authority":"patient","authRequired":"identity_session","permission":"READ_RECEIPTS","sideEffect":"read","signing":"receipt","description":"Receipt detail with a signed, offline-verifiable receipt object. format=insurance requires SHARE_RECEIPT_INSURANCE Layer 2 consent.","contract":{"query":{"def":{"type":"object","shape":{"format":{"def":{"type":"default","innerType":{"def":{"type":"enum","entries":{"patient":"patient","insurance":"insurance"}},"type":"enum","enum":{"patient":"patient","insurance":"insurance"},"options":["patient","insurance"]},"defaultValue":"patient"},"type":"default"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"receiptId":{"def":{"type":"string"},"type":"string"},"bookingId":{"def":{"type":"string"},"type":"string"},"receiptNumber":{"def":{"type":"string"},"type":"string"},"format":{"def":{"type":"enum","entries":{"patient":"patient","insurance":"insurance"}},"type":"enum","enum":{"patient":"patient","insurance":"insurance"},"options":["patient","insurance"]},"totalCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"currency":{"def":{"type":"string"},"type":"string"},"hsaFsaEligible":{"def":{"type":"boolean"},"type":"boolean"},"bookedByAgentTokenId":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"},"bookedUnderMandateId":{"def":{"type":"optional","innerType":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"type":"optional"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"},"signature":{"def":{"type":"string"},"type":"string"}}},"type":"object"}}},{"name":"grant_agent_token","toolset":"patient","method":"POST","path":"/agent-tokens","authority":"patient","authRequired":"identity_session","sideEffect":"write","signing":"none","description":"Mint a scoped root agent token (rawToken returned ONCE).","contract":{"request":{"def":{"type":"object","shape":{"ecosystemId":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"label":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"permissions":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"},"checks":[{}]},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"dataTier":{"def":{"type":"default","innerType":{"def":{"type":"union","options":[{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}},{"def":{"type":"literal","values":[3]},"type":"literal","values":{}}]},"type":"union","options":[{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}},{"def":{"type":"literal","values":[3]},"type":"literal","values":{}}]},"defaultValue":1},"type":"default"},"spendingLimitCents":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true}},"type":"optional"},"spendingPeriod":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"daily":"daily","weekly":"weekly","monthly":"monthly"}},"type":"enum","enum":{"daily":"daily","weekly":"weekly","monthly":"monthly"},"options":["daily","weekly","monthly"]}},"type":"optional"},"singleTransactionMaxCents":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true}},"type":"optional"},"expiresAt":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":false,"local":false,"precision":null,"pattern":{}},"type":"string"}]},"type":"string"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"token":{"def":{"type":"string"},"type":"string"},"tokenPreview":{"def":{"type":"string"},"type":"string"},"ecosystemId":{"def":{"type":"string"},"type":"string"},"label":{"def":{"type":"string"},"type":"string"},"permissions":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"dataTier":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"spendingLimitCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"spendingPeriod":{"def":{"type":"nullable","innerType":{"def":{"type":"enum","entries":{"daily":"daily","weekly":"weekly","monthly":"monthly"}},"type":"enum","enum":{"daily":"daily","weekly":"weekly","monthly":"monthly"},"options":["daily","weekly","monthly"]}},"type":"nullable"},"singleTransactionMaxCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"expiresAt":{"def":{"type":"string"},"type":"string"},"issuedAt":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"},"successStatus":201}},{"name":"list_agent_tokens","toolset":"patient","method":"GET","path":"/agent-tokens","authority":"patient","authRequired":"identity_session","sideEffect":"read","signing":"none","description":"List the patient's active agent tokens.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"ecosystemId":{"def":{"type":"string"},"type":"string"},"label":{"def":{"type":"string"},"type":"string"},"tokenPreview":{"def":{"type":"string"},"type":"string"},"permissions":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"dataTier":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"spendingLimitCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"spendingPeriod":{"def":{"type":"nullable","innerType":{"def":{"type":"enum","entries":{"daily":"daily","weekly":"weekly","monthly":"monthly"}},"type":"enum","enum":{"daily":"daily","weekly":"weekly","monthly":"monthly"},"options":["daily","weekly","monthly"]}},"type":"nullable"},"singleTransactionMaxCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"issuedAt":{"def":{"type":"string"},"type":"string"},"expiresAt":{"def":{"type":"string"},"type":"string"},"revokedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"ecosystemRevokedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"ecosystemId":{"def":{"type":"string"},"type":"string"},"label":{"def":{"type":"string"},"type":"string"},"tokenPreview":{"def":{"type":"string"},"type":"string"},"permissions":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"dataTier":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"spendingLimitCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"spendingPeriod":{"def":{"type":"nullable","innerType":{"def":{"type":"enum","entries":{"daily":"daily","weekly":"weekly","monthly":"monthly"}},"type":"enum","enum":{"daily":"daily","weekly":"weekly","monthly":"monthly"},"options":["daily","weekly","monthly"]}},"type":"nullable"},"singleTransactionMaxCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"issuedAt":{"def":{"type":"string"},"type":"string"},"expiresAt":{"def":{"type":"string"},"type":"string"},"revokedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"ecosystemRevokedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"type":"object"}}},{"name":"create_mandate","toolset":"patient","method":"POST","path":"/mandates","authority":"patient","authRequired":"identity_session","sideEffect":"write","signing":"none","description":"Mint a standing mandate: durable, bounded agent spending authority (specialty-scoped, dollar-capped, time-bounded). First-person only; IA2 + GRANT_MANDATE consent required (ADR 0182).","contract":{"request":{"def":{"type":"object","shape":{"ecosystemId":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"agentTokenId":{"def":{"type":"optional","innerType":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"uuid","check":"string_format","abort":false,"pattern":{}},"type":"string"}]},"type":"string"}},"type":"optional"},"label":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"specialties":{"def":{"type":"array","element":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"checks":[{},{}]},"type":"array","element":{"def":{"type":"string","checks":[{},{}]},"type":"string"}},"maxPerTransactionCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true},"maxTotalCents":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true}},"type":"optional"},"validUntil":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":false,"local":false,"precision":null,"pattern":{}},"type":"string"}]},"type":"string"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"ecosystemId":{"def":{"type":"string"},"type":"string"},"agentTokenId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"label":{"def":{"type":"string"},"type":"string"},"specialties":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"maxPerTransactionCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"maxTotalCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"spentCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"remainingCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"status":{"def":{"type":"enum","entries":{"active":"active","revoked":"revoked","expired":"expired","exhausted":"exhausted"}},"type":"enum","enum":{"active":"active","revoked":"revoked","expired":"expired","exhausted":"exhausted"},"options":["active","revoked","expired","exhausted"]},"validFrom":{"def":{"type":"string"},"type":"string"},"validUntil":{"def":{"type":"string"},"type":"string"},"revokedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"createdAt":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"},"successStatus":201}},{"name":"list_mandates","toolset":"patient","method":"GET","path":"/mandates","authority":"patient","authRequired":"identity_session","permission":"READ_CONSENT","sideEffect":"read","signing":"none","description":"List the patient's standing mandates (all lifecycle states) — agents cite an active mandate's id on authorize/commit.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"ecosystemId":{"def":{"type":"string"},"type":"string"},"agentTokenId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"label":{"def":{"type":"string"},"type":"string"},"specialties":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"maxPerTransactionCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"maxTotalCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"spentCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"remainingCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"status":{"def":{"type":"enum","entries":{"active":"active","revoked":"revoked","expired":"expired","exhausted":"exhausted"}},"type":"enum","enum":{"active":"active","revoked":"revoked","expired":"expired","exhausted":"exhausted"},"options":["active","revoked","expired","exhausted"]},"validFrom":{"def":{"type":"string"},"type":"string"},"validUntil":{"def":{"type":"string"},"type":"string"},"revokedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"createdAt":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"ecosystemId":{"def":{"type":"string"},"type":"string"},"agentTokenId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"label":{"def":{"type":"string"},"type":"string"},"specialties":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"maxPerTransactionCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"maxTotalCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"spentCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"remainingCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"status":{"def":{"type":"enum","entries":{"active":"active","revoked":"revoked","expired":"expired","exhausted":"exhausted"}},"type":"enum","enum":{"active":"active","revoked":"revoked","expired":"expired","exhausted":"exhausted"},"options":["active","revoked","expired","exhausted"]},"validFrom":{"def":{"type":"string"},"type":"string"},"validUntil":{"def":{"type":"string"},"type":"string"},"revokedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"createdAt":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}}},"type":"object"}}},{"name":"get_mandate","toolset":"patient","method":"GET","path":"/mandates/:id","authority":"patient","authRequired":"identity_session","permission":"READ_CONSENT","sideEffect":"read","signing":"none","description":"Standing mandate detail: scope, caps, remaining budget, lifecycle status.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"ecosystemId":{"def":{"type":"string"},"type":"string"},"agentTokenId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"label":{"def":{"type":"string"},"type":"string"},"specialties":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"maxPerTransactionCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"maxTotalCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"spentCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"remainingCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"status":{"def":{"type":"enum","entries":{"active":"active","revoked":"revoked","expired":"expired","exhausted":"exhausted"}},"type":"enum","enum":{"active":"active","revoked":"revoked","expired":"expired","exhausted":"exhausted"},"options":["active","revoked","expired","exhausted"]},"validFrom":{"def":{"type":"string"},"type":"string"},"validUntil":{"def":{"type":"string"},"type":"string"},"revokedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"createdAt":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"revoke_mandate","toolset":"patient","method":"POST","path":"/mandates/:id/revoke","authority":"patient","authRequired":"identity_session","sideEffect":"write","signing":"none","description":"Revoke a standing mandate (soft, immediate, first-person only). Executed transactions resolve by dispute, never retroactive revocation.","contract":{"request":{"def":{"type":"object","shape":{"reason":{"def":{"type":"string","checks":[{},{}]},"type":"string"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"ecosystemId":{"def":{"type":"string"},"type":"string"},"agentTokenId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"label":{"def":{"type":"string"},"type":"string"},"specialties":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"maxPerTransactionCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"maxTotalCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"spentCents":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"remainingCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"status":{"def":{"type":"enum","entries":{"active":"active","revoked":"revoked","expired":"expired","exhausted":"exhausted"}},"type":"enum","enum":{"active":"active","revoked":"revoked","expired":"expired","exhausted":"exhausted"},"options":["active","revoked","expired","exhausted"]},"validFrom":{"def":{"type":"string"},"type":"string"},"validUntil":{"def":{"type":"string"},"type":"string"},"revokedAt":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"createdAt":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"revoke_agent_token","toolset":"patient","method":"POST","path":"/agent-tokens/:id/revoke","authority":"patient","authRequired":"identity_session","sideEffect":"write","signing":"none","description":"Revoke an agent token; cascades to its entire subtree.","contract":{"request":{"def":{"type":"object","shape":{"reason":{"def":{"type":"string","checks":[{},{}]},"type":"string"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"revokedCount":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"subtreeSize":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"}}},{"name":"mint_child_token","toolset":"delegation","method":"POST","path":"/agent-tokens/children","authority":"patient","authRequired":"agent_token","sideEffect":"write","signing":"none","description":"Mint a strictly-weaker CHILD token from the calling agent token, under enforced attenuation (Doctrine §1).","contract":{"request":{"def":{"type":"object","shape":{"ecosystemId":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"label":{"def":{"type":"string","checks":[{},{}]},"type":"string"},"permissions":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"},"checks":[{}]},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"dataTier":{"def":{"type":"optional","innerType":{"def":{"type":"union","options":[{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}},{"def":{"type":"literal","values":[3]},"type":"literal","values":{}}]},"type":"union","options":[{"def":{"type":"literal","values":[1]},"type":"literal","values":{}},{"def":{"type":"literal","values":[2]},"type":"literal","values":{}},{"def":{"type":"literal","values":[3]},"type":"literal","values":{}}]}},"type":"optional"},"spendingLimitCents":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true}},"type":"optional"},"spendingPeriod":{"def":{"type":"optional","innerType":{"def":{"type":"enum","entries":{"daily":"daily","weekly":"weekly","monthly":"monthly"}},"type":"enum","enum":{"daily":"daily","weekly":"weekly","monthly":"monthly"},"options":["daily","weekly","monthly"]}},"type":"optional"},"singleTransactionMaxCents":{"def":{"type":"optional","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true}},"type":"optional"},"expiresAt":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"datetime","check":"string_format","offset":false,"local":false,"precision":null,"pattern":{}},"type":"string"}]},"type":"string"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"token":{"def":{"type":"string"},"type":"string"},"tokenPreview":{"def":{"type":"string"},"type":"string"},"parentTokenId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"rootTokenId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"depth":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"ecosystemId":{"def":{"type":"string"},"type":"string"},"label":{"def":{"type":"string"},"type":"string"},"permissions":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"dataTier":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"spendingLimitCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"spendingPeriod":{"def":{"type":"nullable","innerType":{"def":{"type":"enum","entries":{"daily":"daily","weekly":"weekly","monthly":"monthly"}},"type":"enum","enum":{"daily":"daily","weekly":"weekly","monthly":"monthly"},"options":["daily","weekly","monthly"]}},"type":"nullable"},"singleTransactionMaxCents":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"expiresAt":{"def":{"type":"string"},"type":"string"},"issuedAt":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"},"successStatus":201}},{"name":"events_stream","toolset":"events","method":"GET","path":"/events","authority":"system","authRequired":"agent_token","sideEffect":"read","signing":"none","description":"SSE stream of canonical protocol events."},{"name":"create_event_subscription","toolset":"events","method":"POST","path":"/event-subscriptions","authority":"system","authRequired":"agent_token","sideEffect":"write","signing":"none","description":"Register a webhook callback (HMAC-signed).","contract":{"request":{"def":{"type":"object","shape":{"callbackUrl":{"def":{"type":"string","checks":[{"def":{"type":"string","format":"url","check":"string_format","abort":false},"type":"string"}]},"type":"string"},"eventTypes":{"def":{"type":"default","innerType":{"def":{"type":"array","element":{"def":{"type":"string","checks":[{}]},"type":"string"}},"type":"array","element":{"def":{"type":"string","checks":[{}]},"type":"string"}},"defaultValue":[]},"type":"default"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"callbackUrl":{"def":{"type":"string"},"type":"string"},"eventTypes":{"def":{"type":"array","element":{"def":{"type":"string"},"type":"string"}},"type":"array","element":{"def":{"type":"string"},"type":"string"}},"signingSecret":{"def":{"type":"string"},"type":"string"},"state":{"def":{"type":"string"},"type":"string"},"createdAt":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}}},"type":"object"},"successStatus":201}},{"name":"list_event_deliveries","toolset":"events","method":"GET","path":"/event-subscriptions/:id/deliveries","authority":"system","authRequired":"agent_token","sideEffect":"read","signing":"none","description":"Paginated webhook delivery/attempt log for a subscription: per-attempt status, HTTP result, and real attempt numbers (at-least-once introspection).","contract":{"query":{"def":{"type":"object","shape":{"limit":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{},{}]},"type":"number","isFinite":true},"defaultValue":50},"type":"default"},"offset":{"def":{"type":"default","innerType":{"def":{"type":"number","coerce":true,"checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true},{}]},"type":"number","isFinite":true},"defaultValue":0},"type":"default"}}},"type":"object"},"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"eventId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"eventType":{"def":{"type":"string"},"type":"string"},"attemptNumber":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"httpStatus":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"outcome":{"def":{"type":"string"},"type":"string"},"durationMs":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"attemptedAt":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"type":"array","element":{"def":{"type":"object","shape":{"id":{"def":{"type":"string"},"type":"string"},"eventId":{"def":{"type":"nullable","innerType":{"def":{"type":"string"},"type":"string"}},"type":"nullable"},"eventType":{"def":{"type":"string"},"type":"string"},"attemptNumber":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"httpStatus":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"outcome":{"def":{"type":"string"},"type":"string"},"durationMs":{"def":{"type":"nullable","innerType":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}},"type":"nullable"},"attemptedAt":{"def":{"type":"string"},"type":"string"}},"catchall":{"def":{"type":"unknown"},"type":"unknown"}},"type":"object"}},"meta":{"def":{"type":"object","shape":{"limit":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"offset":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true},"count":{"def":{"type":"number","checks":[{"def":{"type":"number","check":"number_format","abort":false,"format":"safeint"},"type":"number","isFinite":true}]},"type":"number","isFinite":true}}},"type":"object"}}},"type":"object"}}},{"name":"redeliver_event","toolset":"events","method":"POST","path":"/event-subscriptions/:id/deliveries/:deliveryId/redeliver","authority":"system","authRequired":"agent_token","sideEffect":"write","signing":"none","description":"Re-enqueue one event for this subscription. The redelivered event keeps its original eventId so subscriber-side dedupe holds.","contract":{"response":{"def":{"type":"object","shape":{"data":{"def":{"type":"object","shape":{"outboxId":{"def":{"type":"string"},"type":"string"},"eventId":{"def":{"type":"string"},"type":"string"},"subscriptionId":{"def":{"type":"string"},"type":"string"},"state":{"def":{"type":"literal","values":["queued"]},"type":"literal","values":{}}}},"type":"object"}}},"type":"object"},"successStatus":202}}]}