Aller au contenu

← Tous les contrats

OHN-16 Authorization and Policy Decision Engine

Version
1.3.0
OpenAPI
3.1.0
Source dans le dépôt
modules/OHN-16/api/openapi.yaml
Serveurs
https://opeshealthnetwork.com
Authentification
bearerAuth: http bearer (JWT)

Télécharger le contrat (YAML)

Les contrats sont rédigés en anglais.

Deny-by-default policy decision point and policy release workflow. Built and tested with synthetic data. Real-patient use requires accepted OHN-01/05/06/15/38 integrations and the legal, privacy and safety authorizations named in governance/IMPLEMENTATION_AUTHORIZATION.md.

Opérations

Decisions

OHN-16-API-001 and the decision explorer

GET/api/ohn/v1/access/decisions

Identifiant d’opération: ohn16_listDecisions

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
decisionquery"permit" | "deny" | "indeterminate"non
resource_typequerystringnon
simulatedquery"true" | "false"non
cursorquerystringnonOpaque cursor from next_cursor.

Réponses

CodeDescriptionType de média
200Page of decisions, newest first; patient references are masked
application/json: Page
401Missing, invalid or expired bearer token
application/json: Error
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
429Per-principal rate limit exceeded
application/json: Error
POST/api/ohn/v1/access/decisions

Evaluates a request against the published policy and records the decision, obligations, workflow trail and audit receipt. A deny or indeterminate result is a successful evaluation (HTTP 200); a permit is HTTP 201. Callers must treat indeterminate as deny and must not cache decisions (cache.ttl_seconds is 0).

Identifiant d’opération: ohn16_decideAccess

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Denied or indeterminate
application/json: DecisionResult
201Permitted
application/json: DecisionResult
400Malformed request or missing Idempotency-Key
application/json: Error
401Missing, invalid or expired bearer token
application/json: Error
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
409Stale expected_version, invalid state transition, or idempotency key reuse. No partial change is made.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
429Per-principal rate limit exceeded
application/json: Error
503Database or dependency unavailable; nothing was changed
application/json: Error
GET/api/ohn/v1/access/decisions/{id}

Identifiant d’opération: ohn16_getDecision

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Decision with trace, obligations and workflow history
application/json: DecisionResult
401Missing, invalid or expired bearer token
application/json: Error
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error

Policies

OHN-16-API-002, OHN-16-API-003 and the release workflow OHN-16-W001

GET/api/ohn/v1/policies

Identifiant d’opération: ohn16_listPolicies

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
statequery"draft" | "peer_review" | "simulation_passed" | "dual_approved" | "published" | "deprecated" | "revoked"non
cursorquerystringnonOpaque cursor from next_cursor.

Réponses

CodeDescriptionType de média
200Page of policy bundles in the caller's jurisdiction and organization
application/json: Page
401Missing, invalid or expired bearer token
application/json: Error
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
429Per-principal rate limit exceeded
application/json: Error
POST/api/ohn/v1/policies

Identifiant d’opération: ohn16_createPolicyDraft

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Draft created
application/json: BundleWithReceipt
400Malformed request or missing Idempotency-Key
application/json: Error
401Missing, invalid or expired bearer token
application/json: Error
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
409Stale expected_version, invalid state transition, or idempotency key reuse. No partial change is made.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
GET/api/ohn/v1/policies/{id}

Identifiant d’opération: ohn16_getPolicy

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Bundle with rules and release history
application/json: Bundle
401Missing, invalid or expired bearer token
application/json: Error
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
GET/api/ohn/v1/policies/{id}/diff

Identifiant d’opération: ohn16_diffPolicy

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui

Réponses

CodeDescriptionType de média
200Rule and setting differences against the superseded or currently published bundle
application/json: object
401Missing, invalid or expired bearer token
application/json: Error
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
POST/api/ohn/v1/policies/{id}/rules

Adds a rule to a draft. Only the author may edit; rules are immutable once the bundle leaves draft (also enforced by a database trigger).

Identifiant d’opération: ohn16_addPolicyRule

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Rule added
application/json: object
401Missing, invalid or expired bearer token
application/json: Error
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
409Stale expected_version, invalid state transition, or idempotency key reuse. No partial change is made.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
POST/api/ohn/v1/policies/{id}/rules/{ruleId}/remove

Identifiant d’opération: ohn16_removePolicyRule

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
ruleIdpathstring (uuid)oui
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Rule removed
application/json: object
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
409Stale expected_version, invalid state transition, or idempotency key reuse. No partial change is made.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
POST/api/ohn/v1/policies/{id}/submit

