forked from antonarhipov/ktor-ddd-example
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample_calls.http
More file actions
59 lines (38 loc) · 1.08 KB
/
example_calls.http
File metadata and controls
59 lines (38 loc) · 1.08 KB
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
### Create new customer
POST http://localhost:8080/customers
Content-Type: application/json
{
"name": "John Doe"
}
### Using the following customer id for the next requests
@customer_id = 1
### Get specific customer
GET http://localhost:8080/customers/{{customer_id}}
Accept: application/json
### Add a contact to a customer
POST http://localhost:8080/customers/{{customer_id}}/contacts
Content-Type: application/json
{
"name": "Jane Doe",
"email": "jane@example.com",
"phone": "123-456-7890"
}
### Add a note to a customer
POST http://localhost:8080/customers/{{customer_id}}/notes
Content-Type: application/json
{
"content": "This is a note for the customer."
}
### Create a reminder
# You can also use the `noteId` field to associate a reminder with a specific note.
POST http://localhost:8080/reminders
Content-Type: application/json
{
"customerId": 1,
"noteId": null,
"remindAt": "2024-01-01T10:00:00",
"message": "Follow up with customer"
}
### Get all reminders for a customer
GET http://localhost:8080/reminders/customer/{{customer_id}}
Accept: application/json