{"info":{"title":"HANK Payer Policy Monitor","contact":{"name":"HANK Engineering","email":"engineering@hank.ai"},"version":"0.1.0","description":"**HANK Payer Policy Monitor** - the audit-grade provenance layer for US health\ninsurance payer policy and hospital price-transparency data. Every record\ncarries reproducible discovery, fetch, and parse evidence.\n\n### Base URL & versioning\nAll JSON endpoints live under the **`/api/v1`** prefix (e.g.\n`/api/v1/payers`, `/api/v1/billing-rules`, `/api/v1/price-transparency`). The\nmajor version is pinned in the URL path.\n\n**What is a breaking change?** Removing an endpoint or field, renaming a field,\nnarrowing a type, making an optional request parameter required, or changing\nthe meaning of an existing value. These ship only under a **new path prefix**\n(`/api/v2`). **Additive** changes - new endpoints, new optional request\nparameters, new fields in a response - are *not* breaking and ship in-place on\n`/api/v1`, so clients must ignore unknown response fields.\n\n**Introducing v2.** A new major version is published as a parallel prefix\n(`/api/v2`) and documented in this same spec under its own server/tag set. The\nprevious major version keeps working through its deprecation window (below);\nthe two run side by side so integrators can migrate one endpoint at a time.\n\n### Deprecation & sunset policy\nWhen an endpoint or version is slated for removal we announce it on the\nresponse itself using the standard HTTP headers, **before** anything is removed:\n\n* **`Deprecation`** - an HTTP-date marking when the endpoint became deprecated\n  (per the *Deprecation HTTP Header Field* draft). Its presence means \"still\n  works, but migrate.\"\n* **`Sunset`** - an HTTP-date (RFC 8594) for the earliest time the endpoint may\n  stop responding. We commit to a **minimum 90-day** gap between the\n  `Deprecation` date and the `Sunset` date.\n* **`Link: <…>; rel=\"successor-version\"`** (and/or `rel=\"deprecation\"`) -\n  points at the replacement endpoint or the migration notes.\n\nDeprecated operations are also flagged `deprecated: true` in this OpenAPI spec.\nNothing is deprecated today; this documents the convention so clients can wire\nup `Deprecation`/`Sunset` handling in advance. Treat the appearance of a\n`Sunset` header as a hard migration deadline.\n\n### Conditional GET (caching)\nRead endpoints that serve a stable, cacheable representation - currently the\nRSS/Atom feed at `/api/v1/policies/updates/feed` - return a strong **`ETag`**\nand honor **`If-None-Match`**: send the ETag back on the next poll and an\nunchanged resource answers **`304 Not Modified`** with an empty body instead of\nre-sending the payload.\n\n### Authentication\nAuthenticate with your **hank.ai console bearer token**. Call the metered edge\nat `https://api.hank.ai/v1/ppman/*` with `Authorization: Bearer <token>` - the\nedge validates the token (credits, rate, and `hank-ppman` service scope) and\nforwards the request. Mint a token at console.hank.ai. A request with no valid\ncontrol-plane identity returns `401`. (The legacy local `X-API-Key` consumer-key\npath has been retired.)\n\n### Pagination\nList endpoints accept `page` (default `1`) and `page_size` (default `20`, max\n`100`) query parameters and return an envelope with `items`, `total`, `page`,\n`page_size`, and `pages`.\n\n### Error envelope\n**Every** `/api` error (4xx and 5xx) returns the same `ErrorResponse` shape:\nan `error` object with a machine-readable `code` (e.g. `validation_error`,\n`rate_limit_exceeded`, `internal_error`), a non-sensitive `message`, a\n`request_id` correlation id (also echoed in the `X-Request-ID` header), and\noptional `details`. The `500` path never leaks internals - quote the\n`request_id` in any support request.\n"},"tags":[{"name":"auth","description":"OAuth login/logout and session management for the web console."},{"name":"payers","description":"Health-insurance payers (Level-1 companies) and their EDI routing entries."},{"name":"policies","description":"Monitored payer policy documents and their change history."},{"name":"billing-rules","description":"Structured billing rules extracted from payer policies (codes, modifiers, conditions)."},{"name":"price-transparency","description":"Hospital price-transparency rates per facility (payers, codes, charges) with full provenance."},{"name":"transparency-dashboard","description":"Aggregate price-transparency coverage and analytics surfaces."},{"name":"pt-documents","description":"Patient document upload (EOB / plan docs) for personalized out-of-pocket estimation."},{"name":"compare","description":"Cross-payer and cross-facility rate comparison endpoints."},{"name":"search","description":"Full-text and structured search across payers, policies, and rules."},{"name":"sources","description":"Monitored source URLs feeding the policy and rate pipelines."},{"name":"analytics","description":"Usage and coverage analytics rollups."},{"name":"audit","description":"Audit trail of changes for provenance and enforcement use."},{"name":"disagreements","description":"Recorded disagreements between extracted and observed billing behavior."},{"name":"payer-health","description":"Per-payer source-health and freshness signals."},{"name":"prior-auth","description":"Prior-authorization requirements surfaced from payer policies."},{"name":"webhooks","description":"Outbound webhook subscriptions for change notifications."},{"name":"email-webhook","description":"Inbound email webhook ingestion (e.g. forwarded payer bulletins)."},{"name":"email-subscriptions","description":"Email digest subscriptions for policy-change alerts."},{"name":"unsubscribe","description":"One-click unsubscribe handling for email notifications."}],"paths":{"/":{"get":{"summary":"Root","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"}},"description":"Auth-stateful landing. Signed-in visitors get the two-door product chooser\n(/welcome); anonymous visitors land on the public PT explorer. The branch is\nSERVER-SIDE - the client whoami probe only toggles CSS after paint and would flash\nthe wrong landing. Manages its own session and FAILS SAFE to the public landing on\nany auth/DB error (the bare root redirect must never 500).","operationId":"root__get"}},"/health":{"get":{"summary":"Health Check","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"}},"description":"Readiness probe - verifies the DB is reachable + queryable.","operationId":"health_check_health_get"}},"/healthz":{"get":{"summary":"Liveness","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"}},"description":"Cheap liveness probe - no DB, no I/O.\n\nUse for Railway/load-balancer liveness checks on tight intervals.\nA failing /healthz means \"process is dead, restart me.\" Use /health\nfor readiness (which DOES touch the DB).","operationId":"liveness_healthz_get"}},"/policy/":{"get":{"tags":["policy"],"summary":"Policy Index","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"}},"description":"The Payer-Policy product landing - links to the policy surfaces. The\n\"Your policies\" (Bring-Your-Own Policy) card renders only when the upload feature\nflag is ON, so it's never an orphan link to a 404 while the feature is dark.","operationId":"policy_index_policy__get"}},"/welcome":{"get":{"summary":"Welcome","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"}},"description":"The signed-in two-door product chooser: Price Transparency | Payer Policy (+ an\nOperator-console door for admins). Anonymous browser → 302 console SSO; anonymous\nXHR → 401 (require_customer_page). Not billable.","operationId":"welcome_welcome_get"}},"/policy/search":{"get":{"tags":["policy"],"summary":"Policy Search Page","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"}},"description":"The policy document-search page. Signed-in only (anon browser → 302 SSO).","operationId":"policy_search_page_policy_search_get"}},"/transparency/":{"get":{"tags":["transparency-dashboard"],"summary":"Landing","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"}},"operationId":"landing_transparency__get"}},"/api/v1/lookup/":{"get":{"tags":["lookup"],"summary":"Lookup","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"topic","schema":{"type":"string","title":"Topic","maxLength":500,"minLength":2,"description":"Free-text clinical/billing topic"},"required":true,"description":"Free-text clinical/billing topic"},{"in":"query","name":"payer","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer","description":"Payer name or uuid; omit to search all payers"},"required":false,"description":"Payer name or uuid; omit to search all payers"},{"in":"query","name":"k","schema":{"type":"integer","title":"K","default":8,"maximum":50,"minimum":1,"description":"Max documents to return"},"required":false,"description":"Max documents to return"},{"in":"query","name":"limit","schema":{"anyOf":[{"type":"integer","maximum":50,"minimum":1},{"type":"null"}],"title":"Limit","description":"Alias for k (max documents to return); takes precedence over k when supplied"},"required":false,"description":"Alias for k (max documents to return); takes precedence over k when supplied"},{"in":"query","name":"include_rules","schema":{"type":"boolean","title":"Include Rules","default":true,"description":"Attach extracted billing rules to each document"},"required":false,"description":"Attach extracted billing rules to each document"}],"operationId":"lookup_api_v1_lookup__get"}},"/api/v1/payers/":{"get":{"tags":["payers"],"summary":"List Payers","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_PayerResponse_"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"payer_type","schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Payer Type"},"required":false},{"in":"query","name":"is_active","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"required":false},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Search"},"required":false},{"in":"query","name":"page","schema":{"type":"integer","title":"Page","default":1,"minimum":1},"required":false},{"in":"query","name":"page_size","schema":{"type":"integer","title":"Page Size","default":20,"maximum":100,"minimum":1},"required":false}],"operationId":"list_payers_api_v1_payers__get"}},"/api/v1/search/":{"get":{"tags":["search"],"summary":"Search","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_SearchResult_"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"q","schema":{"type":"string","title":"Q","maxLength":200,"minLength":2},"required":true},{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id"},"required":false},{"in":"query","name":"specialty","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty"},"required":false},{"in":"query","name":"page","schema":{"type":"integer","title":"Page","default":1,"minimum":1},"required":false},{"in":"query","name":"page_size","schema":{"type":"integer","title":"Page Size","default":20,"maximum":100,"minimum":1},"required":false}],"operationId":"search_api_v1_search__get"}},"/policy/changes":{"get":{"tags":["policy"],"summary":"Policy Changes Page","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":25,"maximum":100,"minimum":1},"required":false}],"description":"Change-history page: a brand/payer picker + state filter + date window over the\npolicy-change timeline. Signed-in only. The initial results region shows the recent\nglobal changes; picking a payer (+ state) narrows to that brand family's timeline.","operationId":"policy_changes_page_policy_changes_get"}},"/policy/sources":{"get":{"tags":["policy"],"summary":"Policy Sources Page","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"status","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"required":false}],"description":"Source freshness list page. Signed-in only (free). Renders the first page inline.","operationId":"policy_sources_page_policy_sources_get"}},"/api/v1/policies/":{"get":{"tags":["policies"],"summary":"List Policies","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_PolicyUpdateResponse_"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id"},"required":false},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"State","description":"2-letter state to narrow a brand's affiliates by operating footprint (requires payer_id)"},"required":false,"description":"2-letter state to narrow a brand's affiliates by operating footprint (requires payer_id)"},{"in":"query","name":"specialty","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty"},"required":false},{"in":"query","name":"change_type","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Type"},"required":false},{"in":"query","name":"severity","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"required":false},{"in":"query","name":"date_from","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"},"required":false},{"in":"query","name":"date_to","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"},"required":false},{"in":"query","name":"is_reviewed","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Reviewed"},"required":false},{"in":"query","name":"sort","schema":{"type":"string","title":"Sort","default":"-created_at","pattern":"^-?(created_at|severity|change_percentage)$"},"required":false},{"in":"query","name":"page","schema":{"type":"integer","title":"Page","default":1,"minimum":1},"required":false},{"in":"query","name":"page_size","schema":{"type":"integer","title":"Page Size","default":20,"maximum":100,"minimum":1},"required":false}],"operationId":"list_policies_api_v1_policies__get"}},"/api/v1/webhooks/":{"get":{"tags":["webhooks"],"summary":"List Webhooks","responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookResponse"},"title":"Response List Webhooks Api V1 Webhooks  Get"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"operationId":"list_webhooks_api_v1_webhooks__get"},"post":{"tags":["webhooks"],"summary":"Create Webhook","responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"operationId":"create_webhook_api_v1_webhooks__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}},"required":true}}},"/policy/documents":{"get":{"tags":["policy-documents"],"summary":"Policy Documents Page","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"}},"description":"The upload page + the signed-in customer's own uploaded-document list. 404 when\nthe feature flag is OFF; anonymous browser → 302 to console SSO\n(require_customer_page). An operator (no customer org) sees the upload form with an\nempty list.","operationId":"policy_documents_page_policy_documents_get"},"post":{"tags":["policy-documents"],"summary":"Upload Policy Document Web","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"description":"Upload one policy PDF for the signed-in customer's org (HTMX form post).\n\nReturns the result partial (success OR a friendly rejection) at HTTP 200 so HTMX\nswaps it into the page. 404 when the flag is OFF. CSRF is enforced by the\nmiddleware (the form carries ``_csrf_token``). Rate-limited to match the API\ningress. The customer must CHECK the consent box (attesting they own the document\nand it is not PHI) - the checked value + version are recorded on the stored row.\nOn a rejection we roll back so no orphan document is committed.","operationId":"upload_policy_document_web_policy_documents_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_policy_document_web_policy_documents_post"}}},"required":true}}},"/policy/my-payers":{"get":{"tags":["policy"],"summary":"Policy My Payers Page","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"}},"description":"\"Are you watching my payers?\" page. Signed-in only (free). Pick a payer to see whether\nwe monitor it and how fresh those sources are.","operationId":"policy_my_payers_page_policy_my_payers_get"}},"/policy/confidence":{"get":{"tags":["policy"],"summary":"Policy Confidence Page","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"}},"description":"Data-confidence badge - the overall TIER of our policy coverage from observable\nsource-health signals only (no internal scoring). Signed-in only (free).","operationId":"policy_confidence_page_policy_confidence_get"}},"/policy/developers":{"get":{"tags":["policy"],"summary":"Policy Developers","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"}},"description":"PUBLIC developer docs for the Payer-Policy product - all five capabilities over REST +\nMCP, with the metered operation for each, plus the MCP tool catalog. Anonymous-accessible\n(the 'where's the documentation' surface the anon banner links to); the surfaces themselves\nstay login-gated + metered.","operationId":"policy_developers_policy_developers_get"}},"/policy/find-payer":{"get":{"tags":["policy"],"summary":"Find Payer Page","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"}},"description":"The fielded find-my-payer form. Signed-in only.","operationId":"find_payer_page_policy_find_payer_get"}},"/policy/monitoring":{"get":{"tags":["policy"],"summary":"Policy Monitoring Page","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"}},"description":"Monitoring overview page. Signed-in only. Renders the buckets inline.","operationId":"policy_monitoring_page_policy_monitoring_get"}},"/api/v1/payers/sync":{"post":{"tags":["payers"],"summary":"Trigger Sync","responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncTriggerResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Trigger a full payer directory sync as a background task.","operationId":"trigger_sync_api_v1_payers_sync_post"}},"/api/v1/audit/export":{"get":{"tags":["audit"],"summary":"Audit Export","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditExportResponse"}}},"description":"JSON evidence package (when ``format=json``). With ``format=zip`` the body is instead an ``application/zip`` attachment."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"code","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Code or comma-separated codes"},"required":false,"description":"Code or comma-separated codes"},{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id","description":"Filter to specific payer"},"required":false,"description":"Filter to specific payer"},{"in":"query","name":"from_date","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From Date","description":"Rules with effective_from >= this date"},"required":false,"description":"Rules with effective_from >= this date"},{"in":"query","name":"to_date","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To Date","description":"Rules with effective_from <= this date"},"required":false,"description":"Rules with effective_from <= this date"},{"in":"query","name":"format","schema":{"type":"string","title":"Format","default":"json","description":"Export format: json or zip"},"required":false,"description":"Export format: json or zip"},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":100,"maximum":500,"minimum":1,"description":"Max rules to export"},"required":false,"description":"Max rules to export"}],"description":"Export compliance audit evidence packages.","operationId":"audit_export_api_v1_audit_export_get"}},"/api/v1/payers/match":{"get":{"tags":["payers"],"summary":"Match Payer","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"company","schema":{"type":"string","title":"Company","maxLength":500,"minLength":2,"description":"OCR-extracted company name"},"required":true,"description":"OCR-extracted company name"},{"in":"query","name":"plan","schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Plan","description":"Optional plan name"},"required":false,"description":"Optional plan name"},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"State","description":"State hint"},"required":false,"description":"State hint"},{"in":"query","name":"zip","schema":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Zip","description":"ZIP hint for disambiguation"},"required":false,"description":"ZIP hint for disambiguation"},{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Payer Id","description":"EDI payer ID from insurance card"},"required":false,"description":"EDI payer ID from insurance card"},{"in":"query","name":"naic_code","schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Naic Code","description":"NAIC company code"},"required":false,"description":"NAIC company code"},{"in":"query","name":"phone","schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Phone","description":"Provider services phone from insurance card"},"required":false,"description":"Provider services phone from insurance card"},{"in":"query","name":"address","schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Address","description":"Claims address from insurance card"},"required":false,"description":"Claims address from insurance card"},{"in":"query","name":"addr_line","schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Addr Line","description":"Structured claims-address line from the card (PO box or street). With any addr_* param present the structured leg governs and the legacy free-text `address` is ignored."},"required":false,"description":"Structured claims-address line from the card (PO box or street). With any addr_* param present the structured leg governs and the legacy free-text `address` is ignored."},{"in":"query","name":"addr_city","schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Addr City","description":"Claims-address city (accepted; not matched on)"},"required":false,"description":"Claims-address city (accepted; not matched on)"},{"in":"query","name":"addr_state","schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Addr State","description":"Claims-address (lockbox) state (accepted; not matched on)"},"required":false,"description":"Claims-address (lockbox) state (accepted; not matched on)"},{"in":"query","name":"addr_zip","schema":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Addr Zip","description":"Claims-address ZIP. Required for a street line to key; a PO box can resolve without it."},"required":false,"description":"Claims-address ZIP. Required for a street line to key; a PO box can resolve without it."},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":5,"maximum":20,"minimum":1},"required":false}],"operationId":"match_payer_api_v1_payers_match_get"}},"/api/v1/payers/stats":{"get":{"tags":["payers"],"summary":"Get Stats","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayerDirectoryStats"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Payer directory health stats - covers both parent payers and entries.","operationId":"get_stats_api_v1_payers_stats_get"}},"/policy/changes/diff":{"get":{"tags":["policy"],"summary":"Policy Change Diff","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"id","schema":{"type":"string","title":"Id","format":"uuid"},"required":true}],"description":"The cream/sienna-skinned side-by-side diff for a change, lazy-loaded by the detail\npage. Reuses render_policy_diff_table (shared with the admin diff). READ-ONLY; FREE\nsub-resource (a follow-through of the already-billed timeline - not separately billed).","operationId":"policy_change_diff_policy_changes_diff_get"}},"/transparency/search":{"get":{"tags":["transparency-dashboard"],"summary":"Search Page","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"q","schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"},"required":false},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"code_type","schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Code Type"},"required":false},{"in":"query","name":"sort","schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sort"},"required":false},{"in":"query","name":"dir","schema":{"type":"string","title":"Dir","default":"desc","maxLength":4},"required":false},{"in":"query","name":"near","schema":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Near"},"required":false},{"in":"query","name":"radius","schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Radius"},"required":false},{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Id"},"required":false}],"operationId":"search_page_transparency_search_get"}},"/unsubscribe/{token}":{"post":{"tags":["unsubscribe"],"summary":"Unsubscribe","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"path","name":"token","schema":{"type":"string","title":"Token"},"required":true}],"description":"Public one-click unsubscribe endpoint (RFC 8058).\n\nLooks up the subscription by unsubscribe_token, deactivates it,\nand renders a confirmation page.","operationId":"unsubscribe_unsubscribe__token__post"}},"/webhook/email/event":{"post":{"tags":["email-webhook"],"summary":"Email Event","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"}},"description":"Ingest SendGrid Event Webhook events (bounce/dropped/spamreport/unsubscribe).\n\nThe body is NOT trusted until its ECDSA-P256 signature verifies against the\nconfigured SendGrid verification key. On bounce/dropped/spamreport/\nunsubscribe we suppress the address (stops every subscription for it) and\nrecord the reason in EmailDeliveryLog. Replays are idempotent.\n\nSecurity posture: fail-closed. A missing verification key, missing/invalid\nsignature, or tampered body all yield 401/403 and write NOTHING.","operationId":"email_event_webhook_email_event_post"}},"/api/v1/lookup/payers":{"get":{"tags":["lookup"],"summary":"Payer Suggest","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"q","schema":{"type":"string","title":"Q","maxLength":80,"minLength":1,"description":"Payer name prefix/substring"},"required":true,"description":"Payer name prefix/substring"}],"description":"Typeahead: active payers matching `q` (exact-prefix first), for the payer picker.","operationId":"payer_suggest_api_v1_lookup_payers_get"}},"/api/v1/lookup/topics":{"get":{"tags":["lookup"],"summary":"Topic Suggest","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"q","schema":{"type":"string","title":"Q","default":"","maxLength":80,"description":"Topic prefix/substring; blank returns the most-covered topics"},"required":false,"description":"Topic prefix/substring; blank returns the most-covered topics"},{"in":"query","name":"payer","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer","description":"Scope suggestions to one payer (name or uuid); omit for all"},"required":false,"description":"Scope suggestions to one payer (name or uuid); omit for all"},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":10,"maximum":25,"minimum":1},"required":false}],"description":"Typeahead for the TOPIC box, grounded in the real corpus: only topics that an\nindexed policy document actually covers are suggested (no fabricated topics).\nOptionally payer-scoped so \"what can I ask about THIS payer\" stays honest.","operationId":"topic_suggest_api_v1_lookup_topics_get"}},"/api/v1/payers/export":{"get":{"tags":["payers"],"summary":"Export Payers","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayerExportResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"format","schema":{"type":"string","title":"Format","default":"json","pattern":"^(json|csv)$"},"required":false},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":10000,"maximum":50000,"minimum":1},"required":false}],"description":"Bulk export for ClaimMaker to seed its local cache.","operationId":"export_payers_api_v1_payers_export_get"}},"/api/v1/payers/health":{"get":{"tags":["payer-health"],"summary":"List Payer Health","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_PayerHealthResponse_"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"payer_type","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Type"},"required":false},{"in":"query","name":"status","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Filter: healthy, warning, critical"},"required":false,"description":"Filter: healthy, warning, critical"},{"in":"query","name":"sort_by","schema":{"type":"string","title":"Sort By","default":"composite_score","description":"Sort field"},"required":false,"description":"Sort field"},{"in":"query","name":"sort_order","schema":{"type":"string","title":"Sort Order","default":"desc","description":"asc or desc"},"required":false,"description":"asc or desc"},{"in":"query","name":"page","schema":{"type":"integer","title":"Page","default":1,"minimum":1},"required":false},{"in":"query","name":"page_size","schema":{"type":"integer","title":"Page Size","default":50,"maximum":100,"minimum":1},"required":false}],"description":"List all payers ranked by health score.","operationId":"list_payer_health_api_v1_payers_health_get"}},"/api/v1/sources/stale":{"get":{"tags":["sources"],"summary":"List Stale Sources","responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StaleSourceResponse"},"title":"Response List Stale Sources Api V1 Sources Stale Get"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Return sources needing human review with diagnostic context.\n\nSources enter the `needs_human_review` state after automated healing\n(rule-based and AI) has been exhausted. These sources require manual\nintervention to restore scraping.\n\nSanitized output: no raw HTML, no headers or auth data in scrape_config.","operationId":"list_stale_sources_api_v1_sources_stale_get"}},"/policy/applicability":{"get":{"tags":["policy"],"summary":"Policy Applicability Page","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id"},"required":false},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"via","schema":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Via"},"required":false}],"description":"The applicability page: a payer picker + optional state / LOB / procedure code.\nSigned-in only. Optional ``payer_id`` (+ ``state``) prefill the picker and auto-load\nresults - this is what makes the governing-MAC link (see the results partial) land on\na working view of the MAC payer's policies. ``via=mac`` (set on the governing-MAC link)\nshows a breadcrumb caption explaining the user arrived from a MAC-authority reference.","operationId":"policy_applicability_page_policy_applicability_get"}},"/transparency/compare":{"get":{"tags":["transparency-dashboard"],"summary":"Compare","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"codes","schema":{"type":"string","title":"Codes","default":""},"required":false},{"in":"query","name":"code_types","schema":{"type":"string","title":"Code Types","default":""},"required":false},{"in":"query","name":"hospitals","schema":{"type":"string","title":"Hospitals","default":""},"required":false}],"description":"Side-by-side comparison matrix: rows = procedures, cols = hospitals.\n\nInputs:\n  - codes:       comma-separated procedure codes (parallel to code_types)\n  - code_types:  comma-separated code types (CPT/MS_DRG/HCPCS/...)\n  - hospitals:   comma-separated CCNs\n\nEach cell shows the median rate for that (code, hospital) pair, color-\ncoded against the procedure's row median: cheaper = green ↓, pricier =\nred ↑. Tabular numerals so columns line up vertically.\n\nWith no params, render an empty-state with example links + form.","operationId":"compare_transparency_compare_get"}},"/transparency/updates":{"get":{"tags":["transparency-dashboard"],"summary":"Updates","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"}},"description":"Public 'what changed lately' surface.\n\nThree editorial sections, each cached against the data watermark\nso a fresh nightly ingest auto-invalidates the next time someone\nhits the page (no cron-driven cache busting needed):\n\n  1. Hospitals updated - last 7 + last 30 days.\n  2. Biggest median movers - codes whose national median moved\n     most over the last 30 days vs. the prior window.\n  3. Per-payer rate movement - top payers across the network.","operationId":"updates_transparency_updates_get"}},"/api/v1/auth/ws-ticket":{"post":{"tags":["websocket"],"summary":"Create Ws Ticket","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Exchange control-plane identity for a 30-second WebSocket ticket.\n\nThe ticket signs the caller's control-plane org so the socket binds to the\nsame owner (per-org connection cap) the retired X-API-Key flow used to bind\nto a key id.","operationId":"create_ws_ticket_api_v1_auth_ws_ticket_post"}},"/api/v1/billing-rules/":{"get":{"tags":["billing-rules"],"summary":"List Billing Rules","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRuleListResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"code","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"required":false},{"in":"query","name":"code_type","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Type"},"required":false},{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id"},"required":false},{"in":"query","name":"plan_type","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Type"},"required":false},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"network_status","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Network Status"},"required":false},{"in":"query","name":"rule_category","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Category"},"required":false},{"in":"query","name":"specialty","schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Specialty","description":"Filter by medical specialty (e.g. anesthesiology, cardiology)"},"required":false,"description":"Filter by medical specialty (e.g. anesthesiology, cardiology)"},{"in":"query","name":"modifier","schema":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Modifier","description":"Filter to rules that ADDRESS this modifier code - the rule IS the modifier (code_type='modifier'), or its modifier_dispositions / modifier_requirements carry it."},"required":false,"description":"Filter to rules that ADDRESS this modifier code - the rule IS the modifier (code_type='modifier'), or its modifier_dispositions / modifier_requirements carry it."},{"in":"query","name":"severity","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"required":false},{"in":"query","name":"origin","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"},"required":false},{"in":"query","name":"verification_status","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Status"},"required":false},{"in":"query","name":"effective_date","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective Date"},"required":false},{"in":"query","name":"current_only","schema":{"type":"boolean","title":"Current Only","default":true,"description":"Only return rules with no effective_to"},"required":false,"description":"Only return rules with no effective_to"},{"in":"query","name":"offset","schema":{"type":"integer","title":"Offset","default":0,"minimum":0},"required":false},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":50,"maximum":200,"minimum":1},"required":false}],"description":"Paginated listing of billing rules with optional filters.","operationId":"list_billing_rules_api_v1_billing_rules__get"},"post":{"tags":["billing-rules"],"summary":"Create Billing Rule","responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRuleResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Create a new billing rule.","operationId":"create_billing_rule_api_v1_billing_rules__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRuleCreate"}}},"required":true}}},"/api/v1/payers/aliases":{"post":{"tags":["payers"],"summary":"Create Alias","responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasCreatedResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Create an alias mapping from a coder correction.","operationId":"create_alias_api_v1_payers_aliases_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasCreateRequest"}}},"required":true}}},"/api/v1/payers/entries":{"post":{"tags":["payers"],"summary":"Create Entry","responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntryCreatedResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Create a new payer entry from a coder's unknown-payer submission.","operationId":"create_entry_api_v1_payers_entries_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntryCreateRequest"}}},"required":true}}},"/api/v1/payers/sources":{"get":{"tags":["payers"],"summary":"List Available Sources","responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SourceStatusItem"},"title":"Response List Available Sources Api V1 Payers Sources Get"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"List all available payer data sources with their sync status.","operationId":"list_available_sources_api_v1_payers_sources_get"}},"/policy/search/results":{"get":{"tags":["policy"],"summary":"Policy Search Results","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"topic","schema":{"type":"string","title":"Topic","default":"","maxLength":500},"required":false},{"in":"query","name":"payer","schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Payer"},"required":false},{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Payer Id"},"required":false},{"in":"query","name":"k","schema":{"type":"integer","title":"K","default":8,"maximum":25,"minimum":1},"required":false}],"description":"HTMX results partial: ranked policy documents for ``topic`` (+ optional ``payer``)\nwith citations. Reuses the ``/api/v1/lookup`` engine; READ-ONLY; metered\n``policy.lookup``. A signed-in customer's OWN uploaded policies fold in (labeled\n\"Your uploaded policy\"); operators/anon resolve None → global corpus only. Degraded\npaths render a calm state, never a 500.","operationId":"policy_search_results_policy_search_results_get"}},"/transparency/rankings":{"get":{"tags":["transparency-dashboard"],"summary":"Rankings Hub","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"}},"description":"Top-of-funnel rankings hub: 7 leaderboard peeks (top-5 each).\n\nThe peek-5 lists are now SLICED FROM the same ``rank_full:{slug}``\ncached top-100 the full ranking view uses, so the order a user sees\non the hub is exactly the order they see after clicking through.\nWithout this, two independent ``TABLESAMPLE BERNOULLI(0.5)`` calls\n(one for limit=5, one for limit=100) drew different samples and\nproduced different top rows - the user reported it.","operationId":"rankings_hub_transparency_rankings_get"}},"/webhook/email/inbound":{"post":{"tags":["email-webhook"],"summary":"Inbound Email","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"}},"operationId":"inbound_email_webhook_email_inbound_post"}},"/api/v1/payers/sync/doi":{"post":{"tags":["payers"],"summary":"Trigger Doi Sync","responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncTriggerResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Trigger DOI sync as a background task.","operationId":"trigger_doi_sync_api_v1_payers_sync_doi_post"}},"/policy/changes/results":{"get":{"tags":["policy"],"summary":"Policy Changes Results","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id"},"required":false},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"date_from","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"},"required":false},{"in":"query","name":"severity","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"required":false},{"in":"query","name":"change_type","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Type"},"required":false},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":50,"maximum":100,"minimum":1},"required":false}],"description":"HTMX results partial. With a ``payer_id``, resolve the brand family (F7 include-\nunknown) narrowed by ``state`` and return its change timeline + an unknown-footprint\nbanner; without a ``payer_id``, the recent global changes. Metered ``policy.changes``.","operationId":"policy_changes_results_policy_changes_results_get"}},"/policy/sources/results":{"get":{"tags":["policy"],"summary":"Policy Sources Results","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"status","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"required":false},{"in":"query","name":"page","schema":{"type":"integer","title":"Page","default":1,"minimum":1},"required":false},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":50,"maximum":200,"minimum":1},"required":false}],"description":"Metered (``policy.monitor``) source-freshness rows: filter (``attention`` =\nfailing+needs_review) + pagination (clamped <=200). F3: never the raw error string.","operationId":"policy_sources_results_policy_sources_results_get"}},"/transparency/dashboard":{"get":{"tags":["transparency-dashboard"],"summary":"Dashboard","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"code_filter","schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Code Filter"},"required":false},{"in":"query","name":"sort","schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sort"},"required":false},{"in":"query","name":"dir","schema":{"type":"string","title":"Dir","default":"desc","maxLength":4},"required":false}],"description":"National pricing dashboard - KPIs, top procedures, state coverage, payers.\n\nPERF: pt_negotiated_rates has 11M+ rows across 43 monthly partitions.\nNaive aggregates were 24s+ on the original implementation. We replaced\nwith sample-based + small-table queries:\n  - Total rate-row count: SUM(reltuples) from pg_class for partition\n    children - instant, approximate.\n  - Active hospitals + states: small scan of pt_hospitals (7,371 rows)\n    rather than DISTINCT over the partitioned rates table.\n  - Top procedures + payers: TABLESAMPLE BERNOULLI(0.5) gives a\n    representative ~55K-row sample in <1s. Counts are scaled (×200)\n    to estimate full-population values. Approximate but directionally\n    correct for a dashboard headline. Users who want exact stats drill\n    into /procedure/{code}/by-state.\n\nA 3-minute process-local TTL cache fronts every query - the underlying\ndata only changes when an MRF batch ingests, so serving a few-minute-\nstale aggregate is fine and drops cached loads to <50ms.","operationId":"dashboard_transparency_dashboard_get"}},"/api/v1/analytics/trends":{"get":{"tags":["analytics"],"summary":"List Trends","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrendsResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"window_days","schema":{"type":"integer","title":"Window Days","default":90,"maximum":365,"minimum":1,"description":"Analysis window in days"},"required":false,"description":"Analysis window in days"},{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id","description":"Filter to specific payer"},"required":false,"description":"Filter to specific payer"},{"in":"query","name":"specialty","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty","description":"Filter by specialty"},"required":false,"description":"Filter by specialty"},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":20,"maximum":100,"minimum":1,"description":"Max results"},"required":false,"description":"Max results"}],"description":"Detect payer policy tightening/loosening trends over time.","operationId":"list_trends_api_v1_analytics_trends_get"}},"/api/v1/policies/updates":{"get":{"tags":["policies"],"summary":"Recent Updates","responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PolicyUpdateResponse"},"title":"Response Recent Updates Api V1 Policies Updates Get"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":20,"maximum":100,"minimum":1},"required":false},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cursor"},"required":false}],"operationId":"recent_updates_api_v1_policies_updates_get"}},"/api/v1/policy/documents":{"get":{"tags":["policy-documents"],"summary":"List Policy Documents","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"List the caller org's own uploaded policy documents (metadata only). 404 when\nthe flag is OFF; 401 anon; 503 if the PHI key is misconfigured. Owner-scoped by\nconstruction - the WHERE owner_org_id filter is the authorization.","operationId":"list_policy_documents_api_v1_policy_documents_get"},"post":{"tags":["policy-documents"],"summary":"Upload Policy Document","responses":{"201":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Upload one policy PDF owned by the caller's control-plane org.\n\n→ 201 ``{document_id, chunks_indexed}`` on success. 404 when the feature flag is\nOFF. 401 for an anonymous caller (``customer_org_id`` resolves the edge/SSO org or\n401). 400/413/503 for a rejected upload (not a PDF / too large / key misconfigured)\nget_db rolls back on the raised error, so a rejected upload leaves no row. The\noptional subscription-only payer-tag runs inside upload_user_policy (no-op unless\nenabled).","operationId":"upload_policy_document_api_v1_policy_documents_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_policy_document_api_v1_policy_documents_post"}}},"required":true}}},"/policy/documents/delete":{"post":{"tags":["policy-documents"],"summary":"Delete Policy Document Web","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"description":"Delete one of the signed-in customer's own uploaded policies (HTMX form post).\n\nAlways re-renders the document list (200) so HTMX swaps ``#up-list-region``. A\nnot-owned / not-found / malformed id is a SILENT no-op - the list re-renders\nunchanged (no existence oracle), and the store audits the denial. Owner-authorized\nsoft-delete + chunk purge: on success the document drops from the list AND from the\norg's search immediately. CSRF enforced (X-CSRFToken header); 404 when the flag is\nOFF; a PHI-key misconfig is logged and re-renders the list rather than 500-ing the\npage. Every outcome is logged so on-call can diagnose a failed delete from logs\nalone.","operationId":"delete_policy_document_web_policy_documents_delete_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_delete_policy_document_web_policy_documents_delete_post"}}},"required":true}}},"/transparency/compliance":{"get":{"tags":["transparency-dashboard"],"summary":"Compliance","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"}},"operationId":"compliance_transparency_compliance_get"}},"/api/v1/payers/{payer_id}":{"get":{"tags":["payers"],"summary":"Get Payer","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayerDetailResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"payer_id","schema":{"type":"string","title":"Payer Id","format":"uuid"},"required":true}],"operationId":"get_payer_api_v1_payers__payer_id__get"}},"/transparency/code/{code}":{"get":{"tags":["transparency-dashboard"],"summary":"Code Detail","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"path","name":"code","schema":{"type":"string","title":"Code"},"required":true},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"sort","schema":{"type":"string","title":"Sort","default":"cheapest"},"required":false},{"in":"query","name":"show_flagged","schema":{"type":"boolean","title":"Show Flagged","default":false},"required":false},{"in":"query","name":"payer","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer"},"required":false},{"in":"query","name":"near","schema":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Near"},"required":false},{"in":"query","name":"radius","schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Radius"},"required":false},{"in":"query","name":"code_type","schema":{"type":"string","title":"Code Type","default":"CPT","maxLength":20},"required":false}],"operationId":"code_detail_transparency_code__code__get"}},"/api/v1/prior-auth/changes":{"get":{"tags":["prior-auth"],"summary":"Get Changes","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriorAuthChangeList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id"},"required":false},{"in":"query","name":"days","schema":{"type":"integer","title":"Days","default":30,"maximum":365,"minimum":1},"required":false},{"in":"query","name":"offset","schema":{"type":"integer","title":"Offset","default":0,"minimum":0},"required":false},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":50,"maximum":200,"minimum":1},"required":false}],"description":"Recent prior auth rule changes within a date window.","operationId":"get_changes_api_v1_prior_auth_changes_get"}},"/policy/find-payer/results":{"post":{"tags":["policy"],"summary":"Find Payer Results","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"description":"Resolve the supplied fields to a payer. Metered ``policy.resolve_payer`` inline; a\nmetering verdict of not-allowed refuses BEFORE doing the work (402 over-credits / 429\nrate-limited). NO full member_id field - only the 3-alpha BCBS routing prefix.","operationId":"find_payer_results_policy_find_payer_results_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_find_payer_results_policy_find_payer_results_post"}}}}}},"/transparency/my-documents":{"get":{"tags":["pt-documents"],"summary":"My Documents","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"token","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"required":false}],"description":"Returning-patient retrieval surface. Lists ONLY the token-verified email's\nown saved documents, with decrypted coverage/EOB data - authorized end-to-end\nby the magic-link-verified email.\n\n🔒 SECURITY MODEL:\n  * The authorization principal is derived from `token` ALONE (a signed,\n    expiring magic link whose payload is the verified email). No form field /\n    header / other query param can stand in (review F1).\n  * `principal = PhiStore.principal_for(verified.email)`; the listed ids come\n    from `find_documents_by_email(verified.email)` (principal-scoped by\n    construction), and EACH per-doc read is `coverage_for` / `line_items_for`\n    gated on that principal - so even a tampered/substituted id cannot surface\n    another patient's PHI (closes review F3's enumeration concern).\n  * 404 when the flag is OFF (like the doc partials). Generic error (no oracle)\n    for an invalid token. Token never logged.","operationId":"my_documents_transparency_my_documents_get"}},"/api/v1/compare/code/{code}":{"get":{"tags":["compare"],"summary":"Compare Code","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeComparisonResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"code","schema":{"type":"string","title":"Code"},"required":true},{"in":"query","name":"code_type","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Type"},"required":false},{"in":"query","name":"payer_ids","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Ids","description":"Comma-separated payer UUIDs"},"required":false,"description":"Comma-separated payer UUIDs"}],"description":"Side-by-side comparison of billing rules for a code across payers.","operationId":"compare_code_api_v1_compare_code__code__get"}},"/api/v1/lookup/payer-brands":{"get":{"tags":["lookup"],"summary":"Payer Brands","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"q","schema":{"type":"string","title":"Q","maxLength":80,"minLength":1,"description":"Brand/payer name prefix/substring"},"required":true,"description":"Brand/payer name prefix/substring"},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":12,"maximum":25,"minimum":1},"required":false}],"description":"Typeahead for the brand/payer picker on the policy change-history surface - groups\nmatches into kind=\"brand\" (a parent + affiliate_count, the entry to pass for a by-state\nfamily query) and kind=\"payer\" (a leaf + domicile_state). FREE (in _TYPEAHEAD_PATHS -\nnever billed); READ-ONLY.","operationId":"payer_brands_api_v1_lookup_payer_brands_get"}},"/api/v1/payers/resolve-card":{"post":{"tags":["payers"],"summary":"Resolve Card Endpoint","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveCardResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Resolve messy / OCR'd insurance-card fields to the true top-level payer\nplus downstream context (corporate chain, claims-submission address,\napplicable policies, coding preferences, PT rate link).\n\nIdentity is DETERMINISTIC / EXACT / LLM-confirmed - never a bare fuzzy score.\nStateless: nothing is persisted, and no card fields are logged.\n\nWhen the card carries a claims lockbox (the ``addr_*`` fields), the response\nadditionally carries ``book``, the book of business that lockbox resolves to,\nwhenever the lockbox determines one. Identity and book are separate questions:\na name can pin the payer while only the lockbox knows the book.","operationId":"resolve_card_endpoint_api_v1_payers_resolve_card_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveCardRequest"}}},"required":true}}},"/api/v1/sources/{source_id}":{"get":{"tags":["sources"],"summary":"Get Source","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicySourceResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","title":"Source Id","format":"uuid"},"required":true}],"description":"Return a single PolicySource by id.","operationId":"get_source_api_v1_sources__source_id__get"}},"/policy/changes/{update_id}":{"get":{"tags":["policy"],"summary":"Policy Change Detail","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"path","name":"update_id","schema":{"type":"string","title":"Update Id","format":"uuid"},"required":true}],"description":"Read-only consumer mirror of the admin change detail: payer/severity/effective\nheader + the AI plain-language summary + a lazy-loaded side-by-side diff. NO operator\ncontrols (no review/flag/extract/cost/lifecycle). Signed-in only.","operationId":"policy_change_detail_policy_changes__update_id__get"}},"/policy/sources/{source_id}":{"get":{"tags":["policy"],"summary":"Policy Source Detail","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","title":"Source Id"},"required":true}],"description":"One source's read-only detail: last-checked + recent detected changes. STRIPPED of\noperator internals (no ExternalCallLog/SourceCandidate/lifecycle/scrape_config). 404 for\na missing/invalid id. Registered AFTER /sources/results so that literal path resolves first.","operationId":"policy_source_detail_policy_sources__source_id__get"}},"/transparency/payer-compare":{"get":{"tags":["transparency-dashboard"],"summary":"Payer Compare","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"ccn","schema":{"type":"string","title":"Ccn"},"required":true},{"in":"query","name":"code","schema":{"type":"string","title":"Code"},"required":true},{"in":"query","name":"code_type","schema":{"type":"string","title":"Code Type","default":"CPT","maxLength":20},"required":false}],"description":"Payer lens: per-payer rate comparison for ONE (hospital, code).\n\nAnswers the question the product otherwise can't (UX deep-dive payer-lens\ngap, 2026-06-06): \"what does EACH payer pay this facility for this\nprocedure, and where do I sit vs the others?\" Bounded (one hospital+code),\nso it's a fast indexed query - no per-payer matview needed.","operationId":"payer_compare_transparency_payer_compare_get"}},"/api/v1/billing-rules/export":{"post":{"tags":["billing-rules"],"summary":"Export Billing Rules","responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BillingRuleResponse"},"title":"Response 200 Export Billing Rules Api V1 Billing Rules Export Post"}}},"description":"Array of billing rules (when ``format=json``). With ``format=csv`` the body is instead a ``text/csv`` attachment."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Export billing rules as JSON or CSV.\n\nAccepts filter criteria and returns all matching rules (up to 10,000).","operationId":"export_billing_rules_api_v1_billing_rules_export_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}},"required":true}}},"/api/v1/email-subscriptions/":{"get":{"tags":["email-subscriptions"],"summary":"List Email Subscriptions","responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmailSubscriptionResponse"},"title":"Response List Email Subscriptions Api V1 Email Subscriptions  Get"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"List email subscriptions owned by the authenticated API key.","operationId":"list_email_subscriptions_api_v1_email_subscriptions__get"},"post":{"tags":["email-subscriptions"],"summary":"Create Email Subscription","responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSubscriptionResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Create a new email subscription for policy update digests.","operationId":"create_email_subscription_api_v1_email_subscriptions__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSubscriptionCreate"}}},"required":true}}},"/api/v1/policies/{update_id}":{"get":{"tags":["policies"],"summary":"Get Policy","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyDetailResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"update_id","schema":{"type":"string","title":"Update Id","format":"uuid"},"required":true}],"operationId":"get_policy_api_v1_policies__update_id__get"}},"/transparency/hospital/{ccn}":{"get":{"tags":["transparency-dashboard"],"summary":"Hospital Detail","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"path","name":"ccn","schema":{"type":"string","title":"Ccn"},"required":true},{"in":"query","name":"sort","schema":{"type":"string","title":"Sort","default":"most_expensive"},"required":false},{"in":"query","name":"tab_sort","schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Tab Sort"},"required":false},{"in":"query","name":"tab_dir","schema":{"type":"string","title":"Tab Dir","default":"desc","maxLength":4},"required":false},{"in":"query","name":"code","schema":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Code"},"required":false},{"in":"query","name":"code_type","schema":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Code Type"},"required":false}],"operationId":"hospital_detail_transparency_hospital__ccn__get"}},"/transparency/payer-vs-payer":{"get":{"tags":["transparency-dashboard"],"summary":"Payer Vs Payer","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"code","schema":{"type":"string","title":"Code","default":"","maxLength":20},"required":false},{"in":"query","name":"payer_a","schema":{"type":"string","title":"Payer A","default":"","maxLength":200},"required":false},{"in":"query","name":"payer_b","schema":{"type":"string","title":"Payer B","default":"","maxLength":200},"required":false},{"in":"query","name":"code_type","schema":{"type":"string","title":"Code Type","default":"CPT","maxLength":20},"required":false}],"description":"Provider/employer lens: cross-market payer-A-vs-payer-B head-to-head for a\ncode (\"Aetna vs Cigna for 70450\"). The consumer UI over the same data the\n/api/v1/.../payer-comparison endpoint serves (shared QueryService method, so\nthe page and the API never drift).","operationId":"payer_vs_payer_transparency_payer_vs_payer_get"}},"/api/v1/billing-rules/changes":{"get":{"tags":["billing-rules"],"summary":"List Billing Rule Changes","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRuleChangesResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"since","schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since","description":"ISO datetime"},"required":false,"description":"ISO datetime"},{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id"},"required":false},{"in":"query","name":"rule_category","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Category"},"required":false},{"in":"query","name":"action","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action","description":"created, updated, superseded, verified, flagged"},"required":false,"description":"created, updated, superseded, verified, flagged"},{"in":"query","name":"offset","schema":{"type":"integer","title":"Offset","default":0,"minimum":0},"required":false},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":100,"maximum":500,"minimum":1},"required":false}],"description":"List billing rule changes for incremental sync.","operationId":"list_billing_rule_changes_api_v1_billing_rules_changes_get"}},"/api/v1/billing-rules/compare":{"get":{"tags":["billing-rules"],"summary":"Compare Billing Rules","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparisonResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"code","schema":{"type":"string","title":"Code","description":"CPT/HCPCS/ICD-10 code"},"required":true,"description":"CPT/HCPCS/ICD-10 code"},{"in":"query","name":"code_type","schema":{"type":"string","title":"Code Type","description":"Code type"},"required":true,"description":"Code type"},{"in":"query","name":"rule_category","schema":{"type":"string","title":"Rule Category","description":"Rule category"},"required":true,"description":"Rule category"},{"in":"query","name":"payer_ids","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Ids","description":"Comma-separated payer IDs (UUIDs). Omit for all payers."},"required":false,"description":"Comma-separated payer IDs (UUIDs). Omit for all payers."},{"in":"query","name":"as_of","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of","description":"Point-in-time date (YYYY-MM-DD). Omit for current rules."},"required":false,"description":"Point-in-time date (YYYY-MM-DD). Omit for current rules."}],"description":"Compare billing rules for a code across multiple payers.","operationId":"compare_billing_rules_api_v1_billing_rules_compare_get"}},"/api/v1/billing-rules/resolve":{"get":{"tags":["billing-rules"],"summary":"Resolve Billing Rule","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"code","schema":{"type":"string","title":"Code","description":"CPT/HCPCS/ICD-10 code"},"required":true,"description":"CPT/HCPCS/ICD-10 code"},{"in":"query","name":"code_type","schema":{"type":"string","title":"Code Type","description":"Code type (cpt, hcpcs, icd10, drg, revenue)"},"required":true,"description":"Code type (cpt, hcpcs, icd10, drg, revenue)"},{"in":"query","name":"payer_id","schema":{"type":"string","title":"Payer Id","format":"uuid","description":"Payer ID"},"required":true,"description":"Payer ID"},{"in":"query","name":"rule_category","schema":{"type":"string","title":"Rule Category","description":"Rule category"},"required":true,"description":"Rule category"},{"in":"query","name":"plan_type","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Type","description":"Plan type filter"},"required":false,"description":"Plan type filter"},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","description":"2-letter state code"},"required":false,"description":"2-letter state code"},{"in":"query","name":"network_status","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Network Status","description":"in_network, out_of_network, or both"},"required":false,"description":"in_network, out_of_network, or both"},{"in":"query","name":"include_fallbacks","schema":{"type":"boolean","title":"Include Fallbacks","default":false,"description":"Include lower-scoring fallback rules"},"required":false,"description":"Include lower-scoring fallback rules"},{"in":"query","name":"as_of","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of","description":"Point-in-time date (YYYY-MM-DD). Omit for current rules."},"required":false,"description":"Point-in-time date (YYYY-MM-DD). Omit for current rules."}],"description":"Resolve the most specific billing rule for a code + context.","operationId":"resolve_billing_rule_api_v1_billing_rules_resolve_get"}},"/api/v1/policies/updates/feed":{"get":{"tags":["policies"],"summary":"Updates Feed","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id"},"required":false},{"in":"query","name":"specialty","schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Specialty"},"required":false},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":50,"maximum":100,"minimum":1},"required":false},{"in":"query","name":"format","schema":{"type":"string","title":"Format","default":"rss","pattern":"^(rss|atom)$"},"required":false}],"description":"RSS/Atom feed of policy updates. Public, no auth required.\n\nSupports conditional GET: every response carries a strong ``ETag`` derived\nfrom the newest policy update + filter scope (see ``compute_feed_validator``).\nA poller that sends ``If-None-Match`` with a still-current ETag gets a\n``304 Not Modified`` with an empty body instead of the full feed.","operationId":"updates_feed_api_v1_policies_updates_feed_get"}},"/api/v1/webhooks/{webhook_id}":{"delete":{"tags":["webhooks"],"summary":"Delete Webhook","responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"webhook_id","schema":{"type":"string","title":"Webhook Id","format":"uuid"},"required":true}],"operationId":"delete_webhook_api_v1_webhooks__webhook_id__delete"}},"/policy/applicability/results":{"get":{"tags":["policy"],"summary":"Policy Applicability Results","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id"},"required":false},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"line_of_business","schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Line Of Business"},"required":false},{"in":"query","name":"procedure_code","schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Procedure Code"},"required":false}],"description":"HTMX results partial: the applicability engine's verdict for the picked payer.\nMetered ``policy.applicability``; READ-ONLY; degraded paths render a calm state.","operationId":"policy_applicability_results_policy_applicability_results_get"}},"/transparency/rankings/{slug}":{"get":{"tags":["transparency-dashboard"],"summary":"Ranking View","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"path","name":"slug","schema":{"type":"string","title":"Slug"},"required":true},{"in":"query","name":"sort","schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sort"},"required":false},{"in":"query","name":"dir","schema":{"anyOf":[{"type":"string","maxLength":4},{"type":"null"}],"title":"Dir"},"required":false},{"in":"query","name":"near","schema":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Near"},"required":false},{"in":"query","name":"radius","schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Radius"},"required":false}],"description":"Full sortable+filterable view of a single leaderboard (top 100 rows).\n\n``dir`` defaults to None (NOT \"desc\") so an absent param falls back to each\nboard's ``default_dir`` - ascending boards (cheapest procedures, lowest-paid\nhospitals, lowest-paying payers) must render ascending to match their title\n+ the CSV export. A hardcoded \"desc\" default made that fallback dead code and\ninverted all three boards.","operationId":"ranking_view_transparency_rankings__slug__get"}},"/transparency/payer/{payer_id}":{"get":{"tags":["transparency-dashboard"],"summary":"Payer Detail","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"path","name":"payer_id","schema":{"type":"string","title":"Payer Id","format":"uuid"},"required":true}],"description":"Legacy by-ID route. Redirects to ``/payer/by-name/{slug}`` when\nthe payer name resolves to a non-trivial slug; otherwise falls back to\nthe legacy single-ID summary so old links don't 500.","operationId":"payer_detail_transparency_payer__payer_id__get"}},"/api/v1/billing-rules/{rule_id}":{"get":{"tags":["billing-rules"],"summary":"Get Billing Rule By Id","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRuleResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"rule_id","schema":{"type":"string","title":"Rule Id","format":"uuid"},"required":true}],"description":"Retrieve a single billing rule by ID.","operationId":"get_billing_rule_by_id_api_v1_billing_rules__rule_id__get"},"put":{"tags":["billing-rules"],"summary":"Update Billing Rule","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRuleResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"rule_id","schema":{"type":"string","title":"Rule Id","format":"uuid"},"required":true}],"description":"Update an existing billing rule.","operationId":"update_billing_rule_api_v1_billing_rules__rule_id__put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRuleUpdate"}}},"required":true}}},"/api/v1/prior-auth/requirements":{"get":{"tags":["prior-auth"],"summary":"Get Requirements","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriorAuthRequirementList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id"},"required":false},{"in":"query","name":"code","schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Code"},"required":false},{"in":"query","name":"code_type","schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Code Type"},"required":false},{"in":"query","name":"offset","schema":{"type":"integer","title":"Offset","default":0,"minimum":0},"required":false},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":50,"maximum":200,"minimum":1},"required":false}],"description":"Current prior auth requirements, optionally filtered by payer/code.","operationId":"get_requirements_api_v1_prior_auth_requirements_get"}},"/api/v1/billing-rules/adjudicate":{"post":{"tags":["billing-rules"],"summary":"Adjudicate a claim-shaped set of lines against a payer's current policy rules","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjudicateResponse"}}},"description":"Per-line modifier verdicts, prior-auth, coverage, applicable rules, plus claim-level edits, document-scope notices, and (Medicare) LCD/NCD context."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Claim-shaped adjudication (Policy-RCM M6).\n\nAccepts a payer reference (exactly one of payer_id | edi_payer_id | name), DOS,\noptional plan/state/specialty, and up to 50 claim lines. Returns, per line, the\nmodifier verdicts (`missing_required` / `disallowed_present` / `conditional` /\n`no_guidance` / `documented` / `satisfied` - the last two are informational:\n`documented` means the payer documents the modifier without a\nrequire/disallow/conditional disposition, `satisfied` means the payer requires or\nallows it and the line carries it, i.e. the line is coded correctly and here is the\nrule that says so) each carrying the citing rule's `provenance`\n(verification_status/confidence), a prior-auth answer (`unknown` when the payer has\nno PA rule - never a false 'not required'), coverage status, and the applicable rules\nwith audit-grade citations + provenance. Claim-level: cross-code `claim_edit` rules\nco-surfaced once, payer document-scope notices, and the Medicare LCD/NCD authority\nblock when the payer chain is Medicare-governed.\n\nScope honesty: omitting `plan_type` and/or `state` no longer hides every rule scoped to\none. Rules that are scoped to a plan/state the claim did NOT state are surfaced with\n`scope_match=\"unconfirmed\"` and a `scope_caveat`, and always rank BELOW rules we know\napply. A `not_covered` / prior-auth boolean is never asserted from an unconfirmed rule -\nthose answers stay `unknown` with the rules listed - and `missing_required` is never\nissued from one either: an unconfirmed requirement is reported as `documented` with its\n`scope_caveat`, so it stays visible without reading as an instruction to change the claim.\n\nData coverage: the claim-level `data_coverage` is `\"no_payer_corpus\"` when we hold no\nactionable rules for this payer at all, so an empty answer for a payer we have never\ningested is distinguishable from an empty answer for a payer whose corpus simply does\nnot address the billed codes (which the per-line `data_coverage` note explains).\n\nPrior-auth `false` is not \"no rule\" - it reflects a DOCUMENTED payer rule (identified\nby `prior_auth.basis_rule_id`). Consumers should inspect that rule's `provenance` /\n`verification_status` before skipping auth on a `false`; only `unknown` means the\npayer published nothing (or that everything we found is scope-unconfirmed).\n\nDeterministic only: a fuzzy payer name is rejected (422 → /payers/match). This\nendpoint surfaces rules; it does NOT run pairwise NCCI adjudication.","operationId":"adjudicate_claim_api_v1_billing_rules_adjudicate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjudicateRequest"},"example":{"lines":[{"code":"00731","units":1,"code_type":"cpt","modifiers":["AA"],"line_number":1}],"payer":{"name":"UnitedHealthcare"},"state":"TX","plan_type":"commercial","specialty":"anesthesiology","date_of_service":"2026-07-21"}}},"required":true}}},"/api/v1/payers/directory-version":{"get":{"tags":["payers"],"summary":"Get Directory Version Endpoint","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayerDirectoryVersionResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Current content version of the payer directory.\n\nReturns an opaque, monotonically increasing token that advances whenever any\npayer, payer entry, plan, alias, phone, address, or MAC jurisdiction record\nchanges, including changes made outside the scheduled sync jobs. Poll this\ncheaply and treat a changed value as \"the directory moved, revalidate anything\ncached from it\". Compare for equality only, and do not parse the value.","operationId":"get_directory_version_endpoint_api_v1_payers_directory_version_get"}},"/api/v1/payers/{payer_id}/health":{"get":{"tags":["payer-health"],"summary":"Get Payer Health","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayerHealthResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"payer_id","schema":{"type":"string","title":"Payer Id","format":"uuid"},"required":true}],"description":"Get health score for a single payer with dimension breakdown.","operationId":"get_payer_health_api_v1_payers__payer_id__health_get"}},"/api/v1/price-transparency/rates":{"get":{"tags":["price-transparency"],"summary":"List Rates","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatesResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"code","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"required":false},{"in":"query","name":"q","schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"},"required":false},{"in":"query","name":"hospital_id","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hospital Id"},"required":false},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"observed_after","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Observed After"},"required":false},{"in":"query","name":"observed_before","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Observed Before"},"required":false},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":100,"maximum":1000,"minimum":1},"required":false},{"in":"query","name":"offset","schema":{"type":"integer","title":"Offset","default":0,"minimum":0},"required":false},{"in":"query","name":"sort","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort","description":"Ordering: cheapest | most_expensive | largest_spread | most_recent (default)"},"required":false,"description":"Ordering: cheapest | most_expensive | largest_spread | most_recent (default)"},{"in":"query","name":"code_type","schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Code Type"},"required":false},{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Id"},"required":false},{"in":"query","name":"setting","schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Setting"},"required":false},{"in":"query","name":"billing_class","schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Billing Class"},"required":false}],"operationId":"list_rates_api_v1_price_transparency_rates_get"}},"/api/v1/billing-rules/resolve-all":{"get":{"tags":["billing-rules"],"summary":"Resolve All Categories","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveAllResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"code","schema":{"type":"string","title":"Code","description":"CPT/HCPCS/ICD-10 code"},"required":true,"description":"CPT/HCPCS/ICD-10 code"},{"in":"query","name":"code_type","schema":{"type":"string","title":"Code Type","description":"Code type"},"required":true,"description":"Code type"},{"in":"query","name":"payer_id","schema":{"type":"string","title":"Payer Id","format":"uuid","description":"Payer ID"},"required":true,"description":"Payer ID"},{"in":"query","name":"plan_type","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Type"},"required":false},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"network_status","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Network Status"},"required":false},{"in":"query","name":"as_of","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of","description":"Point-in-time date (YYYY-MM-DD). Omit for current rules."},"required":false,"description":"Point-in-time date (YYYY-MM-DD). Omit for current rules."}],"description":"Resolve ALL rule categories for a code at a payer in one call.","operationId":"resolve_all_categories_api_v1_billing_rules_resolve_all_get"}},"/api/v1/billing-rules/specialties":{"get":{"tags":["billing-rules","billing-rules"],"summary":"List Specialties","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialtyListResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Return the canonical list of valid specialty filter values.","operationId":"list_specialties_api_v1_billing_rules_specialties_get"}},"/api/v1/payers/entries/{entry_id}":{"get":{"tags":["payers"],"summary":"Get Entry Detail","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayerEntryDetailResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"entry_id","schema":{"type":"integer","title":"Entry Id"},"required":true}],"operationId":"get_entry_detail_api_v1_payers_entries__entry_id__get"}},"/api/v1/payers/sync/{source_name}":{"post":{"tags":["payers"],"summary":"Trigger Source Sync","responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceSyncTriggerResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"source_name","schema":{"type":"string","title":"Source Name","maxLength":100},"required":true}],"description":"Manually trigger sync for a single payer data source.","operationId":"trigger_source_sync_api_v1_payers_sync__source_name__post"}},"/api/v1/price-transparency/search":{"get":{"tags":["price-transparency"],"summary":"Clinical Search","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"q","schema":{"type":"string","title":"Q","maxLength":200,"minLength":1},"required":true},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":50,"maximum":200,"minimum":1},"required":false},{"in":"query","name":"offset","schema":{"type":"integer","title":"Offset","default":0,"minimum":0},"required":false},{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Id"},"required":false}],"description":"Clinical search → matching procedure CODES (one row per\n``(code, code_type)``) with hospital/payer/price summary, ranked by\nrelevance.\n\nBacked by the ``pt_rate_rollup_monthly`` continuous aggregate, so a broad\nfree-text query (\"colonoscopy\", \"mri\") returns in well under a second.\n(This endpoint previously ran a legacy per-rate scan over the full rate\nhypertable that timed out at 25s → 503 for any unscoped query - the same\nfast code-pivot path the consumer UI uses now serves the API.)\n\nDrill into per-hospital rate detail for a result via\n``GET /rates?code=<code>&code_type=<code_type>``; for one hospital's full\nmenu use ``GET /hospitals/{ccn}/offerings``.","operationId":"clinical_search_api_v1_price_transparency_search_get"}},"/transparency/my-documents/delete":{"post":{"tags":["pt-documents"],"summary":"Delete My Document","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"description":"Patient self-service SOFT delete (cell 18). A returning patient deletes ONE\nof their OWN saved documents, authenticated by the SAME magic-link token that\ngates retrieval (cell 16) - the SOLE principal source.\n\n🔒 SECURITY MODEL (the IDOR boundary):\n  * METHOD: POST (this is a mutation). CSRF-EXEMPT by the SAME design as\n    save-doc (see app/middleware/csrf.py EXEMPT_PATHS): the patient has no\n    login/session, so there is no session CSRF token; the signed, expiring,\n    per-email magic-link token carried in the POST BODY is the unforgeable\n    bearer credential. A request without a valid token mutates nothing.\n  * The authorization principal is derived from `token` ALONE\n    (`_verified_email_from_token` -> VerifiedEmail). No form field / header /\n    other input can stand in (review F1).\n  * The delete itself is `PhiStore.soft_delete(document_id, principal=...)`,\n    which is DENY-BY-DEFAULT (cell 14): a principal can only delete a doc its\n    OWN contact's email-HMAC matches. Patient A's token deleting patient B's\n    `document_id` raises PhiAccessDenied and mutates NOTHING - not-found and\n    not-owned are indistinguishable (no oracle), and the denied attempt is\n    audited (cell 13). This closes the IDOR: the rendered/guessed doc id is\n    irrelevant because ownership is re-checked at the store layer.\n  * RETENTION: soft delete only (tombstone + audit). The hard-purge sweep is\n    cell 19 - see `_DELETED_RETENTION_DAYS` above for the documented window.\n  * 404 when the flag is OFF. Generic 403 for an invalid token. The token is\n    never logged; no PHI is logged.","operationId":"delete_my_document_transparency_my_documents_delete_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_delete_my_document_transparency_my_documents_delete_post"}}},"required":true}}},"/transparency/service-line/{slug}":{"get":{"tags":["transparency-dashboard"],"summary":"Service Line View","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"path","name":"slug","schema":{"type":"string","title":"Slug"},"required":true}],"description":"Render the service-line detail page for a curated clinical pack\nor a code_filter group.\n\nResolution flow:\n  1. ``resolve_slug`` -> {kind, group_id|code_filter, ...} or None.\n  2. ``placeholder`` kind -> render the \"Coming soon\" template variant.\n  3. ``domain_pack`` kind -> 4 tables filtered through\n     ``LeaderboardService.domain_pack_*`` joining\n     ``pt_clinical_group_codes``.\n  4. ``code_filter`` kind -> reuses the existing leaderboard methods\n     (most_expensive_procedures / highest_paid_hospitals /\n     top_payers_by_spend) with the code_filter clause that already\n     drives the dashboard tile section.\n\nAll four loaders are wrapped in ``cached(versioned_key(...))`` with\n``_RANKINGS_TTL`` so cold rebuilds (~5–10s exact aggregates) amortize\nacross thousands of warm hits over a full day, and a fresh MRF ingest\nadvances the watermark and invalidates everything in one move.","operationId":"service_line_view_transparency_service_line__slug__get"}},"/api/v1/compare/change/{update_id}":{"get":{"tags":["compare"],"summary":"Compare Change","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeComparisonResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"update_id","schema":{"type":"string","title":"Update Id","format":"uuid"},"required":true}],"description":"Compare billing rules across payers for codes affected by a specific policy update.","operationId":"compare_change_api_v1_compare_change__update_id__get"}},"/api/v1/payers/applicable-policies":{"get":{"tags":["payers"],"summary":"Applicable Policies Endpoint","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"payer_id","schema":{"type":"string","title":"Payer Id","format":"uuid"},"required":true},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"line_of_business","schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Line Of Business"},"required":false},{"in":"query","name":"procedure_code","schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Procedure Code"},"required":false},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":50,"maximum":100,"minimum":1},"required":false},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Cursor"},"required":false}],"description":"Which policies apply to a payer (+ optional state / line_of_business / procedure\ncode) - the real applicability engine (authority set + deterministic narrowing +\nLLM-confirm of the ambiguous remainder, degrade-safe). READ-ONLY; metered\npolicy.applicability; serve-head safe. Declared BEFORE /{payer_id} so this literal\npath isn't captured as a payer id.\n\nPAGED, like the ``applicable_policies`` MCP tool it mirrors, and through the SAME helper.\nThis used to return the engine's WHOLE decided list: for \"HMO New Mexico, Inc.\" (47,927\ncandidate sources, from a mis-attributed bulk ingest of Iowa Administrative Code PDFs) that is\n~6 MB of JSON out of a ``60/minute`` metered endpoint, and even the largest LEGITIMATE payer\n(BCBS Rhode Island, 4,991) was ~2 MB. ``limit`` (1-100) plus an opaque ``cursor`` bound it,\nand ``total`` / ``has_more`` / ``next_cursor`` say exactly what was bounded - nothing is\ndropped silently and every row past a page stays reachable, exactly once. A ``cursor``\nreplayed against different filters is REJECTED (structured ``error``, never a silent\nre-slice).\n\n``truncated`` / ``candidate_total`` are a DIFFERENT signal that can appear alongside these:\nthey mean the candidate source universe exceeded the engine's internal cap and was cut BEFORE\nnarrowing, so ``total`` under-counts.","operationId":"applicable_policies_endpoint_api_v1_payers_applicable_policies_get"}},"/api/v1/webhooks/{webhook_id}/test":{"post":{"tags":["webhooks"],"summary":"Test Webhook","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"webhook_id","schema":{"type":"string","title":"Webhook Id","format":"uuid"},"required":true}],"operationId":"test_webhook_api_v1_webhooks__webhook_id__test_post"}},"/transparency/compliance/freshness":{"get":{"tags":["transparency-dashboard"],"summary":"Compliance Freshness","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"state","schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"bucket","schema":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Bucket"},"required":false}],"description":"Public auditor view of per-hospital MRF freshness.\n\nSurfaces only the fields safe to publish - no internal IDs, no\ndiscovery-run errors. Internal coverage details remain admin-only at\n``/admin/price-transparency/coverage``.","operationId":"compliance_freshness_transparency_compliance_freshness_get"}},"/transparency/payer/by-name/{slug}":{"get":{"tags":["transparency-dashboard"],"summary":"Payer Detail By Name","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"path","name":"slug","schema":{"type":"string","title":"Slug"},"required":true}],"description":"Canonical payer page - groups all UUIDs filed under one name.\n\nA single human payer (\"Aetna\") routinely splits into dozens of\nregional-plan UUIDs in MRF filings. The ranking-row links use the\nname slug (NOT a UUID) so clicking \"Aetna\" on a leaderboard surfaces\nevery row Aetna filed, not just one regional plan's slice.","operationId":"payer_detail_by_name_transparency_payer_by_name__slug__get"}},"/api/v1/billing-rules/batch-resolve":{"post":{"tags":["billing-rules"],"summary":"Batch Resolve Billing Rules","responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResolveResponse"},"title":"Response Batch Resolve Billing Rules Api V1 Billing Rules Batch Resolve Post"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Resolve billing rules for multiple codes in a single request (max 100).","operationId":"batch_resolve_billing_rules_api_v1_billing_rules_batch_resolve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResolveRequest"}}},"required":true}}},"/api/v1/billing-rules/disagreements":{"get":{"tags":["disagreements"],"summary":"List Disagreements","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisagreementsResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":20,"maximum":100,"minimum":1},"required":false},{"in":"query","name":"code_type","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Type"},"required":false},{"in":"query","name":"rule_category","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Category"},"required":false},{"in":"query","name":"min_payers","schema":{"type":"integer","title":"Min Payers","default":2,"maximum":50,"minimum":2},"required":false}],"description":"List billing codes ranked by cross-payer disagreement score.","operationId":"list_disagreements_api_v1_billing_rules_disagreements_get"}},"/api/v1/lookup/document/{source_id}":{"get":{"tags":["lookup"],"summary":"Fetch Document","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","title":"Source Id"},"required":true},{"in":"query","name":"include_rules","schema":{"type":"boolean","title":"Include Rules","default":true},"required":false}],"description":"Return OUR stored copy of a policy document (the scraped text) + its\nextracted rules - so an API/MCP consumer gets the policy back, not just a URL\nto the payer's (often JS-gated) site. The `url` is kept as a 'view original'\nreference. This is the MCP `fetch_document` capability.","operationId":"fetch_document_api_v1_lookup_document__source_id__get"}},"/api/v1/payers/{payer_id}/hierarchy":{"get":{"tags":["payers"],"summary":"Get Payer Hierarchy","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayerHierarchyResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"payer_id","schema":{"type":"string","title":"Payer Id","format":"uuid"},"required":true}],"description":"Resolve the corporate chain up from a payer: [self, managed-by, parent, ...]\nvia parent_payer_id (cycle-guarded). 404 if the payer doesn't exist.","operationId":"get_payer_hierarchy_api_v1_payers__payer_id__hierarchy_get"}},"/policy/search/document/{source_id}":{"get":{"tags":["policy"],"summary":"Policy Search Document","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"path","name":"source_id","schema":{"type":"string","title":"Source Id"},"required":true},{"in":"query","name":"topic","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"required":false},{"in":"query","name":"payer","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer"},"required":false}],"description":"Read OUR stored copy of a policy document (full captured text + capture date +\nchar count + attached billing rules) instead of leaving the site for the payer's\nbot-walled page. ``require_customer_page`` (F5 - it's a navigable page); metered\n``policy.document``. No stored snapshot → a calm fallback, never a 500/404.","operationId":"policy_search_document_policy_search_document__source_id__get"}},"/transparency/admin/refresh-history":{"get":{"tags":["transparency-dashboard"],"summary":"Admin Refresh History","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"}},"description":"Operator view: last 30 nightly refresh runs.\n\nAdmin-gated via ``require_admin``; returns 401 (or redirects via\nDEV_MODE bypass) for unauthenticated users. The\n``/transparency/admin/*`` path is already covered by the\n``Disallow`` rule in robots.txt so we don't add to public sitemaps.","operationId":"admin_refresh_history_transparency_admin_refresh_history_get"}},"/api/v1/billing-rules/by-code/{code}":{"get":{"tags":["billing-rules"],"summary":"Billing Rules By Code","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrossPayerFullCoverageResponse"}}},"headers":{"X-PPMan-Billing-Schema-Version":{"schema":{"type":"string","example":"1"},"description":"Billing-rules response-contract version. Pin this to detect a backward-incompatible BillingRuleResponse shape change."}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"code","schema":{"type":"string","title":"Code"},"required":true},{"in":"query","name":"code_type","schema":{"type":"string","title":"Code Type","description":"Code type (cpt, hcpcs, icd10, etc.)"},"required":true,"description":"Code type (cpt, hcpcs, icd10, etc.)"},{"in":"query","name":"plan_type","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Type"},"required":false},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"network_status","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Network Status"},"required":false},{"in":"query","name":"as_of","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of","description":"Point-in-time date (YYYY-MM-DD). Omit for current."},"required":false,"description":"Point-in-time date (YYYY-MM-DD). Omit for current."}],"description":"Cross-payer full-coverage matrix for a code.\n\nReturns every active payer that has at least one explicit rule for the\ncode, with that payer's full coverage picture (composed reimbursement,\ncoding, coverage_policy, prior_auth, claim_edits, frequency_limit,\ndocumentation). Payers with no explicit rules are omitted.\n\n**Audit-grade provenance (service-to-service contract).** Every nested\nrule carries HANK's provenance fields so consumers such as hank-scholar can\ncite payer rules verbatim: `source_quote` (verbatim policy quote),\n`source_page` (locator), and `rule_data.icd10_crosswalk` (diagnosis\npairings). The `carc_codes`/`rarc_codes` denial-code mappings are part of\nthe contract but are **reserved** - currently `null` on all rules; they\npopulate in a later denial-code extraction phase, so do not gate features on\nthem being present yet. Access is gated by `require_api_access` (a valid edge\nbearer token or an authenticated console/SSO session); there is no per-rule\nscope permission enforced. The response advertises a stable contract version\nvia the `X-PPMan-Billing-Schema-Version` header (declared in this endpoint's\nOpenAPI response headers).","operationId":"billing_rules_by_code_api_v1_billing_rules_by_code__code__get"}},"/api/v1/policies/{update_id}/document":{"get":{"tags":["policies"],"summary":"Download Document","responses":{"200":{"content":{"application/json":{"schema":{}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"update_id","schema":{"type":"string","title":"Update Id","format":"uuid"},"required":true},{"in":"query","name":"format","schema":{"type":"string","title":"Format","default":"text","pattern":"^(text|html)$"},"required":false}],"description":"Download the content snapshot associated with a policy update.\n\nReturns the ContentSnapshot linked via new_snapshot_id (the exact snapshot\nthat triggered the change detection).","operationId":"download_document_api_v1_policies__update_id__document_get"}},"/transparency/procedure/{concept_key}":{"get":{"tags":["transparency-dashboard"],"summary":"Concept Landing","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"path","name":"concept_key","schema":{"type":"string","title":"Concept Key"},"required":true},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"payer","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer"},"required":false},{"in":"query","name":"near","schema":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Near"},"required":false},{"in":"query","name":"radius","schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Radius"},"required":false},{"in":"query","name":"deductible","schema":{"anyOf":[{"type":"number","maximum":1000000,"minimum":0},{"type":"null"}],"title":"Deductible"},"required":false},{"in":"query","name":"spent","schema":{"type":"number","title":"Spent","default":0,"maximum":1000000,"minimum":0},"required":false},{"in":"query","name":"oop_max","schema":{"anyOf":[{"type":"number","maximum":1000000,"minimum":0},{"type":"null"}],"title":"Oop Max"},"required":false},{"in":"query","name":"coinsurance","schema":{"type":"number","title":"Coinsurance","default":20,"maximum":100,"minimum":0},"required":false}],"description":"Concept-first landing (#429 M3): a patient lands on the PROCEDURE, not a\ncode. We load the concept's full member set (CPT ∪ DRG ∪ APR-DRG ∪ APC) and\nUNION-query every facility's rates across it (concept_facilities), so DRG-only\nfilers (MUSC publishes MS-DRG 470, not CPT 27447) appear in the SAME list as\nthe CPT facilities. Codes are an internal detail surfaced only as form badges.\n\nM4 layers the apples-to-apples normalized all-in + per-facility OOP on top; M3\nrenders the per-(facility, published-form) medians grouped by facility.","operationId":"concept_landing_transparency_procedure__concept_key__get"}},"/api/v1/policy/documents/{document_id}":{"delete":{"tags":["policy-documents"],"summary":"Delete Policy Document","responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"document_id","schema":{"type":"string","title":"Document Id"},"required":true}],"description":"Delete ONE of the caller org's own uploaded policy documents. → 204 on success.\n404 when the flag is OFF, for a malformed id, OR for a document the caller does not\nown (not-owned and not-found are INDISTINGUISHABLE - no existence oracle; the denial\nis audited by the store). 401 anon. Owner-authorized soft-delete + chunk purge, so\nthe document drops from the caller's search + list immediately.","operationId":"delete_policy_document_api_v1_policy_documents__document_id__delete"}},"/api/v1/billing-rules/{rule_id}/history":{"get":{"tags":["billing-rules"],"summary":"Get Billing Rule History","responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BillingRuleHistoryResponse"},"title":"Response Get Billing Rule History Api V1 Billing Rules  Rule Id  History Get"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"rule_id","schema":{"type":"string","title":"Rule Id","format":"uuid"},"required":true}],"description":"Get the full audit history for a billing rule.","operationId":"get_billing_rule_history_api_v1_billing_rules__rule_id__history_get"}},"/transparency/compliance/missing-fields":{"get":{"tags":["transparency-dashboard"],"summary":"Compliance Missing Fields","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"query","name":"state","schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"State"},"required":false}],"description":"Per-hospital heatmap of % rows missing each CMS-required field.\n\nThe TABLESAMPLE-backed service query is the only public PT query\nthat scans the full 11M-row rates table. The 600s cache TTL keeps\nthe cold-load cost bounded even under sustained traffic.","operationId":"compliance_missing_fields_transparency_compliance_missing_fields_get"}},"/transparency/procedure/{code}/by-state":{"get":{"tags":["transparency-dashboard"],"summary":"Procedure By State","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"path","name":"code","schema":{"type":"string","title":"Code"},"required":true},{"in":"query","name":"sort","schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sort"},"required":false},{"in":"query","name":"dir","schema":{"type":"string","title":"Dir","default":"desc","maxLength":4},"required":false},{"in":"query","name":"concept_key","schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Concept Key"},"required":false},{"in":"query","name":"code_type","schema":{"type":"string","title":"Code Type","default":"CPT","maxLength":20},"required":false}],"operationId":"procedure_by_state_transparency_procedure__code__by_state_get"}},"/api/v1/billing-rules/{rule_id}/evidence":{"get":{"tags":["billing-rules"],"summary":"Get Evidence Chain","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceChainResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"rule_id","schema":{"type":"string","title":"Rule Id","format":"uuid"},"required":true}],"description":"Return the full provenance chain for a billing rule.","operationId":"get_evidence_chain_api_v1_billing_rules__rule_id__evidence_get"}},"/api/v1/price-transparency/service-lines":{"get":{"tags":["price-transparency"],"summary":"List Service Lines","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceLinesResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"Service-line groups suitable for filter UIs.\n\nDrops the ``ALL`` aggregate sentinel (a Phase-0 catch-all bucket whose\n`n_codes` reads as ``100001`` and confuses clients) and emits a\nhuman-readable ``human_label`` next to the raw enum-style ``name``.","operationId":"list_service_lines_api_v1_price_transparency_service_lines_get"}},"/api/v1/webhooks/{webhook_id}/deliveries":{"get":{"tags":["webhooks"],"summary":"List Deliveries","responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryResponse"},"title":"Response List Deliveries Api V1 Webhooks  Webhook Id  Deliveries Get"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"webhook_id","schema":{"type":"string","title":"Webhook Id","format":"uuid"},"required":true},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":20,"maximum":100,"minimum":1},"required":false}],"operationId":"list_deliveries_api_v1_webhooks__webhook_id__deliveries_get"}},"/api/v1/price-transparency/payers/options":{"get":{"tags":["price-transparency"],"summary":"List Payers Options","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"HTMX-friendly ``<option>`` list for the landing-page payer filter.\n\nPopulates a ``<select name=\"payer_id\">`` from distinct payers in our\nrate data, ranked by row count (bug #15). Capped at 100 to keep the\ndropdown usable.","operationId":"list_payers_options_api_v1_price_transparency_payers_options_get"}},"/api/v1/price-transparency/states/options":{"get":{"tags":["price-transparency"],"summary":"List States Options","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"selected","schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Selected"},"required":false}],"description":"HTMX-friendly ``<option>`` list for the state filter.\n\nPopulates a ``<select name=\"state\">`` from the actual hospitals we have\ndata for, so users only see states that will return results (bug #14).\nThe ``selected`` query param preserves the user's choice across page\nre-renders (e.g. when the search results page reloads the dropdown).","operationId":"list_states_options_api_v1_price_transparency_states_options_get"}},"/api/v1/webhooks/{webhook_id}/retry-queue":{"get":{"tags":["webhooks"],"summary":"List Retry Queue","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryQueueListResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"webhook_id","schema":{"type":"string","title":"Webhook Id","format":"uuid"},"required":true},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":50,"maximum":200,"minimum":1},"required":false},{"in":"query","name":"offset","schema":{"type":"integer","title":"Offset","default":0,"minimum":0},"required":false}],"description":"Dead-Letter Queue for a webhook: exhausted/failed deferred deliveries.\n\nRead-only, bounded, paginated. Each entry carries its failure context (event\ntype, last error, HTTP code, when it gave up) so the operator/consumer can\ndecide whether to replay. Owner-authenticated exactly like the other webhook\nroutes (404 on a non-owned id).\n\nViewing the DLQ ACKNOWLEDGES the listed exhausted rows (stamps\n``acknowledged_at``) so retention may eventually reclaim them - but they were\nnever deletable while unseen, which is the no-silent-loss guarantee.","operationId":"list_retry_queue_api_v1_webhooks__webhook_id__retry_queue_get"}},"/api/v1/price-transparency/cross-reference":{"get":{"tags":["price-transparency"],"summary":"Get Cross Reference","responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CrossReferenceRow"},"title":"Response 200 Get Cross Reference Api V1 Price Transparency Cross Reference Get"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"code","schema":{"type":"string","title":"Code"},"required":true},{"in":"query","name":"payer_id","schema":{"type":"string","title":"Payer Id","format":"uuid"},"required":true},{"in":"query","name":"hospital_id","schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hospital Id"},"required":false}],"operationId":"get_cross_reference_api_v1_price_transparency_cross_reference_get"}},"/api/v1/price-transparency/rates/aggregate":{"get":{"tags":["price-transparency"],"summary":"Get Aggregates","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregateResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"code","schema":{"type":"string","title":"Code"},"required":true},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"start_month","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Month"},"required":false},{"in":"query","name":"end_month","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Month"},"required":false},{"in":"query","name":"code_type","schema":{"type":"string","title":"Code Type","default":"CPT","maxLength":20},"required":false},{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Id"},"required":false}],"description":"National (or per-state) quality-filtered aggregate for one code.\n\nCORRECTNESS (pt-10x iter 3): the previous implementation read the UNFILTERED\npt_rate_rollup_monthly rollup, whose median-of-medians ran 15-31% below the\nquality-filtered truth (penny/per-diem/professional rate shapes leak in -\n70450 $383 vs $454). This now serves the from-raw, quality_predicates-filtered\nsummary matviews: pt_code_global_summary (national) or pt_code_hospital_summary\naggregated for a state - the same source the consumer medians use, validated\nwithin ~0.6% of raw truth (runbook AC-NAT). CPT/HCPCS are pooled.\n\nThe former per-month OVER-TIME breakdown (start_month/end_month) is suppressed\nuntil a quality-filtered monthly rollup exists; those params are ignored.\npayer_id filtering on the aggregate is likewise a follow-up (the from-raw code\nsummaries are across-payer); when supplied it is currently ignored and the\nacross-payer aggregate is returned.","operationId":"get_aggregates_api_v1_price_transparency_rates_aggregate_get"}},"/transparency/procedure/{code}/by-hospital":{"get":{"tags":["transparency-dashboard"],"summary":"Procedure By Hospital","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"parameters":[{"in":"path","name":"code","schema":{"type":"string","title":"Code"},"required":true},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"sort","schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sort"},"required":false},{"in":"query","name":"dir","schema":{"type":"string","title":"Dir","default":"desc","maxLength":4},"required":false},{"in":"query","name":"near","schema":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Near"},"required":false},{"in":"query","name":"radius","schema":{"anyOf":[{"type":"integer","maximum":500,"minimum":1},{"type":"null"}],"title":"Radius"},"required":false},{"in":"query","name":"deductible","schema":{"type":"number","title":"Deductible","default":0,"maximum":1000000,"minimum":0},"required":false},{"in":"query","name":"spent","schema":{"type":"number","title":"Spent","default":0,"maximum":1000000,"minimum":0},"required":false},{"in":"query","name":"oop_max","schema":{"type":"number","title":"Oop Max","default":0,"maximum":1000000,"minimum":0},"required":false},{"in":"query","name":"coinsurance_pct","schema":{"type":"number","title":"Coinsurance Pct","default":0,"maximum":100,"minimum":0},"required":false},{"in":"query","name":"oop_max_active","schema":{"type":"boolean","title":"Oop Max Active","default":true},"required":false},{"in":"query","name":"uninsured","schema":{"type":"boolean","title":"Uninsured","default":false},"required":false},{"in":"query","name":"coverage","schema":{"type":"string","title":"Coverage","default":"","maxLength":16},"required":false},{"in":"query","name":"concept_key","schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Concept Key"},"required":false},{"in":"query","name":"code_type","schema":{"type":"string","title":"Code Type","default":"CPT","maxLength":20},"required":false},{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Id"},"required":false}],"operationId":"procedure_by_hospital_transparency_procedure__code__by_hospital_get"}},"/api/v1/billing-rules/resolve-full-coverage":{"get":{"tags":["billing-rules"],"summary":"Resolve Full Coverage","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullCoverageResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"code","schema":{"type":"string","title":"Code","description":"CPT/HCPCS/ICD-10 code"},"required":true,"description":"CPT/HCPCS/ICD-10 code"},{"in":"query","name":"code_type","schema":{"type":"string","title":"Code Type","description":"Code type"},"required":true,"description":"Code type"},{"in":"query","name":"payer_id","schema":{"type":"string","title":"Payer Id","format":"uuid","description":"Payer ID"},"required":true,"description":"Payer ID"},{"in":"query","name":"plan_type","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Type"},"required":false},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"network_status","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Network Status"},"required":false},{"in":"query","name":"as_of","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of","description":"Point-in-time date (YYYY-MM-DD). Omit for current rules."},"required":false,"description":"Point-in-time date (YYYY-MM-DD). Omit for current rules."}],"description":"Return the full billing picture for a code + payer in a single call.\n\n- `reimbursement` → Layer 3/4 composition (base_units, conversion_factor,\n  modifier_reimbursements merged across candidates).\n- `claim_edits` → list of all matching edits (bundling, modifier_check,\n  medical_necessity_review can all apply simultaneously).\n- Other categories return a single top-scored rule or null.","operationId":"resolve_full_coverage_api_v1_billing_rules_resolve_full_coverage_get"}},"/api/v1/billing-rules/resolve-reimbursement":{"get":{"tags":["billing-rules"],"summary":"Resolve Reimbursement","responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ComposedReimbursementResponse"},{"type":"null"}],"title":"Response Resolve Reimbursement Api V1 Billing Rules Resolve Reimbursement Get"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"code","schema":{"type":"string","title":"Code","description":"CPT/HCPCS code"},"required":true,"description":"CPT/HCPCS code"},{"in":"query","name":"code_type","schema":{"type":"string","title":"Code Type","description":"Code type (cpt, hcpcs)"},"required":true,"description":"Code type (cpt, hcpcs)"},{"in":"query","name":"payer_id","schema":{"type":"string","title":"Payer Id","format":"uuid","description":"Payer ID"},"required":true,"description":"Payer ID"},{"in":"query","name":"plan_type","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Type"},"required":false},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"network_status","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Network Status"},"required":false},{"in":"query","name":"as_of","schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of","description":"Point-in-time date (YYYY-MM-DD). Omit for current rules."},"required":false,"description":"Point-in-time date (YYYY-MM-DD). Omit for current rules."}],"description":"Compose reimbursement data for a code + payer across multiple rules.\n\nWalks all matching reimbursement rules best-first and fills each\nmissing top-level field from the highest-priority rule that supplies\nit. `modifier_reimbursements` is dict-merged by modifier code so\nentries from multiple rules survive.\n\nReturns `null` when no reimbursement rules match.","operationId":"resolve_reimbursement_api_v1_billing_rules_resolve_reimbursement_get"}},"/api/v1/price-transparency/payer-comparison":{"get":{"tags":["price-transparency"],"summary":"Payer Comparison","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayerComparisonResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"code","schema":{"type":"string","title":"Code"},"required":true},{"in":"query","name":"payer_a","schema":{"type":"string","title":"Payer A","description":"canonical payer name, e.g. 'Aetna' or 'Cigna Healthcare'"},"required":true,"description":"canonical payer name, e.g. 'Aetna' or 'Cigna Healthcare'"},{"in":"query","name":"payer_b","schema":{"type":"string","title":"Payer B"},"required":true},{"in":"query","name":"code_type","schema":{"type":"string","title":"Code Type","default":"CPT","maxLength":20},"required":false}],"description":"Cross-market payer-vs-payer head-to-head for one code (Provider rubric).\nReturns median + p10/p90 + counts for two payers side by side, from the\nquality-filtered per-payer matview pt_payer_code_summary. CPT/HCPCS pooled\nto the dominant row. Resolves each payer by exact canonical name.","operationId":"payer_comparison_api_v1_price_transparency_payer_comparison_get"}},"/api/v1/price-transparency/rates/by-hospital":{"get":{"tags":["price-transparency"],"summary":"Rates By Hospital","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ByHospitalResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"query","name":"code","schema":{"type":"string","title":"Code","maxLength":64,"description":"Procedure code (required)"},"required":true,"description":"Procedure code (required)"},{"in":"query","name":"state","schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"State"},"required":false},{"in":"query","name":"near","schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Near","description":"ZIP5 or \"lat,lng\" centroid for a geo \"cheapest hospitals near me\" search"},"required":false,"description":"ZIP5 or \"lat,lng\" centroid for a geo \"cheapest hospitals near me\" search"},{"in":"query","name":"radius","schema":{"anyOf":[{"type":"integer","maximum":250,"minimum":1},{"type":"null"}],"title":"Radius","description":"Search radius in miles (default 25 when near= is set, mirrors the dashboard)"},"required":false,"description":"Search radius in miles (default 25 when near= is set, mirrors the dashboard)"},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":100,"maximum":1000,"minimum":1},"required":false},{"in":"query","name":"offset","schema":{"type":"integer","title":"Offset","default":0,"minimum":0},"required":false},{"in":"query","name":"code_type","schema":{"type":"string","title":"Code Type","default":"CPT","maxLength":20},"required":false},{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Id"},"required":false}],"description":"Cheapest hospitals near me - per-hospital aggregated medians for one code.\n\nWraps the geo-capable ``QueryService.by_hospital_aggregates`` (the exact\nmethod the consumer dashboard's ``/transparency/procedure/{code}/by-hospital``\npage uses). Each row carries the hospital, its median/IQR/min/max for the\ncode, n_payers, n_rates, and - when ``near`` resolves - a ``miles`` distance\nwithin the requested radius.\n\n``near`` accepts a 5-digit ZIP (resolved to its centroid) or a literal\n``\"lat,lng\"`` pair. ``radius`` defaults to 25 miles and is clamped to\n[5, 250], matching the dashboard's ``_resolve_near`` semantics. Omitting\n``near`` returns a national (or ``state``-scoped) ranking, same as the\ndashboard's non-geo path.\n\nThe underlying query is always bounded by ``code`` (never a full hypertable\nscan). The service returns rows ordered by median DESC; ``limit``/``offset``\npage that result list. ``Decimal``/``UUID`` cells are JSON-encoded by\nFastAPI's default encoder, consistent with the other endpoints here.","operationId":"rates_by_hospital_api_v1_price_transparency_rates_by_hospital_get"}},"/api/v1/email-subscriptions/{subscription_id}":{"delete":{"tags":["email-subscriptions"],"summary":"Delete Email Subscription","responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"subscription_id","schema":{"type":"string","title":"Subscription Id","format":"uuid"},"required":true}],"description":"Soft-delete an email subscription (set is_active=False).","operationId":"delete_email_subscription_api_v1_email_subscriptions__subscription_id__delete"}},"/api/v1/payers/bcbs-prefix/{member_or_prefix}":{"get":{"tags":["payers"],"summary":"Get Bcbs Prefix","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BcbsPrefixResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"member_or_prefix","schema":{"type":"string","title":"Member Or Prefix"},"required":true}],"description":"Resolve a BCBS member ID (or 3-char alpha prefix) to its Home Plan.\nFEP members (leading 'R' + digits) are flagged is_fep with no prefix.","operationId":"get_bcbs_prefix_api_v1_payers_bcbs_prefix__member_or_prefix__get"}},"/api/v1/price-transparency/service-lines/html":{"get":{"tags":["price-transparency"],"summary":"List Service Lines Html","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"description":"HTMX-friendly partial for the landing-page service-line browser.\n\nUses the CURATED SERVICE_LINE_REGISTRY (each entry has a real\n``/transparency/service-line/{slug}`` page), in its defined display order -\nNOT the raw engineering taxonomy from ``known_groups()``, which leaked\ninternal labels (FORMAT_FORCER_INTERNAL, NONMEASURE_CODE) and linked them to\na 0-result ``/search?q=`` dead-end.","operationId":"list_service_lines_html_api_v1_price_transparency_service_lines_html_get"}},"/api/v1/price-transparency/service-lines/{name}":{"get":{"tags":["price-transparency"],"summary":"Service Line Detail","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceLineDetailResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"name","schema":{"type":"string","title":"Name"},"required":true}],"operationId":"service_line_detail_api_v1_price_transparency_service_lines__name__get"}},"/api/v1/price-transparency/refresh-jobs/{job_id}":{"get":{"tags":["price-transparency"],"summary":"Get Refresh Job","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshJobResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"job_id","schema":{"type":"string","title":"Job Id","format":"uuid"},"required":true}],"operationId":"get_refresh_job_api_v1_price_transparency_refresh_jobs__job_id__get"}},"/api/v1/price-transparency/hospitals/{ccn}/refresh":{"post":{"tags":["price-transparency"],"summary":"Refresh Hospital","responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshHospitalResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"ccn","schema":{"type":"string","title":"Ccn"},"required":true}],"operationId":"refresh_hospital_api_v1_price_transparency_hospitals__ccn__refresh_post"}},"/api/v1/price-transparency/hospitals/{ccn}/offerings":{"get":{"tags":["price-transparency"],"summary":"Hospital Offerings","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferingsResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"ccn","schema":{"type":"string","title":"Ccn"},"required":true},{"in":"query","name":"sort","schema":{"type":"string","title":"Sort","default":"most_expensive"},"required":false},{"in":"query","name":"service_line","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Line"},"required":false},{"in":"query","name":"limit","schema":{"type":"integer","title":"Limit","default":100,"maximum":1000,"minimum":1},"required":false},{"in":"query","name":"offset","schema":{"type":"integer","title":"Offset","default":0,"minimum":0},"required":false},{"in":"query","name":"payer_id","schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Id"},"required":false}],"operationId":"hospital_offerings_api_v1_price_transparency_hospitals__ccn__offerings_get"}},"/api/v1/billing-rules/specialties/{specialty}/profile":{"get":{"tags":["billing-rules"],"summary":"Get Specialty Profile","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecialtyProfileResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"specialty","schema":{"type":"string","title":"Specialty"},"required":true}],"description":"Return aggregated stats and recent activity for a medical specialty.","operationId":"get_specialty_profile_api_v1_billing_rules_specialties__specialty__profile_get"}},"/api/v1/price-transparency/hospitals/{ccn}/correction":{"post":{"tags":["price-transparency"],"summary":"Submit Hospital Correction","responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CorrectionResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"ccn","schema":{"type":"string","title":"Ccn"},"required":true}],"description":"Correction / dispute submission path (Hospital-lens rubric: \"correction\npath\"). A hospital can flag a wrong rate, a stale file, a wrong facility\nattribution, or point us at its current MRF URL. Writes to the\npt_pipeline_issues review queue (issue_type='other', subject_kind='hospital')\nfor the data team to triage. A hospital handing us its current MRF is the\nhighest-signal input to the document-upload flywheel. get_db owns the\ntransaction (commit-on-success), so no explicit commit here.","operationId":"submit_hospital_correction_api_v1_price_transparency_hospitals__ccn__correction_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HospitalCorrectionRequest"}}},"required":true}}},"/api/v1/price-transparency/hospitals/{ccn}/provenance":{"get":{"tags":["price-transparency"],"summary":"Hospital Provenance","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvenanceResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"ccn","schema":{"type":"string","title":"Ccn"},"required":true},{"in":"query","name":"download","schema":{"type":"boolean","title":"Download","default":false,"description":"Return as a downloadable JSON attachment (provenance-<ccn>.json)."},"required":false,"description":"Return as a downloadable JSON attachment (provenance-<ccn>.json)."}],"description":"Audit-grade provenance for a hospital's published rates - the committed\ndifferentiator made programmatically accessible: reproducible discovery ->\nfetch -> parse evidence per source MRF. Returns one record per active\nmachine-readable file: the source URL, the page it was discovered on, the\ndiscovery method + run id, the last fetch status/time, and the content\nSHA-256 fingerprint + byte size of the exact bytes parsed, PLUS a\ndeterministic ``integrity_hash`` over the ``sources`` array (the manifest\nfingerprint - same convention as the billing-rule audit export) so a\nconsumer can prove the record wasn't altered in transit.","operationId":"hospital_provenance_api_v1_price_transparency_hospitals__ccn__provenance_get"}},"/api/v1/webhooks/{webhook_id}/deliveries/{log_id}/replay":{"post":{"tags":["webhooks"],"summary":"Replay Delivery","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"webhook_id","schema":{"type":"string","title":"Webhook Id","format":"uuid"},"required":true},{"in":"path","name":"log_id","schema":{"type":"integer","title":"Log Id"},"required":true}],"description":"Manually re-arm an exhausted/failed delivery for redelivery.\n\nResets the DLQ row to ``pending`` / ``next_attempt_at = now`` so the EXISTING\nretry sweep redelivers it on the next tick - same signed, SSRF-validated path\nas every other deferred retry. There is no second delivery path here.\n\nOwner-authenticated (``webhooks:write``). Idempotent-safe: replaying an\nalready-pending row just re-arms its schedule.","operationId":"replay_delivery_api_v1_webhooks__webhook_id__deliveries__log_id__replay_post"}},"/api/v1/price-transparency/hospitals/{ccn}/provenance/verify":{"get":{"tags":["price-transparency"],"summary":"Hospital Provenance Verify","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvenanceVerifyResponse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized - missing/invalid control-plane identity"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden - token not scoped for this service"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Validation error"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Rate limit exceeded"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Internal server error"}},"parameters":[{"in":"path","name":"ccn","schema":{"type":"string","title":"Ccn"},"required":true}],"description":"Live reproducibility check: re-fetch the recorded source MRF URL(s) with\nthe self-hosted fetcher and confirm the freshly-computed content SHA-256\nstill matches what we published.\n\nThis is the \"the bytes still hash to what we certified\" attestation behind\nthe audit-grade-provenance differentiator. BOUNDED - only the first few\nsources that carry both a URL and a recorded hash are re-fetched, each with\na byte + time ceiling - because a source MRF can be tens of GB and this is a\npublic endpoint. Per source: ``verified`` (live hash == recorded),\n``mismatch`` (URL now serves different bytes), ``unreachable`` (fetch\nfailed), or ``skipped`` (no url/hash, or past the cap). The\n``integrity_hash`` echoes the manifest fingerprint of the source set the\nverdicts were computed against.","operationId":"hospital_provenance_verify_api_v1_price_transparency_hospitals__ccn__provenance_verify_get"}}},"openapi":"3.1.0","servers":[{"url":"https://api.hank.ai/v1/ppman","description":"Production - the metered Hank edge (console-bearer auth)"},{"url":"http://localhost:8787","description":"Local development"}],"components":{"schemas":{"RateItem":{"type":"object","title":"RateItem","required":["rate_id","code","code_type","payer_name_raw","hospital_id","hospital_name","mrf_observed_at"],"properties":{"ccn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ccn"},"code":{"type":"string","title":"Code"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"rate_id":{"type":"integer","title":"Rate Id"},"setting":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Setting"},"payer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Id"},"code_type":{"type":"string","title":"Code Type"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hospital_id":{"type":"string","title":"Hospital Id"},"methodology":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Methodology"},"gross_charge":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Charge"},"billing_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Class"},"hospital_name":{"type":"string","title":"Hospital Name"},"median_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Amount"},"plan_name_raw":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name Raw"},"exclude_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exclude Reason"},"max_negotiated":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Negotiated"},"min_negotiated":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Negotiated"},"payer_name_raw":{"type":"string","title":"Payer Name Raw"},"discounted_cash":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discounted Cash"},"mrf_observed_at":{"type":"string","title":"Mrf Observed At"},"percentile_10_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Percentile 10 Amount"},"percentile_90_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Percentile 90 Amount"},"standard_charge_dollar":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Standard Charge Dollar"},"standard_charge_algorithm":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Standard Charge Algorithm"}}},"PayerSide":{"type":"object","title":"PayerSide","required":["payer","found"],"properties":{"p10":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P10"},"p90":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P90"},"found":{"type":"boolean","title":"Found"},"payer":{"type":"string","title":"Payer"},"median":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median"},"n_rates":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N Rates"},"n_hospitals":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N Hospitals"}}},"PtRateLink":{"type":"object","title":"PtRateLink","required":["kind","payer_id","url"],"properties":{"url":{"type":"string","title":"Url"},"kind":{"type":"string","title":"Kind"},"payer_id":{"type":"string","title":"Payer Id"}}},"ErrorDetail":{"type":"object","title":"ErrorDetail","required":["code","message"],"properties":{"code":{"type":"string","title":"Code"},"details":{"anyOf":[{"type":"array","items":{}},{"type":"null"}],"title":"Details","default":null},"message":{"type":"string","title":"Message"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id","default":null}},"description":"The single, documented body of every ``/api`` error.\n\nThis is the ONE error shape an SDK/integrator parses. Every API error path\n(4xx and 5xx) emits ``ErrorResponse`` wrapping exactly these fields:\n\n- ``code``: a stable, machine-readable token (e.g. ``http_404``,\n  ``validation_error``, ``rate_limit_exceeded``, ``internal_error``).\n- ``message``: a human-readable, **non-sensitive** description. The 500 path\n  always uses a generic string here - it never leaks internals/stack traces.\n- ``request_id``: correlation id (also echoed in the ``X-Request-ID``\n  header) so a caller can quote it in a support request.\n- ``details``: optional structured extras - used by the 422 handler to carry\n  the per-field validation errors. ``null`` for most errors."},"HospitalRef":{"type":"object","title":"HospitalRef","required":["ccn"],"properties":{"ccn":{"type":"string","title":"Ccn"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"hospital_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hospital Id"}}},"MatchResult":{"type":"object","title":"MatchResult","required":["payer","confidence","match_quality","match_reason"],"properties":{"payer":{"$ref":"#/components/schemas/PayerEntryResponse"},"signals":{"type":"array","items":{"$ref":"#/components/schemas/SignalDetail"},"title":"Signals","default":[]},"confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Confirmed"},"confidence":{"type":"number","title":"Confidence"},"match_reason":{"type":"string","title":"Match Reason"},"matched_plan":{"anyOf":[{"$ref":"#/components/schemas/PayerPlanResponse"},{"type":"null"}]},"address_match":{"anyOf":[{"$ref":"#/components/schemas/AddressMatchInfo"},{"type":"null"}]},"match_quality":{"type":"string","title":"Match Quality"},"corroborating_signals":{"type":"array","items":{"type":"string"},"title":"Corroborating Signals","default":[]}}},"MatchedRule":{"type":"object","title":"MatchedRule","properties":{"rule_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Id"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"rule_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Category"}}},"OfferingItem":{"type":"object","title":"OfferingItem","required":["code","code_type","n_rate_rows","n_payers"],"properties":{"code":{"type":"string","title":"Code"},"n_payers":{"type":"integer","title":"N Payers"},"code_type":{"type":"string","title":"Code Type"},"avg_median":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Median"},"max_dollar":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Dollar"},"min_dollar":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Dollar"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"n_rate_rows":{"type":"integer","title":"N Rate Rows"},"gross_charge":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross Charge"},"max_observed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Max Observed"},"discounted_cash":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Discounted Cash"}}},"ResolvedBook":{"type":"object","title":"ResolvedBook","required":["program","basis"],"properties":{"basis":{"type":"string","title":"Basis","examples":["claims lockbox pobox:32593:48232 → shared_family, program-unanimous → medicare_advantage"],"description":"Human-readable resolution basis, naming the canonical key it came from."},"program":{"type":"string","title":"Program","examples":["medicare_advantage"],"description":"The resolved book of business."}},"description":"Which BOOK OF BUSINESS the card's claims lockbox resolves to (#598 round 10).\n\nADDRESS-DERIVED ONLY, and only when the lockbox actually determines it. A card\nwhose address leg did not fire, or whose lockbox cannot speak about the book,\nleaves this null - it is never inferred from the payer's name or from a\nmulti-program directory row.\n\nTwo ways a lockbox determines a book, in precedence order:\n\n1. the key EARNED ``single_product`` and therefore SELECTED one directory row -\n   the book is that row's own single ``lines_of_business`` entry;\n2. the key earned ``shared_family`` but its sharers are PROGRAM-UNANIMOUS -\n   identity stays with the name leg, and the agreed program is the book. This\n   is the BCBSM / PO Box 32593 case: two rows (Medicare Plus Blue, BCN\n   Advantage) share the lockbox, so it cannot select one, but both say\n   ``medicare_advantage``.\n\n``program`` uses the ``payer_address.program`` vocabulary, a SUPERSET of\n``lines_of_business`` (it additionally carries ``tricare_va``). The sentinels\n``multi`` and ``unknown`` are never served here - neither names a book."},"SearchResult":{"type":"object","title":"SearchResult","required":["update_id","payer_id","payer_name","source_name","change_type","severity","created_at"],"properties":{"rank":{"type":"number","title":"Rank","default":0},"headline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Headline"},"payer_id":{"type":"string","title":"Payer Id","format":"uuid"},"severity":{"type":"string","title":"Severity"},"update_id":{"type":"string","title":"Update Id","format":"uuid"},"created_at":{"type":"string","title":"Created At","format":"date-time"},"payer_name":{"type":"string","title":"Payer Name"},"change_type":{"type":"string","title":"Change Type"},"source_name":{"type":"string","title":"Source Name"},"plain_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plain Summary"}}},"SignalDetail":{"type":"object","title":"SignalDetail","required":["signal_type","matched","score"],"properties":{"score":{"type":"number","title":"Score"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"matched":{"type":"boolean","title":"Matched"},"signal_type":{"type":"string","title":"Signal Type"}},"description":"Per-signal result in match response."},"AggregateItem":{"type":"object","title":"AggregateItem","required":["code","code_type"],"properties":{"p10":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P10"},"p90":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P90"},"code":{"type":"string","title":"Code"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"median":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median"},"n_rates":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N Rates"},"code_type":{"type":"string","title":"Code Type"},"n_hospitals":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N Hospitals"},"last_observed":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Observed"}}},"ErrorResponse":{"type":"object","title":"ErrorResponse","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}},"description":"The single top-level envelope for every ``/api`` error response."},"ExportRequest":{"type":"object","title":"ExportRequest","properties":{"codes":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":200},{"type":"null"}],"title":"Codes","examples":[["70450","70460"]],"description":"Restrict to these codes (up to 200)."},"format":{"enum":["csv","json"],"type":"string","title":"Format","default":"json","examples":["json"],"description":"Response format: json array or csv attachment."},"states":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":52},{"type":"null"}],"title":"States","examples":[["NY","NJ"]],"description":"Restrict to these USPS state codes."},"payer_ids":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":50},{"type":"null"}],"title":"Payer Ids","examples":[["018f3a2b-7c4d-7e1a-9b2c-3d4e5f6a7b8c"]],"description":"Restrict the export to these payers (up to 50). Omit for all payers."},"plan_types":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":6},{"type":"null"}],"title":"Plan Types","examples":[["all_plans"]],"description":"Restrict to these plan types."},"rule_categories":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":7},{"type":"null"}],"title":"Rule Categories","examples":[["prior_auth"]],"description":"Restrict to these rule categories."}}},"MatchResponse":{"type":"object","title":"MatchResponse","required":["matches","query_quality","total_candidates"],"properties":{"matches":{"type":"array","items":{"$ref":"#/components/schemas/MatchResult"},"title":"Matches"},"confirmed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Confirmed","description":"True when the top match is a confirmed payer identity; False when only unconfirmed fuzzy suggestions could be offered; null when no confirmation gate ran."},"mac_authority":{"anyOf":[{"$ref":"#/components/schemas/MacAuthorityInfo"},{"type":"null"}],"description":"The Medicare Administrative Contractor governing the supplied state's traditional-Medicare policy, when the query is a Medicare-in-state context. Null for non-Medicare payers, Medicare Advantage/supplement plans, or when no state is given."},"query_quality":{"type":"string","title":"Query Quality"},"total_candidates":{"type":"integer","title":"Total Candidates","description":"How many candidates this response considered before truncating to `limit`. It is a property of THIS response, not of the directory: the underlying similarity legs are bounded by `limit`, so raising `limit` can raise this count. Do not read it as 'how many payers could match'."},"directory_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Directory Version","examples":["4217"],"description":"Opaque, monotonically increasing version of the payer directory content that produced this match. Use it as a cache key: when the value changes, previously cached results derived from the directory should be revalidated. Compare for equality only, and do not parse it. Null when the signal is unavailable."}}},"PayerResponse":{"type":"object","title":"PayerResponse","required":["id","name","payer_type","created_at"],"properties":{"id":{"type":"string","title":"Id","format":"uuid","examples":["018f3a2b-7c4d-7e1a-9b2c-3d4e5f6a7b8c"],"description":"Unique payer (parent company) id."},"name":{"type":"string","title":"Name","examples":["UnitedHealthcare"],"description":"Payer company name."},"is_active":{"type":"boolean","title":"Is Active","default":true,"examples":[true],"description":"False once a payer is retired/merged away."},"naic_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Naic Code","examples":["79413"],"description":"NAIC five-digit insurance company code, if known."},"created_at":{"type":"string","title":"Created At","format":"date-time","description":"When the payer was first recorded."},"parent_org":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Org","examples":["UnitedHealth Group"],"description":"Parent organization name, if part of a larger group."},"payer_type":{"type":"string","title":"Payer Type","examples":["commercial"],"description":"Payer classification."},"short_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Name","examples":["UHC"],"description":"Common abbreviation, if any."},"entry_count":{"type":"integer","title":"Entry Count","default":0,"examples":[37],"description":"Number of EDI payer entries linked to this payer."},"is_monitored":{"type":"boolean","title":"Is Monitored","default":false,"examples":[true],"description":"True when PPMan actively tracks this payer's policies."},"domicile_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domicile State","examples":["MN"],"description":"USPS code of the payer's state of domicile."},"operating_states":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Operating States","examples":[["NY","NJ","CT"]],"description":"USPS state codes the payer operates in."}}},"RatesResponse":{"type":"object","title":"RatesResponse","required":["items","limit","offset"],"properties":{"q":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"},"items":{"type":"array","items":{"$ref":"#/components/schemas/RateItem"},"title":"Items"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}}},"WebhookCreate":{"type":"object","title":"WebhookCreate","required":["url"],"properties":{"url":{"type":"string","title":"Url","format":"uri","examples":["https://example.com/hooks/ppman"],"maxLength":2083,"minLength":1,"description":"HTTPS endpoint we POST events to. Each delivery is HMAC-signed."},"code_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Code Filter","examples":[["70450"]],"description":"Only deliver billing_rule.changed events for these codes."},"event_types":{"type":"array","items":{"type":"string"},"title":"Event Types","default":["policy.updated"],"examples":[["policy.updated","billing_rule.changed"]],"description":"Events to subscribe to. Valid: policy.updated, billing_rule.changed."},"payer_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Payer Filter","examples":[["Aetna"]],"description":"Only deliver events for these payers (names or ids)."},"state_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"State Filter","examples":[["NY"]],"description":"Only deliver events scoped to these USPS state codes."},"plan_type_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Plan Type Filter","examples":[["all_plans"]],"description":"Only deliver events for these plan types."},"severity_minimum":{"anyOf":[{"enum":["low","medium","high","critical"],"type":"string"},{"type":"null"}],"title":"Severity Minimum","examples":["medium"],"description":"Only deliver events at or above this severity."},"specialty_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Specialty Filter","examples":[["cardiology"]],"description":"Only deliver events touching these specialties."},"rule_category_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Rule Category Filter","examples":[["prior_auth"]],"description":"Only deliver billing_rule.changed events for these categories."}}},"ByHospitalItem":{"type":"object","title":"ByHospitalItem","properties":{"ccn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ccn"},"p25":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P25"},"p75":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P75"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Miles"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"median":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median"},"n_rates":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N Rates"},"n_payers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N Payers"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"max_dollar":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Dollar"},"min_dollar":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Dollar"},"cash_median":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cash Median"},"hospital_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hospital Id"}}},"CitationSchema":{"type":"object","title":"CitationSchema","properties":{"source_page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Page"},"source_quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Quote"},"source_document_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Document Url"}},"description":"Audit-grade provenance for a cited rule."},"PayerRuleEntry":{"type":"object","title":"PayerRuleEntry","required":["payer_id","payer_name","rule"],"properties":{"rule":{"$ref":"#/components/schemas/BillingRuleResponse"},"payer_id":{"type":"string","title":"Payer Id","format":"uuid"},"payer_name":{"type":"string","title":"Payer Name"}}},"ReplayResponse":{"type":"object","title":"ReplayResponse","required":["retry_queue_id","notification_log_id","status","next_attempt_at"],"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message","default":"Delivery re-queued; the retry sweep will redeliver it on the next tick."},"retry_queue_id":{"type":"integer","title":"Retry Queue Id"},"next_attempt_at":{"type":"string","title":"Next Attempt At","format":"date-time"},"notification_log_id":{"type":"integer","title":"Notification Log Id"}},"description":"Result of re-arming a DLQ entry for redelivery by the existing sweep."},"ResolveRequest":{"type":"object","title":"ResolveRequest","required":["code","code_type","payer_id","plan_type","rule_category"],"properties":{"code":{"type":"string","title":"Code"},"as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"payer_id":{"type":"string","title":"Payer Id","format":"uuid"},"code_type":{"type":"string","title":"Code Type"},"plan_type":{"type":"string","title":"Plan Type"},"rule_category":{"type":"string","title":"Rule Category"},"network_status":{"type":"string","title":"Network Status","default":"both"},"include_fallbacks":{"type":"boolean","title":"Include Fallbacks","default":false}}},"ResolvedPolicy":{"type":"object","title":"ResolvedPolicy","required":["name","url"],"properties":{"url":{"type":"string","title":"Url"},"name":{"type":"string","title":"Name"},"basis":{"type":"array","items":{"type":"string"},"title":"Basis"},"applies":{"type":"boolean","title":"Applies","default":true},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"}}},"SearchCodeItem":{"type":"object","title":"SearchCodeItem","required":["code","code_type","n_hospitals","n_payers","total_rates"],"properties":{"code":{"type":"string","title":"Code"},"n_payers":{"type":"integer","title":"N Payers"},"code_type":{"type":"string","title":"Code Type"},"p10_dollar":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P10 Dollar"},"p90_dollar":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P90 Dollar"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"n_hospitals":{"type":"integer","title":"N Hospitals"},"total_rates":{"type":"integer","title":"Total Rates"},"last_observed":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Observed"},"median_dollar":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Dollar"}},"description":"One matching procedure (code-level pivot) in a clinical search.\n\nDrill into per-hospital rates for a result via\n``GET /rates?code=<code>&code_type=<code_type>``."},"SearchResponse":{"type":"object","title":"SearchResponse","required":["q","total","expansion","items","limit","offset"],"properties":{"q":{"type":"string","title":"Q"},"items":{"type":"array","items":{"$ref":"#/components/schemas/SearchCodeItem"},"title":"Items"},"limit":{"type":"integer","title":"Limit"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"expansion":{"type":"object","title":"Expansion","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"ServiceLineRow":{"type":"object","title":"ServiceLineRow","required":["name","human_label","n_codes"],"properties":{"name":{"type":"string","title":"Name"},"n_codes":{"type":"integer","title":"N Codes"},"human_label":{"type":"string","title":"Human Label"}}},"TrendsResponse":{"type":"object","title":"TrendsResponse","required":["window_days","from_date","to_date","items","total"],"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Items","examples":[[{"payer_id":"018f3a2b-7c4d-7e1a-9b2c-3d4e5f6a7b8c","velocity":0.12,"direction":"tightening","payer_name":"Aetna","net_direction":7,"sample_changes":["Prior-auth requirement added for 70450"],"top_categories":["prior_auth","reimbursement"],"loosening_count":2,"tightening_count":9}]],"description":"Per-payer trend rows (direction, tightening/loosening counts, velocity, top categories)."},"total":{"type":"integer","title":"Total","examples":[1],"description":"Total number of payers matching the filters."},"to_date":{"type":"string","title":"To Date","examples":["2026-06-18"],"description":"ISO-8601 date of the window end (today)."},"from_date":{"type":"string","title":"From Date","examples":["2026-03-20"],"description":"ISO-8601 date of the window start (window_days ago)."},"window_days":{"type":"integer","title":"Window Days","examples":[90],"description":"The analysis window, in days."}},"description":"Payer policy tightening/loosening trends over a window\n(``GET /api/v1/analytics/trends``)."},"ComparisonEntry":{"type":"object","title":"ComparisonEntry","required":["payer_id","payer_name"],"properties":{"rule":{"anyOf":[{"$ref":"#/components/schemas/BillingRuleResponse"},{"type":"null"}]},"payer_id":{"type":"string","title":"Payer Id","format":"uuid"},"payer_name":{"type":"string","title":"Payer Name"}}},"PriorAuthChange":{"type":"object","title":"PriorAuthChange","required":["history_id","rule_id","payer_id","payer_name","code","action","changed_at"],"properties":{"code":{"type":"string","title":"Code"},"action":{"type":"string","title":"Action"},"rule_id":{"type":"string","title":"Rule Id"},"payer_id":{"type":"string","title":"Payer Id"},"code_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Type"},"changed_at":{"type":"string","title":"Changed At"},"history_id":{"type":"integer","title":"History Id"},"payer_name":{"type":"string","title":"Payer Name"},"change_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Source"},"change_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Description"}}},"ResolveResponse":{"type":"object","title":"ResolveResponse","properties":{"rule":{"anyOf":[{"$ref":"#/components/schemas/BillingRuleResponse"},{"type":"null"}]},"as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of"},"fallbacks":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/BillingRuleResponse"}},{"type":"null"}],"title":"Fallbacks"},"delegation_chain":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Delegation Chain"},"specificity_score":{"type":"integer","title":"Specificity Score","default":0},"resolved_via_payer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resolved Via Payer Id"}}},"ValidationError":{"type":"object","title":"ValidationError","required":["loc","msg","type"],"properties":{"ctx":{"type":"object","title":"Context"},"loc":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"}}},"WebhookResponse":{"type":"object","title":"WebhookResponse","required":["id","url","event_types","created_at"],"properties":{"id":{"type":"string","title":"Id","format":"uuid"},"url":{"type":"string","title":"Url"},"is_active":{"type":"boolean","title":"Is Active","default":true},"created_at":{"type":"string","title":"Created At","format":"date-time"},"code_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Code Filter"},"event_types":{"type":"array","items":{"type":"string"},"title":"Event Types"},"payer_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Payer Filter"},"state_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"State Filter"},"failure_count":{"type":"integer","title":"Failure Count","default":0},"last_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Status Code"},"plan_type_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Plan Type Filter"},"severity_minimum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity Minimum"},"specialty_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Specialty Filter"},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Triggered At"},"rule_category_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Rule Category Filter"}}},"AddressMatchInfo":{"type":"object","title":"AddressMatchInfo","properties":{"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"The canonical key that matched, verbatim."},"matched":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched","description":"Which structured input matched this row: \"pobox\", \"street\", \"phone\", or null."},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url","description":"Where the matched claims address was published (provenance)."},"uniqueness":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uniqueness","description":"Earned discriminating power of the matched claims address: single_product | shared_family | shared_tpa. Null when unearned, when only a phone matched, or when a PO box was matched without the ZIP that would identify one lockbox."}},"description":"What the structured claims-address / phone input matched on THIS row (#598 M5).\n\nEvery field is nullable and the object itself is null-fielded when the leg ran\nbut this particular row was not hit - the consumer can always read the shape,\nnever has to infer absence from a missing key.\n\n``key`` echoes the CANONICAL form verbatim (CC sign-off amendment A2) so a\nconsumer can join our evidence to their own address corpus without\nre-deriving it: ``pobox:<box>:<zip5>``, ``street:<folded line>:<zip5>``,\n``pobox:<box>`` (a box matched without a ZIP - see the no-zip rule), or\n``phone:<10 digits>``.\n\n``uniqueness`` is the EARNED class of the matched key\n(``address_normalizer.earn_uniqueness``), and only ``single_product`` ever\ncarries selection weight. It is ALWAYS null for ``matched=\"phone\"``: a phone\ncorroborates, it never selects."},"DisagreementItem":{"type":"object","title":"DisagreementItem","required":["code","code_type","payer_count","disagreement_score","category_count","severity_range","financial_impact_range"],"properties":{"code":{"type":"string","title":"Code"},"code_type":{"type":"string","title":"Code Type"},"payer_count":{"type":"integer","title":"Payer Count"},"category_count":{"type":"integer","title":"Category Count"},"severity_range":{"type":"array","items":{"type":"string"},"title":"Severity Range"},"disagreement_score":{"type":"number","title":"Disagreement Score"},"financial_impact_range":{"type":"array","items":{"type":"integer"},"title":"Financial Impact Range"}}},"LcdMatchResponse":{"type":"object","title":"LcdMatchResponse","required":["lcd_id","title"],"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"title":{"type":"string","title":"Title"},"lcd_id":{"type":"string","title":"Lcd Id"},"code_matched":{"type":"boolean","title":"Code Matched","default":false},"effective_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effective Date"},"contractor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contractor Name"},"retirement_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retirement Date"}},"description":"One MAC LCD in the Medicare coverage-authority block."},"MacAuthorityInfo":{"type":"object","title":"MacAuthorityInfo","required":["payer_id","payer_name","jurisdiction","state","basis"],"properties":{"basis":{"type":"string","title":"Basis","examples":["SC → JM → Palmetto GBA (payer_mac_jurisdictions)"],"description":"Human-readable resolution basis."},"state":{"type":"string","title":"State","examples":["SC"],"description":"Two-letter USPS state the jurisdiction was resolved for."},"payer_id":{"type":"string","title":"Payer Id","format":"uuid","description":"Canonical payer id of the governing MAC."},"payer_name":{"type":"string","title":"Payer Name","examples":["Palmetto GBA"],"description":"MAC name."},"jurisdiction":{"type":"string","title":"Jurisdiction","examples":["JM"],"description":"A/B MAC jurisdiction code."}},"description":"The Medicare Administrative Contractor (MAC) that governs traditional-Medicare\nmedical policy for a given state. Resolved deterministically from\n``payer_mac_jurisdictions``: no fuzzy matching, no LLM."},"NcdMatchResponse":{"type":"object","title":"NcdMatchResponse","required":["ncd_id","title"],"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"title":{"type":"string","title":"Title"},"ncd_id":{"type":"string","title":"Ncd Id"}},"description":"One national NCD in the Medicare coverage-authority block."},"ProvenanceSource":{"type":"object","title":"ProvenanceSource","properties":{"active":{"type":"boolean","title":"Active","default":true},"file_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Id"},"mrf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mrf Url"},"parser_ids":{"type":"array","items":{"type":"string"},"title":"Parser Ids","default":[]},"parse_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parse Status"},"last_fetch_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Fetch At"},"content_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Sha256"},"size_raw_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Raw Bytes"},"blob_first_seen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blob First Seen"},"parser_versions":{"type":"array","items":{"type":"string"},"title":"Parser Versions","default":[]},"source_page_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Page Url"},"discovery_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discovery Method"},"last_fetch_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Fetch Status"},"discovered_by_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discovered By Run Id"}}},"SourceStatusItem":{"type":"object","title":"SourceStatusItem","required":["source_name","source_type","url","is_doi","is_local","record_count"],"properties":{"url":{"type":"string","title":"Url","examples":["https://content.naic.org/..."],"description":"Origin URL or path the source is fetched from."},"is_doi":{"type":"boolean","title":"Is Doi","examples":[false],"description":"True for Department-of-Insurance (state DOI) sources."},"is_local":{"type":"boolean","title":"Is Local","examples":[false],"description":"True when the source is a bundled local file."},"last_sync":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sync","examples":["2026-06-18T03:30:00+00:00"],"description":"ISO-8601 timestamp of the last sync attempt, or null if never run."},"source_name":{"type":"string","title":"Source Name","examples":["naic"],"description":"Internal source identifier."},"source_type":{"type":"string","title":"Source Type","examples":["registry"],"description":"Source category (e.g. registry feed, DOI portal, local file)."},"last_failure":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Failure","examples":[null],"description":"ISO-8601 timestamp of the last failed sync, or null."},"last_success":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Success","examples":["2026-06-18T03:30:00+00:00"],"description":"ISO-8601 timestamp of the last successful sync, or null."},"record_count":{"type":"integer","title":"Record Count","examples":[1820],"description":"Records ingested on the last successful sync."},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason","examples":[null],"description":"Short reason for the most recent failure, or null."},"schema_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schema Fingerprint","examples":["a1b2c3d4"],"description":"Hash of the source's last-seen schema (drift detection), or null."}},"description":"One payer data source with its last-sync status (``GET /payers/sources``)."},"SourceSyncStatus":{"type":"object","title":"SourceSyncStatus","required":["source_name"],"properties":{"last_sync":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync"},"source_name":{"type":"string","title":"Source Name"},"last_success":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Success"},"record_count":{"type":"integer","title":"Record Count","default":0},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"}}},"AdjudicateRequest":{"type":"object","title":"AdjudicateRequest","required":["payer","date_of_service","lines"],"properties":{"pos":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Pos","examples":["11"],"description":"Place of service. Routes NCCI PTP table selection: a facility POS (19/21/22/23/24) selects the CMS 'facility' (ccioph, outpatient-hospital) edit table, otherwise the 'practitioner' (ccipra) table. Caveat: POS 21 is inpatient hospital, which we route to the outpatient-hospital table as the closest facility approximation (CMS publishes no separate inpatient PTP table). Not yet a billing-rule resolver axis."},"lines":{"type":"array","items":{"$ref":"#/components/schemas/AdjudicateLineRequest"},"title":"Lines","maxItems":50,"minItems":1},"payer":{"$ref":"#/components/schemas/AdjudicatePayerRef"},"state":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"State","examples":["TX"]},"plan_type":{"anyOf":[{"enum":["commercial","medicare_advantage","medicaid","exchange","community_plan","all_plans"],"type":"string"},{"type":"null"}],"title":"Plan Type","examples":["commercial"]},"specialty":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Specialty","examples":["anesthesiology"]},"date_of_service":{"type":"string","title":"Date Of Service","format":"date","examples":["2026-07-21"]}}},"AggregateResponse":{"type":"object","title":"AggregateResponse","required":["items"],"properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"items":{"type":"array","items":{"$ref":"#/components/schemas/AggregateItem"},"title":"Items"}}},"BillingRuleCreate":{"type":"object","title":"BillingRuleCreate","required":["code","code_type","payer_id","rule_category","rule_data","summary_text","effective_from"],"properties":{"code":{"type":"string","title":"Code","examples":["70450"],"description":"Procedure/diagnosis code this rule applies to."},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","examples":["NY"],"description":"USPS state code the rule is scoped to, or null for all states."},"origin":{"type":"string","title":"Origin","default":"admin_created","examples":["admin_created"],"description":"How the rule was created."},"payer_id":{"type":"string","title":"Payer Id","format":"uuid","examples":["018f3a2b-7c4d-7e1a-9b2c-3d4e5f6a7b8c"],"description":"Payer the rule applies to."},"severity":{"type":"string","title":"Severity","default":"medium","examples":["high"],"description":"Operational severity."},"code_type":{"type":"string","title":"Code Type","examples":["CPT"],"description":"Code system of ``code``."},"plan_type":{"type":"string","title":"Plan Type","default":"all_plans","examples":["all_plans"],"description":"Plan type scope."},"rule_data":{"type":"object","title":"Rule Data","examples":[{"um_vendor":"evicore","pa_required":true}],"description":"Category-specific structured payload (validated against ``rule_category``).","additionalProperties":true},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence","examples":[0.95],"description":"Extraction confidence (0.0-1.0), if applicable."},"specialties":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Specialties","examples":[["radiology"]],"description":"Medical specialties the rule applies to."},"effective_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective To","examples":[null],"description":"Date the rule stops applying, or null if open-ended."},"summary_text":{"type":"string","title":"Summary Text","examples":["Prior authorization required for CT head without contrast (70450)."],"description":"Human-readable one-line summary of the rule."},"rule_category":{"type":"string","title":"Rule Category","examples":["prior_auth"],"description":"The rule category; determines the shape of ``rule_data``."},"code_range_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Range End","examples":["70470"],"description":"End of an inclusive code range (rule applies to code..code_range_end)."},"effective_from":{"type":"string","title":"Effective From","format":"date","examples":["2026-01-01"],"description":"Date the rule takes effect (YYYY-MM-DD)."},"network_status":{"type":"string","title":"Network Status","default":"both","examples":["both"],"description":"Network scope: in_network, out_network, or both."},"excluded_states":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Excluded States","examples":[["CA"]],"description":"USPS state codes explicitly excluded from the rule."},"source_document_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Document Url","examples":["https://payer.example/policies/imaging.pdf"],"description":"URL of the payer document the rule was derived from."},"financial_impact_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Financial Impact Score","examples":[72],"description":"Estimated financial impact (0-100), if scored."}}},"BillingRuleUpdate":{"type":"object","title":"BillingRuleUpdate","properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"code_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Type"},"plan_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Type"},"rule_data":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Rule Data"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"specialties":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Specialties"},"effective_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective To"},"summary_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary Text"},"rule_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rule Category"},"code_range_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Range End"},"effective_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective From"},"network_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Network Status"},"excluded_states":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Excluded States"},"source_document_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Document Url"},"financial_impact_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Financial Impact Score"}}},"CrossReferenceRow":{"type":"object","title":"CrossReferenceRow","required":["rate_id","code","code_type"],"properties":{"code":{"type":"string","title":"Code"},"rate_id":{"type":"integer","title":"Rate Id"},"code_type":{"type":"string","title":"Code Type"},"matched_rule":{"anyOf":[{"$ref":"#/components/schemas/MatchedRule"},{"type":"null"}]},"median_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Amount"},"payer_name_raw":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Name Raw"},"percentile_10_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Percentile 10 Amount"},"percentile_90_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Percentile 90 Amount"},"standard_charge_dollar":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Standard Charge Dollar"}}},"ManualRefreshBody":{"type":"object","title":"ManualRefreshBody","properties":{"reason":{"type":"string","title":"Reason","default":"manual admin trigger","maxLength":500}},"description":"Bounded request body for manual refresh trigger.\n\nDCR W2-A-S2: prior route accepted ``Optional[dict]`` so a client could\nsubmit a 1 MB ``reason`` field that landed straight in the audit log.\nCap at 500 chars and reject any extra fields.","additionalProperties":false},"NcciPtpEditSchema":{"type":"object","title":"NcciPtpEditSchema","required":["column1_code","column1_line","column2_code","column2_line","modifier_indicator","edit_type","verdict","effective_date"],"properties":{"verdict":{"enum":["never_bypassable","bypass_modifier_present","bypass_modifier_missing","not_applicable"],"type":"string","title":"Verdict"},"edit_type":{"enum":["practitioner","facility"],"type":"string","title":"Edit Type"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"},"column1_code":{"type":"string","title":"Column1 Code"},"column1_line":{"type":"integer","title":"Column1 Line"},"column2_code":{"type":"string","title":"Column2 Code"},"column2_line":{"type":"integer","title":"Column2 Line"},"deletion_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Deletion Date"},"effective_date":{"type":"string","title":"Effective Date","format":"date"},"bypass_modifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bypass Modifier","description":"For a bypass_modifier_present verdict: the NCCI-associated modifier that unbundled the pair (an X{EPSU}/59, anatomic, global-surgery, or other modifier per the CMS NCCI Policy Manual Ch.1 §E)."},"modifier_indicator":{"type":"integer","title":"Modifier Indicator","description":"0 = never bypassable, 1 = bypassable with a modifier, 9 = n/a."},"bypass_modifier_line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bypass Modifier Line","description":"The line number that carried ``bypass_modifier``."},"bypass_modifier_class":{"anyOf":[{"enum":["x_or_59","anatomic","global_surgery","other"],"type":"string"},{"type":"null"}],"title":"Bypass Modifier Class","description":"The NCCI-associated class of ``bypass_modifier``: 'x_or_59' (X{EPSU}/59 distinct-service), 'anatomic', 'global_surgery', or 'other'. Null when no bypass modifier is present."}},"description":"One active CMS NCCI Procedure-to-Procedure edit between two claim lines (Policy-RCM\nP2-M2). Directional: ``column1`` is the comprehensive (Column-One) code, ``column2`` the\ncomponent (Column-Two) code. ``verdict`` is EXACTLY one of the four values below."},"OfferingsResponse":{"type":"object","title":"OfferingsResponse","required":["hospital","items","sort","limit","offset"],"properties":{"sort":{"type":"string","title":"Sort"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OfferingItem"},"title":"Items"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"hospital":{"$ref":"#/components/schemas/HospitalRef"}}},"PayerPlanResponse":{"type":"object","title":"PayerPlanResponse","required":["id","plan_name"],"properties":{"id":{"type":"integer","title":"Id"},"is_active":{"type":"boolean","title":"Is Active","default":true},"plan_name":{"type":"string","title":"Plan Name"},"plan_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Type"},"metal_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metal Level"},"operating_states":{"type":"array","items":{"type":"string"},"title":"Operating States","default":[]},"plan_id_external":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id External"}}},"AdjudicatePayerRef":{"type":"object","title":"AdjudicatePayerRef","properties":{"name":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Name","examples":["UnitedHealthcare"]},"payer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id","examples":["019cddf2-693e-7d90-bec4-ed94faed61ad"]},"edi_payer_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Edi Payer Id","examples":["87726"]}},"description":"EXACTLY ONE of the three identifiers must be supplied (422 otherwise). Resolution is\ndeterministic: payer_id → EDI id → exact-normalized name / alias. A fuzzy name is\nREJECTED with a 422 pointing to /payers/match."},"AdjudicateResponse":{"type":"object","title":"AdjudicateResponse","required":["payer_resolution","date_of_service","lines"],"properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/AdjudicatedLineSchema"},"title":"Lines"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"ncci_ptp":{"anyOf":[{"$ref":"#/components/schemas/NcciPtpBlockSchema"},{"type":"null"}],"description":"CMS NCCI Procedure-to-Procedure pairwise edits across the claim's CPT/HCPCS lines (Policy-RCM P2-M2). Always populated by the service (``edits`` empty when there is no active pair or the edit table is not yet loaded)."},"plan_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Type"},"specialty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty"},"claim_edits":{"type":"array","items":{"$ref":"#/components/schemas/ApplicableRuleSchema"},"title":"Claim Edits","description":"claim_edit rules across all line codes, co-surfaced once (deduped) at claim level. Rules are surfaced, NOT pairwise-adjudicated (no NCCI engine)."},"claim_notices":{"type":"array","items":{"$ref":"#/components/schemas/ApplicableRuleSchema"},"title":"Claim Notices","description":"Payer document_scope rules - policy-wide context (e.g. reclassified full-width wildcards), NOT per-code answers. Deduped by (payer_id, normalized text) and capped; see ``total_notices`` for the full deduped count."},"data_coverage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Coverage","description":"Claim-level data-coverage sentinel. The token 'no_payer_corpus' when we hold NO current actionable policy rules for this payer at all, and no payer it inherits from supplies any either - i.e. an empty answer is a gap in OUR corpus, not a payer that is silent on the billed codes. Null whenever a corpus exists (whether or not it addresses these codes; that distinction is the per-line ``data_coverage``)."},"total_notices":{"type":"integer","title":"Total Notices","default":0,"description":"Total DISTINCT document-scope notices after (payer_id, normalized-text) dedup. Greater than len(claim_notices) means the list was capped - nothing was silently dropped."},"date_of_service":{"type":"string","title":"Date Of Service","format":"date"},"lcd_ncd_context":{"anyOf":[{"$ref":"#/components/schemas/LcdNcdContextResponse"},{"type":"null"}],"description":"Medicare LCD/NCD coverage-authority block - present only when the payer (or an inheritance ancestor) is CMS-national / a MAC."},"payer_resolution":{"$ref":"#/components/schemas/PayerResolutionSchema"}},"description":"The claim-shaped adjudication answer (Policy-RCM M6)."},"AliasCreateRequest":{"type":"object","title":"AliasCreateRequest","required":["alias","payer_entry_id"],"properties":{"alias":{"type":"string","title":"Alias","examples":["United Health Care"],"maxLength":500,"minLength":2,"description":"The raw payer text a coder typed that should map to the entry (stored upper-cased and trimmed)."},"payer_entry_id":{"type":"integer","title":"Payer Entry Id","examples":[48213],"description":"Id of the existing payer entry this alias should resolve to."}}},"BcbsPrefixResponse":{"type":"object","title":"BcbsPrefixResponse","properties":{"found":{"type":"boolean","title":"Found","default":false,"description":"True when the prefix resolved to a Home Plan."},"is_fep":{"type":"boolean","title":"Is Fep","default":false,"description":"True for a Federal Employee Program member (leading 'R', no prefix)."},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix","description":"The 3-char BCBS alpha prefix resolved."},"payer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id","description":"Canonical payer id of the Home Plan, if linked."},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name","description":"The member's BCBS Home Plan name."}}},"ByHospitalNearMeta":{"type":"object","title":"ByHospitalNearMeta","required":["resolved"],"properties":{"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"},"zip5":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip5"},"input":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"resolved":{"type":"boolean","title":"Resolved"},"radius_miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Radius Miles"}}},"ByHospitalResponse":{"type":"object","title":"ByHospitalResponse","required":["items","total","limit","offset","code","code_type"],"properties":{"code":{"type":"string","title":"Code"},"near":{"anyOf":[{"$ref":"#/components/schemas/ByHospitalNearMeta"},{"type":"null"}]},"items":{"type":"array","items":{"$ref":"#/components/schemas/ByHospitalItem"},"title":"Items"},"limit":{"type":"integer","title":"Limit"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"code_type":{"type":"string","title":"Code Type"}}},"ComparisonResponse":{"type":"object","title":"ComparisonResponse","required":["code","code_type","rule_category","entries"],"properties":{"code":{"type":"string","title":"Code"},"as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ComparisonEntry"},"title":"Entries"},"code_type":{"type":"string","title":"Code Type"},"rule_category":{"type":"string","title":"Rule Category"}},"description":"Response for resolver.compare_across_payers (category-specific)."},"CorrectionResponse":{"type":"object","title":"CorrectionResponse","required":["status","hospital","message"],"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"hospital":{"$ref":"#/components/schemas/HospitalRef"},"issue_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Issue Id"}}},"EntryCreateRequest":{"type":"object","title":"EntryCreateRequest","required":["name"],"properties":{"name":{"type":"string","title":"Name","examples":["UnitedHealthcare of the Mid-Atlantic"],"maxLength":500,"minLength":2,"description":"The payer name as it appears in the coder's source system."},"state":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"State","examples":["MD"],"description":"Two-letter USPS state code the payer operates in, if known."},"source":{"type":"string","const":"coder_submission","title":"Source","default":"coder_submission","examples":["coder_submission"],"description":"Provenance of this submission. Always ``coder_submission``."},"payer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Id","examples":["87726"],"description":"EDI payer id (clearinghouse routing id) for the payer, if known."}}},"NcciPtpBlockSchema":{"type":"object","title":"NcciPtpBlockSchema","required":["authority","edit_type","note"],"properties":{"note":{"type":"string","title":"Note","description":"Honest scope caveat - NCCI is CMS Medicare policy; commercial payers commonly adopt it but may vary."},"edits":{"type":"array","items":{"$ref":"#/components/schemas/NcciPtpEditSchema"},"title":"Edits"},"authority":{"type":"string","title":"Authority","examples":["CMS NCCI"]},"edit_type":{"enum":["practitioner","facility"],"type":"string","title":"Edit Type","description":"Which CMS PTP table was queried: 'practitioner' (default) or 'facility' (outpatient hospital), chosen from the claim's place of service (19/21/22/23/24 -> facility)."},"loaded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Loaded At","description":"When the queried edit table was most recently loaded (max loaded_at over the edit_type). Null when the table is empty or not yet present."},"source_quarter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Quarter","examples":["2026q3"],"description":"Data vintage: the newest CMS quarter loaded into the queried edit table (e.g. '2026q3'). Null when the table is empty or not yet present on this head."}},"description":"Claim-level CMS NCCI PTP result. Present on every adjudication response (``edits`` is\nempty when the claim has no active PTP pair) so a consumer always sees the authority and\nwhich edit table - practitioner vs facility - was evaluated."},"PayerAliasResponse":{"type":"object","title":"PayerAliasResponse","required":["alias","source"],"properties":{"alias":{"type":"string","title":"Alias"},"source":{"type":"string","title":"Source"},"hit_count":{"type":"integer","title":"Hit Count","default":0},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence","default":1}}},"PayerEntryResponse":{"type":"object","title":"PayerEntryResponse","required":["id","name","canonical_name","source","first_seen"],"properties":{"id":{"type":"integer","title":"Id","examples":[48213],"description":"Autoincrement payer-entry id."},"name":{"type":"string","title":"Name","examples":["UnitedHealthcare"],"description":"Entry name as discovered from its source."},"source":{"type":"string","title":"Source","examples":["naic"],"description":"Where this entry was discovered."},"payer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id","examples":["018f3a2b-7c4d-7e1a-9b2c-3d4e5f6a7b8c"],"description":"Parent payer id this entry rolls up to, if linked."},"is_active":{"type":"boolean","title":"Is Active","default":true,"examples":[true],"description":"False once the entry is retired."},"first_seen":{"type":"string","title":"First Seen","format":"date-time"},"payer_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Type","examples":["commercial"],"description":"Payer classification, if known."},"supports_era":{"type":"boolean","title":"Supports Era","default":false},"edi_payer_ids":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Edi Payer Ids","default":[],"examples":[[{"source":"naic","payer_id":"87726","is_primary":true}]],"description":"EDI payer ids by clearinghouse/source."},"last_verified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Verified"},"canonical_name":{"type":"string","title":"Canonical Name","examples":["unitedhealthcare"],"description":"Normalized form of ``name`` used for matching."},"line_of_business":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line Of Business","examples":["medicare_advantage"],"description":"Single line of business assigned by the deterministic backfill (first signal wins). One of: commercial, dental, medicaid, medicare, medicare_advantage, vision, workers_comp. Prefer lines_of_business when it is present: a payer that spans several programs cannot be described by one value here."},"operating_states":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Operating States","examples":[["NY","NJ"]],"description":"USPS state codes the entry operates in."},"lines_of_business":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Lines Of Business","examples":[["commercial","medicaid","medicare_advantage"]],"description":"Every line of business this entry is known to write, from the same vocabulary as line_of_business (commercial, dental, medicaid, medicare, medicare_advantage, vision, workers_comp). More than one element means the entry spans multiple payment rulebooks and must not be collapsed to a single program. Null means no line-of-business signal has been observed yet."},"enrollment_required":{"type":"boolean","title":"Enrollment Required","default":false},"parent_organization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Organization","examples":["UnitedHealth Group"],"description":"Parent organization name, if any."},"primary_edi_payer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Edi Payer Id","examples":["87726"],"description":"Preferred EDI payer id for claim routing."},"supports_eligibility":{"type":"boolean","title":"Supports Eligibility","default":false},"supports_claim_status":{"type":"boolean","title":"Supports Claim Status","default":false},"supports_dental_claims":{"type":"boolean","title":"Supports Dental Claims","default":false},"supports_professional_claims":{"type":"boolean","title":"Supports Professional Claims","default":false},"supports_institutional_claims":{"type":"boolean","title":"Supports Institutional Claims","default":false}},"description":"Response schema for PayerEntry -- the entity returned by match."},"PayerHierarchyItem":{"type":"object","title":"PayerHierarchyItem","required":["id","canonical_name","payer_type"],"properties":{"id":{"type":"string","title":"Id","format":"uuid"},"payer_type":{"type":"string","title":"Payer Type"},"canonical_name":{"type":"string","title":"Canonical Name"}}},"ProvenanceResponse":{"type":"object","title":"ProvenanceResponse","required":["hospital","sources"],"properties":{"sources":{"type":"array","items":{"$ref":"#/components/schemas/ProvenanceSource"},"title":"Sources"},"hospital":{"$ref":"#/components/schemas/HospitalRef"},"integrity_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integrity Hash"}}},"RefreshJobResponse":{"type":"object","title":"RefreshJobResponse","required":["job_id","status","requested_at","files_total","files_succeeded","files_failed","files_not_modified"],"properties":{"job_id":{"type":"string","title":"Job Id","format":"uuid"},"status":{"type":"string","title":"Status"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"files_total":{"type":"integer","title":"Files Total"},"hospital_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hospital Id"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"error_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Detail"},"files_failed":{"type":"integer","title":"Files Failed"},"requested_at":{"type":"string","title":"Requested At","format":"date-time"},"files_succeeded":{"type":"integer","title":"Files Succeeded"},"files_not_modified":{"type":"integer","title":"Files Not Modified"}}},"ResolveAllResponse":{"type":"object","title":"ResolveAllResponse","required":["code","code_type","payer_id","categories_matched","rules"],"properties":{"code":{"type":"string","title":"Code","examples":["70450"],"description":"The queried procedure/diagnosis code."},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of","examples":["2026-01-01"],"description":"Point-in-time date the resolution was anchored to (ISO date), or null for current."},"rules":{"type":"object","title":"Rules","examples":[{"reimbursement":{"rule":{"code":"70450","rule_category":"reimbursement"},"specificity_score":40}}],"description":"category -> {rule: <BillingRuleResponse>, specificity_score: int}.","additionalProperties":{"type":"object","additionalProperties":true}},"payer_id":{"type":"string","title":"Payer Id","examples":["018f3a2b-7c4d-7e1a-9b2c-3d4e5f6a7b8c"],"description":"Payer the rules were resolved for (UUID as string)."},"code_type":{"type":"string","title":"Code Type","examples":["CPT"],"description":"Code system of ``code``."},"categories_matched":{"type":"integer","title":"Categories Matched","examples":[3],"description":"Number of rule categories with a winning rule."}},"description":"All-category resolver result (``GET /api/v1/billing-rules/resolve-all``).\n\n``rules`` maps each matched rule_category to its winning rule plus the\nspecificity score that won it. The nested rule object has the same shape as\n``BillingRuleResponse``; it is left as a free-form object here to avoid a\nforward-reference import cycle."},"ResolveCardRequest":{"type":"object","title":"ResolveCardRequest","properties":{"zip":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Zip","description":"ZIP hint for disambiguation."},"naic":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Naic","description":"NAIC company code (deterministic)."},"plan":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Plan","description":"Plan name, if printed on the card."},"phone":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Phone","description":"Provider-services phone from the card."},"state":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"State","description":"State hint (2-letter USPS)."},"rx_bin":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Rx Bin","description":"RxBIN (pharmacy processor routing number)."},"rx_pcn":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Rx Pcn","description":"RxPCN (processor control number)."},"address":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Address","description":"Claims address printed on the card."},"company":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Company","description":"OCR-extracted company / plan brand name."},"addr_zip":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Addr Zip","description":"Claims-address ZIP. Required for a street line to key; a PO box can resolve without it."},"payer_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Payer Id","description":"EDI payer id (deterministic)."},"addr_city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Addr City","description":"Claims-address city (accepted; not matched on)"},"addr_line":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Addr Line","description":"Structured claims-address line from the card (PO box or street). With any addr_* field present the structured leg governs and the legacy free-text `address` is ignored."},"member_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Member Id","description":"Member / subscriber ID (may be OCR-noisy)."},"addr_state":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Addr State","description":"Claims-address (lockbox) state (accepted; not matched on). This is where the LOCKBOX sits - never the member's service state, which is `state`."},"bcbs_prefix":{"anyOf":[{"type":"string","maxLength":5},{"type":"null"}],"title":"Bcbs Prefix","description":"3-alpha BlueCard prefix (routing only - not a full member id)."},"group_number":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Group Number","description":"Group number (not used for identity)."}},"description":"Messy / OCR'd fields read off an insurance card.\n\nAll fields are optional - supply only what was read. PHI-adjacent fields\n(member_id, group_number, rx_bin, rx_pcn) are used in-request only and are\nNEVER persisted or logged by the resolver."},"AuditExportResponse":{"type":"object","title":"AuditExportResponse","required":["manifest","chains"],"properties":{"chains":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Chains","examples":[[{"code":"70450","rule_id":"018f...","source_url":"https://payer.example/policy"}]],"description":"One evidence chain per exported rule (source -> detection -> summary -> extraction)."},"manifest":{"type":"object","title":"Manifest","examples":[{"filters":{"code":"70450"},"rule_count":3,"export_date":"2026-06-18T12:00:00Z"}],"description":"Export metadata: export_date, filters applied, rule count, integrity hashes.","additionalProperties":true}},"description":"JSON body of a compliance audit export (``GET /api/v1/audit/export``\nwith ``format=json``). With ``format=zip`` the endpoint instead streams an\n``application/zip`` attachment."},"BatchResolveRequest":{"type":"object","title":"BatchResolveRequest","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ResolveRequest"},"title":"Items","maxItems":100}}},"BillingRuleResponse":{"type":"object","title":"BillingRuleResponse","required":["id","code","code_type","payer_id","plan_type","network_status","rule_category","rule_data","summary_text","effective_from","severity","origin","verification_status","created_at","updated_at"],"properties":{"id":{"type":"string","title":"Id","format":"uuid"},"code":{"type":"string","title":"Code"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"origin":{"type":"string","title":"Origin"},"payer_id":{"type":"string","title":"Payer Id","format":"uuid"},"severity":{"type":"string","title":"Severity"},"code_type":{"type":"string","title":"Code Type"},"plan_type":{"type":"string","title":"Plan Type"},"rule_data":{"type":"object","title":"Rule Data","description":"Category-specific structured payload. For coding rules this includes `icd10_crosswalk` (supporting-diagnosis pairings) - that provenance rides inside this dict rather than as a top-level field.","additionalProperties":true},"carc_codes":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":true}},{"type":"null"}],"title":"Carc Codes","description":"Claim Adjustment Reason Codes the policy maps this rule to, as a list of {\"code\", \"description\", \"when\"} objects. Null when not yet extracted."},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"created_at":{"type":"string","title":"Created At","format":"date-time"},"payer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Name"},"rarc_codes":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":true}},{"type":"null"}],"title":"Rarc Codes","description":"Remittance Advice Remark Codes the policy maps this rule to, as a list of {\"code\", \"description\", \"when\"} objects. Null when not yet extracted."},"updated_at":{"type":"string","title":"Updated At","format":"date-time"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"source_page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Page","description":"Page/section locator for source_quote (e.g. \"p.3\", \"§II.B\")."},"specialties":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Specialties"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"verified_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Verified By"},"effective_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective To"},"source_quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Quote","description":"Verbatim supporting quote from the payer policy document this rule was derived from."},"summary_text":{"type":"string","title":"Summary Text"},"rule_category":{"type":"string","title":"Rule Category"},"code_range_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Range End"},"effective_from":{"type":"string","title":"Effective From","format":"date"},"network_status":{"type":"string","title":"Network Status"},"excluded_states":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Excluded States"},"source_update_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Update Id"},"superseded_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Superseded By Id"},"source_summary_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Summary Id"},"source_document_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Document Url"},"verification_status":{"type":"string","title":"Verification Status"},"financial_impact_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Financial Impact Score"},"source_last_scraped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Source Last Scraped At"}}},"HTTPValidationError":{"type":"object","title":"HTTPValidationError","properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail"}}},"PayerDetailResponse":{"type":"object","title":"PayerDetailResponse","required":["id","name","payer_type","created_at"],"properties":{"id":{"type":"string","title":"Id","format":"uuid","examples":["018f3a2b-7c4d-7e1a-9b2c-3d4e5f6a7b8c"],"description":"Unique payer (parent company) id."},"name":{"type":"string","title":"Name","examples":["UnitedHealthcare"],"description":"Payer company name."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"has_api":{"type":"boolean","title":"Has Api","default":false},"has_rss":{"type":"boolean","title":"Has Rss","default":false},"sources":{"type":"array","items":{"$ref":"#/components/schemas/PolicySourceResponse"},"title":"Sources","default":[]},"is_active":{"type":"boolean","title":"Is Active","default":true,"examples":[true],"description":"False once a payer is retired/merged away."},"naic_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Naic Code","examples":["79413"],"description":"NAIC five-digit insurance company code, if known."},"created_at":{"type":"string","title":"Created At","format":"date-time","description":"When the payer was first recorded."},"parent_org":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Org","examples":["UnitedHealth Group"],"description":"Parent organization name, if part of a larger group."},"payer_type":{"type":"string","title":"Payer Type","examples":["commercial"],"description":"Payer classification."},"short_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Name","examples":["UHC"],"description":"Common abbreviation, if any."},"entry_count":{"type":"integer","title":"Entry Count","default":0,"examples":[37],"description":"Number of EDI payer entries linked to this payer."},"is_monitored":{"type":"boolean","title":"Is Monitored","default":false,"examples":[true],"description":"True when PPMan actively tracks this payer's policies."},"domicile_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domicile State","examples":["MN"],"description":"USPS code of the payer's state of domicile."},"mac_jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mac Jurisdiction"},"operating_states":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Operating States","examples":[["NY","NJ","CT"]],"description":"USPS state codes the payer operates in."},"provider_portal_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Portal Url"}}},"PayerDirectoryStats":{"type":"object","title":"PayerDirectoryStats","required":["total_payers","active_payers","total_aliases","total_payer_ids","sources"],"properties":{"sources":{"type":"array","items":{"$ref":"#/components/schemas/SourceSyncStatus"},"title":"Sources"},"total_payers":{"type":"integer","title":"Total Payers"},"active_payers":{"type":"integer","title":"Active Payers"},"total_aliases":{"type":"integer","title":"Total Aliases"},"total_payer_ids":{"type":"integer","title":"Total Payer Ids"}}},"PayerExportResponse":{"type":"object","title":"PayerExportResponse","required":["payers","total"],"properties":{"total":{"type":"integer","title":"Total","examples":[1820],"description":"Number of entries returned in ``payers``."},"payers":{"type":"array","items":{"$ref":"#/components/schemas/PayerEntryResponse"},"title":"Payers","description":"All active payer entries (up to the requested limit)."}},"description":"JSON body of ``GET /api/v1/payers/export`` (with ``format=json``).\n\nWith ``format=csv`` the endpoint instead streams a ``text/csv`` attachment."},"PayerHealthResponse":{"type":"object","title":"PayerHealthResponse","required":["payer_id","payer_name","payer_type","composite_score","status","dimensions","computed_at"],"properties":{"status":{"type":"string","title":"Status"},"payer_id":{"type":"string","title":"Payer Id","format":"uuid"},"dimensions":{"type":"array","items":{"$ref":"#/components/schemas/DimensionScoreResponse"},"title":"Dimensions"},"payer_name":{"type":"string","title":"Payer Name"},"payer_type":{"type":"string","title":"Payer Type"},"computed_at":{"type":"string","title":"Computed At","format":"date-time"},"composite_score":{"type":"number","title":"Composite Score"}},"description":"Full health score for a single payer."},"PriorAuthChangeList":{"type":"object","title":"PriorAuthChangeList","required":["items","total","offset","limit"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PriorAuthChange"},"title":"Items"},"limit":{"type":"integer","title":"Limit"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"}}},"ResolveCardResponse":{"type":"object","title":"ResolveCardResponse","required":["confidence"],"properties":{"book":{"anyOf":[{"$ref":"#/components/schemas/ResolvedBook"},{"type":"null"}],"description":"Book of business the card's claims lockbox resolves to, or null when the address leg did not determine one. Never inferred from the payer name."},"level":{"anyOf":[{"enum":["national","state","mco"],"type":"string"},{"type":"null"}],"title":"Level","description":"Coarse level of the resolved payer."},"confidence":{"type":"number","title":"Confidence","description":"Resolution confidence in [0, 1]; 0.0 on honest absence."},"pt_rate_link":{"anyOf":[{"$ref":"#/components/schemas/PtRateLink"},{"type":"null"}],"description":"Best-effort link into PT rate data, or null."},"corporate_chain":{"type":"array","items":{"type":"string"},"title":"Corporate Chain","description":"Corporate chain names from the payer up: [self, parent, ...]."},"top_level_payer":{"anyOf":[{"$ref":"#/components/schemas/ResolvedTopLevelPayer"},{"type":"null"}],"description":"The resolved top-level payer, or null when identity could not be confirmed."},"resolution_basis":{"type":"array","items":{"type":"string"},"title":"Resolution Basis","description":"Ordered signals that drove identity (e.g. ['edi_payer_id']); empty on absence."},"coding_preferences":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Coding Preferences","description":"Best-effort coding preferences from billing_rules.rule_data (empty if none)."},"applicable_policies":{"type":"array","items":{"$ref":"#/components/schemas/ResolvedPolicy"},"title":"Applicable Policies","description":"Active policy sources for the payer."},"claims_submission_address":{"type":"string","title":"Claims Submission Address","default":"not on file","description":"Best claims-submission address (state-scoped first), or the literal 'not on file'."}}},"StaleSourceResponse":{"type":"object","title":"StaleSourceResponse","required":["id","name","url","source_type","healing_status","updated_at"],"properties":{"id":{"type":"string","title":"Id","format":"uuid"},"url":{"type":"string","title":"Url"},"name":{"type":"string","title":"Name"},"updated_at":{"type":"string","title":"Updated At","format":"date-time"},"source_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type"},"scrape_config":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Scrape Config"},"healing_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Healing Status"},"last_scraped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Scraped At"},"failure_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Category"},"healing_diagnosis":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":true}},{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Healing Diagnosis"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures","default":0},"original_scrape_config":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Original Scrape Config"}},"description":"Sanitized response for sources needing human review."},"SyncTriggerResponse":{"type":"object","title":"SyncTriggerResponse","required":["status","message"],"properties":{"status":{"type":"string","title":"Status","examples":["accepted"],"description":"Lifecycle marker for the queued job."},"message":{"type":"string","title":"Message","examples":["Sync started in background"],"description":"Human-readable note describing what was started."}},"description":"202 ack for the payer-directory sync triggers (full sync / DOI sync)."},"AliasCreatedResponse":{"type":"object","title":"AliasCreatedResponse","required":["status","alias"],"properties":{"alias":{"type":"string","title":"Alias","examples":["UNITED HEALTHCARE"],"description":"The normalized (upper-cased, trimmed) alias that was stored."},"status":{"type":"string","title":"Status","examples":["created"],"description":"Always ``created`` on success."}},"description":"201 ack returned when a coder-correction alias is created."},"ApplicableRuleSchema":{"type":"object","title":"ApplicableRuleSchema","required":["id","rule_category","summary_text","effective_from","severity","citation","verification_status"],"properties":{"id":{"type":"string","title":"Id","format":"uuid"},"citation":{"$ref":"#/components/schemas/CitationSchema"},"severity":{"type":"string","title":"Severity"},"carc_codes":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":true}},{"type":"null"}],"title":"Carc Codes"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"rarc_codes":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":true}},{"type":"null"}],"title":"Rarc Codes"},"scope_match":{"enum":["exact","generic","unconfirmed"],"type":"string","title":"Scope Match","default":"exact","description":"How confidently this rule's scope covers the request. 'exact' = the rule is scoped to the plan type and/or state the claim STATED. 'generic' = the rule is plan-blind and national, so it applies regardless. 'unconfirmed' = the rule is scoped to a plan type and/or state the claim did NOT state; it is surfaced because it may apply, but we cannot confirm it does - see ``scope_caveat``."},"effective_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective To"},"scope_caveat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Caveat","description":"Present ONLY for scope_match='unconfirmed': names the plan type / state the rule is scoped to and warns that the request did not specify it."},"summary_text":{"type":"string","title":"Summary Text"},"rule_category":{"type":"string","title":"Rule Category"},"effective_from":{"type":"string","title":"Effective From","format":"date"},"delegation_chain":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Delegation Chain"},"verification_status":{"type":"string","title":"Verification Status"},"resolved_via_payer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resolved Via Payer Id"}},"description":"A rule that applies to a claim line (or the whole claim), with provenance.\n\n``resolved_via_payer_id`` / ``delegation_chain`` are set when the rule reached\nthis claim through M2 inheritance delegation (a rule-less TPA answered by its\nparent's policy). ``verification_status`` / ``confidence`` are the F2 trust signals -\ninspect them before acting on the rule (e.g. before skipping a prior auth).\n\n``scope_match`` / ``scope_caveat`` are the M7 scope-honesty labels - read them before\nacting: an ``unconfirmed`` rule is shown because it MAY apply, not because we know it\ndoes."},"EntryCreatedResponse":{"type":"object","title":"EntryCreatedResponse","required":["status","id","canonical_name"],"properties":{"id":{"type":"integer","title":"Id","examples":[48213],"description":"Server-assigned autoincrement identifier of the new payer entry."},"status":{"type":"string","title":"Status","examples":["created"],"description":"Always ``created`` on success."},"canonical_name":{"type":"string","title":"Canonical Name","examples":["unitedhealthcare"],"description":"Normalized canonical form of the submitted payer name."}},"description":"201 ack returned when a coder submits a new unknown-payer entry."},"FullCoverageResponse":{"type":"object","title":"FullCoverageResponse","properties":{"as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of"},"coding":{"anyOf":[{"$ref":"#/components/schemas/ResolvedRuleResponse"},{"type":"null"}]},"prior_auth":{"anyOf":[{"$ref":"#/components/schemas/ResolvedRuleResponse"},{"type":"null"}]},"claim_edits":{"type":"array","items":{"$ref":"#/components/schemas/ResolvedRuleResponse"},"title":"Claim Edits"},"documentation":{"anyOf":[{"$ref":"#/components/schemas/ResolvedRuleResponse"},{"type":"null"}]},"reimbursement":{"anyOf":[{"$ref":"#/components/schemas/ComposedReimbursementResponse"},{"type":"null"}]},"coverage_policy":{"anyOf":[{"$ref":"#/components/schemas/ResolvedRuleResponse"},{"type":"null"}]},"frequency_limit":{"anyOf":[{"$ref":"#/components/schemas/ResolvedRuleResponse"},{"type":"null"}]},"lcd_ncd_context":{"anyOf":[{"$ref":"#/components/schemas/LcdNcdContextResponse"},{"type":"null"}]}},"description":"Cross-category aggregate returned by\n`GET /billing-rules/resolve-full-coverage`. `claim_edits` is plural\nbecause a single code can trigger multiple edit types simultaneously."},"PolicyDetailResponse":{"type":"object","title":"PolicyDetailResponse","required":["id","source_id","payer_id","change_type","severity","created_at"],"properties":{"id":{"type":"string","title":"Id","format":"uuid"},"summary":{"anyOf":[{"$ref":"#/components/schemas/PolicySummaryResponse"},{"type":"null"}]},"payer_id":{"type":"string","title":"Payer Id","format":"uuid"},"severity":{"type":"string","title":"Severity"},"diff_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Diff Text"},"source_id":{"type":"string","title":"Source Id","format":"uuid"},"created_at":{"type":"string","title":"Created At","format":"date-time"},"payer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Name"},"change_type":{"type":"string","title":"Change Type"},"is_reviewed":{"type":"boolean","title":"Is Reviewed","default":false},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"affected_codes":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Affected Codes"},"effective_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective Date"},"change_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Percentage"},"affected_specialties":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Affected Specialties"},"source_last_scraped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Source Last Scraped At"}}},"PolicySourceResponse":{"type":"object","title":"PolicySourceResponse","required":["id","payer_id","name","url","source_type","schedule_cron","schedule_enabled","priority","is_active","created_at"],"properties":{"id":{"type":"string","title":"Id","format":"uuid"},"url":{"type":"string","title":"Url"},"name":{"type":"string","title":"Name"},"payer_id":{"type":"string","title":"Payer Id","format":"uuid"},"priority":{"type":"integer","title":"Priority"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","title":"Created At","format":"date-time"},"source_type":{"type":"string","title":"Source Type"},"schedule_cron":{"type":"string","title":"Schedule Cron"},"last_scraped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Scraped At"},"schedule_enabled":{"type":"boolean","title":"Schedule Enabled"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures","default":0}}},"PolicyUpdateResponse":{"type":"object","title":"PolicyUpdateResponse","required":["id","source_id","payer_id","change_type","severity","created_at"],"properties":{"id":{"type":"string","title":"Id","format":"uuid"},"payer_id":{"type":"string","title":"Payer Id","format":"uuid"},"severity":{"type":"string","title":"Severity"},"source_id":{"type":"string","title":"Source Id","format":"uuid"},"created_at":{"type":"string","title":"Created At","format":"date-time"},"change_type":{"type":"string","title":"Change Type"},"is_reviewed":{"type":"boolean","title":"Is Reviewed","default":false},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"affected_codes":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Affected Codes"},"effective_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective Date"},"change_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Percentage"},"affected_specialties":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Affected Specialties"},"source_last_scraped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Source Last Scraped At"}}},"PriorAuthRequirement":{"type":"object","title":"PriorAuthRequirement","required":["rule_id","payer_id","payer_name","code"],"properties":{"code":{"type":"string","title":"Code"},"rule_id":{"type":"string","title":"Rule Id"},"payer_id":{"type":"string","title":"Payer Id"},"code_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Type"},"rule_data":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Rule Data"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"payer_name":{"type":"string","title":"Payer Name"},"summary_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary Text"},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effective From"},"verification_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Status"}}},"ResolvedRuleResponse":{"type":"object","title":"ResolvedRuleResponse","required":["rule","specificity_score"],"properties":{"rule":{"$ref":"#/components/schemas/BillingRuleResponse"},"delegation_chain":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Delegation Chain"},"range_narrowness":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Range Narrowness"},"specificity_score":{"type":"integer","title":"Specificity Score"},"resolved_via_payer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resolved Via Payer Id"}},"description":"Wraps a resolved rule with its specificity metadata. Used inside\nFullCoverageResponse so consumers can see why a rule won a category."},"RuleProvenanceSchema":{"type":"object","title":"RuleProvenanceSchema","required":["verification_status"],"properties":{"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"verification_status":{"type":"string","title":"Verification Status"}},"description":"Trust signals for a cited rule (Policy-RCM M6): whether a human verified/flagged it\nand the extraction confidence. Consumers inspect these before acting on a\nmachine-derived answer (notably a prior-auth ``false``)."},"ServiceLinesResponse":{"type":"object","title":"ServiceLinesResponse","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ServiceLineRow"},"title":"Items"}}},"AdjudicateLineRequest":{"type":"object","title":"AdjudicateLineRequest","required":["code","code_type"],"properties":{"code":{"type":"string","title":"Code","examples":["00731"],"maxLength":10},"units":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Units","examples":[1]},"code_type":{"enum":["cpt","hcpcs","icd10","modifier","revenue_code","drg"],"type":"string","title":"Code Type","examples":["cpt"]},"modifiers":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9]{1,8}$"},"title":"Modifiers","examples":[["AA"]],"maxItems":8},"line_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line Number","examples":[1]}}},"AdjudicatedLineSchema":{"type":"object","title":"AdjudicatedLineSchema","required":["line_number","code","code_type","prior_auth","coverage"],"properties":{"code":{"type":"string","title":"Code"},"units":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Units"},"coverage":{"$ref":"#/components/schemas/CoverageAssessmentSchema"},"code_type":{"type":"string","title":"Code Type"},"modifiers":{"type":"array","items":{"type":"string"},"title":"Modifiers"},"prior_auth":{"$ref":"#/components/schemas/PriorAuthAssessmentSchema"},"line_number":{"type":"integer","title":"Line Number"},"data_coverage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Coverage","description":"An honest data-coverage note. When ZERO rules exist for this line's code, a sentence that also says WHICH kind of zero it is: either we hold other rules for this payer but none addresses this code, or we hold no actionable rules for this payer at all (a corpus gap - see the claim-level ``data_coverage``). Either way, absence of a rule is not evidence of coverage / no-PA / no-modifier. The token 'no_modifier_guidance' when the code IS known (>=1 rule) but the payer publishes nothing about its modifier requirements and the line carries no modifiers."},"applicable_rules":{"type":"array","items":{"$ref":"#/components/schemas/ApplicableRuleSchema"},"title":"Applicable Rules"},"modifier_verdicts":{"type":"array","items":{"$ref":"#/components/schemas/ModifierVerdictSchema"},"title":"Modifier Verdicts"}}},"BillingRuleChangeItem":{"type":"object","title":"BillingRuleChangeItem","required":["id","action","change_source"],"properties":{"id":{"type":"integer","title":"Id","examples":[40128],"description":"Change-history row id (monotonic; use as a cursor)."},"action":{"type":"string","title":"Action","examples":["updated"],"description":"What happened to the rule."},"new_data":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"New Data","examples":[null],"description":"Snapshot of the rule after the change, or null."},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","examples":["2026-06-18T09:15:00+00:00"],"description":"ISO-8601 timestamp the change was recorded."},"change_source":{"type":"string","title":"Change Source","examples":["policy_detection"],"description":"Origin of the change (e.g. pipeline detection vs admin edit)."},"previous_data":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Previous Data","examples":[null],"description":"Snapshot of the rule before the change, or null."},"billing_rule_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Rule Id","examples":["018f3a2b-7c4d-7e1a-9b2c-3d4e5f6a7b8c"],"description":"UUID of the affected billing rule, or null if the rule was deleted."},"change_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Description","examples":["Prior-auth requirement added"],"description":"Human-readable summary of the change."}},"description":"One billing-rule change row in the incremental-sync feed."},"DisagreementsResponse":{"type":"object","title":"DisagreementsResponse","required":["items","total"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DisagreementItem"},"title":"Items"},"total":{"type":"integer","title":"Total"}}},"EvidenceChainResponse":{"type":"object","title":"EvidenceChainResponse","required":["rule_id","code","code_type","rule_created_at","summary_text"],"properties":{"code":{"type":"string","title":"Code"},"rule_id":{"type":"string","title":"Rule Id","format":"uuid"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"code_type":{"type":"string","title":"Code Type"},"payer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Name"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"summary_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Summary Id"},"change_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Type"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"},"source_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type"},"specialties":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Specialties"},"impact_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impact Level"},"summary_text":{"type":"string","title":"Summary Text"},"plain_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plain Summary"},"summarized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Summarized At"},"diff_available":{"type":"boolean","title":"Diff Available","default":false},"rule_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rule Confidence"},"rule_created_at":{"type":"string","title":"Rule Created At","format":"date-time"},"policy_update_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Policy Update Id"},"change_detected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Change Detected At"},"financial_impact_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Financial Impact Score"},"source_last_scraped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Source Last Scraped At"}},"description":"Full provenance chain for a billing rule: source -> detection -> summary -> extraction."},"LcdNcdContextResponse":{"type":"object","title":"LcdNcdContextResponse","required":["medicare_governed","authority_basis","ncd_active_count","lcd_active_count","code_filtered","label"],"properties":{"label":{"type":"string","title":"Label"},"warnings":{"type":"array","items":{"type":"string"},"title":"Warnings"},"lcd_matches":{"type":"array","items":{"$ref":"#/components/schemas/LcdMatchResponse"},"title":"Lcd Matches"},"ncd_matches":{"type":"array","items":{"$ref":"#/components/schemas/NcdMatchResponse"},"title":"Ncd Matches"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"},"code_filtered":{"type":"boolean","title":"Code Filtered"},"authority_basis":{"type":"string","title":"Authority Basis"},"contractor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contractor Name"},"lcd_active_count":{"type":"integer","title":"Lcd Active Count"},"ncd_active_count":{"type":"integer","title":"Ncd Active Count"},"medicare_governed":{"type":"boolean","title":"Medicare Governed"},"resolved_via_payer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resolved Via Payer Id"}},"description":"Policy-RCM M3 Medicare coverage-authority block attached to a resolve when the\npayer (or an inheritance ancestor) is CMS-national / a MAC. ``label`` states whether\n``lcd_matches`` is code-precise or jurisdiction-level, so the UI never implies\nprecision it does not have."},"ModifierVerdictSchema":{"type":"object","title":"ModifierVerdictSchema","required":["modifier","verdict"],"properties":{"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"rule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rule Id"},"verdict":{"enum":["missing_required","disallowed_present","conditional","no_guidance","documented","satisfied"],"type":"string","title":"Verdict"},"citation":{"anyOf":[{"$ref":"#/components/schemas/CitationSchema"},{"type":"null"}]},"modifier":{"type":"string","title":"Modifier"},"provenance":{"anyOf":[{"$ref":"#/components/schemas/RuleProvenanceSchema"},{"type":"null"}],"description":"Trust signals (verification_status, confidence) for the rule this verdict cites. Null for a bare no_guidance with no citing rule."},"scope_match":{"enum":["exact","generic","unconfirmed"],"type":"string","title":"Scope Match","default":"exact","description":"Scope confidence for the rule this verdict cites (same values as ApplicableRule.scope_match). An 'unconfirmed' verdict is driven by a rule scoped to a plan type and/or state the claim did not state - read ``scope_caveat`` before acting on it. A confirmed rule always outranks an unconfirmed one, so this is only 'unconfirmed' when no in-scope rule addressed the modifier at all."},"scope_caveat":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Caveat","description":"Present ONLY for scope_match='unconfirmed': names the plan type / state the cited rule is scoped to and warns that the claim did not specify it."}},"description":"One modifier finding for a claim line. ``verdict`` is EXACTLY one of the six values\nbelow - nothing else is emitted.\n\nISSUES a biller must act on:\n  * ``missing_required``   - the payer requires this modifier and it is not on the line.\n    Emitted ONLY from a rule confirmed in scope for the claim (``scope_match`` ``exact``\n    or ``generic``), never from a scope-``unconfirmed`` one: this is the only verdict\n    that tells a biller to actively CHANGE the claim they are about to submit, so it may\n    not rest on a rule we cannot confirm applies. A requirement we could not confirm is\n    still shown - as ``documented`` carrying its ``scope_caveat`` (see below).\n  * ``disallowed_present`` - the payer disallows this modifier and it IS on the line.\n  * ``conditional``        - the payer allows it only under stated conditions.\n\nINFORMATIONAL (not issues):\n  * ``satisfied``  - the payer REQUIRES or ALLOWS this modifier and it IS on the line:\n    the line is coded the way the policy asks, and ``rule_id`` / ``citation`` name the\n    rule that says so. Emitted since Policy-RCM M7; before that this outcome was silence,\n    which made \"you coded this correctly\" indistinguishable from \"we know nothing\".\n  * ``documented`` - the payer documents the modifier's treatment (a payer-wide modifier\n    rule that addresses it, or a code-scoped reimbursement tier) WITHOUT a\n    require/disallow/conditional disposition, so ``context`` cites that policy (the\n    rule's summary, or 'reimbursed at N%') instead of a bare no_guidance. Also carries\n    the ``missing_required`` case we could not confirm: when the modifier is absent and\n    the only ``required`` disposition comes from a scope-``unconfirmed`` rule, the\n    requirement is reported here - same rule, same citation, ``scope_caveat`` set - so it\n    stays readable without reading as an instruction to change the claim.\n\nHONEST SILENCE:\n  * ``no_guidance`` - the payer publishes nothing about this modifier (``rule_id`` null).\n\n``satisfied`` and ``documented`` never overlap on a modifier that IS on the line:\n``documented`` means no disposition exists, ``satisfied`` means a required/allowed one\nexists and the line meets it."},"PayerResolutionSchema":{"type":"object","title":"PayerResolutionSchema","required":["payer_id","matched_via"],"properties":{"payer_id":{"type":"string","title":"Payer Id","format":"uuid"},"payer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Name"},"matched_via":{"enum":["payer_id","edi_payer_id","exact_name","alias"],"type":"string","title":"Matched Via"},"resolved_via_payer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resolved Via Payer Id","description":"Whose policies adjudicate this payer's claims, via M2 inheritance delegation. Set when the payer publishes no rules of its own (the ancestor's corpus governs outright) OR when the ancestor supplemented this response with at least one rule, notice or modifier disposition. Null when the payer answered the whole claim from its own corpus. Inheritance SUPPLEMENTS a payer's own rules, it never replaces them: where the payer has its own rule for a code, that rule wins. Read each rule's own resolved_via_payer_id / delegation_chain to see which citations were inherited."}}},"PolicySummaryResponse":{"type":"object","title":"PolicySummaryResponse","required":["id","update_id","status","created_at"],"properties":{"id":{"type":"string","title":"Id","format":"uuid"},"status":{"type":"string","title":"Status"},"update_id":{"type":"string","title":"Update Id","format":"uuid"},"created_at":{"type":"string","title":"Created At","format":"date-time"},"model_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Used"},"key_changes":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Key Changes"},"action_items":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":true}},{"type":"null"}],"title":"Action Items"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"impact_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impact Level"},"plain_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plain Summary"},"prompt_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prompt Tokens"},"completion_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completion Tokens"},"affected_code_types":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Affected Code Types"},"affected_specialties":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Affected Specialties"},"structured_breakdown":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Structured Breakdown"}}},"ResolvedTopLevelPayer":{"type":"object","title":"ResolvedTopLevelPayer","required":["id","name","canonical_name"],"properties":{"id":{"type":"string","title":"Id","format":"uuid"},"name":{"type":"string","title":"Name"},"payer_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Type"},"canonical_name":{"type":"string","title":"Canonical Name"}}},"SpecialtyListResponse":{"type":"object","title":"SpecialtyListResponse","required":["specialties"],"properties":{"specialties":{"type":"array","items":{"type":"string"},"title":"Specialties","examples":[["anesthesiology","cardiology","dermatology","radiology"]],"description":"Sorted canonical specialty values usable as a ``specialty`` filter."}},"description":"Canonical specialty filter values (``GET /api/v1/billing-rules/specialties``)."},"WebhookCreateResponse":{"type":"object","title":"WebhookCreateResponse","required":["id","url","event_types","created_at","secret"],"properties":{"id":{"type":"string","title":"Id","format":"uuid"},"url":{"type":"string","title":"Url"},"secret":{"type":"string","title":"Secret"},"is_active":{"type":"boolean","title":"Is Active","default":true},"created_at":{"type":"string","title":"Created At","format":"date-time"},"code_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Code Filter"},"event_types":{"type":"array","items":{"type":"string"},"title":"Event Types"},"payer_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Payer Filter"},"state_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"State Filter"},"failure_count":{"type":"integer","title":"Failure Count","default":0},"last_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Status Code"},"plan_type_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Plan Type Filter"},"severity_minimum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity Minimum"},"specialty_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Specialty Filter"},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Triggered At"},"rule_category_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Rule Category Filter"}},"description":"Returned only at creation time - includes the signing secret (shown once)."},"CodeComparisonResponse":{"type":"object","title":"CodeComparisonResponse","required":["code","payers"],"properties":{"code":{"type":"string","title":"Code"},"payers":{"type":"array","items":{"$ref":"#/components/schemas/PayerRuleEntry"},"title":"Payers"},"code_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Type"}},"description":"Response for cross-payer comparison of a code (all categories)."},"DimensionScoreResponse":{"type":"object","title":"DimensionScoreResponse","required":["name","score","weight","detail"],"properties":{"name":{"type":"string","title":"Name"},"score":{"type":"number","title":"Score"},"detail":{"type":"string","title":"Detail"},"weight":{"type":"number","title":"Weight"}},"description":"Single scoring dimension with explanation."},"PayerFullCoverageEntry":{"type":"object","title":"PayerFullCoverageEntry","required":["payer_id","payer_name","coverage"],"properties":{"coverage":{"$ref":"#/components/schemas/FullCoverageResponse"},"payer_id":{"type":"string","title":"Payer Id","format":"uuid"},"payer_name":{"type":"string","title":"Payer Name"}},"description":"Per-payer full-coverage entry returned by the code-centric endpoint."},"PayerHierarchyResponse":{"type":"object","title":"PayerHierarchyResponse","required":["payer_id"],"properties":{"chain":{"type":"array","items":{"$ref":"#/components/schemas/PayerHierarchyItem"},"title":"Chain","description":"Corporate chain from the payer up: [self, managed-by, parent, ...]."},"payer_id":{"type":"string","title":"Payer Id","format":"uuid","description":"The payer the chain was resolved from."}}},"ProvenanceVerification":{"type":"object","title":"ProvenanceVerification","required":["status"],"properties":{"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"status":{"type":"string","title":"Status"},"file_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Id"},"mrf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mrf Url"},"http_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Http Status"},"recorded_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recorded Sha256"},"refetched_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refetched Sha256"},"refetched_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Refetched Size Bytes"}},"description":"One source's live re-fetch-and-compare verdict."},"RetryQueueListResponse":{"type":"object","title":"RetryQueueListResponse","required":["items","total","limit","offset"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RetryQueueEntryResponse"},"title":"Items"},"limit":{"type":"integer","title":"Limit"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"}},"description":"Paginated DLQ listing for one webhook subscription."},"BillingRuleListResponse":{"type":"object","title":"BillingRuleListResponse","required":["items","total","page","page_size","pages"],"properties":{"page":{"type":"integer","title":"Page"},"items":{"type":"array","items":{"$ref":"#/components/schemas/BillingRuleResponse"},"title":"Items"},"pages":{"type":"integer","title":"Pages"},"total":{"type":"integer","title":"Total"},"page_size":{"type":"integer","title":"Page Size"}}},"EmailSubscriptionCreate":{"type":"object","title":"EmailSubscriptionCreate","required":["email_address"],"properties":{"code_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Code Filter","examples":[["70450"]],"description":"Only notify for billing_rule.changed on these codes."},"event_types":{"type":"array","items":{"type":"string"},"title":"Event Types","default":["policy.updated"],"examples":[["policy.updated"]],"description":"Events to subscribe to. Valid: policy.updated, billing_rule.changed."},"payer_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Payer Filter","examples":[["Aetna"]],"description":"Only notify for these payers (names or ids)."},"state_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"State Filter","examples":[["NY"]],"description":"Only notify for these USPS state codes."},"email_address":{"type":"string","title":"Email Address","format":"email","examples":["coder@clinic.example"],"description":"Address that will receive notification emails."},"digest_frequency":{"enum":["immediate","daily","weekly"],"type":"string","title":"Digest Frequency","default":"immediate","examples":["daily"],"description":"How often matching events are batched into an email."},"plan_type_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Plan Type Filter","examples":[["all_plans"]],"description":"Only notify for these plan types."},"severity_minimum":{"anyOf":[{"enum":["low","medium","high","critical"],"type":"string"},{"type":"null"}],"title":"Severity Minimum","examples":["medium"],"description":"Only notify at or above this severity."},"specialty_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Specialty Filter","examples":[["cardiology"]],"description":"Only notify for these specialties."},"rule_category_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Rule Category Filter","examples":[["prior_auth"]],"description":"Only notify for these rule categories."}}},"PayerComparisonResponse":{"type":"object","title":"PayerComparisonResponse","required":["code","code_type","payers"],"properties":{"code":{"type":"string","title":"Code"},"payers":{"type":"array","items":{"$ref":"#/components/schemas/PayerSide"},"title":"Payers"},"code_type":{"type":"string","title":"Code Type"},"median_delta_pct_a_vs_b":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Delta Pct A Vs B"}}},"ProvenanceVerifySummary":{"type":"object","title":"ProvenanceVerifySummary","required":["sources_total","verified","mismatch","unreachable","skipped"],"properties":{"skipped":{"type":"integer","title":"Skipped"},"mismatch":{"type":"integer","title":"Mismatch"},"verified":{"type":"integer","title":"Verified"},"unreachable":{"type":"integer","title":"Unreachable"},"sources_total":{"type":"integer","title":"Sources Total"}}},"RefreshHospitalResponse":{"type":"object","title":"RefreshHospitalResponse","required":["job_id","status"],"properties":{"job_id":{"type":"string","title":"Job Id","examples":["018f3a2b-7c4d-7e1a-9b2c-3d4e5f6a7b8c"],"description":"Identifier of the enqueued refresh job (UUID as string)."},"status":{"type":"string","title":"Status","examples":["queued"],"description":"Initial job status - always ``queued`` on enqueue."}},"description":"202 ack returned when a hospital MRF refresh job is enqueued.\n\nPoll ``GET /api/v1/price-transparency/refresh-jobs/{job_id}`` for status."},"RetryQueueEntryResponse":{"type":"object","title":"RetryQueueEntryResponse","required":["retry_queue_id","notification_log_id","status","attempt_number","next_attempt_at","queued_at"],"properties":{"status":{"type":"string","title":"Status"},"queued_at":{"type":"string","title":"Queued At","format":"date-time"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"response_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Code"},"attempt_number":{"type":"integer","title":"Attempt Number"},"retry_queue_id":{"type":"integer","title":"Retry Queue Id"},"acknowledged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Acknowledged At"},"next_attempt_at":{"type":"string","title":"Next Attempt At","format":"date-time"},"last_attempted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Attempted At"},"notification_log_id":{"type":"integer","title":"Notification Log Id"}},"description":"A single Dead-Letter-Queue entry: an exhausted/failed deferred delivery.\n\nJoins the ``webhook_retry_queue`` row to its source ``notification_log`` so the\noperator/consumer sees the failure context (event type, last error, HTTP code,\nwhen it gave up) needed to decide whether to replay."},"WebhookDeliveryResponse":{"type":"object","title":"WebhookDeliveryResponse","required":["id","delivery_id","event_type","status","sent_at"],"properties":{"id":{"type":"integer","title":"Id"},"status":{"type":"string","title":"Status"},"sent_at":{"type":"string","title":"Sent At","format":"date-time"},"attempts":{"type":"integer","title":"Attempts","default":1},"event_type":{"type":"string","title":"Event Type"},"delivery_id":{"type":"string","title":"Delivery Id","format":"uuid"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"response_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Code"}}},"ChangeComparisonResponse":{"type":"object","title":"ChangeComparisonResponse","required":["update_id","payer_name","changed_codes"],"properties":{"update_id":{"type":"string","title":"Update Id","format":"uuid"},"payer_name":{"type":"string","title":"Payer Name"},"changed_codes":{"type":"array","items":{"$ref":"#/components/schemas/CodeComparisonResponse"},"title":"Changed Codes"}},"description":"Response for comparing codes affected by a specific policy update."},"CoverageAssessmentSchema":{"type":"object","title":"CoverageAssessmentSchema","required":["status"],"properties":{"rules":{"type":"array","items":{"$ref":"#/components/schemas/ApplicableRuleSchema"},"title":"Rules"},"status":{"enum":["covered","not_covered","conditional","unknown"],"type":"string","title":"Status"}}},"PayerEntryDetailResponse":{"type":"object","title":"PayerEntryDetailResponse","required":["id","name","canonical_name","source","first_seen"],"properties":{"id":{"type":"integer","title":"Id","examples":[48213],"description":"Autoincrement payer-entry id."},"name":{"type":"string","title":"Name","examples":["UnitedHealthcare"],"description":"Entry name as discovered from its source."},"plans":{"type":"array","items":{"$ref":"#/components/schemas/PayerPlanResponse"},"title":"Plans","default":[]},"source":{"type":"string","title":"Source","examples":["naic"],"description":"Where this entry was discovered."},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/PayerAliasResponse"},"title":"Aliases","default":[]},"payer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Payer Id","examples":["018f3a2b-7c4d-7e1a-9b2c-3d4e5f6a7b8c"],"description":"Parent payer id this entry rolls up to, if linked."},"is_active":{"type":"boolean","title":"Is Active","default":true,"examples":[true],"description":"False once the entry is retired."},"first_seen":{"type":"string","title":"First Seen","format":"date-time"},"payer_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Type","examples":["commercial"],"description":"Payer classification, if known."},"supports_era":{"type":"boolean","title":"Supports Era","default":false},"edi_payer_ids":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Edi Payer Ids","default":[],"examples":[[{"source":"naic","payer_id":"87726","is_primary":true}]],"description":"EDI payer ids by clearinghouse/source."},"last_verified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Verified"},"canonical_name":{"type":"string","title":"Canonical Name","examples":["unitedhealthcare"],"description":"Normalized form of ``name`` used for matching."},"line_of_business":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line Of Business","examples":["medicare_advantage"],"description":"Single line of business assigned by the deterministic backfill (first signal wins). One of: commercial, dental, medicaid, medicare, medicare_advantage, vision, workers_comp. Prefer lines_of_business when it is present: a payer that spans several programs cannot be described by one value here."},"operating_states":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Operating States","examples":[["NY","NJ"]],"description":"USPS state codes the entry operates in."},"lines_of_business":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Lines Of Business","examples":[["commercial","medicaid","medicare_advantage"]],"description":"Every line of business this entry is known to write, from the same vocabulary as line_of_business (commercial, dental, medicaid, medicare, medicare_advantage, vision, workers_comp). More than one element means the entry spans multiple payment rulebooks and must not be collapsed to a single program. Null means no line-of-business signal has been observed yet."},"enrollment_required":{"type":"boolean","title":"Enrollment Required","default":false},"parent_organization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Organization","examples":["UnitedHealth Group"],"description":"Parent organization name, if any."},"primary_edi_payer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Edi Payer Id","examples":["87726"],"description":"Preferred EDI payer id for claim routing."},"supports_eligibility":{"type":"boolean","title":"Supports Eligibility","default":false},"supports_claim_status":{"type":"boolean","title":"Supports Claim Status","default":false},"supports_dental_claims":{"type":"boolean","title":"Supports Dental Claims","default":false},"supports_professional_claims":{"type":"boolean","title":"Supports Professional Claims","default":false},"supports_institutional_claims":{"type":"boolean","title":"Supports Institutional Claims","default":false}},"description":"Detailed entry with child records."},"PriorAuthRequirementList":{"type":"object","title":"PriorAuthRequirementList","required":["items","total","offset","limit"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PriorAuthRequirement"},"title":"Items"},"limit":{"type":"integer","title":"Limit"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"}}},"ProvenanceVerifyResponse":{"type":"object","title":"ProvenanceVerifyResponse","required":["hospital","summary","verifications"],"properties":{"summary":{"$ref":"#/components/schemas/ProvenanceVerifySummary"},"hospital":{"$ref":"#/components/schemas/HospitalRef"},"verifications":{"type":"array","items":{"$ref":"#/components/schemas/ProvenanceVerification"},"title":"Verifications"},"integrity_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Integrity Hash"}}},"SpecialtyProfileResponse":{"type":"object","title":"SpecialtyProfileResponse","required":["specialty","total_rules","by_category","by_severity","top_payers","recent_changes_30d"],"properties":{"specialty":{"type":"string","title":"Specialty","examples":["anesthesiology"],"description":"Canonical specialty name."},"top_payers":{"type":"object","title":"Top Payers","examples":[{"Aetna":60,"Cigna":44}],"description":"Top payers (by rule count) for this specialty; payer short-name -> count.","additionalProperties":{"type":"integer"}},"by_category":{"type":"object","title":"By Category","examples":[{"coding":142,"prior_auth":80,"reimbursement":120}],"description":"Rule counts grouped by rule_category.","additionalProperties":{"type":"integer"}},"by_severity":{"type":"object","title":"By Severity","examples":[{"low":50,"high":82,"medium":200,"critical":10}],"description":"Rule counts grouped by severity.","additionalProperties":{"type":"integer"}},"total_rules":{"type":"integer","title":"Total Rules","examples":[342],"description":"Count of current rules tagged to this specialty."},"recent_changes_30d":{"type":"integer","title":"Recent Changes 30D","examples":[7],"description":"Rules created in the last 30 days for this specialty."}},"description":"Aggregated stats for one medical specialty\n(``GET /api/v1/billing-rules/specialties/{specialty}/profile``)."},"EmailSubscriptionResponse":{"type":"object","title":"EmailSubscriptionResponse","required":["id","email_address","event_types","digest_frequency","created_at"],"properties":{"id":{"type":"string","title":"Id","format":"uuid"},"is_active":{"type":"boolean","title":"Is Active","default":true},"created_at":{"type":"string","title":"Created At","format":"date-time"},"code_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Code Filter"},"event_types":{"type":"array","items":{"type":"string"},"title":"Event Types"},"last_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sent At"},"payer_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Payer Filter"},"state_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"State Filter"},"email_address":{"type":"string","title":"Email Address"},"failure_count":{"type":"integer","title":"Failure Count","default":0},"digest_frequency":{"type":"string","title":"Digest Frequency"},"plan_type_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Plan Type Filter"},"severity_minimum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity Minimum"},"specialty_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Specialty Filter"},"rule_category_filter":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Rule Category Filter"}}},"HospitalCorrectionRequest":{"type":"object","title":"HospitalCorrectionRequest","required":["correction_type","message"],"properties":{"code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Code"},"message":{"type":"string","title":"Message","maxLength":4000,"minLength":3},"submitter_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Submitter Name"},"correction_type":{"type":"string","title":"Correction Type","maxLength":40,"description":"wrong_rate | stale_file | wrong_url | wrong_facility | other"},"submitter_email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Submitter Email"},"suggested_mrf_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Suggested Mrf Url"}},"description":"A hospital (or anyone) flagging a problem with this facility's data."},"PriorAuthAssessmentSchema":{"type":"object","title":"PriorAuthAssessmentSchema","required":["required"],"properties":{"rules":{"type":"array","items":{"$ref":"#/components/schemas/ApplicableRuleSchema"},"title":"Rules"},"required":{"anyOf":[{"type":"boolean"},{"enum":["conditional","unknown"],"type":"string"}],"title":"Required","description":"true/false reflect a DOCUMENTED payer rule; 'conditional' = a PA rule without a clean boolean; 'unknown' = no PA rule at all, OR every PA rule found is scope-'unconfirmed' (never a false 'not required'). A false value is a documented rule - inspect basis_rule_id's provenance / verification_status before skipping auth."},"basis_rule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Basis Rule Id","description":"The rule whose data decided ``required`` (true/false/'conditional'); null for 'unknown'. Look it up in ``rules`` to read its provenance."}},"description":"Prior-auth answer for a line. ``required`` is ``true``/``false`` when a PA rule\nstates it, ``\"conditional\"`` when a PA rule exists without a clean boolean, and\n``\"unknown\"`` when the payer has NO PA rule for the code (honest absence - never a\nfalse 'not required') - or when every PA rule we found is scoped to a plan/state the\nclaim did not state (see ``scope_match`` on the listed rules)."},"ServiceLineDetailResponse":{"type":"object","title":"ServiceLineDetailResponse","required":["name","codes"],"properties":{"name":{"type":"string","title":"Name"},"codes":{"type":"array","items":{"type":"string"},"title":"Codes"}}},"SourceSyncTriggerResponse":{"type":"object","title":"SourceSyncTriggerResponse","required":["status","result"],"properties":{"result":{"type":"object","title":"Result","examples":[{"source":"naic","skipped":0,"updated":3,"inserted":12}],"description":"Raw per-source sync summary from the aggregator (counts, errors).","additionalProperties":true},"status":{"type":"string","title":"Status","examples":["completed"],"description":"Lifecycle marker - ``completed`` once the inline sync returns."}},"description":"202 ack for a single-source sync (``POST /payers/sync/{source_name}``).\n\nThe sync runs inline, so ``result`` carries the source aggregator's raw\nsummary dict (counts of inserted/updated/skipped records, errors, etc.).\nIts keys vary per source, so it is left as a free-form object."},"BillingRuleChangesResponse":{"type":"object","title":"BillingRuleChangesResponse","required":["total","offset","limit","changes"],"properties":{"limit":{"type":"integer","title":"Limit","examples":[100],"description":"Pagination page size echoed from the request."},"total":{"type":"integer","title":"Total","examples":[1],"description":"Total matching change rows."},"offset":{"type":"integer","title":"Offset","examples":[0],"description":"Pagination offset echoed from the request."},"changes":{"type":"array","items":{"$ref":"#/components/schemas/BillingRuleChangeItem"},"title":"Changes","description":"The change rows for this page."}},"description":"Paginated incremental-change feed (``GET /api/v1/billing-rules/changes``)."},"BillingRuleHistoryResponse":{"type":"object","title":"BillingRuleHistoryResponse","required":["id","action","change_source","created_at"],"properties":{"id":{"type":"integer","title":"Id"},"action":{"type":"string","title":"Action"},"new_data":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"New Data"},"created_at":{"type":"string","title":"Created At","format":"date-time"},"change_source":{"type":"string","title":"Change Source"},"changed_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Changed By Id"},"previous_data":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Previous Data"},"billing_rule_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Billing Rule Id"},"change_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Description"}}},"ComposedReimbursementResponse":{"type":"object","title":"ComposedReimbursementResponse","required":["composed_data","field_sources","primary_rule","contributing_rules"],"properties":{"as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of"},"primary_rule":{"$ref":"#/components/schemas/BillingRuleResponse"},"composed_data":{"type":"object","title":"Composed Data","additionalProperties":true},"field_sources":{"type":"object","title":"Field Sources","additionalProperties":{"type":"string"}},"modifier_sources":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}],"title":"Modifier Sources"},"contributing_rules":{"type":"array","items":{"$ref":"#/components/schemas/BillingRuleResponse"},"title":"Contributing Rules"}},"description":"Layer 3/4 composed reimbursement data returned by\n`GET /billing-rules/resolve-reimbursement`."},"PayerDirectoryVersionResponse":{"type":"object","title":"PayerDirectoryVersionResponse","required":["version","bumped_at"],"properties":{"version":{"type":"string","title":"Version","examples":["4217"],"description":"Opaque, monotonically increasing version of the payer directory content. It advances whenever any payer, payer entry, plan, alias, phone, address, or MAC jurisdiction record changes, including changes made outside the scheduled sync jobs. Compare for equality only, and do not parse it."},"bumped_at":{"type":"string","title":"Bumped At","format":"date-time","description":"UTC timestamp of the most recent directory change that advanced the version."}},"description":"Cheap content-version signal for the whole payer directory."},"CrossPayerFullCoverageResponse":{"type":"object","title":"CrossPayerFullCoverageResponse","required":["code","total_payers","entries"],"properties":{"code":{"type":"string","title":"Code"},"as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/PayerFullCoverageEntry"},"title":"Entries"},"code_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Type"},"total_payers":{"type":"integer","title":"Total Payers"}},"description":"Response for `GET /api/v1/billing-rules/by-code/{code}`.\n\nLists every active payer that has at least one explicit (non-cms_baseline)\nrule for the code, with that payer's `resolve_full_coverage` result.\nPayers are sorted alphabetically. `total_payers` lets the UI show\n\"12 of 225 payers have rules for this code\" style messaging."},"PaginatedResponse_SearchResult_":{"type":"object","title":"PaginatedResponse[SearchResult]","required":["items","total","page","page_size","pages"],"properties":{"page":{"type":"integer","title":"Page"},"items":{"type":"array","items":{"$ref":"#/components/schemas/SearchResult"},"title":"Items"},"pages":{"type":"integer","title":"Pages"},"total":{"type":"integer","title":"Total"},"page_size":{"type":"integer","title":"Page Size"}}},"PaginatedResponse_PayerResponse_":{"type":"object","title":"PaginatedResponse[PayerResponse]","required":["items","total","page","page_size","pages"],"properties":{"page":{"type":"integer","title":"Page"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PayerResponse"},"title":"Items"},"pages":{"type":"integer","title":"Pages"},"total":{"type":"integer","title":"Total"},"page_size":{"type":"integer","title":"Page Size"}}},"PaginatedResponse_PayerHealthResponse_":{"type":"object","title":"PaginatedResponse[PayerHealthResponse]","required":["items","total","page","page_size","pages"],"properties":{"page":{"type":"integer","title":"Page"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PayerHealthResponse"},"title":"Items"},"pages":{"type":"integer","title":"Pages"},"total":{"type":"integer","title":"Total"},"page_size":{"type":"integer","title":"Page Size"}}},"PaginatedResponse_PolicyUpdateResponse_":{"type":"object","title":"PaginatedResponse[PolicyUpdateResponse]","required":["items","total","page","page_size","pages"],"properties":{"page":{"type":"integer","title":"Page"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PolicyUpdateResponse"},"title":"Items"},"pages":{"type":"integer","title":"Pages"},"total":{"type":"integer","title":"Total"},"page_size":{"type":"integer","title":"Page Size"}}},"Body_set_budgets_admin_costs_budgets_post":{"type":"object","title":"Body_set_budgets_admin_costs_budgets_post","properties":{"llm_budget_daily_usd":{"type":"string","title":"Llm Budget Daily Usd","default":""},"llm_budget_monthly_usd":{"type":"string","title":"Llm Budget Monthly Usd","default":""}}},"Body_save_ai_settings_admin_settings_ai_post":{"type":"object","title":"Body_save_ai_settings_admin_settings_ai_post","properties":{"auto_extract":{"type":"boolean","title":"Auto Extract","default":false},"auto_summarize":{"type":"boolean","title":"Auto Summarize","default":false}}},"Body_save_llm_settings_admin_settings_llm_post":{"type":"object","title":"Body_save_llm_settings_admin_settings_llm_post","properties":{"llm_method":{"type":"string","title":"Llm Method","default":"cli_first"},"llm_provider":{"type":"string","title":"Llm Provider","default":"anthropic"},"llm_web_search":{"type":"string","title":"Llm Web Search"},"llm_model_openai":{"type":"string","title":"Llm Model Openai","default":"gpt-5.4-mini"},"llm_default_model":{"type":"string","title":"Llm Default Model","default":"opus"},"llm_effort_openai":{"type":"string","title":"Llm Effort Openai","default":"medium"},"llm_default_effort":{"type":"string","title":"Llm Default Effort","default":"medium"},"llm_cli_concurrency":{"type":"integer","title":"Llm Cli Concurrency","default":1},"llm_model_anthropic":{"type":"string","title":"Llm Model Anthropic","default":"sonnet"},"llm_effort_anthropic":{"type":"string","title":"Llm Effort Anthropic","default":"medium"}}},"Body_save_api_keys_admin_settings_api_keys_post":{"type":"object","title":"Body_save_api_keys_admin_settings_api_keys_post","properties":{"openai_api_key":{"type":"string","title":"Openai Api Key","default":""},"voyage_api_key":{"type":"string","title":"Voyage Api Key","default":""},"anthropic_api_key":{"type":"string","title":"Anthropic Api Key","default":""},"firecrawl_api_key":{"type":"string","title":"Firecrawl Api Key","default":""}}},"Body_save_doc_transparency__partials_save_doc_post":{"type":"object","title":"Body_save_doc_transparency__partials_save_doc_post","required":["file","email","doc_token"],"properties":{"file":{"type":"string","title":"File","format":"binary"},"rate":{"type":"string","title":"Rate","default":"0"},"email":{"type":"string","title":"Email"},"consent":{"type":"string","title":"Consent","default":""},"doc_token":{"type":"string","title":"Doc Token"}}},"Body_llm_queue_requeue_admin_llm_queue_requeue_post":{"type":"object","title":"Body_llm_queue_requeue_admin_llm_queue_requeue_post","required":["job_type","entity_id"],"properties":{"job_type":{"type":"string","title":"Job Type"},"entity_id":{"type":"string","title":"Entity Id"}}},"Body_create_pricing_record_admin_pricing_create_post":{"type":"object","title":"Body_create_pricing_record_admin_pricing_create_post","properties":{"notes":{"type":"string","title":"Notes","default":""},"model_name":{"type":"string","title":"Model Name","default":""},"input_price":{"type":"string","title":"Input Price","default":"0"},"output_price":{"type":"string","title":"Output Price","default":"0"},"effective_from":{"type":"string","title":"Effective From","default":""},"cache_read_price":{"type":"string","title":"Cache Read Price","default":"0"}}},"Body_unset_api_key_admin_settings_api_keys_unset_post":{"type":"object","title":"Body_unset_api_key_admin_settings_api_keys_unset_post","required":["key"],"properties":{"key":{"type":"string","title":"Key"}}},"Body_upload_policy_document_web_policy_documents_post":{"type":"object","title":"Body_upload_policy_document_web_policy_documents_post","required":["file"],"properties":{"file":{"type":"string","title":"File","format":"binary"},"consent":{"type":"string","title":"Consent","default":""}}},"Body_find_payer_results_policy_find_payer_results_post":{"type":"object","title":"Body_find_payer_results_policy_find_payer_results_post","properties":{"naic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Naic"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"rx_bin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rx Bin"},"rx_pcn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rx Pcn"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"payer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Id"},"bcbs_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bcbs Prefix"}}},"Body_extract_doc_transparency__partials_extract_doc_post":{"type":"object","title":"Body_extract_doc_transparency__partials_extract_doc_post","required":["file"],"properties":{"code":{"type":"string","title":"Code","default":""},"file":{"type":"string","title":"File","format":"binary"},"rate":{"type":"string","title":"Rate","default":"0"},"code_type":{"type":"string","title":"Code Type","default":""}}},"Body_extract_sbc_transparency__partials_extract_sbc_post":{"type":"object","title":"Body_extract_sbc_transparency__partials_extract_sbc_post","required":["file"],"properties":{"file":{"type":"string","title":"File","format":"binary"},"rate":{"type":"string","title":"Rate","default":"0"}}},"Body_save_scraping_settings_admin_settings_scraping_post":{"type":"object","title":"Body_save_scraping_settings_admin_settings_scraping_post","properties":{"scrape_user_agent":{"type":"string","title":"Scrape User Agent","default":""},"scrape_max_failures":{"type":"integer","title":"Scrape Max Failures","default":5},"scrape_delay_between":{"type":"number","title":"Scrape Delay Between","default":2},"scrape_request_timeout":{"type":"integer","title":"Scrape Request Timeout","default":30}}},"Body_toggle_feature_flag_admin_feature_flags_toggle_post":{"type":"object","title":"Body_toggle_feature_flag_admin_feature_flags_toggle_post","required":["key","enabled"],"properties":{"key":{"type":"string","title":"Key"},"confirm":{"type":"string","title":"Confirm","default":""},"enabled":{"type":"string","title":"Enabled"}}},"Body_upload_policy_document_api_v1_policy_documents_post":{"type":"object","title":"Body_upload_policy_document_api_v1_policy_documents_post","required":["file"],"properties":{"file":{"type":"string","title":"File","format":"binary"}}},"Body_delete_policy_document_web_policy_documents_delete_post":{"type":"object","title":"Body_delete_policy_document_web_policy_documents_delete_post","required":["document_id"],"properties":{"document_id":{"type":"string","title":"Document Id"}}},"Body_delete_my_document_transparency_my_documents_delete_post":{"type":"object","title":"Body_delete_my_document_transparency_my_documents_delete_post","required":["token","document_id"],"properties":{"token":{"type":"string","title":"Token"},"document_id":{"type":"string","title":"Document Id"}}},"Body_save_worker_pool_settings_admin_settings_worker_pool_post":{"type":"object","title":"Body_save_worker_pool_settings_admin_settings_worker_pool_post","properties":{"llm_worker_concurrency":{"type":"integer","title":"Llm Worker Concurrency","default":3},"llm_worker_sleep_seconds":{"type":"integer","title":"Llm Worker Sleep Seconds","default":30},"llm_extraction_reserved_workers":{"type":"integer","title":"Llm Extraction Reserved Workers","default":0}}},"Body_queue_resolve_admin_pt_rediscovery_queue__queue_id__resolve_post":{"type":"object","title":"Body_queue_resolve_admin_pt_rediscovery_queue__queue_id__resolve_post","properties":{"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"resolved_to_hpt_file_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Resolved To Hpt File Id"}}},"Body_complete_subscription_remote_admin_settings_subscription_complete_post":{"type":"object","title":"Body_complete_subscription_remote_admin_settings_subscription_complete_post","required":["callback_url"],"properties":{"callback_url":{"type":"string","title":"Callback Url"}}},"Body_update_gap_status_admin_payer_match_gap__gap_id__status__new_status__post":{"type":"object","title":"Body_update_gap_status_admin_payer_match_gap__gap_id__status__new_status__post","properties":{"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"missing_evidence_class":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Missing Evidence Class"}}}},"securitySchemes":{"ConsoleBearer":{"type":"http","scheme":"bearer","description":"Your hank.ai console bearer token. Call the metered edge at `https://api.hank.ai/v1/ppman/*` with `Authorization: Bearer <token>` - the edge validates it (credits + rate + service scope) and forwards the request. Mint a token at console.hank.ai. This is the customer auth path."}}}}