draft -> peer_review. Refused (422 domain_refusal) for a bundle without rules.

Identifiant d’opération: ohn16_submitPolicy

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Submitted
application/json: BundleWithReceipt
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
409Stale expected_version, invalid state transition, or idempotency key reuse. No partial change is made.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
POST/api/ohn/v1/policies/{id}/run-fixtures

Runs every active fixture. In peer_review a clean run advances the bundle to simulation_passed and records the run as test evidence. Refused (422 negative_tests_missing) unless at least one fixture expects deny or indeterminate.

Identifiant d’opération: ohn16_runPolicyFixtures

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Run recorded
application/json: object
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
409Stale expected_version, invalid state transition, or idempotency key reuse. No partial change is made.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
POST/api/ohn/v1/policies/{id}/simulate

Evaluates a request against the named bundle in any state. Recorded with simulated=true; never creates a grant, exception or access.denied event.

Identifiant d’opération: ohn16_simulatePolicy

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Simulated decision
application/json: DecisionResult
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
429Per-principal rate limit exceeded
application/json: Error
POST/api/ohn/v1/policies/{id}/approve

Records one of two approvals on a simulation_passed bundle. The author can never approve and one reviewer cannot give both (403 dual_control_violation).

Identifiant d’opération: ohn16_approvePolicy

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Approval recorded
application/json: BundleWithReceipt
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
409Stale expected_version, invalid state transition, or idempotency key reuse. No partial change is made.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
POST/api/ohn/v1/policies/{id}/reject

Returns a bundle in review to draft and clears its evidence and approvals.

Identifiant d’opération: ohn16_rejectPolicy

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Returned to draft
application/json: BundleWithReceipt
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
409Stale expected_version, invalid state transition, or idempotency key reuse. No partial change is made.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
POST/api/ohn/v1/policies/{id}/publish

dual_approved -> published. The publisher restates the evidence; anything that differs from the recorded regression run and approvals is refused. The previous published bundle becomes deprecated and is recorded as rollback_ref. Emits policy.published and access.policy-version.changed through the transactional outbox.

Identifiant d’opération: ohn16_publishPolicy

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Published; downstream delivery is pending confirmation
application/json: BundleWithReceipt
400Malformed request or missing Idempotency-Key
application/json: Error
401Missing, invalid or expired bearer token
application/json: Error
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
409Stale expected_version, invalid state transition, or idempotency key reuse. No partial change is made.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
429Per-principal rate limit exceeded
application/json: Error
503Database or dependency unavailable; nothing was changed
application/json: Error
POST/api/ohn/v1/policies/{id}/revoke

published -> revoked. Nothing replaces the bundle automatically, so every decision denies (no_published_policy) until another bundle is published.

Identifiant d’opération: ohn16_revokePolicy

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Revoked
application/json: BundleWithReceipt
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
409Stale expected_version, invalid state transition, or idempotency key reuse. No partial change is made.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error

Fixtures

GET/api/ohn/v1/access/fixtures

Identifiant d’opération: ohn16_listFixtures

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
cursorquerystringnonOpaque cursor from next_cursor.

Réponses

CodeDescriptionType de média
200Page of fixtures
application/json: Page
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
POST/api/ohn/v1/access/fixtures

Identifiant d’opération: ohn16_createFixture

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Fixture created
application/json: object
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
POST/api/ohn/v1/access/fixtures/{id}/retire

Identifiant d’opération: ohn16_retireFixture

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Fixture retired
application/json: object
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
409Stale expected_version, invalid state transition, or idempotency key reuse. No partial change is made.
application/json: Error
GET/api/ohn/v1/access/fixture-runs

Identifiant d’opération: ohn16_listFixtureRuns

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
releasequerystringnon
resource_typequerystringnon
cursorquerystringnonOpaque cursor from next_cursor.

Réponses

CodeDescriptionType de média
200Same content as report OHN-16-R002
application/json: Report
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error

Relationships

GET/api/ohn/v1/access/relationships

Identifiant d’opération: ohn16_listRelationships

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
cursorquerystringnonOpaque cursor from next_cursor.

Réponses

CodeDescriptionType de média
200Page of relationship assertions; patient references are masked
application/json: Page
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
POST/api/ohn/v1/access/relationships

