OHN-53 Notifications and Messaging
- Version
- 1.0.1
- OpenAPI
- 3.1.0
- Source dans le dépôt
modules/OHN-53/api/openapi.yaml- Serveurs
https://opeshealthnetwork.com- Authentification
bearer: http bearer (JWT (ES256 from the platform gateway; iss ohn-platform-gateway, aud ohn-53; role + purpose + jurisdiction + organization_id))
Les contrats sont rédigés en anglais.
In-app inbox, SMS, email and USSD. Local dev sink by default (no live SMS or email adapter exists: provider contracts and credentials are owner items). No clinical content in SMS or email. Tokens come from the platform gateway (ES256, issuer ohn-platform-gateway, audience ohn-53; claims role, jurisdiction, organization_id, purpose). Every call except GET /health/ohn-53 and the two secret-authenticated callbacks (POST /api/ohn/v1/ussd, POST .../intake/webhook) needs a bearer token; every non-GET call needs an Idempotency-Key (1-255 characters, not blank) except those two callbacks. The operator kill switch refuses every gateway write with 503 not_configured (setting OHN_M53_WRITES_DISABLED).
Opérations
- Autres opérations (31)
Autres opérations
GET/api/ohn/v1/notifications/inboxList my notifications and unread count
In-app messages are rendered at read time in the requested language (lang query parameter, else Accept-Language, else the language each message was sent in). Messages stored before migration 0002 have no template key and are returned in the language they were sent in (`language`).
Identifiant d’opération: OHN-53-API-001
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
unread | query | "true" | "false" | non | |
limit | query | integer | non | |
lang | query | "en" | "fr" | non | Language of title/body. Overrides Accept-Language. |
Accept-Language | header | string | non | Used when lang is absent; the first en or fr entry by weight wins. |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: get-api-ohn-v1-notifications-inbox.response-200 |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
422 | Validation failed | application/json: Error |
503 | Not configured or dependency unavailable (fail closed) | — |
POST/api/ohn/v1/notifications/inbox/{id}/readMark one as read
Identifiant d’opération: OHN-53-API-002
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui | |
id | path | string | oui |
Corps de la requête (obligatoire)
application/json:object
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
409 | idempotency_conflict (the key was reused with a different body) or request_in_progress | application/json: Error |
422 | Validation failed | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
POST/api/ohn/v1/notifications/inbox/read-allMark all as read
Identifiant d’opération: OHN-53-API-003
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:object
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
409 | idempotency_conflict (the key was reused with a different body) or request_in_progress | application/json: Error |
422 | Validation failed | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
GET/api/ohn/v1/notifications/preferencesMy preferences
Identifiant d’opération: OHN-53-API-004
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
422 | Validation failed | application/json: Error |
503 | Not configured or dependency unavailable (fail closed) | — |
PUT/api/ohn/v1/notifications/preferencesUpdate my preferences (optimistic concurrency)
Identifiant d’opération: OHN-53-API-005
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:Preferences
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
409 | version_conflict: {error, message, details: {current_version}} | application/json: Error |
422 | Validation failed | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
GET/api/ohn/v1/notifications/contactsMy contacts
Identifiant d’opération: OHN-53-API-006
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
503 | Not configured or dependency unavailable (fail closed) | — |
POST/api/ohn/v1/notifications/contactsAdd a phone or email and send a code
Identifiant d’opération: OHN-53-API-007
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:StartContact
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Created | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
409 | contact_in_use (verified for someone else) or already_verified (the caller already verified it) | application/json: Error |
422 | Validation failed | application/json: Error |
429 | rate_limited: too many codes requested in the last hour (default 5) | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
POST/api/ohn/v1/notifications/contacts/{id}/resendSend a new code
Identifiant d’opération: OHN-53-API-008
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui | |
id | path | string | oui |
Corps de la requête (obligatoire)
application/json:object
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Created | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | No pending contact of the caller with this id | application/json: Error |
409 | contact_in_use or already_verified | application/json: Error |
422 | Validation failed | application/json: Error |
429 | rate_limited | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
POST/api/ohn/v1/notifications/contacts/{id}/verifyVerify with the code
Identifiant d’opération: OHN-53-API-009
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui | |
id | path | string | oui |
Corps de la requête (obligatoire)
application/json:ConfirmContact
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Verified, or already verified ({contact, duplicate: true}) | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
409 | invalid_state (revoked contact) or contact_in_use (the number was verified for another account meanwhile) | application/json: Error |
410 | code_expired: no open challenge or it has expired (10 minutes by default); ask for a new code | application/json: Error |
422 | domain_validation_failed (not 6 digits) or wrong_code: {error: wrong_code, message, attempts_left}; the attempt is counted | application/json: Error | post-api-ohn-v1-notifications-contacts-id-verify.response-422.option-2 |
429 | too_many_attempts: five wrong codes (configurable); ask for a new code | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
POST/api/ohn/v1/notifications/contacts/{id}/revokeRemove a contact
Identifiant d’opération: OHN-53-API-010
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui | |
id | path | string | oui |
Corps de la requête (obligatoire)
application/json:object
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
409 | idempotency_conflict (the key was reused with a different body) or request_in_progress | application/json: Error |
422 | Validation failed | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
GET/api/ohn/v1/notifications/remindersReminders (patient: own; staff: organisation)
Identifiant d’opération: OHN-53-API-011
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
422 | Validation failed | application/json: Error |
503 | Not configured or dependency unavailable (fail closed) | — |
POST/api/ohn/v1/notifications/remindersSchedule a reminder
Identifiant d’opération: OHN-53-API-012
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:Reminder
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Created | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
409 | idempotency_conflict (the key was reused with a different body) or request_in_progress | application/json: Error |
422 | domain_validation_failed; also when due_at is in the past (details.due_at = past) | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
POST/api/ohn/v1/notifications/reminders/{id}/cancelCancel a reminder
Identifiant d’opération: OHN-53-API-013
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui | |
id | path | string | oui |
Corps de la requête (obligatoire)
application/json:ExpectedVersion
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
409 | version_conflict, or invalid_transition (only a scheduled reminder can be cancelled) | application/json: Error |
422 | Validation failed | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
POST/api/ohn/v1/notifications/intake/eventsEvent intake (service role)
Identifiant d’opération: OHN-53-API-014
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:EventEnvelope
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | denied_by_policy: wrong role, or the event belongs to another jurisdiction than the token | application/json: Error |
404 | Not found | — |
409 | idempotency_conflict (the key was reused with a different body) or request_in_progress | application/json: Error |
422 | Validation failed | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
POST/api/ohn/v1/notifications/intake/webhookOHN-24 signed webhook receiver
OHN-24 webhook receiver. Authenticated by the HMAC-SHA256 of the raw body (header X-OHN-Signature: sha256=<hex>) with the shared webhook secret; no bearer token and no Idempotency-Key (duplicates are ignored by event_id). Unsigned or unconfigured is refused.
Identifiant d’opération: OHN-53-API-015
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
X-OHN-Signature | header | string | oui |
Corps de la requête (obligatoire)
application/json:EventEnvelope
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | bad_signature: X-OHN-Signature missing or not sha256=<hex HMAC-SHA256 of the raw body> | application/json: Error |
409 | idempotency_conflict (the key was reused with a different body) or request_in_progress | application/json: Error |
422 | Validation failed | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
POST/api/ohn/v1/ussdUSSD aggregator callback (CON/END)
Aggregator callback (Africa's Talking format). Header X-OHN53-USSD-Secret or query key. Answers text/plain "CON ..." or "END ...", at most 182 characters.
Identifiant d’opération: OHN-53-API-016
Corps de la requête (obligatoire)
application/x-www-form-urlencoded:UssdCallbackapplication/json:UssdCallback
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | USSD screen | text/plain: string |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | END Not authorised. | text/plain: string |
409 | idempotency_conflict (the key was reused with a different body) or request_in_progress | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
POST/api/ohn/v1/notifications/ussd-simulatorUSSD simulator
Identifiant d’opération: OHN-53-API-017
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:UssdSimulator
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: post-api-ohn-v1-notifications-ussd-simulator.response-200 |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
409 | idempotency_conflict (the key was reused with a different body) or request_in_progress | application/json: Error |
422 | Validation failed | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
GET/api/ohn/v1/notifications/admin/outboxDev sink messages
Identifiant d’opération: OHN-53-API-018
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
422 | Validation failed | application/json: Error |
503 | Not configured or dependency unavailable (fail closed) | — |
GET/api/ohn/v1/notifications/admin/deliveriesDeliveries
Identifiant d’opération: OHN-53-API-019
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
422 | Validation failed | application/json: Error |
503 | Not configured or dependency unavailable (fail closed) | — |
GET/api/ohn/v1/notifications/admin/deliveries/{id}Delivery and its log
Identifiant d’opération: OHN-53-API-020
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string | oui |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
422 | Validation failed | application/json: Error |
503 | Not configured or dependency unavailable (fail closed) | — |
POST/api/ohn/v1/notifications/admin/deliveries/{id}/retryRetry a failed delivery
Identifiant d’opération: OHN-53-API-021
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui | |
id | path | string | oui |
Corps de la requête (obligatoire)
application/json:object
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found (not a UUID) | application/json: Error |
409 | invalid_transition: only failed or dead deliveries can be retried | application/json: Error |
422 | Validation failed | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
POST/api/ohn/v1/notifications/admin/deliveries/processSend due messages now
Identifiant d’opération: OHN-53-API-022
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:object
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
409 | idempotency_conflict (the key was reused with a different body) or request_in_progress | application/json: Error |
422 | Validation failed | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
POST/api/ohn/v1/notifications/admin/test-notificationSend a test message
Identifiant d’opération: OHN-53-API-023
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:TestNotification
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Created | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
409 | idempotency_conflict (the key was reused with a different body) or request_in_progress | application/json: Error |
422 | Validation failed | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
GET/api/ohn/v1/notifications/admin/subscriptionsOHN-24 subscriptions and intake counts
Identifiant d’opération: OHN-53-API-024
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
422 | Validation failed | application/json: Error |
503 | Not configured or dependency unavailable (fail closed) | — |
POST/api/ohn/v1/notifications/admin/subscriptions/bootstrapCreate OHN-24 pull subscriptions
Identifiant d’opération: OHN-53-API-025
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:object
Réponses
| Code | Description | Type de média |
|---|---|---|
201 | Created | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
409 | idempotency_conflict (the key was reused with a different body) or request_in_progress | application/json: Error |
422 | Validation failed | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
POST/api/ohn/v1/notifications/admin/intake/pollPoll OHN-24 now
Identifiant d’opération: OHN-53-API-026
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | oui |
Corps de la requête (obligatoire)
application/json:object
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
400 | missing_idempotency_key (header absent, blank or longer than 255), or malformed_request (body is not valid JSON) | application/json: Error |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
409 | idempotency_conflict (the key was reused with a different body) or request_in_progress | application/json: Error |
422 | Validation failed | application/json: Error |
503 | not_configured (the operator kill switch, setting OHN_M53_WRITES_DISABLED, or a missing setting) or dependency_unavailable; nothing is stored | application/json: Error |
GET/api/ohn/v1/notifications/reportsReport catalogue
Identifiant d’opération: OHN-53-API-027
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
422 | Validation failed | application/json: Error |
503 | Not configured or dependency unavailable (fail closed) | — |
GET/api/ohn/v1/notifications/reports/{id}Run report
Identifiant d’opération: OHN-53-API-028
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string | oui |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
422 | Validation failed | application/json: Error |
503 | Not configured or dependency unavailable (fail closed) | — |
GET/api/ohn/v1/notifications/reports/{id}/exportSigned CSV
Identifiant d’opération: OHN-53-API-029
Authentification: bearer
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | path | string | oui |
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Signed CSV: header X-OHN53-Signature: hmac-sha256=<hex HMAC-SHA256 of the body with the export signing key>; Content-Disposition attachment | text/csv: string |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
422 | Validation failed | application/json: Error |
503 | not_configured: the export signing key is not set (details.setting) | application/json: Error |
GET/api/ohn/v1/notifications/auditAudit trail
Identifiant d’opération: OHN-53-API-030
Authentification: bearer
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | OK | application/json: object |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
422 | Validation failed | application/json: Error |
503 | Not configured or dependency unavailable (fail closed) | — |
GET/health/ohn-53Health and provider modes
Identifiant d’opération: OHN-53-API-032
Réponses
| Code | Description | Type de média |
|---|---|---|
200 | Public. status, module, providers {sms,email,in_app: {provider, mode}}, dependencies {OHN-15, OHN-24: live|unconfigured|test_fake}, worker, event_intake, ussd, contact_protection, real_delivery_allowed (always false: there is no live adapter), writes_enabled, auth_configured, synthetic_auth (always false) | application/json: object |
401 | Unauthenticated | — |
403 | Denied by policy (audited) | — |
404 | Not found | — |
422 | Validation failed | application/json: Error |
503 | status unavailable: the database cannot be reached | application/json: Error |
Schémas
Error
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
error | string | oui | |
message | string | non | |
details | any | non |
Preferences
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
language | "en" | "fr" | oui | |
channels | Preferences.channels | oui | |
quiet_hours | null | Preferences.quiet_hours.option-2 | oui | |
opt_out | boolean | oui | |
muted_categories | array of string | non | |
expected_version | integer | oui |
StartContact
object | object
ConfirmContact
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
code | string | oui |
Reminder
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
patient_id | string (uuid) | oui | |
kind | "appointment" | "vaccination_due" | oui | |
due_at | string (date-time) | oui | |
remind_hours_before | integer | non | |
place_label | string | oui |
ExpectedVersion
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
expected_version | integer | oui |
EventEnvelope
any
UssdCallback
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
sessionId | string | oui | |
phoneNumber | string | oui | |
text | string | non | |
serviceCode | string | non | |
networkCode | string | non |
UssdSimulator
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
session_id | string | oui | |
phone_number | string | oui | |
text | string | oui |
TestNotification
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
recipient_id | string (uuid) | oui | |
recipient_kind | "patient" | "staff" | oui | |
channels | array of "in_app" | "sms" | "email" | oui |
InboxItem
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | string (uuid) | oui | |
category | string | oui | |
title | string | oui | |
body | string | oui | |
language | "en" | "fr" | oui | Language of title/body as returned. |
texts | object | oui | Title/body per language: en and fr when the message has a template key, else only the stored language. |
link | string | null | non | |
read | boolean | oui | |
read_at | string | null (date-time) | non | |
created_at | string (date-time) | oui | |
source_module | string | null | non |
get-api-ohn-v1-notifications-inbox.response-200 défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
items | array of InboxItem | oui | |
unread | integer | oui |
post-api-ohn-v1-notifications-contacts-id-verify.response-422.option-2 défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
error | "wrong_code" | oui | |
message | string | non | |
attempts_left | integer | oui |
post-api-ohn-v1-notifications-ussd-simulator.response-200 défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
reply | string | oui | |
kind | "continue" | "end" | oui | |
text | string | oui |
Preferences.channels défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
in_app | true | oui | |
sms | boolean | oui | |
email | boolean | oui |
Preferences.quiet_hours.option-2 défini sur place
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
start | integer | oui | |
end | integer | oui |