OHN-53 Notifications and Messaging
- Version
- 1.0.1
- OpenAPI
- 3.1.0
- Source in the repository
modules/OHN-53/api/openapi.yaml- Servers
https://opeshealthnetwork.com- Authentication
bearer: http bearer (JWT (ES256 from the platform gateway; iss ohn-platform-gateway, aud ohn-53; role + purpose + jurisdiction + organization_id))
Contracts are written in English.
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).
Operations
- Other operations (31)
Other operations
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`).
Operation ID: OHN-53-API-001
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
unread | query | "true" | "false" | no | |
limit | query | integer | no | |
lang | query | "en" | "fr" | no | Language of title/body. Overrides Accept-Language. |
Accept-Language | header | string | no | Used when lang is absent; the first en or fr entry by weight wins. |
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-002
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes | |
id | path | string | yes |
Request body (required)
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-003
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body (required)
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-004
Authentication: bearer
Responses
| Code | Description | Media type |
|---|---|---|
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)
Operation ID: OHN-53-API-005
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body (required)
application/json:Preferences
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-006
Authentication: bearer
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-007
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body (required)
application/json:StartContact
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-008
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes | |
id | path | string | yes |
Request body (required)
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-009
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes | |
id | path | string | yes |
Request body (required)
application/json:ConfirmContact
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-010
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes | |
id | path | string | yes |
Request body (required)
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
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)
Operation ID: OHN-53-API-011
Authentication: bearer
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-012
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body (required)
application/json:Reminder
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-013
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes | |
id | path | string | yes |
Request body (required)
application/json:ExpectedVersion
Responses
| Code | Description | Media type |
|---|---|---|
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)
Operation ID: OHN-53-API-014
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body (required)
application/json:EventEnvelope
Responses
| Code | Description | Media type |
|---|---|---|
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.
Operation ID: OHN-53-API-015
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-OHN-Signature | header | string | yes |
Request body (required)
application/json:EventEnvelope
Responses
| Code | Description | Media type |
|---|---|---|
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.
Operation ID: OHN-53-API-016
Request body (required)
application/x-www-form-urlencoded:UssdCallbackapplication/json:UssdCallback
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-017
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body (required)
application/json:UssdSimulator
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-018
Authentication: bearer
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-019
Authentication: bearer
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-020
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-021
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes | |
id | path | string | yes |
Request body (required)
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-022
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body (required)
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-023
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body (required)
application/json:TestNotification
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-024
Authentication: bearer
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-025
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body (required)
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-026
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | yes |
Request body (required)
application/json:object
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-027
Authentication: bearer
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-028
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-029
Authentication: bearer
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-030
Authentication: bearer
Responses
| Code | Description | Media type |
|---|---|---|
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
Operation ID: OHN-53-API-032
Responses
| Code | Description | Media type |
|---|---|---|
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 |
Schemas
Error
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes | |
message | string | no | |
details | any | no |
Preferences
| Name | Type | Required | Description |
|---|---|---|---|
language | "en" | "fr" | yes | |
channels | Preferences.channels | yes | |
quiet_hours | null | Preferences.quiet_hours.option-2 | yes | |
opt_out | boolean | yes | |
muted_categories | array of string | no | |
expected_version | integer | yes |
StartContact
object | object
ConfirmContact
| Name | Type | Required | Description |
|---|---|---|---|
code | string | yes |
Reminder
| Name | Type | Required | Description |
|---|---|---|---|
patient_id | string (uuid) | yes | |
kind | "appointment" | "vaccination_due" | yes | |
due_at | string (date-time) | yes | |
remind_hours_before | integer | no | |
place_label | string | yes |
ExpectedVersion
| Name | Type | Required | Description |
|---|---|---|---|
expected_version | integer | yes |
EventEnvelope
any
UssdCallback
| Name | Type | Required | Description |
|---|---|---|---|
sessionId | string | yes | |
phoneNumber | string | yes | |
text | string | no | |
serviceCode | string | no | |
networkCode | string | no |
UssdSimulator
| Name | Type | Required | Description |
|---|---|---|---|
session_id | string | yes | |
phone_number | string | yes | |
text | string | yes |
TestNotification
| Name | Type | Required | Description |
|---|---|---|---|
recipient_id | string (uuid) | yes | |
recipient_kind | "patient" | "staff" | yes | |
channels | array of "in_app" | "sms" | "email" | yes |
InboxItem
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
category | string | yes | |
title | string | yes | |
body | string | yes | |
language | "en" | "fr" | yes | Language of title/body as returned. |
texts | object | yes | Title/body per language: en and fr when the message has a template key, else only the stored language. |
link | string | null | no | |
read | boolean | yes | |
read_at | string | null (date-time) | no | |
created_at | string (date-time) | yes | |
source_module | string | null | no |
get-api-ohn-v1-notifications-inbox.response-200 defined inline
| Name | Type | Required | Description |
|---|---|---|---|
items | array of InboxItem | yes | |
unread | integer | yes |
post-api-ohn-v1-notifications-contacts-id-verify.response-422.option-2 defined inline
| Name | Type | Required | Description |
|---|---|---|---|
error | "wrong_code" | yes | |
message | string | no | |
attempts_left | integer | yes |
post-api-ohn-v1-notifications-ussd-simulator.response-200 defined inline
| Name | Type | Required | Description |
|---|---|---|---|
reply | string | yes | |
kind | "continue" | "end" | yes | |
text | string | yes |
Preferences.channels defined inline
| Name | Type | Required | Description |
|---|---|---|---|
in_app | true | yes | |
sms | boolean | yes | |
email | boolean | yes |
Preferences.quiet_hours.option-2 defined inline
| Name | Type | Required | Description |
|---|---|---|---|
start | integer | yes | |
end | integer | yes |