← All contracts
OHN-30 Insurance Coverage and Eligibility Exchange
- Version
- 1.0.1
- OpenAPI
- 3.1.0
- Source in the repository
modules/OHN-30/api/openapi.json- Servers
https://opeshealthnetwork.com/api/ohn/v1
- Authentication
bearer: http bearer
Download the contract (JSON)
Contracts are written in English.
Base path /api/ohn/v1. Every POST requires Idempotency-Key; mutations use expected_version. Routes default-deny on role AND purpose (coverage_eligibility). Coverage is advisory and never blocks care. Strict bodies: unknown keys are 422 (unrecognized_keys, reported under "_"); only the first path segment of a failing field is reported. Policy identifiers are encrypted at rest, masked in views, and never placed in events. The TypeScript-only synthetic sign-in is not served; the gateway issues tokens.
Operations
OHN-30
GET/coverage/eligibility-inquiriesList inquiries (outcome, status, payer)
Operation ID: listInquiries
Authentication: bearer
Responses
| Code | Description | Media type |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/coverage/eligibility-inquiriesRun an eligibility inquiry (API-001; F001; W001)
Operation ID: createInquiry
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
201 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/coverage/eligibility-inquiries/{id}Inquiry with freshness, disputes and history (API-002)
Operation ID: getInquiry
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Responses
| Code | Description | Media type |
|---|
200 | OK | |
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/coverage/eligibility-inquiries/{id}/disputesDispute a recorded payer response (F003)
Operation ID: openDispute
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
201 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/coverage/disputesDispute ledger
Operation ID: listDisputes
Authentication: bearer
Responses
| Code | Description | Media type |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/coverage/disputes/{id}/resolveResolve a dispute (opener cannot resolve)
Operation ID: resolveDispute
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/coverage/endpointsInsurer connection status
Operation ID: listEndpoints
Authentication: bearer
Responses
| Code | Description | Media type |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/coverage/endpointsConfigure an insurer endpoint (F002)
Operation ID: configureEndpoint
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
201 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/coverage/certificatesCertificates the insurer endpoint form may offer (from OHN-45 /crypto/certificates with the certificate_reader service token; caller organisation only; usable = not expired and not rotation-due). Audited. 503 when OHN-45 is unavailable.
Operation ID: listCertificates
Authentication: bearer
Responses
| Code | Description | Media type |
|---|
200 | OK | |
401 | Unauthenticated | — |
403 | Role/purpose denied | — |
503 | OHN-45 unavailable | — |
POST/coverage/endpoints/{id}/verifyVerify endpoint trust (configurer cannot verify)
Operation ID: verifyEndpoint
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/coverage/endpoints/{id}/suspendSuspend a verified endpoint
Operation ID: suspendEndpoint
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/coverage/policyRead policy (unset = fail closed)
Operation ID: readPolicy
Authentication: bearer
Responses
| Code | Description | Media type |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/coverage/policyWrite policy
Operation ID: writePolicy
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/coverage/code-lists/{list}Read code list
Operation ID: listCodes
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
list | path | "purpose" | "supported_standard" | "resolution_status" | yes | |
Responses
| Code | Description | Media type |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/coverage/code-lists/{list}Upsert code list entries
Operation ID: upsertCodes
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
list | path | "purpose" | "supported_standard" | "resolution_status" | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/coverage/maintenance/retry-sweepRetry queued unknown inquiries (needs retry policy)
Operation ID: retrySweep
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Responses
| Code | Description | Media type |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/coverage/maintenance/drain-outboxDrain outbox (no sink => nothing marked delivered)
Operation ID: drainOutbox
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | yes | |
Responses
| Code | Description | Media type |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/coverage/report-catalogReport catalog
Operation ID: reportCatalog
Authentication: bearer
Responses
| Code | Description | Media type |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/coverage/reports/{reportId}Run report
Operation ID: runReport
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
reportId | path | "OHN-30-R001" | "OHN-30-R002" | "OHN-30-R003" | yes | |
Responses
| Code | Description | Media type |
|---|
200 | OK | |
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/coverage/reports/{reportId}/exportCreate signed single-use export
Operation ID: createExport
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
reportId | path | "OHN-30-R001" | "OHN-30-R002" | "OHN-30-R003" | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
201 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
GET/coverage/exports/{token}Download export (owner only, single use, 5 min)
Operation ID: fetchExport
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
token | path | string | yes | |
Responses
| Code | Description | Media type |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
POST/coverage/eligibility-inquiries/{id}/answerInsurer answers an in-network eligibility inquiry addressed to it: eligible, ineligible or limited, with validity and benefit notes (F004). Outcomes must be configured in the answer_outcome code list. Role partner_reviewer of the payer organisation.
Operation ID: answerInquiry
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|
id | path | string (uuid) | yes | |
Idempotency-Key | header | string | yes | |
Request body (required)
Responses
| Code | Description | Media type |
|---|
200 | OK | application/json: object
|
400 | Malformed / missing Idempotency-Key | — |
401 | Unauthenticated | — |
403 | Role/purpose denied, patient not authorized, or separation of duties | — |
404 | Not found / out of scope | — |
409 | Version conflict, illegal transition or idempotency mismatch | |
422 | Validation or domain refusal | |
429 | Rate limited | — |
503 | Dependency unavailable (fails closed) | — |
Other operations
GET/health/ohn-30Liveness incl. DB and dependency modes
Operation ID: health
Responses
| Code | Description | Media type |
|---|
200 | ok | — |
503 | unavailable | — |
Schemas
Error
| Name | Type | Required | Description |
|---|
error | string | yes | |
message | string | no | |
details | any | no | |
Inquiry
| Name | Type | Required | Description |
|---|
patient_ref | string (uuid) | yes | |
payer_org | string (uuid) | yes | |
policy_identifier | string | yes | Sent to the payer; stored encrypted; only a masked form is ever returned |
service_code | string | yes | |
date_of_service | string (date) | yes | |
purpose | string | yes | Must exist in the jurisdiction purpose code list |
InquiryView
| Name | Type | Required | Description |
|---|
id | string (uuid) | no | |
outcome | "eligible" | "ineligible" | "unknown" | no | unknown means no verdict was obtained; it is never an ineligible result |
unknown_reason | "timeout" | "endpoint_error" | null | no | |
status | "recorded" | "retry_queued" | "retry_exhausted" | "resolved" | no | |
freshness | "current" | "expired" | "not_applicable" | no | Expired results must not be presented as current |
valid_until | string | null (date-time) | no | |
ttl_configured | boolean | no | |
policy_identifier_masked | string | no | |
coverage_is_advisory | true | no | |
blocks_care | false | no | |
Endpoint
| Name | Type | Required | Description |
|---|
insurer_org | string (uuid) | yes | |
endpoint_url | string (uri) | yes | https only, public host, no credentials, port 443 |
certificate_ref | string (uuid) | yes | |
supported_standard | string | yes | |
timeout_ms | integer | yes | |
EndpointDecision
| Name | Type | Required | Description |
|---|
expected_version | integer | yes | |
reason | string | yes | |
Dispute
| Name | Type | Required | Description |
|---|
source_response_ref | string (uuid) | yes | |
dispute_reason | string | yes | |
DisputeResolve
| Name | Type | Required | Description |
|---|
resolution_status | string | yes | |
reason | string | yes | |
expected_version | integer | yes | |
Policy
| Name | Type | Required | Description |
|---|
eligibility_ttl_minutes | integer | null | yes | |
max_retry_attempts | integer | null | yes | |
retry_delay_seconds | integer | null | yes | |
availability_slo_bp | integer | null | yes | |
approval_reference | string | yes | |
ExportCommand
| Name | Type | Required | Description |
|---|
format | "csv" | "pdf" | yes | |
filters | object | no | |
Report
| Name | Type | Required | Description |
|---|
report_id | "OHN-30-R001" | "OHN-30-R002" | "OHN-30-R003" | no | |
title | string | no | |
columns | array of any | no | |
rows | array of any | no | |
summary | object | no | |
state | "rendered" | "no_authorized_data" | no | |
generated_at | string (date-time) | no | |
PayerAnswer
| Name | Type | Required | Description |
|---|
result | "eligible" | "ineligible" | "limited" | yes | |
valid_until | string (date-time) | no | |
benefit_notes | string | no | Required when result is limited. |
expected_version | integer | yes | |
get-coverage-certificates.response-200 defined inline
get-coverage-certificates.response-200.items.item defined inline
| Name | Type | Required | Description |
|---|
id | string (uuid) | no | |
label | string | no | |
key_purpose | string | no | |
expires_at | string | null | no | |
expired | boolean | no | |
rotation_due | boolean | no | |
usable | boolean | no | |
CodeListUpsert.entries.item defined inline
| Name | Type | Required | Description |
|---|
code | string | yes | |
label_en | string | yes | |
label_fr | string | yes | |
active | boolean | no | |