{ "openapi": "3.1.0", "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema", "info": { "title": "Thrivory ThriveNow API", "version": "1.0.0", "description": "Unified API for claim review (predictions), adjudication & funding, claim status, webhooks, and reconciliation. Production access requires a BAA with Thrivory. All endpoints use HTTPS and JSON.", "contact": { "name": "Thrivory Support", "email": "support@thrivory.com" }, "termsOfService": "https://thrivory.com/terms" }, "servers": [ { "url": "https://api.sandbox.thrivory.com", "description": "Sandbox" }, { "url": "https://api.thrivory.com", "description": "Production" } ], "tags": [ { "name": "Auth" }, { "name": "Metadata" }, { "name": "Claims" }, { "name": "Adjudications & Settlements" }, { "name": "Payout Accounts" }, { "name": "Webhooks" }, { "name": "Imports" }, { "name": "Operations" } ], "security": [ { "oauth2": [ "claims:read", "claims:write", "settlements:write", "metadata:read", "webhooks:manage", "imports:write", "payouts:write" ] } ], "paths": { "/v1/oauth/token": { "post": { "tags": [ "Auth" ], "summary": "Obtain an access token (OAuth 2.0 Client Credentials)", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "client_id", "client_secret", "grant_type" ], "properties": { "client_id": { "type": "string" }, "client_secret": { "type": "string" }, "grant_type": { "type": "string", "const": "client_credentials" } } } } } }, "responses": { "200": { "description": "Access token", "content": { "application/json": { "schema": { "type": "object", "required": [ "access_token", "token_type", "expires_in" ], "properties": { "access_token": { "type": "string" }, "token_type": { "type": "string", "example": "Bearer" }, "expires_in": { "type": "integer", "example": 3600 } } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/oauth/introspect": { "post": { "tags": [ "Auth" ], "summary": "Introspect a token (optional)", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string" } }, "required": [ "token" ] } } } }, "responses": { "200": { "description": "Token metadata", "content": { "application/json": { "schema": { "type": "object" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/oauth/revoke": { "post": { "tags": [ "Auth" ], "summary": "Revoke a token (optional)", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string" } }, "required": [ "token" ] } } } }, "responses": { "200": { "description": "Revoked" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/.well-known/jwks.json": { "get": { "tags": [ "Auth" ], "summary": "JWKS for signature verification", "responses": { "200": { "description": "JWKS", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/v1/health": { "get": { "tags": [ "Operations" ], "summary": "Health check", "responses": { "200": { "description": "Healthy" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/metadata/payers": { "get": { "tags": [ "Metadata" ], "summary": "Search payers (Thrivory Payer IDs)", "description": "Returns payer directory entries. Use `system=internal` to filter to Thrivory payer identifiers.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "Search by name, alias, or ID" }, { "name": "system", "in": "query", "schema": { "type": "string", "enum": [ "Thrivory" ] }, "description": "Identifier system (currently 'internal')" }, { "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" } ], "responses": { "200": { "description": "List of payers", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Payer" } } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/metadata/reason-codes": { "get": { "tags": [ "Metadata" ], "summary": "Thrivory proprietary denial reason codes", "responses": { "200": { "description": "List of reason codes", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ReasonCode" } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/metadata/funding-rails": { "get": { "tags": [ "Metadata" ], "summary": "Available funding rails and cutoff times", "responses": { "200": { "description": "List of funding rails", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FundingRail" } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/claims/reviews": { "post": { "tags": [ "Claims" ], "summary": "Review a claim (predictions, no funding)", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClaimReviewRequest" }, "examples": { "basic": { "summary": "Minimal example", "value": { "facility": "ABC", "claim_identifier": "CLM-10001", "chart_identifier": "PAT-5678", "date_of_service": "2025-08-15", "date_of_submission": "2025-08-16", "servicer_npi": "1111111111", "billing_npi": "5556667778", "patient_primary_payor_id": "thrivoryid:123456", "service_lines": [ { "cpt": "J1745", "modifier": "JW", "units": 1, "amount": 5000 } ], "submitted_amount": 5000 } } } } } }, "responses": { "200": { "description": "Review results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClaimReviewResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/claims/adjudications": { "post": { "tags": [ "Adjudications & Settlements" ], "summary": "Create adjudication + terms using authorization_id", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdjudicationCreateRequest" } } } }, "responses": { "200": { "description": "Adjudication created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Adjudication" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/settlements/{settlement_id}/confirm": { "post": { "tags": [ "Adjudications & Settlements" ], "summary": "Confirm terms and release funds", "parameters": [ { "name": "settlement_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/IdempotencyKey" } ], "responses": { "200": { "description": "Settlement funded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Settlement" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/settlements/{settlement_id}/cancel": { "post": { "tags": [ "Adjudications & Settlements" ], "summary": "Cancel an adjudication/settlement prior to funding", "parameters": [ { "name": "settlement_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/IdempotencyKey" } ], "responses": { "200": { "description": "Settlement canceled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Settlement" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/claims/{claim_id}/status": { "patch": { "tags": [ "Claims" ], "summary": "Signal a claim status update", "parameters": [ { "name": "claim_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClaimStatusUpdateRequest" } } } }, "responses": { "200": { "description": "Updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClaimStatus" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/ServerError" } } }, "get": { "tags": [ "Claims" ], "summary": "Fetch Thrivory's current claim status", "parameters": [ { "name": "claim_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Claim status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClaimStatus" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/claims/{claim_id}": { "get": { "tags": [ "Claims" ], "summary": "Fetch a claim rollup (review + adjudication + status)", "parameters": [ { "name": "claim_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Claim object", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Claim" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/settlements/{settlement_id}/reconciliation": { "get": { "tags": [ "Adjudications & Settlements" ], "summary": "Reconciliation details for a funded settlement", "parameters": [ { "name": "settlement_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Reconciliation details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Reconciliation" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/payout-accounts": { "post": { "tags": [ "Payout Accounts" ], "summary": "Register a tokenized payout destination", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutAccountCreateRequest" } } } }, "responses": { "200": { "description": "Payout account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutAccount" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" } } }, "get": { "tags": [ "Payout Accounts" ], "summary": "List payout accounts", "parameters": [ { "$ref": "#/components/parameters/Limit" }, { "$ref": "#/components/parameters/Cursor" } ], "responses": { "200": { "description": "List of payout accounts", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PayoutAccount" } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/payout-accounts/{id}": { "get": { "tags": [ "Payout Accounts" ], "summary": "Get payout account", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Payout account", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutAccount" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/ServerError" } } }, "delete": { "tags": [ "Payout Accounts" ], "summary": "Delete payout account", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Deleted" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/webhooks/endpoints": { "post": { "tags": [ "Webhooks" ], "summary": "Create webhook endpoint", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookEndpointCreateRequest" } } } }, "responses": { "200": { "description": "Endpoint", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookEndpoint" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" } } }, "get": { "tags": [ "Webhooks" ], "summary": "List webhook endpoints", "responses": { "200": { "description": "List of endpoints", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WebhookEndpoint" } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/webhooks/endpoints/{id}": { "delete": { "tags": [ "Webhooks" ], "summary": "Delete webhook endpoint", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Deleted" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/ServerError" } } }, "get": { "tags": [ "Webhooks" ], "summary": "Get webhook endpoint", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Endpoint", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookEndpoint" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/webhooks/endpoints/{id}/rotate-secret": { "post": { "tags": [ "Webhooks" ], "summary": "Rotate webhook signing secret", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/IdempotencyKey" } ], "responses": { "200": { "description": "New secret issued", "content": { "application/json": { "schema": { "type": "object", "properties": { "secret_last4": { "type": "string" } } } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/webhooks/test": { "post": { "tags": [ "Webhooks" ], "summary": "Send a test event to a webhook endpoint", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "endpoint_id": { "type": "string" }, "type": { "type": "string", "enum": [ "claim.reviewed", "adjudication.decision", "settlement.funded", "settlement.failed", "claim.status.updated", "reconciliation.posted" ] } }, "required": [ "endpoint_id", "type" ] } } } }, "responses": { "200": { "description": "Event dispatched" }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/imports/claims": { "post": { "tags": [ "Imports" ], "summary": "Bulk import historical claims (async job)", "parameters": [ { "$ref": "#/components/parameters/IdempotencyKey" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClaimsImportRequest" } } } }, "responses": { "202": { "description": "Job accepted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportJob" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "401": { "$ref": "#/components/responses/Unauthorized" }, "500": { "$ref": "#/components/responses/ServerError" } } } }, "/v1/imports/{job_id}": { "get": { "tags": [ "Imports" ], "summary": "Fetch import job status", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Job status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImportJob" } } } }, "401": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" }, "500": { "$ref": "#/components/responses/ServerError" } } } } }, "webhooks": { "claim.reviewed": { "post": { "summary": "Claim review result", "security": [ { "webhookSignature": [] } ], "parameters": [ { "name": "Thrivory-Signature", "in": "header", "required": true, "schema": { "type": "string" }, "description": "Webhook signature (HMAC SHA-256)" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClaimReviewedEvent" } } } }, "responses": { "200": { "description": "Acknowledged" } } } }, "adjudication.decision": { "post": { "summary": "Adjudication decision created", "security": [ { "webhookSignature": [] } ], "parameters": [ { "name": "Thrivory-Signature", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdjudicationDecisionEvent" } } } }, "responses": { "200": { "description": "Acknowledged" } } } }, "settlement.funded": { "post": { "summary": "Settlement funded", "security": [ { "webhookSignature": [] } ], "parameters": [ { "name": "Thrivory-Signature", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SettlementFundedEvent" } } } }, "responses": { "200": { "description": "Acknowledged" } } } }, "settlement.failed": { "post": { "summary": "Settlement failed", "security": [ { "webhookSignature": [] } ], "parameters": [ { "name": "Thrivory-Signature", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SettlementFailedEvent" } } } }, "responses": { "200": { "description": "Acknowledged" } } } }, "claim.status.updated": { "post": { "summary": "Authoritative claim status update", "security": [ { "webhookSignature": [] } ], "parameters": [ { "name": "Thrivory-Signature", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClaimStatusUpdatedEvent" } } } }, "responses": { "200": { "description": "Acknowledged" } } } }, "reconciliation.posted": { "post": { "summary": "Reconciliation event posted", "security": [ { "webhookSignature": [] } ], "parameters": [ { "name": "Thrivory-Signature", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReconciliationPostedEvent" } } } }, "responses": { "200": { "description": "Acknowledged" } } } } }, "components": { "parameters": { "IdempotencyKey": { "name": "Idempotency-Key", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Provide a unique key per request to enable safe retries" }, "Limit": { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 100 }, "description": "Max results to return" }, "Cursor": { "name": "cursor", "in": "query", "schema": { "type": "string" }, "description": "Opaque pagination cursor" } }, "responses": { "BadRequest": { "description": "400 Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "Unauthorized": { "description": "401 Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "NotFound": { "description": "404 Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "ServerError": { "description": "500 Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } }, "securitySchemes": { "oauth2": { "type": "oauth2", "flows": { "clientCredentials": { "tokenUrl": "https://api.thrivory.com/v1/oauth/token", "scopes": { "claims:read": "Read claims", "claims:write": "Create and modify claims", "settlements:write": "Create/confirm/cancel settlements", "metadata:read": "Read reference data (payers, codes)", "webhooks:manage": "Manage webhook endpoints", "imports:write": "Submit import jobs", "payouts:write": "Manage payout accounts" } } } }, "webhookSignature": { "type": "apiKey", "in": "header", "name": "Thrivory-Signature", "description": "HMAC SHA-256 signature of the request body: hex(hmacSHA256(secret, body))" } }, "schemas": { "Payer": { "type": "object", "properties": { "id": { "type": "string", "description": "Payer ID in the specified system (e.g., 'thrivoryid:123456')" }, "system": { "type": "string", "enum": [ "Thrivory" ], "description": "Identifier system" }, "name": { "type": "string" }, "aliases": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "system", "name" ] }, "ReasonCode": { "type": "object", "properties": { "code": { "type": "string" }, "description": { "type": "string" } }, "required": [ "code", "description" ] }, "FundingRail": { "type": "object", "properties": { "code": { "type": "string", "enum": [ "RTP", "SAME_DAY", "FUTURE_DATE" ] }, "name": { "type": "string" }, "cutoff_times": { "type": "array", "items": { "type": "string", "description": "HH:MM timezone-specific cutoff" } } }, "required": [ "code", "name" ] }, "ServiceLine": { "type": "object", "properties": { "cpt": { "type": "string", "description": "CPT/HCPCS code" }, "modifier": { "type": "string" }, "units": { "type": "number" }, "amount": { "type": "number" } }, "required": [ "cpt", "units", "amount" ] }, "ClaimReviewRequest": { "type": "object", "description": "Submit encounter/claim context for prediction. Fields align with Thrivory Data Feed Requirements.", "properties": { "facility": { "type": "string", "description": "Location/facility identifier" }, "claim_identifier": { "type": "string", "description": "Unique claim ID" }, "chart_identifier": { "type": "string", "description": "Patient chart ID" }, "date_of_entry": { "type": "string", "format": "date" }, "date_of_service": { "type": "string", "format": "date" }, "date_of_submission": { "type": "string", "format": "date" }, "servicer_npi": { "type": "string", "pattern": "^[0-9]{10}$" }, "billing_npi": { "type": "string", "pattern": "^[0-9]{10}$" }, "patient_primary_payor_text": { "type": "string" }, "patient_primary_payor_id": { "type": "string", "description": "Thrivory payer ID" }, "patient_primary_payor_plan_text": { "type": "string" }, "icd10_codes": { "type": "array", "items": { "type": "string" } }, "cpt_billing_codes": { "type": "string", "deprecated": true, "description": "Prefer service_lines[].cpt" }, "cpt_billing_modifier": { "type": "string", "deprecated": true, "description": "Prefer service_lines[].modifier" }, "cpt_billing_text": { "type": "string" }, "submitted_amount": { "type": "number" }, "balance_payor": { "type": "number" }, "balance_patient": { "type": "number" }, "payments_payor": { "type": "number" }, "payments_patient": { "type": "number" }, "payments_total": { "type": "number" }, "settlement_date": { "type": "string", "format": "date" }, "payment_account_location": { "type": "string", "description": "Last four digits or token reference" }, "denial_code": { "type": "string" }, "denial_code_text": { "type": "string" }, "service_lines": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceLine" } } }, "required": [ "claim_identifier", "chart_identifier", "date_of_service", "servicer_npi", "billing_npi", "patient_primary_payor_id", "submitted_amount" ] }, "ClaimReviewResponse": { "type": "object", "properties": { "authorization_id": { "type": "string", "description": "Short\u2011lived authorization handle used to create an adjudication" }, "denial_predicted": { "type": "boolean" }, "denial_reasons": { "type": "array", "items": { "$ref": "#/components/schemas/ReasonCode" } }, "expected_reimbursement": { "type": "object", "properties": { "allowed": { "type": "number" }, "expected": { "type": "number" } }, "required": [ "expected" ] }, "expected_payment_date": { "type": "string", "format": "date" }, "confidence": { "type": "number", "minimum": 0, "maximum": 1, "description": "Model confidence" }, "id": { "type": "string", "description": "Review ID" } }, "required": [ "authorization_id", "denial_predicted", "expected_reimbursement" ] }, "AdjudicationCreateRequest": { "type": "object", "properties": { "authorization_id": { "type": "string" }, "funding": { "type": "object", "properties": { "rail": { "type": "string", "enum": [ "RTP", "SAME_DAY", "FUTURE_DATE" ] }, "desired_date": { "type": "string", "format": "date" } }, "required": [ "rail" ] }, "payout_account_token": { "type": "string" } }, "required": [ "authorization_id", "funding" ] }, "Adjudication": { "type": "object", "properties": { "settlement_id": { "type": "string" }, "decision": { "type": "string", "enum": [ "approved", "declined", "manual_review" ] }, "terms": { "type": "object", "properties": { "advance_percentage": { "type": "number" }, "advance_amount": { "type": "number" }, "fees_estimate": { "type": "number" } } }, "status": { "type": "string", "enum": [ "pending_confirmation", "approved", "declined", "canceled", "funded" ] }, "expected_reimbursement": { "type": "number" }, "expected_payment_date": { "type": "string", "format": "date" } }, "required": [ "settlement_id", "decision", "status" ] }, "Settlement": { "type": "object", "properties": { "settlement_id": { "type": "string" }, "status": { "type": "string", "enum": [ "funded", "failed", "canceled" ] }, "funded_amount": { "type": "number" }, "timestamp": { "type": "string", "format": "date-time" } }, "required": [ "settlement_id", "status" ] }, "ClaimStatusUpdateRequest": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "created", "submitted", "accepted_by_payer", "denied", "paid", "partial_paid", "appealed", "closed" ] }, "reason": { "type": "string" }, "external_reference": { "type": "string" }, "effective_at": { "type": "string", "format": "date-time" } }, "required": [ "status" ] }, "ClaimStatus": { "type": "object", "properties": { "claim_id": { "type": "string" }, "status": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "claim_id", "status", "updated_at" ] }, "Claim": { "type": "object", "properties": { "claim_identifier": { "type": "string" }, "review": { "$ref": "#/components/schemas/ClaimReviewResponse" }, "adjudication": { "$ref": "#/components/schemas/Adjudication" }, "status": { "$ref": "#/components/schemas/ClaimStatus" } } }, "Reconciliation": { "type": "object", "properties": { "id": { "type": "string" }, "settlement_id": { "type": "string" }, "payer_payment": { "type": "number" }, "fee_collected": { "type": "number" }, "final_status": { "type": "string", "enum": [ "closed", "underpaid", "overpaid" ] } }, "required": [ "id", "settlement_id", "payer_payment", "final_status" ] }, "PayoutAccountCreateRequest": { "type": "object", "properties": { "token": { "type": "string", "description": "Tokenized bank destination" } }, "required": [ "token" ] }, "PayoutAccount": { "type": "object", "properties": { "id": { "type": "string" }, "last4": { "type": "string" }, "bank_name": { "type": "string" }, "status": { "type": "string", "enum": [ "active", "disabled" ] } }, "required": [ "id", "status" ] }, "WebhookEndpointCreateRequest": { "type": "object", "properties": { "url": { "type": "string", "format": "uri" }, "description": { "type": "string" } }, "required": [ "url" ] }, "WebhookEndpoint": { "type": "object", "properties": { "id": { "type": "string" }, "url": { "type": "string", "format": "uri" }, "description": { "type": "string" }, "secret_last4": { "type": "string" }, "status": { "type": "string", "enum": [ "active", "disabled" ] } }, "required": [ "id", "url", "status" ] }, "ClaimsImportRequest": { "type": "object", "properties": { "format": { "type": "string", "enum": [ "ndjson", "csv" ], "default": "ndjson" }, "encoding": { "type": "string", "enum": [ "gzip", "none" ], "default": "none" }, "payload": { "type": "string", "description": "Base64-encoded file payload (chunked uploads may be added later)" }, "mapping": { "type": "object", "description": "Optional field mapping if your headers differ from defaults" } }, "required": [ "format", "payload" ] }, "ImportJob": { "type": "object", "properties": { "job_id": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "succeeded", "failed" ] }, "submitted_at": { "type": "string", "format": "date-time" }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/Error" } } }, "required": [ "job_id", "status", "submitted_at" ] }, "ClaimReviewedEvent": { "type": "object", "properties": { "event": { "type": "string", "const": "claim.reviewed" }, "id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "data": { "$ref": "#/components/schemas/ClaimReviewResponse" } }, "required": [ "event", "id", "created_at", "data" ] }, "AdjudicationDecisionEvent": { "type": "object", "properties": { "event": { "type": "string", "const": "adjudication.decision" }, "id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "data": { "$ref": "#/components/schemas/Adjudication" } }, "required": [ "event", "id", "created_at", "data" ] }, "SettlementFundedEvent": { "type": "object", "properties": { "event": { "type": "string", "const": "settlement.funded" }, "id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "data": { "$ref": "#/components/schemas/Settlement" } }, "required": [ "event", "id", "created_at", "data" ] }, "SettlementFailedEvent": { "type": "object", "properties": { "event": { "type": "string", "const": "settlement.failed" }, "id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "data": { "$ref": "#/components/schemas/Error" } }, "required": [ "event", "id", "created_at", "data" ] }, "ClaimStatusUpdatedEvent": { "type": "object", "properties": { "event": { "type": "string", "const": "claim.status.updated" }, "id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "data": { "$ref": "#/components/schemas/ClaimStatus" } }, "required": [ "event", "id", "created_at", "data" ] }, "ReconciliationPostedEvent": { "type": "object", "properties": { "event": { "type": "string", "const": "reconciliation.posted" }, "id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "data": { "$ref": "#/components/schemas/Reconciliation" } }, "required": [ "event", "id", "created_at", "data" ] }, "Error": { "type": "object", "properties": { "error": { "type": "string", "description": "Error code" }, "message": { "type": "string" }, "request_id": { "type": "string" }, "details": { "type": "object" } }, "required": [ "error", "message" ] } } } }