This repository has been archived by the owner on Apr 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapiary.apib
176 lines (135 loc) · 4.12 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
FORMAT: 1A
# IOweYou
Api for IOweYou app
# Group User
## Login [/user/login]
### Login with Facebook [POST]
+ Request (application/json)
+ Body
{
"facebookId": "168143764",
"facebookToken": "3584asd6f81a6fg846as8d4fadga6sd8f4gsa8dfg"
}
+ Response 201 (application/json)
+ Body
{
"id": 1648,
"apiKey": "16asd5f65as5d4g6afdas1df65dsafasdf"
}
## Default [/user]
### Get user's data [GET]
+ Request (application/json)
+ Headers
api-key: "asdasdf4fd6as15f6asdf6as1dfas"
+ Response 200 (application/json)
+ Body
{
"id": 1648,
"email": "[email protected]",
"name": "John Smith",
"registeredAt": "2016-10-30 10:14:22",
"friends": [
{
"id": 243,
"email": "[email protected]",
"name": "Will Smith"
}, {
"id": 1648,
"email": "[email protected]",
"name": "Bill Smith"
}
]
}
# Group Debts
## Update [/debts/update]
### Update all debts [POST]
+ Request (application/json)
+ Headers
api-key: "asdasdf4fd6as15f6asdf6as1dfas"
+ Body
{
"debts":[
{
"id":-1,
"creditorId":4,
"debtorId":1,
"amount":250,
"currencyId":1,
"note":"note dfgh",
"paidAt":"",
"deletedAt":"",
"modifiedAt":"2017-03-22 20:27:49",
"createdAt":"2017-03-22 20:27:49",
"lock":false,
"version":1490210869819
}
]
}
+ Response 200 (application/json)
+ Body
{
"debts": [
{
"id": 153,
"creditorId": 4,
"debtorId": 1,
"customFriendName": "",
"amount": 250,
"currencyId": 1,
"thingName": "",
"note": "fds999999999999999999999999999999999999999999999999",
"paidAt": "",
"deletedAt": "",
"modifiedAt": "2017-03-22 19:38:54",
"createdAt": "2017-03-22 20:27:49",
"managerId": "",
"intervalMinutes": "",
"intervalRunAt": "",
"intervalType": "",
"version": 1490210869819
},
{
"id": 204,
"creditorId": 4,
"debtorId": 1,
"customFriendName": "",
"amount": 250,
"currencyId": 1,
"thingName": "",
"note": "note dfgh",
"paidAt": "",
"deletedAt": "",
"modifiedAt": "2017-03-27 15:59:00",
"createdAt": "2017-03-22 20:27:49",
"managerId": "",
"intervalMinutes": "",
"intervalRunAt": "",
"intervalType": "",
"version": 1490210869819
}
]
}
# Group Currencies
## Currencies [/currencies]
### List all currencies [GET]
+ Request (application/json)
+ Headers
api-key: "asdasdf4fd6as15f6asdf6as1dfas"
+ Response 200 (application/json)
+ Body
{
"currencies": [
{
"id": 1,
"symbol": "Kč"
},
{
"id": 2,
"symbol": "$"
},
{
"id": 3,
"symbol": "€"
}
]
}