Aller au contenu

← Tous les contrats

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)

Télécharger le contrat (YAML)

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

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

NomEmplacementTypeObligatoireDescription
cursorquerystringnon
page_sizequeryintegernon

Réponses

CodeDescriptionType de média
200Countries
application/json: CountryPage
401application/problem+json with the legacy `error` code
application/problem+json: Problem
403application/problem+json with the legacy `error` code
application/problem+json: Problem
GET/jurisdictions

Identifiant d’opération: listJurisdictionPolicies

Authentification: gatewayToken

Paramètres

NomEmplacementTypeObligatoireDescription
cursorquerystringnon
page_sizequeryintegernon

Réponses

CodeDescriptionType de média
200Policies
application/json: PolicyPage
POST/jurisdictions

Identifiant d’opération: createCountry

Authentification: gatewayToken

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Created
application/json: Country
409application/problem+json with the legacy `error` code
application/problem+json: Problem
422application/problem+json with the legacy `error` code
application/problem+json: Problem
POST/jurisdictions/{id}/policies

Identifiant d’opération: publishPolicy

Authentification: gatewayToken

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstringoui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Published
application/json: Policy
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/jurisdictions/namespace-rules

Identifiant d’opération: listNamespaceRules

Authentification: gatewayToken

Paramètres

NomEmplacementTypeObligatoireDescription
country_idquerystring (uuid)non

Réponses

CodeDescriptionType de média
200Rules newest first (capped at 500)
application/json: NamespaceRuleList
422application/problem+json with the legacy `error` code
application/problem+json: Problem
POST/jurisdictions/namespace-rules

Identifiant d’opération: createNamespaceRule

Authentification: gatewayToken

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Created
application/json: NamespaceRule
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/jurisdictions/namespace-rules/{ruleId}

Identifiant d’opération: getNamespaceRule

Authentification: gatewayToken

Paramètres

NomEmplacementTypeObligatoireDescription
ruleIdpathstringoui

Réponses

CodeDescriptionType de média
200Rule with overlapping rules
application/json: NamespaceRuleDetail
404application/problem+json with the legacy `error` code
application/problem+json: Problem
POST/jurisdictions/{id}/activate

Identifiant d’opération: activateCountry

Authentification: gatewayToken

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstringoui
Idempotency-Keyheaderstringoui

Réponses

CodeDescriptionType de média
200Activated
application/json: Country
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/jurisdictions/{id}/suspendLegacy one-step route; now only records a suspension request (dual control)

Identifiant d’opération: suspendCountryLegacy

Authentification: gatewayToken

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstringoui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Suspension requested
application/json: Country
404application/problem+json with the legacy `error` code
application/problem+json: Problem
409application/problem+json with the legacy `error` code
application/problem+json: Problem
422application/problem+json with the legacy `error` code
application/problem+json: Problem
POST/jurisdictions/{id}/reinstate

Identifiant d’opération: reinstateCountry

Authentification: gatewayToken

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstringoui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Reinstated
application/json: Country
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/jurisdictions/{id}/history

Identifiant d’opération: getCountryHistory

Authentification: gatewayToken

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstringoui

Réponses

CodeDescriptionType de média
200Audit trail oldest first
application/json: HistoryList
404application/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

NomEmplacementTypeObligatoireDescription
idpathstringoui

Réponses

CodeDescriptionType de média
200State
application/json: SuspensionState
404application/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

NomEmplacementTypeObligatoireDescription
idpathstringoui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Requested
application/json: Country
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/jurisdictions/{id}/suspension-request/approve

Identifiant d’opération: approveSuspension

Authentification: gatewayToken

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstringoui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Suspended
application/json: Country
403application/problem+json with the legacy `error` code
application/problem+json: Problem
409application/problem+json with the legacy `error` code
application/problem+json: Problem
POST/jurisdictions/{id}/suspension-request/withdraw

Identifiant d’opération: withdrawSuspension

Authentification: gatewayToken

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstringoui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Withdrawn or refused (back to active)
application/json: Country
409application/problem+json with the legacy `error` code
application/problem+json: Problem

reports

GET/jurisdictions/reports

Identifiant d’opération: listReports

Authentification: gatewayToken

Réponses

CodeDescriptionType de média
200Available reports
application/json: ReportList
403application/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

NomEmplacementTypeObligatoireDescription
reportIdpathstringoui
jurisdictionquerystringnon
statusquerystringnon
policy_domainquerystringnon
issuerquerystringnon
actorquerystringnon
datequerystringnon
period_fromquerystringnon
period_toquerystringnon
cursorquerystringnon

Réponses

CodeDescriptionType de média
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/jurisdictions/reports/{reportId}/export

Identifiant d’opération: exportReport

Authentification: gatewayToken

Paramètres

NomEmplacementTypeObligatoireDescription
reportIdpathstringoui
Idempotency-Keyheaderstringoui

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
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/jurisdictions/report-exports/{token}

Identifiant d’opération: downloadReportExport

