-
Notifications
You must be signed in to change notification settings - Fork 0
/
apiary.apib
59 lines (42 loc) · 1.95 KB
/
apiary.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FORMAT: 1A
HOST: https://notifications.ehealth.gov.ua
# EHCS Notifications Service
## Notifications
### Send Notification [POST /api/notifications]
+ Request (application/json)
+ Attributes (object)
+ `person_id`: `d290f1ee-6c54-4b01-90e6-d701748f0851` (string, required) - Identifier of person that is accosiated with user who initiated access token generation
+ `template` (object, required)
+ `name`: `TEMPLATE_CREATE_SERVICE_REQUEST` (string, required) - Identifier of template
+ `parameters` (object) - Key/value pairs of parameters, where key is parameters name
+ Response 201 (application/json)
+ Attributes (`Notification`)
+ Response 400 (application/json)
+ Attributes (`Error`)
+ Response 422 (application/json)
+ Attributes (`ValidationError`)
+ Response 500 (application/json)
+ Attributes (`Error`)
### Get Notification [GET /api/notifications/{id}]
+ Request (application/json)
+ Parameters
+ id: `a48cc83a-7aad-47c6-9487-2a566dc669a7` (string, required)
+ Response 200 (application/json)
+ Attributes (`Notification`)
+ Response 204
+ Response 500 (application/json)
+ Attributes (`Error`)
# Data Structures
## Notification (object)
+ notification_id: `a48cc83a-7aad-47c6-9487-2a566dc669a7` (string, required) - UUID string
+ person_id: `d290f1ee-6c54-4b01-90e6-d701748f0851` (string, required) - UUID string
+ status: sent, not_sent, delivered, not_delivered, unconfirmed_delivery (enum, required) - Notification status
+ status_reason: `sent` (string) - Freeform string
+ status_timestamp: `2024-08-07 11:03:20.128570` (string, required) - ISO 8601 sormat
## ValidationError (Error)
- type: `validation_error` (fixed)
- message: `Validation failed` (string, required)
- errors (object, required)
## Error (object)
+ type: `example_error` (string, required) - Machine-readable error type
+ message: `Example error message` (string, required) - Human-readable error description