Registers a time-bounded clinical relationship (role relationship_registrar). Until OHN-06 integration this is the only source of relationship facts. The 201 body is the assertion (id, version, status, valid_from, expires_at, evidence_ref, asserted_by, receipt); a caller keeps id and version to revoke it. OHN-32 registers with its service identity as relationship_registrar (see its ADRs). 1.3.0 (owner decision 2026-11-29): role care_team_registrar, purpose relationship_registration, the OHN-61 triage service identity, in the organisation scope of the ticket's facility. It may register only relationship_type care_team (another type answers 403 forbidden, details.reason relationship_type_not_permitted) and only with expires_at at most 72 hours after valid_from (more answers 422 domain_validation_failed, details.fieldErrors.expires_at). It implies no other action (no decisions, no reads). OHN-61 registers one care_team assertion per receiving clinician, when the clinician takes up the ticket (call, start of consultation, handover acknowledgement, summary) or when the handover names them: actor_ref = the clinician's OHN-06 practitioner id (from their own token), patient_ref = the triage patient, facility_ref = the ticket's facility, evidence_ref = the OHN-61 ticket id, valid_from = now - 1 minute, expires_at = valid_from + the facility's OHN-61 care_team_relationship_hours (default 24). Audited here as relationship.register.

Identifiant d’opération: ohn16_registerRelationship

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Assertion registered
application/json: object
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
POST/api/ohn/v1/access/relationships/{id}/revoke

Revokes an assertion (role relationship_registrar; 1.3.0: also care_team_registrar, for assertions it registered itself only: asserted_by must be the caller, otherwise 404 not_found, never disclosing the assertion). expected_version is the assertion's current version; a second revoke answers 409 already_revoked, which a service caller such as OHN-61 treats as done. Audited as relationship.revoke.

Identifiant d’opération: ohn16_revokeRelationship

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Assertion revoked; later decisions deny with relationship_revoked
application/json: object
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
409Stale expected_version, invalid state transition, or idempotency key reuse. No partial change is made.
application/json: Error

Emergency

OHN-16-W003

GET/api/ohn/v1/access/emergency-exceptions

Identifiant d’opération: ohn16_listEmergencyExceptions

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
cursorquerystringnonOpaque cursor from next_cursor.

Réponses

CodeDescriptionType de média
200Page of emergency exceptions
application/json: Page
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
POST/api/ohn/v1/access/emergency-exceptions/{id}/review

bounded_grant -> post_review. The reviewer must not be the person the grant was for.

Identifiant d’opération: ohn16_reviewEmergencyException

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
idpathstring (uuid)oui
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200Review recorded
application/json: object
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
409Stale expected_version, invalid state transition, or idempotency key reuse. No partial change is made.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error

Reports

GET/api/ohn/v1/access/reports/{reportId}

OHN-16-R001 decision distribution (filters country, facility, from, to, action), OHN-16-R002 authorization regression (release, resource_type), OHN-16-R003 privileged policy changes (from, to, author). A country other than the caller's returns no rows. Metric formulas are in modules/OHN-16/adr/0005-report-formulas.md.

Identifiant d’opération: ohn16_getReport

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
reportIdpath"OHN-16-R001" | "OHN-16-R002" | "OHN-16-R003"oui
countryquerystring (uuid)non
facilityquerystring (uuid)non
fromquerystring (date-time)non
toquerystring (date-time)non
actionquerystringnon
authorquerystring (uuid)non
releasequerystringnon
resource_typequerystringnon
cursorquerystringnonOpaque cursor from next_cursor.

Réponses

CodeDescriptionType de média
200Report
application/json: Report
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
POST/api/ohn/v1/access/reports/{reportId}/export

Creates a signed CSV or PDF export, audited, retrievable only by the same principal for five minutes.

Identifiant d’opération: ohn16_createExport

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
reportIdpath"OHN-16-R001" | "OHN-16-R002" | "OHN-16-R003"oui
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Export ready
application/json: object
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
GET/api/ohn/v1/access/exports/{token}

Identifiant d’opération: ohn16_downloadExport

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
tokenpathstringoui

Réponses

CodeDescriptionType de média
200The export file; every download is audited
application/json: object
401Missing, invalid or expired bearer token
application/json: Error
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
410Export link expired
application/json: Error
500Export failed its integrity check (export_integrity_failed)
application/json: Error

Support

GET/api/ohn/v1/access/vocabulary

Identifiant d’opération: ohn16_getVocabulary

Authentification: bearerAuth

Réponses

