Skip to content

← All contracts

OHN-02 Health ID Management

Version
1.0.0
OpenAPI
3.1.0
Source in the repository
modules/OHN-02/api/openapi.yaml
Servers
https://opeshealthnetwork.com/api/ohn/v1
Authentication
gatewayToken: http bearer (JWT)

Download the contract (YAML)

Contracts are written in English.

Written from the observed behaviour of the TypeScript reference (backend/modules/ohn-02, 2026-11-17). The by-subject operation depends on OHN-03 through a port; until the service-token decision (OWNER-BLOCKERS B38) it fails closed with 503.

Operations

health-ids

POST/patients

Operation ID: issueHealthId

Authentication: gatewayToken

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
201Identity and first health id created
application/json: HealthIdentifier
422application/problem+json with the legacy error code
application/problem+json: Problem
503application/problem+json with the legacy error code
application/problem+json: Problem
POST/patients/{id}/health-ids

Operation ID: issueAdditionalHealthId

Authentication: gatewayToken

Parameters

NameInTypeRequiredDescription
idpathstringyes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
201Additional id
application/json: HealthIdentifier
404application/problem+json with the legacy error code
application/problem+json: Problem
422application/problem+json with the legacy error code
application/problem+json: Problem
GET/patients/by-subject/{subject}

Operation ID: getPatientBySubject

Authentication: gatewayToken

Parameters

NameInTypeRequiredDescription
subjectpathstringyes

Responses

CodeDescriptionMedia type
200Binding
application/json: SubjectBinding
404application/problem+json with the legacy error code
application/problem+json: Problem
503application/problem+json with the legacy error code
application/problem+json: Problem
GET/health-ids

Operation ID: listHealthIds

Authentication: gatewayToken

Responses

CodeDescriptionMedia type
200Identifiers with their patient
application/json: HealthIdentifierList
POST/health-ids/resolve

Operation ID: resolveHealthId

Authentication: gatewayToken

Parameters

NameInTypeRequiredDescription
Idempotency-Keyheaderstringyes

Request body (required)

  • application/json: object

Responses

CodeDescriptionMedia type
200Patient reference
application/json: Resolution
404application/problem+json with the legacy error code
application/problem+json: Problem
422application/problem+json with the legacy error code
application/problem+json: Problem
GET/health-ids/{id}/verify

Operation ID: verifyHealthId

Authentication: gatewayToken

Parameters

NameInTypeRequiredDescription
idpathstringyes

Responses

CodeDescriptionMedia type
200Active identifier
application/json: HealthIdentifier
404application/problem+json with the legacy error code
application/problem+json: Problem
POST/health-ids/{id}/recover

Operation ID: recoverHealthId

Authentication: gatewayToken

Parameters

NameInTypeRequiredDescription
idpathstringyes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
201Alias recorded and identifier set to recovered
application/json: Recovery
404application/problem+json with the legacy error code
application/problem+json: Problem
422application/problem+json with the legacy error code
application/problem+json: Problem
POST/health-ids/{id}/status

Operation ID: changeHealthIdStatus

Authentication: gatewayToken

Parameters

NameInTypeRequiredDescription
idpathstringyes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
200Updated
application/json: HealthIdentifier
404application/problem+json with the legacy error code
application/problem+json: Problem
422application/problem+json with the legacy error code
application/problem+json: Problem
GET/health-ids/{id}/history

Operation ID: getHealthIdHistory

Authentication: gatewayToken

Parameters

NameInTypeRequiredDescription
idpathstringyes

Responses

CodeDescriptionMedia type
200Status history oldest first
application/json: HistoryList
GET/identifier-aliases

Operation ID: listIdentifierAliases

Authentication: gatewayToken

Responses

CodeDescriptionMedia type
200Aliases
application/json: RecoveryList

reports

GET/health-ids/reports

Operation ID: listReports

Authentication: gatewayToken

Responses

CodeDescriptionMedia type
200Reports
application/json: ReportList
403application/problem+json with the legacy error code
application/problem+json: Problem
GET/health-ids/issuance-exceptions

Operation ID: listIssuanceExceptions

Authentication: gatewayToken

Responses

CodeDescriptionMedia type
200Failed or retried issuances without identifiers
application/json: object
403application/problem+json with the legacy error code
application/problem+json: Problem
GET/health-ids/reports/{reportId}

Operation ID: runReport

Authentication: gatewayToken

Parameters

NameInTypeRequiredDescription
reportIdpathstringyes
jurisdictionquerystringno
channelquerystringno
statusquerystringno
period_fromquerystringno
period_toquerystringno
datequerystringno
cursorquerystringno

