-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathapi.http
55 lines (48 loc) · 1.24 KB
/
api.http
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
### Schedule a day
POST http://localhost:8080/api/doctor/schedule
Content-Type: application/json
X-CorrelationId: test-correlation-id
X-CausationId: test-causation-id
{
"date": "2022-10-10",
"doctorId": "1234",
"slots": [
{
"duration": "PT10m",
"startTime": "14:30:00"
},
{
"duration": "PT10m",
"startTime": "14:40:00"
},
{
"duration": "PT10m",
"startTime": "14:50:00"
}
]
}
### Get slots available on a date
GET http://localhost:8080/api/slots/2022-10-10/available
### Book a slot
POST http://localhost:8080/api/slots/1234_2022-10-10/book
Content-Type: application/json
X-CorrelationId: test-correlation-id
X-CausationId: test-causation-id
{
"slotId": "c4b1f51a-d611-4ff6-bd57-6aad346104e8",
"patientId": "John Doe"
}
### Cancel slot booking
POST http://localhost:8080/api/slots/1234_2022-10-10/cancel-booking
Content-Type: application/json
X-CorrelationId: test-correlation-id
X-CausationId: test-causation-id
{
"slotId": "c4b1f51a-d611-4ff6-bd57-6aad346104e8",
"reason": "No longer needed"
}
### Send day started event
POST http://localhost:8080/api/calendar/2022-10-11/day-started
Content-Type: application/json
X-CorrelationId: test-correlation-id-2
X-CausationId: test-causation-id-2