Authentification: gatewayToken

Paramètres

NomEmplacementTypeObligatoireDescription
tokenpathstringoui

Réponses

CodeDescriptionType de média
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

Schémas

Problem

NomTypeObligatoireDescription
typestringnon
titlestringnon
statusintegernon
detailstringnon
errorstringouiunauthenticated | 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
messagestringoui
trace_idstringnon
detailsobjectnon

CountryStatus

"draft" | "reviewed" | "approved" | "active" | "suspension_requested" | "suspended" | "reinstated" | "superseded"

Country

NomTypeObligatoireDescription
idstring (uuid)oui
country_codestringoui
country_namestringoui
default_localestringoui
time_zonestringoui
issuing_authoritystring (uuid)oui
activation_datestring | null (date-time)non
statusCountryStatusoui
versionintegeroui
created_atstring (date-time)oui
updated_atstring (date-time)oui

CountryCommand

NomTypeObligatoireDescription
country_codestringoui
country_namestringoui
default_localestringoui
time_zonestringoui
issuing_authoritystring (uuid)oui
activation_datestring (date-time)non

CountryPage

NomTypeObligatoireDescription
dataarray of Countryoui
next_cursorstring | nulloui
page_sizeintegeroui

Policy

NomTypeObligatoireDescription
idstring (uuid)non
country_idstring (uuid)non
policy_domainstringnon
policy_versionstringnon
effective_fromstring (date-time)non
policy_documentstringnon
reviewer_idstring (uuid)non
reasonstringnon
statusstringnon
versionintegernon
created_atstring (date-time)non
updated_atstring (date-time)non

PolicyCommand

NomTypeObligatoireDescription
jurisdiction_idstring (uuid)oui
policy_domainstringoui
policy_versionstringoui
effective_fromstring (date-time)oui
policy_documentstringoui
reviewer_idstring (uuid)oui
reasonstringoui

PolicyPage

NomTypeObligatoireDescription
dataarray of Policynon
next_cursorstring | nullnon
page_sizeintegernon

NamespaceRule

NomTypeObligatoireDescription
idstring (uuid)non
country_idstring (uuid)non
identifier_namespacestringnon
issuer_idstring (uuid)non
format_patternstringnon
uniqueness_scope"country" | "jurisdiction" | "facility"non
valid_fromstring (date)non
versionintegernon
created_atstring (date-time)non
updated_atstring (date-time)non

NamespaceRuleCommand

NomTypeObligatoireDescription
country_idstring (uuid)oui
identifier_namespacestringoui
issuer_idstring (uuid)oui
format_patternstringoui
uniqueness_scope"country" | "jurisdiction" | "facility"oui
valid_fromstring (date)oui

NamespaceRuleList

NomTypeObligatoireDescription
dataarray of NamespaceRulenon

NamespaceRuleDetail

NomTypeObligatoireDescription
idstring (uuid)non
country_idstring (uuid)non
identifier_namespacestringnon
issuer_idstring (uuid)non
format_patternstringnon
uniqueness_scope"country" | "jurisdiction" | "facility"non
valid_fromstring (date)non
versionintegernon
created_atstring (date-time)non
updated_atstring (date-time)non
overlapping_rulesarray of NamespaceRulenon

SuspendCommand

NomTypeObligatoireDescription
reasonstringoui
second_approver_idstring (uuid)oui

ReasonCommand

NomTypeObligatoireDescription
reasonstringoui

ReportList

NomTypeObligatoireDescription
reportsarray of ReportList.reports.itemnon

Report

NomTypeObligatoireDescription
report_idstringoui
titlestringoui
columnsarray of stringoui
rowsarray of objectoui
summaryobjectoui
state"rendered" | "no_authorized_data"oui
generated_atstring (date-time)oui
next_cursorstring | nulloui

ExportCommand

NomTypeObligatoireDescription
format"csv" | "pdf"oui
filtersobjectnon

ExportReceipt

NomTypeObligatoireDescription
export_idstring (uuid)non
report_idstringnon
formatstringnon
rowsintegernon
expires_atstring (date-time)non
single_usebooleannon
download_pathstringnon

HistoryEntry

NomTypeObligatoireDescription
idstring (uuid)non
event_typestringnon
atstring (date-time)non
statusstring | nullnon
previous_statusstring | nullnon
policy_domainstring | nullnon
policy_versionstring | nullnon
reasonstring | nullnon
actorstring | nullnon
requested_bystring | nullnon
decisionstring | nullnon

HistoryList

NomTypeObligatoireDescription
dataarray of HistoryEntrynon

SuspensionState

NomTypeObligatoireDescription
country_idstring (uuid)non
statusCountryStatusnon
pendingSuspensionState.pendingnon

ReportList.reports.item défini sur place

NomTypeObligatoireDescription
idstringnon
titlestringnon

SuspensionState.pending défini sur place

NomTypeObligatoireDescription
requested_bystringnon
reasonstringnon
atstring (date-time)non