CodeDescriptionType de média
200Controlled vocabularies used by the forms (ADR-0001)
application/json: object
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
GET/api/ohn/v1/access/context

Identifiant d’opération: ohn16_getCallerContext

Authentification: bearerAuth

Réponses

CodeDescriptionType de média
200The caller's tenant, role and permitted actions
application/json: object
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
POST/api/ohn/v1/access/synthetic/actors

Seeds the OHN-05/06 test fake. Returns 404 unless the service runs with synthetic dependencies.

Identifiant d’opération: ohn16_seedSyntheticActor

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Fake actor stored in memory
application/json: object
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
POST/api/ohn/v1/access/synthetic/consents

Seeds the OHN-15 test fake. Returns 404 unless the service runs with synthetic dependencies.

Identifiant d’opération: ohn16_seedSyntheticConsent

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
201Fake consent stored in memory
application/json: object
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error

Marks

Enforcement of the watermark_export obligation: document marks (security watermark) for printouts and exports, and their public verification

POST/api/ohn/v1/access/marks

Asked before every printout or export. Evaluates an "export" of the named resource against the published policy and answers whether the security watermark is required: when the permit carries the obligation watermark_export, and also when the decision is deny or indeterminate or cannot be evaluated at all (fail closed). Only a permit without the obligation answers required=false. A required mark carries a verification code that /access/marks/verify resolves, an Ed25519 signature over the canonical payload, and the OHN-45 registration when OHN-45 answers. Facilities cannot switch the mark off. Roles: document_printer (purpose document_marking; actor and facility are the token's own) and policy_enforcement_point (purpose access_enforcement; marks a download on behalf of actor_ref at facility_ref, used by the platform export filter). 1.2.0 (2026-11-23): role inspection_printer (purpose inspection_marking), the read-only inspector's print-only grant, marks like a document_printer; its mark is always issued (basis inspection_copy when the policy would not require it) and the text ends with " · INSPECTION COPY". The enforcement point asks for the same with inspection_copy=true (the platform export filter does so for an inspector's download). The public verification answers inspection_copy.

Identifiant d’opération: ohn16_issueMark

Authentification: bearerAuth

Paramètres

NomEmplacementTypeObligatoireDescription
Idempotency-KeyheaderstringouiSame key and payload replays the stored response (Idempotent-Replay true); same key with a different payload is 409.

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200No mark required (permit without watermark_export)
application/json: MarkResult
201Mark required and issued
application/json: MarkResult
401Missing, invalid or expired bearer token
application/json: Error
403Denied by role, purpose of use, tenant scope or dual control. The denial is audited.
application/json: Error
409Stale expected_version, invalid state transition, or idempotency key reuse. No partial change is made.
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
429Per-principal rate limit exceeded
application/json: Error
POST/api/ohn/v1/access/marks/verify

Public check of the verification code printed in a security watermark (no sign-in, rate limited per address). Answers only what the paper shows: who printed it, the facility code, when, the channel and the title. result is valid (local signature and OHN-45 agree), unverified (recorded but unsigned, unregistered or OHN-45 unavailable) or invalid. Every check is recorded.

Identifiant d’opération: ohn16_verifyMark

Corps de la requête (obligatoire)

Réponses

CodeDescriptionType de média
200The recorded mark
application/json: MarkVerification
404Not found in the caller's scope (also returned for unknown routes)
application/json: Error
422Field validation failure or domain refusal; details names the fields
application/json: Error
429Per-principal rate limit exceeded
application/json: Error

Schémas

Error

Machine code in `error` (unauthenticated, forbidden, not_found, domain_validation_failed, invalid_filter, version_conflict, invalid_transition, dual_control_violation, conflict, idempotency_key_required, idempotency_key_reused, request_in_progress, rate_limited, dependency_unavailable, ...). The Java service answers application/problem+json and adds type, title, status, detail and trace_id.

NomTypeObligatoireDescription
errorstringoui
messagestringnon
detailsanynon422 domain_validation_failed: {formErrors: string[], fieldErrors: {field: string[]}} (zod flatten, unknown keys are a form error); 422 invalid_filter: the same shape; 422 for a rule condition: {conditions: string[]}; 409 version_conflict: {current_version}; 409 invalid_transition: {state, allowed_from}; 503: none.

Decision

"permit" | "deny" | "indeterminate"

BundleState

"draft" | "peer_review" | "simulation_passed" | "dual_approved" | "published" | "deprecated" | "revoked"

ResourceType

"patient_record" | "clinical_document" | "observation" | "medication" | "encounter" | "consent_record" | "patient_export" | "search_index" | "policy_bundle" | "jurisdiction_config" | "audit_log" | "report_export"

Action

"read" | "create" | "update" | "delete" | "export" | "search" | "share"

Purpose

"treatment" | "payment" | "operations" | "public_health" | "research" | "patient_access" | "emergency_treatment" | "administration"

PolicyEffect

"permit" | "deny" | "emergency_permit"

ObligationType

"audit_access" | "mask_fields" | "notify_patient" | "require_post_review" | "limit_scope" | "watermark_export"

Receipt

NomTypeObligatoireDescription
receipt_idstring (uuid)oui
committed_atstring (date-time)oui
aggregate_idstring (uuid)oui
aggregate_typestringoui
versionintegeroui
status"committed" | "denied" | "pending"oui

Page

NomTypeObligatoireDescription
itemsarray of objectoui
next_cursorstring | nulloui

ApprovalCommand

NomTypeObligatoireDescription
expected_versionintegeroui
commentstringnon

ExceptionReviewCommand

NomTypeObligatoireDescription
expected_versionintegeroui
outcome"justified" | "not_justified"oui
reasonstringoui

ExportCommand

NomTypeObligatoireDescription
format"csv" | "pdf"oui
filtersobjectnon

SyntheticActorCommand

NomTypeObligatoireDescription
actor_refstring (uuid)oui
rolesarray of stringoui
facility_refsarray of string (uuid)oui
status"active" | "suspended"non

SyntheticConsentCommand

NomTypeObligatoireDescription
patient_refstring (uuid)oui
purposePurposeoui
status"granted" | "withdrawn" | "unknown"oui

MarkCommand

NomTypeObligatoireDescription
channel"print" | "csv" | "pdf" | "json"oui
resource_typeResourceTypeoui
resource_refstring (uuid)oui
patient_refstring (uuid)non
purposePurposeoui
facility_codestringnonThe OHN-05 facility code printed in the mark
document_titlestringnon
document_sha256stringnon
actor_refstring (uuid)nonpolicy_enforcement_point only (required there); a document_printer is always the token subject.
actor_namestringnonpolicy_enforcement_point only; a document_printer's name is the attested display_name of the token.
facility_refstring (uuid)nonpolicy_enforcement_point only (required there); a document_printer is always marked at the token's organization.
inspection_copybooleannonpolicy_enforcement_point only (1.2.0): the download is a read-only inspector's copy; the mark is always issued and says INSPECTION COPY

MarkResult

NomTypeObligatoireDescription
requiredbooleanoui
basis"policy_obligation" | "fail_closed" | "no_obligation" | "inspection_copy"oui
basis_reasonstringnon
decisionstring | nullnon
decision_idstring | null (uuid)non
receiptReceiptnon
event_idstring (uuid)non
markMarkResult.marknon

MarkVerifyCommand

NomTypeObligatoireDescription
codestringoui

MarkVerification

NomTypeObligatoireDescription
codestringoui
result"valid" | "unverified" | "invalid"oui
signature"verified_by_ohn45" | "signed_not_registered" | "registry_unavailable" | "unsigned" | "invalid"oui
printed_bystringnon
facility_codestring | nullnon
printed_atstring (date-time)non
channel"print" | "csv" | "pdf" | "json"non
document_titlestring | nullnon
copybooleannon
messagestringnon

DecisionRequest

OHN-16-F002. patient_ref is required for patient-data resource types; unknown resource types are treated as patient data.

NomTypeObligatoireDescription
actor_refstring (uuid)oui
patient_refstring (uuid)non
resource_refstring (uuid)oui
resource_typeResourceTypeoui
actionActionoui
facility_refstring (uuid)ouiA claim until the directory confirms the affiliation.
purposePurposeoui
relationship_evidencestring (uuid)non
resource_facility_refstring (uuid)non
emergencyDecisionRequest.emergencynon

DecisionResult

NomTypeObligatoireDescription
idstring (uuid)oui
decisionDecisionoui
reason_codestringoui
simulatedbooleanoui
patient_ref_maskedstring | nullouiLast four characters only.
policy_bundle_idstring | null (uuid)oui
policy_versionstring | nulloui
matched_rule_idstring | null (uuid)oui
failed_clausestring | nulloui
obligationsarray of DecisionResult.obligations.itemoui
tracearray of DecisionResult.trace.itemnon
workflow_state"authenticated" | "context_resolved" | "country_policy_applied" | "permit_or_deny" | "obligations_recorded"oui
emergency_exception_idstring | null (uuid)non
grant_expires_atstring | null (date-time)oui
receiptReceiptnon
event_idstring | null (uuid)non
cacheDecisionResult.cachenon

BundleCreateCommand

NomTypeObligatoireDescription
namestringoui
revisionstringoui
change_summarystringoui
emergency_grant_minutesintegernonNo default. When absent
consent_required_for_phibooleannon
clone_fromstring (uuid)non

RuleCommand

OHN-16-F001

NomTypeObligatoireDescription
jurisdiction_idstring (uuid)ouiMust equal the authenticated jurisdiction.
resource_typeResourceTypeoui
actionActionoui
purposePurposeoui
subject_conditionstringouiCondition language of ADR-0002.
resource_conditionstringoui
policy_effectPolicyEffectoui
obligationsarray of RuleCommand.obligations.itemnon
expected_versionintegeroui

PublishCommand

OHN-16-F003

NomTypeObligatoireDescription
policy_bundle_idstring (uuid)oui
revisionstringoui
test_evidence_refstring (uuid)oui
reviewer_astring (uuid)oui
reviewer_bstring (uuid)oui
effective_atstring (date-time)ouiBetween the second approval and now; scheduled activation is not supported.
expected_versionintegeroui

VersionedCommand

NomTypeObligatoireDescription
expected_versionintegeroui

ReasonedCommand

NomTypeObligatoireDescription
expected_versionintegeroui
reasonstringoui

RelationshipCommand

NomTypeObligatoireDescription
actor_refstring (uuid)oui
patient_refstring (uuid)oui
facility_refstring (uuid)oui
relationship_type"treating" | "consulting" | "care_team" | "administrative"oui
valid_fromstring (date-time)oui
expires_atstring (date-time)ouiMust be after valid_from. Relationships are always time-bounded.
evidence_refstring (uuid)oui

FixtureCommand

NomTypeObligatoireDescription
namestringoui
requestDecisionRequestouiOHN-16-F002. patient_ref is required for patient-data resource types; unknown resource types are treated as patient data.
contextFixtureCommand.contextoui
expected_decisionDecisionoui

Bundle

NomTypeObligatoireDescription
idstring (uuid)oui
stateBundleStateoui
versionintegeroui
rulesarray of objectnon
historyarray of objectnon

BundleWithReceipt

NomTypeObligatoireDescription
idstring (uuid)oui
stateBundleStateoui
versionintegeroui
rulesarray of objectnon
historyarray of objectnon
receiptReceiptoui
event_idsarray of string (uuid)non
delivery"pending_downstream_confirmation"non

Report

NomTypeObligatoireDescription
report_id"OHN-16-R001" | "OHN-16-R002" | "OHN-16-R003"oui
columnsarray of stringoui
rowsarray of objectoui
next_cursorstring | nulloui
summaryobjectoui
state"rendered" | "no_authorized_data"oui
generated_atstring (date-time)oui

MarkResult.mark défini sur place

NomTypeObligatoireDescription
idstring (uuid)oui
verify_codestringoui
verify_pathstringoui
channel"print" | "csv" | "pdf" | "json"oui
printed_bystringoui
facility_codestring | nullnon
printed_atstring (date-time)oui
textstringoui"Printed by <name>, <facility code>, <date-time> · COPY · Verify <code>"
signature"unsigned" | "signed_not_registered" | "signed_and_registered"oui

DecisionRequest.emergency défini sur place

NomTypeObligatoireDescription
reasonstringoui

DecisionResult.obligations.item défini sur place

NomTypeObligatoireDescription
typeObligationTypeoui
parametersobjectoui

DecisionResult.trace.item défini sur place

NomTypeObligatoireDescription
stepstringoui
outcome"ok" | "deny" | "indeterminate" | "info"oui
detailstringoui

DecisionResult.cache défini sur place

NomTypeObligatoireDescription
ttl_seconds0oui

RuleCommand.obligations.item défini sur place

NomTypeObligatoireDescription
typeObligationTypeoui
parametersobjectnon

FixtureCommand.context défini sur place

NomTypeObligatoireDescription
jurisdiction"active" | "unavailable"non
actorobject | nulloui
relationshipobject | nulloui
consent"granted" | "withdrawn" | "unknown" | "unavailable"oui