forked from dilshat/sms-sender
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdesign
57 lines (49 loc) · 1.02 KB
/
design
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
Service design
The sms service must provide API to send an sms text message to a recipient or a set of recipients.
SMS message might contain ascii/cyrillic letters and be of length up to 160/70 symbols respectively
- http calls examples
POST /sms
{
"sender" : "Awesome",
"text" : "Hello World",
"phones" : ["996XXXZZZZZZ","996XXXAABBCC"]
}
response:
200 OK
{
"id" : "1234"
}
----------------------------------------------
GET /sms/1234
response:
200 OK
{
"id" : "1234",
"sender" : "Awesome",
"text" : "Hello World",
"statuses" : [
{
"phone" : "996XXXZZZZZZ",
"status" : "DELIVRD"
},
{
"phone" : "996XXXAABBCC",
"status" : "UNDELIV"
}
]
}
------------------------------------
GET /sms/1234?phone=996XXXAABBCC
response:
200 OK
{
"id" : "1234",
"sender" : "Awesome",
"text" : "Hello World",
"statuses" : [
{
"phone" : "996XXXAABBCC",
"status" : "DELIVRD"
}
]
}