Responses

CodeDescriptionMedia type
200Report
application/json: Report
403application/problem+json with the legacy error code
application/problem+json: Problem
404application/problem+json with the legacy error code
application/problem+json: Problem
422application/problem+json with the legacy error code
application/problem+json: Problem
POST/health-ids/reports/{reportId}/export

Operation ID: exportReport

Authentication: gatewayToken

Parameters

NameInTypeRequiredDescription
reportIdpathstringyes
Idempotency-Keyheaderstringyes

Request body (required)

Responses

CodeDescriptionMedia type
201Export created - single use and valid for five minutes
application/json: ExportReceipt
404application/problem+json with the legacy error code
application/problem+json: Problem
422application/problem+json with the legacy error code
application/problem+json: Problem
GET/health-ids/report-exports/{token}

Operation ID: downloadReportExport

Authentication: gatewayToken

Parameters

NameInTypeRequiredDescription
tokenpathstringyes

Responses

CodeDescriptionMedia type
200The file as csv or pdf
text/csv: string (binary)
application/pdf: string (binary)
404application/problem+json with the legacy error code
application/problem+json: Problem
410application/problem+json with the legacy error code
application/problem+json: Problem

Schemas

Problem

NameTypeRequiredDescription
errorstringyes
messagestringno
detailsobjectno
trace_idstringno

IssueHealthIdCommand

NameTypeRequiredDescription
jurisdiction_idstring (uuid)yes
patient_identity_refstring (uuid)yes
proofing_case_idstring (uuid)yes
registration_channelstringyes
languagestringyes
idempotency_keystringno

IssueAdditionalIdCommand

NameTypeRequiredDescription
jurisdiction_idstring (uuid)yes
verification_purposestringyes
requesting_facility_idstring (uuid)yes
patient_disclosure_authoritystring (uuid)no

HealthIdentifier

NameTypeRequiredDescription
idstring (uuid)no
health_identity_idstring (uuid)no
health_idstringno
jurisdiction_idstring (uuid)no
verification_purposestringno
requesting_facility_idstring (uuid)no
patient_disclosure_authoritystring | nullno
statusstringno
versionintegerno
created_atstring (date-time)no
updated_atstring (date-time)no
patient_idstring | nullno

HealthIdentifierList

NameTypeRequiredDescription
dataarray of HealthIdentifierno

SubjectBinding

NameTypeRequiredDescription
patient_idstringno
health_idstring | nullno
status"active" | "suspended"no

Resolution

NameTypeRequiredDescription
patient_idstringno
statusstringno

RecoveryCommand

NameTypeRequiredDescription
claimed_idstringno
identity_evidence_refstring (uuid)yes
recovery_reasonstringyes
verified_contactstringno
reviewer_idstring (uuid)yes

Recovery

NameTypeRequiredDescription
idstring (uuid)no
health_identifier_idstring (uuid)no
claimed_idstring | nullno
identity_evidence_refstring (uuid)no
recovery_reasonstringno
verified_contactstring | nullno
reviewer_idstring (uuid)no
statusstringno
created_atstring (date-time)no
updated_atstring (date-time)no

RecoveryList

NameTypeRequiredDescription
dataarray of Recoveryno

StatusChangeCommand

NameTypeRequiredDescription
requested_status"suspended" | "retired" | "active"yes
reasonstringyes
effective_atstring (date-time)yes
approver_idstring (uuid)yes

HistoryEntry

NameTypeRequiredDescription
idstring (uuid)no
health_identifier_idstring (uuid)no
previous_statusstringno
new_statusstringno
reasonstringno
effective_atstring (date-time)no
approver_idstring (uuid)no
created_atstring (date-time)no

HistoryList

NameTypeRequiredDescription
dataarray of HistoryEntryno

ReportList

NameTypeRequiredDescription
reportsarray of ReportList.reports.itemno

Report

NameTypeRequiredDescription
report_idstringyes
titlestringyes
columnsarray of stringyes
rowsarray of objectyes
summaryobjectyes
state"rendered" | "no_authorized_data"yes
generated_atstring (date-time)yes
next_cursorstring | nullyes

ExportCommand

NameTypeRequiredDescription
format"csv" | "pdf"yes
filtersobjectno

ExportReceipt

NameTypeRequiredDescription
export_idstring (uuid)no
report_idstringno
formatstringno
rowsintegerno
expires_atstring (date-time)no
single_usebooleanno
download_pathstringno

ReportList.reports.item defined inline

NameTypeRequiredDescription
idstringno
titlestringno