OHN-01 Country and Jurisdiction Management
- Version
- 1.0.0
- OpenAPI
- 3.1.0
- Source dans le dépôt
modules/OHN-01/api/openapi.yaml- Serveurs
https://opeshealthnetwork.com/api/ohn/v1- Authentification
gatewayToken: http bearer (JWT)
Les contrats sont rédigés en anglais.
Written from the observed behaviour of the TypeScript reference (backend/modules/ohn-01, 2026-11-17). Reports (/jurisdictions/reports*) and the legacy /auth/token are NOT part of this version: reports are a pending gap (docs/program/java/ohn-01-analysis.md); /auth/token is retired (issued tokens to anyone) and replaced by Keycloak.
Opérations
- jurisdictions (15)
- reports (4)
jurisdictions
GET/countries
Read by every OHN-01 role with action read, including the read-only service role country_reader (OHN-05 facility codes take the jurisdiction's country_code from here; owner decision 2026-11-23).
Identifiant d’opération: listCountries
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
cursor | query | string | non | |
page_size | query | integer | non |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Countries | application/json: CountryPage |
401 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
403 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
GET/jurisdictions
Identifiant d’opération: listJurisdictionPolicies
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
cursor | query | string | non | |
page_size | query | integer | non |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Policies | application/json: PolicyPage |
POST/jurisdictions
Identifiant d’opération: createCountry
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:CountryCommand
Réponses
POST/jurisdictions/{id}/policies
Identifiant d’opération: publishPolicy
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string | oui | |
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:PolicyCommand
Réponses
GET/jurisdictions/namespace-rules
Identifiant d’opération: listNamespaceRules
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
country_id | query | string (uuid) | non |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Rules newest first (capped at 500) | application/json: NamespaceRuleList |
422 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
POST/jurisdictions/namespace-rules
Identifiant d’opération: createNamespaceRule
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:NamespaceRuleCommand
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Created | application/json: NamespaceRule |
404 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
422 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
GET/jurisdictions/namespace-rules/{ruleId}
Identifiant d’opération: getNamespaceRule
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
ruleId | path | string | oui |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Rule with overlapping rules | application/json: NamespaceRuleDetail |
404 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
POST/jurisdictions/{id}/activate
Identifiant d’opération: activateCountry
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string | oui | |
Idempotency-Key | header | string | oui |
Réponses
POST/jurisdictions/{id}/suspendLegacy one-step route; now only records a suspension request (dual control)
Identifiant d’opération: suspendCountryLegacy
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string | oui | |
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:SuspendCommand
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Suspension requested | application/json: Country |
404 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
409 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
422 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
POST/jurisdictions/{id}/reinstate
Identifiant d’opération: reinstateCountry
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string | oui | |
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:ReasonCommand
Réponses
GET/jurisdictions/{id}/history
Identifiant d’opération: getCountryHistory
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string | oui |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Audit trail oldest first | application/json: HistoryList |
404 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
GET/jurisdictions/{id}/suspension-request
Identifiant d’opération: getSuspensionRequest
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string | oui |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | State | application/json: SuspensionState |
404 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
POST/jurisdictions/{id}/suspension-request
Identifiant d’opération: requestSuspension
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string | oui | |
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:ReasonCommand
Réponses
POST/jurisdictions/{id}/suspension-request/approve
Identifiant d’opération: approveSuspension
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string | oui | |
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:ReasonCommand
Réponses
POST/jurisdictions/{id}/suspension-request/withdraw
Identifiant d’opération: withdrawSuspension
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string | oui | |
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:ReasonCommand
Réponses
reports
GET/jurisdictions/reports
Identifiant d’opération: listReports
Authentification: gatewayToken
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Available reports | application/json: ReportList |
403 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
GET/jurisdictions/reports/{reportId}
Filters are strict; an unknown query parameter is refused with 422. Scope comes from the token jurisdiction claim (country id or *).
Identifiant d’opération: runReport
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
reportId | path | string | oui | |
jurisdiction | query | string | non | |
status | query | string | non | |
policy_domain | query | string | non | |
issuer | query | string | non | |
actor | query | string | non | |
date | query | string | non | |
period_from | query | string | non | |
period_to | query | string | non | |
cursor | query | string | non |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Report | application/json: Report |
403 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
404 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
422 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
POST/jurisdictions/reports/{reportId}/export
Identifiant d’opération: exportReport
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
reportId | path | string | oui | |
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:ExportCommand
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Export created - single use and valid for five minutes | application/json: ExportReceipt |
404 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
422 | application/problem+json with the legacy `error` code | application/problem+json: Problem |
GET/jurisdictions/report-exports/{token}
Identifiant d’opération: downloadReportExport
Authentification: gatewayToken
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
token | path | string | oui |
Réponses
Schémas
Problem
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
type | string | non | |
title | string | non | |
status | integer | non | |
detail | string | non | |
error | string | oui | unauthenticated | denied_by_policy | not_found | conflict | domain_validation_failed | missing_idempotency_key | idempotency_conflict | request_in_progress | no_pending_request | second_approver_required | payload_too_large | server_unavailable |
message | string | oui | |
trace_id | string | non | |
details | object | non |
CountryStatus
"draft" | "reviewed" | "approved" | "active" | "suspension_requested" | "suspended" | "reinstated" | "superseded"
Country
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | string (uuid) | oui | |
country_code | string | oui | |
country_name | string | oui | |
default_locale | string | oui | |
time_zone | string | oui | |
issuing_authority | string (uuid) | oui | |
activation_date | string | null (date-time) | non | |
status | CountryStatus | oui | |
version | integer | oui | |
created_at | string (date-time) | oui | |
updated_at | string (date-time) | oui |
CountryCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
country_code | string | oui | |
country_name | string | oui | |
default_locale | string | oui | |
time_zone | string | oui | |
issuing_authority | string (uuid) | oui | |
activation_date | string (date-time) | non |
CountryPage
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
data | array of Country | oui | |
next_cursor | string | null | oui | |
page_size | integer | oui |
Policy
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | string (uuid) | non | |
country_id | string (uuid) | non | |
policy_domain | string | non | |
policy_version | string | non | |
effective_from | string (date-time) | non | |
policy_document | string | non | |
reviewer_id | string (uuid) | non | |
reason | string | non | |
status | string | non | |
version | integer | non | |
created_at | string (date-time) | non | |
updated_at | string (date-time) | non |
PolicyCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
jurisdiction_id | string (uuid) | oui | |
policy_domain | string | oui | |
policy_version | string | oui | |
effective_from | string (date-time) | oui | |
policy_document | string | oui | |
reviewer_id | string (uuid) | oui | |
reason | string | oui |
PolicyPage
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
data | array of Policy | non | |
next_cursor | string | null | non | |
page_size | integer | non |
NamespaceRule
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | string (uuid) | non | |
country_id | string (uuid) | non | |
identifier_namespace | string | non | |
issuer_id | string (uuid) | non | |
format_pattern | string | non | |
uniqueness_scope | "country" | "jurisdiction" | "facility" | non | |
valid_from | string (date) | non | |
version | integer | non | |
created_at | string (date-time) | non | |
updated_at | string (date-time) | non |
NamespaceRuleCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
country_id | string (uuid) | oui | |
identifier_namespace | string | oui | |
issuer_id | string (uuid) | oui | |
format_pattern | string | oui | |
uniqueness_scope | "country" | "jurisdiction" | "facility" | oui | |
valid_from | string (date) | oui |
NamespaceRuleList
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
data | array of NamespaceRule | non |
NamespaceRuleDetail
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | string (uuid) | non | |
country_id | string (uuid) | non | |
identifier_namespace | string | non | |
issuer_id | string (uuid) | non | |
format_pattern | string | non | |
uniqueness_scope | "country" | "jurisdiction" | "facility" | non | |
valid_from | string (date) | non | |
version | integer | non | |
created_at | string (date-time) | non | |
updated_at | string (date-time) | non | |
overlapping_rules | array of NamespaceRule | non |
SuspendCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
reason | string | oui | |
second_approver_id | string (uuid) | oui |
ReasonCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
reason | string | oui |
ReportList
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
reports | array of ReportList.reports.item | non |
Report
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
report_id | string | oui | |
title | string | oui | |
columns | array of string | oui | |
rows | array of object | oui | |
summary | object | oui | |
state | "rendered" | "no_authorized_data" | oui | |
generated_at | string (date-time) | oui | |
next_cursor | string | null | oui |
ExportCommand
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
format | "csv" | "pdf" | oui | |
filters | object | non |
ExportReceipt
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
export_id | string (uuid) | non | |
report_id | string | non | |
format | string | non | |
rows | integer | non | |
expires_at | string (date-time) | non | |
single_use | boolean | non | |
download_path | string | non |
HistoryEntry
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | string (uuid) | non | |
event_type | string | non | |
at | string (date-time) | non | |
status | string | null | non | |
previous_status | string | null | non | |
policy_domain | string | null | non | |
policy_version | string | null | non | |
reason | string | null | non | |
actor | string | null | non | |
requested_by | string | null | non | |
decision | string | null | non |
HistoryList
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
data | array of HistoryEntry | non |
SuspensionState
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
country_id | string (uuid) | non | |
status | CountryStatus | non | |
pending | SuspensionState.pending | non |
ReportList.reports.item défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | string | non | |
title | string | non |
SuspensionState.pending défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
requested_by | string | non | |
reason | string | non | |
at | string (date-time) | non |