← Tous les contrats
OHN-07 Network Organization and Membership Registry
- Version
- 1.0.0
- OpenAPI
- 3.1.0
- Source dans le dépôt
modules/OHN-07/api/openapi.yaml- Serveurs
https://opeshealthnetwork.com/api/ohn/v1/network-registry
- Authentification
bearer: http bearer (JWT)
Télécharger le contrat (YAML)
Les contrats sont rédigés en anglais.
Authoritative registry of network organizations, hierarchy, member agreements and endpoints.
All paths are jurisdiction-scoped to the bearer principal. Every POST requires `Idempotency-Key`
(successful responses are replayed; key reuse with another body = 409). Version-checked writes take
`expected_version` and return 409 `concurrent_mutation` on a stale version. Errors: 401 unauthenticated,
403 denied_by_policy / separation_of_duties, 404 not_found, 409 concurrent_mutation / invalid_transition /
duplicate / membership_not_active / challenge_expired, 422 domain_validation_failed (zod `details`) /
untrusted_assessment / untrusted_certificate / challenge_mismatch / policy_refused, 429 rate_limited,
503 not_configured (names the OHN07_* setting) / dependency_unavailable / server_unavailable.
Opérations
Autres opérations
POST/auth/tokenSynthetic sign-in (404 unless OHN07_SYNTHETIC_AUTH=true and NODE_ENV!=production)
Réponses
| Code | Description | Type de média |
|---|
200 | token | — |
404 | disabled | — |
422 | invalid | — |
GET/configPolicy configuration
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
GET/dashboardP001 KPIs, status distribution, 14-day trend, exceptions
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
GET/organizationsList organizations
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
limit | query | integer | non | |
offset | query | integer | non | |
q | query | string | non | |
organization_type | query | string | non | |
state | query | MembershipState | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
POST/organizationsF001 organization application (creates organization + membership in state applied; emits organization.updated)
Identifiant d’opération: OHN-07-API-001
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
201 | created | — |
403 | other jurisdiction | — |
409 | duplicate registry_ref | — |
422 | validation | — |
503 | dependency or policy unavailable | — |
GET/organizations/treeP002 hierarchy (roots with nested children)
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
GET/organizations/{id}Organization detail with ancestors
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
404 | not in scope | — |
POST/organizations/{id}/amendAmend organization (cycle-safe parent change; emits organization.updated)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
409 | stale | — |
422 | cycle or validation | — |
GET/organizations/{id}/certificatesCertificate picker source: the organization's certificates held by OHN-39 (GET /api/ohn/v1/trust/certificates, organization-scoped). certificate_ref is the value POST /endpoints checks; usable = active, current/rollover/overlap and not expired. Audited (certificate.list).
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
404 | not in scope | — |
503 | OHN-39 unavailable | — |
GET/organizations/{id}/standingRouting decision for an organization (roles network_service
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | ok | |
GET/routing-decisionsRouting decision by organization_id or endpoint_url
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
organization_id | query | string (uuid) | non | |
endpoint_url | query | string | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | ok | |
GET/membershipsList memberships
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
state | query | MembershipState | non | |
limit | query | integer | non | |
offset | query | integer | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
POST/membershipsF002 membership approval — signs agreement version n+1 (trust_assessed → agreement_signed, or amendment while active)
Identifiant d’opération: OHN-07-API-002
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête (obligatoire)
Réponses
| Code | Description | Type de média |
|---|
201 | signed | — |
403 | role or separation_of_duties | — |
409 | state or version | — |
422 | untrusted_assessment or validation | — |
GET/memberships/{id}Membership with organization
Identifiant d’opération: OHN-07-API-003
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
404 | not in scope | — |
POST/memberships/{id}/transitionsW001 steps: documents_verified (officer), trust_assessed (reviewer, OHN-39 check), active (officer; emits membership.approved)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
403 | wrong role | — |
409 | invalid transition | — |
422 | untrusted | — |
POST/memberships/{id}/suspensionsF004 open suspension review (officer; active → suspension_review; routing blocked immediately)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête
Réponses
| Code | Description | Type de média |
|---|
201 | ok | — |
409 | not active | — |
POST/memberships/{id}/revokeRevoke (reviewer ≠ requester): disables endpoints, terminates agreements, emits membership.revoked; 200 when downstream confirmed, 202 when pending
Identifiant d’opération: OHN-07-API-004
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête
Réponses
| Code | Description | Type de média |
|---|
200 | downstream_notified | — |
202 | revoked | — |
403 | separation_of_duties | — |
POST/memberships/{id}/reinstateReinstate after review (reviewer ≠ requester)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête
Réponses
| Code | Description | Type de média |
|---|
200 | active again | — |
GET/agreementsList agreements
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
organization_id | query | string | non | |
status | query | "approved" | "terminated" | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
GET/agreements/diffP007 field diff between two agreement versions
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
organization_id | query | string | oui | |
from_version | query | integer | non | |
to_version | query | integer | non | |
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
GET/endpointsP006 server-paginated endpoint list (filters state, service_type, environment, organization_id, q; sort endpoint_url|state|certificate_expires_at|created_at, dir)
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
POST/endpointsF003 register endpoint (active member, OHN-39-trusted certificate, https)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Corps de la requête
Réponses
| Code | Description | Type de média |
|---|
201 | registered | — |
409 | membership_not_active | — |
422 | untrusted_certificate | — |
GET/endpoints/{id}Endpoint detail with probes and history
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
POST/endpoints/{id}/challengeW002 issue ownership challenge (officer); returns one-time token and publish_at
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Corps de la requête
Réponses
| Code | Description | Type de média |
|---|
200 | challenge_sent | — |
POST/endpoints/{id}/proveW002 submit challenge_response (officer)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | ownership_proved | — |
409 | challenge_expired | — |
422 | challenge_mismatch | — |
POST/endpoints/{id}/policy-checkW002 attestation checks (reviewer): OHN-39 certificate trusted and unexpired, environment permitted, https
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | policy_checked | — |
422 | policy_refused with checks | — |
POST/endpoints/{id}/enableW002 enable (reviewer)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | enabled | — |
POST/endpoints/{id}/disableDisable endpoint with reason
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | disabled | — |
POST/endpoints/{id}/probesRecord a reachability probe for an enabled endpoint (officer)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string (uuid) | oui | |
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
201 | recorded | — |
GET/auditAudit receipts (filter resource_id)
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
GET/outboxPending outbox events (status=all for all)
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
POST/outbox/dispatchRetry delivery of pending events (reviewer)
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | {published, pending} | — |
GET/reports/{id}R001/R002/R003 with metrics and provenance
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | "OHN-07-R001" | "OHN-07-R002" | "OHN-07-R003" | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | ok | — |
404 | unknown | — |
POST/reports/{id}/exportSigned CSV/PDF export (HMAC-SHA256, OHN07_EXPORT_SIGNING_KEY); returns single-use 5-minute retrieval path
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
id | path | string | oui | |
Idempotency-Key | header | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
201 | ok | — |
503 | not_configured | — |
GET/exports/{token}Download once (same principal); X-OHN-Export-Signature header
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|
token | path | string | oui | |
Réponses
| Code | Description | Type de média |
|---|
200 | file | — |
404 | expired or used | — |
Schémas
Receipt
| Nom | Type | Obligatoire | Description |
|---|
receipt_id | Uuid | oui | |
committed_at | string (date-time) | oui | |
aggregate_type | string | oui | |
aggregate_id | string | oui | |
version | integer | oui | |
status | "committed" | "pending" | oui | |
Error
| Nom | Type | Obligatoire | Description |
|---|
error | string | oui | |
message | string | non | |
details | object | non | |
setting | string | non | |
MembershipState
"applied" | "documents_verified" | "trust_assessed" | "agreement_signed" | "active" | "suspension_review" | "revoked" | "downstream_notified"
EndpointState
"registered" | "challenge_sent" | "ownership_proved" | "policy_checked" | "enabled" | "disabled"
OrganizationApplication
| Nom | Type | Obligatoire | Description |
|---|
legal_name | string | oui | |
jurisdiction_id | Uuid | oui | |
organization_type | string | oui | Member of OHN07_ORGANIZATION_TYPES. |
registry_ref | string | oui | Must resolve in OHN-05. |
accountable_officer | Uuid | oui | |
terms_version | string | oui | |
parent_organization_id | Uuid | null | non | |
OrganizationAmend
| Nom | Type | Obligatoire | Description |
|---|
legal_name | string | non | |
organization_type | string | non | |
registry_ref | string | non | |
accountable_officer | Uuid | non | |
terms_version | string | non | |
parent_organization_id | Uuid | null | non | |
expected_version | integer | oui | |
reason | string | oui | |
MembershipApproval
| Nom | Type | Obligatoire | Description |
|---|
organization_id | Uuid | oui | |
agreement_ref | Uuid | oui | |
trust_assessment_id | Uuid | oui | |
approved_scope | string | oui | |
reviewer | Uuid | oui | Must equal the bearer principal. |
expected_version | integer | oui | |
Transition
| Nom | Type | Obligatoire | Description |
|---|
to_state | "documents_verified" | "trust_assessed" | "active" | oui | |
expected_version | integer | oui | |
reason | string | oui | |
trust_assessment_id | Uuid | non | |
Suspension
| Nom | Type | Obligatoire | Description |
|---|
organization_id | Uuid | oui | |
suspension_reason | string | oui | |
effective_at | string (date-time) | oui | |
affected_endpoints | string | oui | |
expected_version | integer | oui | |
Decision
| Nom | Type | Obligatoire | Description |
|---|
expected_version | integer | oui | |
reason | string | oui | |
EndpointRegistration
| Nom | Type | Obligatoire | Description |
|---|
organization_id | Uuid | oui | |
endpoint_url | string (uri) | oui | |
service_type | string | oui | |
environment | string | oui | |
certificate_ref | Uuid | oui | |
jurisdiction_id | Uuid | oui | |
Step
| Nom | Type | Obligatoire | Description |
|---|
expected_version | integer | oui | |
Standing
Routing decision contract v1.0.0 for clinical gateways (OHN-20 etc.). Never cache beyond cache_ttl_seconds (0).
| Nom | Type | Obligatoire | Description |
|---|
contract_version | "1.0.0" | oui | |
organization_id | Uuid | oui | |
jurisdiction_id | Uuid | non | |
legal_name | string | non | |
membership_state | MembershipState | "none" | oui | |
trust_tier | string | null | non | |
membership_active | boolean | non | |
routable | boolean | oui | true only if membership active AND at least one enabled endpoint with unexpired certificate. |
reason | "active_member" | "no_enabled_endpoint" | "not_a_member" | "unknown_endpoint" | "membership_applied" | "membership_documents_verified" | "membership_trust_assessed" | "membership_agreement_signed" | "membership_suspension_review" | "membership_revoked" | "membership_downstream_notified" | "endpoint_registered" | … | oui | |
enabled_endpoints | array of Standing.enabled_endpoints.item | oui | |
evaluated_at | string (date-time) | oui | |
cache_ttl_seconds | 0 | oui | |
Standing.enabled_endpoints.item défini sur place
| Nom | Type | Obligatoire | Description |
|---|
id | string | non | |
endpoint_url | string | non | |
service_type | string | non | |
environment | string | non | |
certificate_expires_at | string | null | non | |