ynab 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (194) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/Gemfile.lock +44 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +57 -0
  6. data/Rakefile +31 -0
  7. data/config.json +10 -0
  8. data/docs/Account.md +16 -0
  9. data/docs/AccountResponse.md +8 -0
  10. data/docs/AccountWrapper.md +8 -0
  11. data/docs/AccountsApi.md +121 -0
  12. data/docs/AccountsResponse.md +8 -0
  13. data/docs/AccountsWrapper.md +8 -0
  14. data/docs/BudgetDetail.md +22 -0
  15. data/docs/BudgetDetailResponse.md +8 -0
  16. data/docs/BudgetDetailWrapper.md +9 -0
  17. data/docs/BudgetSummary.md +12 -0
  18. data/docs/BudgetSummaryResponse.md +8 -0
  19. data/docs/BudgetSummaryWrapper.md +8 -0
  20. data/docs/BudgetsApi.md +116 -0
  21. data/docs/BulkIdWrapper.md +8 -0
  22. data/docs/BulkIds.md +9 -0
  23. data/docs/BulkResponse.md +8 -0
  24. data/docs/BulkTransactionCreateResponse.md +8 -0
  25. data/docs/BulkTransactionIds.md +8 -0
  26. data/docs/BulkTransactions.md +8 -0
  27. data/docs/CategoriesApi.md +121 -0
  28. data/docs/CategoriesResponse.md +8 -0
  29. data/docs/Category.md +15 -0
  30. data/docs/CategoryGroup.md +10 -0
  31. data/docs/CategoryGroupWithCategories.md +11 -0
  32. data/docs/CategoryGroupsWrapper.md +8 -0
  33. data/docs/CategoryResponse.md +8 -0
  34. data/docs/CategoryWrapper.md +8 -0
  35. data/docs/CurrencyFormat.md +8 -0
  36. data/docs/DateFormat.md +8 -0
  37. data/docs/ErrorDetail.md +10 -0
  38. data/docs/ErrorResponse.md +8 -0
  39. data/docs/MonthDetail.md +12 -0
  40. data/docs/MonthDetailResponse.md +8 -0
  41. data/docs/MonthDetailWrapper.md +8 -0
  42. data/docs/MonthSummariesResponse.md +8 -0
  43. data/docs/MonthSummariesWrapper.md +8 -0
  44. data/docs/MonthSummary.md +11 -0
  45. data/docs/MonthsApi.md +121 -0
  46. data/docs/Payee.md +10 -0
  47. data/docs/PayeeLocation.md +11 -0
  48. data/docs/PayeeLocationResponse.md +8 -0
  49. data/docs/PayeeLocationWrapper.md +8 -0
  50. data/docs/PayeeLocationsApi.md +179 -0
  51. data/docs/PayeeLocationsResponse.md +8 -0
  52. data/docs/PayeeLocationsWrapper.md +8 -0
  53. data/docs/PayeeResponse.md +8 -0
  54. data/docs/PayeeWrapper.md +8 -0
  55. data/docs/PayeesApi.md +121 -0
  56. data/docs/PayeesResponse.md +8 -0
  57. data/docs/PayeesWrapper.md +8 -0
  58. data/docs/SaveTransaction.md +18 -0
  59. data/docs/SaveTransactionWrapper.md +8 -0
  60. data/docs/ScheduledSubTransaction.md +14 -0
  61. data/docs/ScheduledTransactionDetail.md +19 -0
  62. data/docs/ScheduledTransactionResponse.md +8 -0
  63. data/docs/ScheduledTransactionSummary.md +18 -0
  64. data/docs/ScheduledTransactionWrapper.md +8 -0
  65. data/docs/ScheduledTransactionsApi.md +121 -0
  66. data/docs/ScheduledTransactionsResponse.md +8 -0
  67. data/docs/ScheduledTransactionsWrapper.md +8 -0
  68. data/docs/SubTransaction.md +14 -0
  69. data/docs/TransactionDetail.md +20 -0
  70. data/docs/TransactionResponse.md +8 -0
  71. data/docs/TransactionSummary.md +19 -0
  72. data/docs/TransactionWrapper.md +8 -0
  73. data/docs/TransactionsApi.md +428 -0
  74. data/docs/TransactionsResponse.md +8 -0
  75. data/docs/TransactionsWrapper.md +8 -0
  76. data/examples/budget-list.rb +25 -0
  77. data/examples/budget-month.rb +36 -0
  78. data/examples/category-balance.rb +27 -0
  79. data/lib/ynab.rb +136 -0
  80. data/lib/ynab/api/accounts_api.rb +135 -0
  81. data/lib/ynab/api/budgets_api.rb +126 -0
  82. data/lib/ynab/api/categories_api.rb +135 -0
  83. data/lib/ynab/api/months_api.rb +135 -0
  84. data/lib/ynab/api/payee_locations_api.rb +194 -0
  85. data/lib/ynab/api/payees_api.rb +135 -0
  86. data/lib/ynab/api/scheduled_transactions_api.rb +135 -0
  87. data/lib/ynab/api/transactions_api.rb +451 -0
  88. data/lib/ynab/api_client.rb +392 -0
  89. data/lib/ynab/api_error.rb +38 -0
  90. data/lib/ynab/configuration.rb +209 -0
  91. data/lib/ynab/models/account.rb +343 -0
  92. data/lib/ynab/models/account_response.rb +193 -0
  93. data/lib/ynab/models/account_wrapper.rb +193 -0
  94. data/lib/ynab/models/accounts_response.rb +193 -0
  95. data/lib/ynab/models/accounts_wrapper.rb +195 -0
  96. data/lib/ynab/models/budget_detail.rb +345 -0
  97. data/lib/ynab/models/budget_detail_response.rb +193 -0
  98. data/lib/ynab/models/budget_detail_wrapper.rb +208 -0
  99. data/lib/ynab/models/budget_summary.rb +235 -0
  100. data/lib/ynab/models/budget_summary_response.rb +193 -0
  101. data/lib/ynab/models/budget_summary_wrapper.rb +195 -0
  102. data/lib/ynab/models/bulk_id_wrapper.rb +193 -0
  103. data/lib/ynab/models/bulk_ids.rb +213 -0
  104. data/lib/ynab/models/bulk_response.rb +193 -0
  105. data/lib/ynab/models/bulk_transaction_create_response.rb +193 -0
  106. data/lib/ynab/models/bulk_transaction_ids.rb +195 -0
  107. data/lib/ynab/models/bulk_transactions.rb +195 -0
  108. data/lib/ynab/models/categories_response.rb +193 -0
  109. data/lib/ynab/models/category.rb +295 -0
  110. data/lib/ynab/models/category_group.rb +222 -0
  111. data/lib/ynab/models/category_group_with_categories.rb +239 -0
  112. data/lib/ynab/models/category_groups_wrapper.rb +195 -0
  113. data/lib/ynab/models/category_response.rb +193 -0
  114. data/lib/ynab/models/category_wrapper.rb +193 -0
  115. data/lib/ynab/models/currency_format.rb +193 -0
  116. data/lib/ynab/models/date_format.rb +193 -0
  117. data/lib/ynab/models/error_detail.rb +221 -0
  118. data/lib/ynab/models/error_response.rb +193 -0
  119. data/lib/ynab/models/month_detail.rb +253 -0
  120. data/lib/ynab/models/month_detail_response.rb +193 -0
  121. data/lib/ynab/models/month_detail_wrapper.rb +193 -0
  122. data/lib/ynab/models/month_summaries_response.rb +193 -0
  123. data/lib/ynab/models/month_summaries_wrapper.rb +195 -0
  124. data/lib/ynab/models/month_summary.rb +236 -0
  125. data/lib/ynab/models/payee.rb +222 -0
  126. data/lib/ynab/models/payee_location.rb +235 -0
  127. data/lib/ynab/models/payee_location_response.rb +193 -0
  128. data/lib/ynab/models/payee_location_wrapper.rb +193 -0
  129. data/lib/ynab/models/payee_locations_response.rb +193 -0
  130. data/lib/ynab/models/payee_locations_wrapper.rb +195 -0
  131. data/lib/ynab/models/payee_response.rb +193 -0
  132. data/lib/ynab/models/payee_wrapper.rb +193 -0
  133. data/lib/ynab/models/payees_response.rb +193 -0
  134. data/lib/ynab/models/payees_wrapper.rb +195 -0
  135. data/lib/ynab/models/save_transaction.rb +346 -0
  136. data/lib/ynab/models/save_transaction_wrapper.rb +193 -0
  137. data/lib/ynab/models/scheduled_sub_transaction.rb +279 -0
  138. data/lib/ynab/models/scheduled_transaction_detail.rb +387 -0
  139. data/lib/ynab/models/scheduled_transaction_response.rb +193 -0
  140. data/lib/ynab/models/scheduled_transaction_summary.rb +370 -0
  141. data/lib/ynab/models/scheduled_transaction_wrapper.rb +193 -0
  142. data/lib/ynab/models/scheduled_transactions_response.rb +193 -0
  143. data/lib/ynab/models/scheduled_transactions_wrapper.rb +195 -0
  144. data/lib/ynab/models/sub_transaction.rb +279 -0
  145. data/lib/ynab/models/transaction_detail.rb +401 -0
  146. data/lib/ynab/models/transaction_response.rb +193 -0
  147. data/lib/ynab/models/transaction_summary.rb +384 -0
  148. data/lib/ynab/models/transaction_wrapper.rb +193 -0
  149. data/lib/ynab/models/transactions_response.rb +193 -0
  150. data/lib/ynab/models/transactions_wrapper.rb +195 -0
  151. data/lib/ynab/version.rb +15 -0
  152. data/pkg/ynab-0.1.0.gem +0 -0
  153. data/spec-v1-swagger.json +2121 -0
  154. data/spec/api/accounts_spec.rb +56 -0
  155. data/spec/api/budgets_spec.rb +55 -0
  156. data/spec/api/categories_spec.rb +57 -0
  157. data/spec/api/months_spec.rb +57 -0
  158. data/spec/api/payee_locations_spec.rb +57 -0
  159. data/spec/api/payees_spec.rb +56 -0
  160. data/spec/api/scheduled_transactions_spec.rb +56 -0
  161. data/spec/api/transactions_spec.rb +122 -0
  162. data/spec/fixtures/.DS_Store +0 -0
  163. data/spec/fixtures/vcr_cassettes/account.yml +46 -0
  164. data/spec/fixtures/vcr_cassettes/accounts.yml +46 -0
  165. data/spec/fixtures/vcr_cassettes/accounts_unauthorized.yml +49 -0
  166. data/spec/fixtures/vcr_cassettes/budget.yml +1413 -0
  167. data/spec/fixtures/vcr_cassettes/budgets.yml +49 -0
  168. data/spec/fixtures/vcr_cassettes/budgets_unauthorized.yml +49 -0
  169. data/spec/fixtures/vcr_cassettes/bulk_transactions.yml +46 -0
  170. data/spec/fixtures/vcr_cassettes/categories.yml +67 -0
  171. data/spec/fixtures/vcr_cassettes/categories_unauthorized.yml +49 -0
  172. data/spec/fixtures/vcr_cassettes/category.yml +46 -0
  173. data/spec/fixtures/vcr_cassettes/create_transaction.yml +46 -0
  174. data/spec/fixtures/vcr_cassettes/month.yml +59 -0
  175. data/spec/fixtures/vcr_cassettes/months.yml +47 -0
  176. data/spec/fixtures/vcr_cassettes/months_unauthorized.yml +49 -0
  177. data/spec/fixtures/vcr_cassettes/payee.yml +47 -0
  178. data/spec/fixtures/vcr_cassettes/payee_location.yml +46 -0
  179. data/spec/fixtures/vcr_cassettes/payee_locations.yml +46 -0
  180. data/spec/fixtures/vcr_cassettes/payee_locations_unauthorized.yml +49 -0
  181. data/spec/fixtures/vcr_cassettes/payees.yml +51 -0
  182. data/spec/fixtures/vcr_cassettes/payees_unauthorized.yml +49 -0
  183. data/spec/fixtures/vcr_cassettes/scheduled_transaction.yml +46 -0
  184. data/spec/fixtures/vcr_cassettes/scheduled_transactions.yml +46 -0
  185. data/spec/fixtures/vcr_cassettes/scheduled_transactions_unauthorized.yml +49 -0
  186. data/spec/fixtures/vcr_cassettes/transaction.yml +46 -0
  187. data/spec/fixtures/vcr_cassettes/transactions.yml +46 -0
  188. data/spec/fixtures/vcr_cassettes/transactions_unauthorized.yml +49 -0
  189. data/spec/fixtures/vcr_cassettes/update_transaction.yml +46 -0
  190. data/spec/spec_helper.rb +18 -0
  191. data/swagger-templates/api_client.mustache +386 -0
  192. data/swagger-templates/gemspec.mustache +37 -0
  193. data/ynab.gemspec +40 -0
  194. metadata +353 -0
@@ -0,0 +1,15 @@
1
+ =begin
2
+ #YNAB API Endpoints
3
+
4
+ #Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ module YnabApi
14
+ VERSION = "0.1.0"
15
+ end
Binary file
@@ -0,0 +1,2121 @@
1
+ {
2
+ "swagger": "2.0",
3
+ "info": {
4
+ "description":
5
+ "Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com",
6
+ "version": "1.0.0",
7
+ "title": "YNAB API Endpoints"
8
+ },
9
+ "schemes": ["https"],
10
+ "host": "api.youneedabudget.com",
11
+ "basePath": "/papi/v1",
12
+ "tags": [
13
+ {
14
+ "name": "Budgets"
15
+ },
16
+ {
17
+ "name": "Accounts",
18
+ "description": "The Accounts for a budget."
19
+ },
20
+ {
21
+ "name": "Categories",
22
+ "description": "The Categories for a budget."
23
+ },
24
+ {
25
+ "name": "Payees",
26
+ "description": "The Payees for a budget."
27
+ },
28
+ {
29
+ "name": "Payee Locations",
30
+ "description":
31
+ "When you enter a transaction and specify a payee on the YNAB mobile apps, the GPS coordinates for that location are stored, with your permission, so that the next time you are in the same place (like the Grocery store) we can pre-populate nearby payees for you! It’s handy and saves you time. This resource makes these locations available. Locations will not be available for all payees."
32
+ },
33
+ {
34
+ "name": "Months",
35
+ "description":
36
+ "Each budget contains one or more months, which is where To be Budgeted, Age of Money and Category (budgeted / activity / balances) amounts are available."
37
+ },
38
+ {
39
+ "name": "Transactions",
40
+ "description": "The Transactions for a budget."
41
+ },
42
+ {
43
+ "name": "Scheduled Transactions",
44
+ "description": "The Scheduled Transactions for a budget."
45
+ }
46
+ ],
47
+ "security": [
48
+ {
49
+ "bearer": []
50
+ }
51
+ ],
52
+ "paths": {
53
+ "/budgets": {
54
+ "get": {
55
+ "tags": ["Budgets"],
56
+ "summary": "List budgets",
57
+ "description": "Returns budgets list with summary information.",
58
+ "operationId": "getBudgets",
59
+ "produces": ["application/json"],
60
+ "parameters": [],
61
+ "responses": {
62
+ "200": {
63
+ "description": "The list of budgets.",
64
+ "schema": {
65
+ "$ref": "#/definitions/BudgetSummaryResponse"
66
+ }
67
+ },
68
+ "404": {
69
+ "description": "No budgets were found.",
70
+ "schema": {
71
+ "$ref": "#/definitions/ErrorResponse"
72
+ }
73
+ },
74
+ "default": {
75
+ "description": "An error occurred.",
76
+ "schema": {
77
+ "$ref": "#/definitions/ErrorResponse"
78
+ }
79
+ }
80
+ }
81
+ }
82
+ },
83
+ "/budgets/{budget_id}": {
84
+ "get": {
85
+ "tags": ["Budgets"],
86
+ "summary": "Single budget",
87
+ "description":
88
+ "Returns a single budget with all related entities. This resource is effectively a full budget export.",
89
+ "operationId": "getBudgetById",
90
+ "produces": ["application/json"],
91
+ "parameters": [
92
+ {
93
+ "name": "budget_id",
94
+ "in": "path",
95
+ "description": "The ID of the Budget.",
96
+ "required": true,
97
+ "type": "string",
98
+ "format": "uuid"
99
+ },
100
+ {
101
+ "name": "last_knowledge_of_server",
102
+ "in": "query",
103
+ "description":
104
+ "The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.",
105
+ "required": false,
106
+ "type": "number"
107
+ }
108
+ ],
109
+ "responses": {
110
+ "200": {
111
+ "description": "The requested Budget.",
112
+ "schema": {
113
+ "$ref": "#/definitions/BudgetDetailResponse"
114
+ }
115
+ },
116
+ "404": {
117
+ "description": "The specified Budget was not found.",
118
+ "schema": {
119
+ "$ref": "#/definitions/ErrorResponse"
120
+ }
121
+ },
122
+ "default": {
123
+ "description": "An error occurred.",
124
+ "schema": {
125
+ "$ref": "#/definitions/ErrorResponse"
126
+ }
127
+ }
128
+ }
129
+ }
130
+ },
131
+ "/budgets/{budget_id}/accounts": {
132
+ "get": {
133
+ "tags": ["Accounts"],
134
+ "summary": "Account list",
135
+ "description": "Returns all accounts",
136
+ "operationId": "getAccounts",
137
+ "produces": ["application/json"],
138
+ "parameters": [
139
+ {
140
+ "name": "budget_id",
141
+ "in": "path",
142
+ "description": "The ID of the Budget.",
143
+ "required": true,
144
+ "type": "string",
145
+ "format": "uuid"
146
+ }
147
+ ],
148
+ "responses": {
149
+ "200": {
150
+ "description": "The list of requested Accounts.",
151
+ "schema": {
152
+ "$ref": "#/definitions/AccountsResponse"
153
+ }
154
+ },
155
+ "404": {
156
+ "description": "No Accounts were found.",
157
+ "schema": {
158
+ "$ref": "#/definitions/ErrorResponse"
159
+ }
160
+ },
161
+ "default": {
162
+ "description": "An error occurred.",
163
+ "schema": {
164
+ "$ref": "#/definitions/ErrorResponse"
165
+ }
166
+ }
167
+ }
168
+ }
169
+ },
170
+ "/budgets/{budget_id}/accounts/{account_id}": {
171
+ "get": {
172
+ "tags": ["Accounts"],
173
+ "summary": "Single account",
174
+ "description": "Returns a single account",
175
+ "operationId": "getAccountById",
176
+ "produces": ["application/json"],
177
+ "parameters": [
178
+ {
179
+ "name": "budget_id",
180
+ "in": "path",
181
+ "description": "The ID of the Budget.",
182
+ "required": true,
183
+ "type": "string",
184
+ "format": "uuid"
185
+ },
186
+ {
187
+ "name": "account_id",
188
+ "in": "path",
189
+ "description": "The ID of the Account.",
190
+ "required": true,
191
+ "type": "string",
192
+ "format": "uuid"
193
+ }
194
+ ],
195
+ "responses": {
196
+ "200": {
197
+ "description": "The requested Account.",
198
+ "schema": {
199
+ "$ref": "#/definitions/AccountResponse"
200
+ }
201
+ },
202
+ "404": {
203
+ "description": "The requested Account was not found.",
204
+ "schema": {
205
+ "$ref": "#/definitions/ErrorResponse"
206
+ }
207
+ },
208
+ "default": {
209
+ "description": "An error occurred.",
210
+ "schema": {
211
+ "$ref": "#/definitions/ErrorResponse"
212
+ }
213
+ }
214
+ }
215
+ }
216
+ },
217
+ "/budgets/{budget_id}/categories": {
218
+ "get": {
219
+ "tags": ["Categories"],
220
+ "summary": "List categories",
221
+ "description": "Returns all categories grouped by category group.",
222
+ "operationId": "getCategories",
223
+ "produces": ["application/json"],
224
+ "parameters": [
225
+ {
226
+ "name": "budget_id",
227
+ "in": "path",
228
+ "description": "The ID of the Budget.",
229
+ "required": true,
230
+ "type": "string",
231
+ "format": "uuid"
232
+ }
233
+ ],
234
+ "responses": {
235
+ "200": {
236
+ "description": "The Categories grouped by Category Group.",
237
+ "schema": {
238
+ "$ref": "#/definitions/CategoriesResponse"
239
+ }
240
+ },
241
+ "404": {
242
+ "description": "No categories were found.",
243
+ "schema": {
244
+ "$ref": "#/definitions/ErrorResponse"
245
+ }
246
+ },
247
+ "default": {
248
+ "description": "An error occurred.",
249
+ "schema": {
250
+ "$ref": "#/definitions/ErrorResponse"
251
+ }
252
+ }
253
+ }
254
+ }
255
+ },
256
+ "/budgets/{budget_id}/categories/{category_id}": {
257
+ "get": {
258
+ "tags": ["Categories"],
259
+ "summary": "Single category",
260
+ "description": "Returns a single category",
261
+ "operationId": "getCategoryById",
262
+ "produces": ["application/json"],
263
+ "parameters": [
264
+ {
265
+ "name": "budget_id",
266
+ "in": "path",
267
+ "description": "The ID of the Budget.",
268
+ "required": true,
269
+ "type": "string",
270
+ "format": "uuid"
271
+ },
272
+ {
273
+ "name": "category_id",
274
+ "in": "path",
275
+ "description": "The ID of the Category.",
276
+ "required": true,
277
+ "type": "string",
278
+ "format": "uuid"
279
+ }
280
+ ],
281
+ "responses": {
282
+ "200": {
283
+ "description": "The requested Category.",
284
+ "schema": {
285
+ "$ref": "#/definitions/CategoryResponse"
286
+ }
287
+ },
288
+ "404": {
289
+ "description": "The Category not was found.",
290
+ "schema": {
291
+ "$ref": "#/definitions/ErrorResponse"
292
+ }
293
+ },
294
+ "default": {
295
+ "description": "An error occurred.",
296
+ "schema": {
297
+ "$ref": "#/definitions/ErrorResponse"
298
+ }
299
+ }
300
+ }
301
+ }
302
+ },
303
+ "/budgets/{budget_id}/payees": {
304
+ "get": {
305
+ "tags": ["Payees"],
306
+ "summary": "List payees",
307
+ "description": "Returns all payees",
308
+ "operationId": "getPayees",
309
+ "produces": ["application/json"],
310
+ "parameters": [
311
+ {
312
+ "name": "budget_id",
313
+ "in": "path",
314
+ "description": "The ID of the Budget.",
315
+ "required": true,
316
+ "type": "string",
317
+ "format": "uuid"
318
+ }
319
+ ],
320
+ "responses": {
321
+ "200": {
322
+ "description": "The requested list of Payees.",
323
+ "schema": {
324
+ "$ref": "#/definitions/PayeesResponse"
325
+ }
326
+ },
327
+ "404": {
328
+ "description": "No Payees were found.",
329
+ "schema": {
330
+ "$ref": "#/definitions/ErrorResponse"
331
+ }
332
+ },
333
+ "default": {
334
+ "description": "An error occurred.",
335
+ "schema": {
336
+ "$ref": "#/definitions/ErrorResponse"
337
+ }
338
+ }
339
+ }
340
+ }
341
+ },
342
+ "/budgets/{budget_id}/payees/{payee_id}": {
343
+ "get": {
344
+ "tags": ["Payees"],
345
+ "summary": "Single payee",
346
+ "description": "Returns single payee",
347
+ "operationId": "getPayeeById",
348
+ "produces": ["application/json"],
349
+ "parameters": [
350
+ {
351
+ "name": "budget_id",
352
+ "in": "path",
353
+ "description": "The ID of the Budget.",
354
+ "required": true,
355
+ "type": "string",
356
+ "format": "uuid"
357
+ },
358
+ {
359
+ "name": "payee_id",
360
+ "in": "path",
361
+ "description": "The ID of the Payee.",
362
+ "required": true,
363
+ "type": "string",
364
+ "format": "uuid"
365
+ }
366
+ ],
367
+ "responses": {
368
+ "200": {
369
+ "description": "The requested Payee.",
370
+ "schema": {
371
+ "$ref": "#/definitions/PayeeResponse"
372
+ }
373
+ },
374
+ "404": {
375
+ "description": "The Payee was not found.",
376
+ "schema": {
377
+ "$ref": "#/definitions/ErrorResponse"
378
+ }
379
+ },
380
+ "default": {
381
+ "description": "An error occurred.",
382
+ "schema": {
383
+ "$ref": "#/definitions/ErrorResponse"
384
+ }
385
+ }
386
+ }
387
+ }
388
+ },
389
+ "/budgets/{budget_id}/payee_locations": {
390
+ "get": {
391
+ "tags": ["Payee Locations"],
392
+ "summary": "List payee locations",
393
+ "description": "Returns all payee locations",
394
+ "operationId": "getPayeeLocations",
395
+ "produces": ["application/json"],
396
+ "parameters": [
397
+ {
398
+ "name": "budget_id",
399
+ "in": "path",
400
+ "description": "The ID of the Budget.",
401
+ "required": true,
402
+ "type": "string",
403
+ "format": "uuid"
404
+ }
405
+ ],
406
+ "responses": {
407
+ "200": {
408
+ "description": "The list of Payee Locations.",
409
+ "schema": {
410
+ "$ref": "#/definitions/PayeeLocationsResponse"
411
+ }
412
+ },
413
+ "404": {
414
+ "description": "No Payees Locations were found.",
415
+ "schema": {
416
+ "$ref": "#/definitions/ErrorResponse"
417
+ }
418
+ },
419
+ "default": {
420
+ "description": "An error occurred.",
421
+ "schema": {
422
+ "$ref": "#/definitions/ErrorResponse"
423
+ }
424
+ }
425
+ }
426
+ }
427
+ },
428
+ "/budgets/{budget_id}/payee_locations/{payee_location_id}": {
429
+ "get": {
430
+ "tags": ["Payee Locations"],
431
+ "summary": "Single payee location",
432
+ "description": "Returns a single payee location",
433
+ "operationId": "getPayeeLocationById",
434
+ "produces": ["application/json"],
435
+ "parameters": [
436
+ {
437
+ "name": "budget_id",
438
+ "in": "path",
439
+ "description": "The ID of the Budget.",
440
+ "required": true,
441
+ "type": "string",
442
+ "format": "uuid"
443
+ },
444
+ {
445
+ "name": "payee_location_id",
446
+ "in": "path",
447
+ "description": "ID of payee location",
448
+ "required": true,
449
+ "type": "string",
450
+ "format": "uuid"
451
+ }
452
+ ],
453
+ "responses": {
454
+ "200": {
455
+ "description": "Payee Location",
456
+ "schema": {
457
+ "$ref": "#/definitions/PayeeLocationResponse"
458
+ }
459
+ },
460
+ "404": {
461
+ "description": "Payee location not found",
462
+ "schema": {
463
+ "$ref": "#/definitions/ErrorResponse"
464
+ }
465
+ },
466
+ "default": {
467
+ "description": "An error occurred.",
468
+ "schema": {
469
+ "$ref": "#/definitions/ErrorResponse"
470
+ }
471
+ }
472
+ }
473
+ }
474
+ },
475
+ "/budgets/{budget_id}/payees/{payee_id}/payee_locations": {
476
+ "get": {
477
+ "tags": ["Payee Locations"],
478
+ "summary": "List locations for a payee",
479
+ "description": "Returns all payee locations for the specified payee",
480
+ "operationId": "getPayeeLocationsByPayee",
481
+ "produces": ["application/json"],
482
+ "parameters": [
483
+ {
484
+ "name": "budget_id",
485
+ "in": "path",
486
+ "description": "The ID of the Budget.",
487
+ "required": true,
488
+ "type": "string",
489
+ "format": "uuid"
490
+ },
491
+ {
492
+ "name": "payee_id",
493
+ "in": "path",
494
+ "description": "ID of payee",
495
+ "required": true,
496
+ "type": "string",
497
+ "format": "uuid"
498
+ }
499
+ ],
500
+ "responses": {
501
+ "200": {
502
+ "description": "The list of requested Payee Locations.",
503
+ "schema": {
504
+ "$ref": "#/definitions/PayeeLocationsResponse"
505
+ }
506
+ },
507
+ "404": {
508
+ "description": "No Payees Locations were found.",
509
+ "schema": {
510
+ "$ref": "#/definitions/ErrorResponse"
511
+ }
512
+ },
513
+ "default": {
514
+ "description": "An error occurred.",
515
+ "schema": {
516
+ "$ref": "#/definitions/ErrorResponse"
517
+ }
518
+ }
519
+ }
520
+ }
521
+ },
522
+ "/budgets/{budget_id}/months": {
523
+ "get": {
524
+ "tags": ["Months"],
525
+ "summary": "List budget months",
526
+ "description": "Returns all budget months",
527
+ "operationId": "getBudgetMonths",
528
+ "produces": ["application/json"],
529
+ "parameters": [
530
+ {
531
+ "name": "budget_id",
532
+ "in": "path",
533
+ "description": "The ID of the Budget.",
534
+ "required": true,
535
+ "type": "string",
536
+ "format": "uuid"
537
+ }
538
+ ],
539
+ "responses": {
540
+ "200": {
541
+ "description": "The list of Budget Months.",
542
+ "schema": {
543
+ "$ref": "#/definitions/MonthSummariesResponse"
544
+ }
545
+ },
546
+ "404": {
547
+ "description": "No Budget Months were found.",
548
+ "schema": {
549
+ "$ref": "#/definitions/ErrorResponse"
550
+ }
551
+ },
552
+ "default": {
553
+ "description": "An error occurred.",
554
+ "schema": {
555
+ "$ref": "#/definitions/ErrorResponse"
556
+ }
557
+ }
558
+ }
559
+ }
560
+ },
561
+ "/budgets/{budget_id}/months/{month}": {
562
+ "get": {
563
+ "tags": ["Months"],
564
+ "summary": "Single budget month",
565
+ "description": "Returns a single budget month",
566
+ "operationId": "getBudgetMonth",
567
+ "produces": ["application/json"],
568
+ "parameters": [
569
+ {
570
+ "name": "budget_id",
571
+ "in": "path",
572
+ "description": "The ID of the Budget.",
573
+ "required": true,
574
+ "type": "string",
575
+ "format": "uuid"
576
+ },
577
+ {
578
+ "name": "month",
579
+ "in": "path",
580
+ "description":
581
+ "The Budget Month. \"current\" can also be used to specify the current calendar month (UTC).",
582
+ "required": true,
583
+ "type": "string",
584
+ "format": "date"
585
+ }
586
+ ],
587
+ "responses": {
588
+ "200": {
589
+ "description": "The Budget Month detail.",
590
+ "schema": {
591
+ "$ref": "#/definitions/MonthDetailResponse"
592
+ }
593
+ },
594
+ "404": {
595
+ "description": "The Budget Month was not found.",
596
+ "schema": {
597
+ "$ref": "#/definitions/ErrorResponse"
598
+ }
599
+ },
600
+ "default": {
601
+ "description": "An error occurred.",
602
+ "schema": {
603
+ "$ref": "#/definitions/ErrorResponse"
604
+ }
605
+ }
606
+ }
607
+ }
608
+ },
609
+ "/budgets/{budget_id}/transactions": {
610
+ "get": {
611
+ "tags": ["Transactions"],
612
+ "summary": "List transactions",
613
+ "description": "Returns budget transactions",
614
+ "operationId": "getTransactions",
615
+ "produces": ["application/json"],
616
+ "parameters": [
617
+ {
618
+ "name": "budget_id",
619
+ "in": "path",
620
+ "description": "The ID of the Budget.",
621
+ "required": true,
622
+ "type": "string",
623
+ "format": "uuid"
624
+ },
625
+ {
626
+ "name": "since_date",
627
+ "in": "query",
628
+ "description": "Only return transactions on or after this date.",
629
+ "required": false,
630
+ "type": "string",
631
+ "format": "date"
632
+ },
633
+ {
634
+ "name": "type",
635
+ "in": "query",
636
+ "description":
637
+ "Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved')",
638
+ "required": false,
639
+ "type": "string",
640
+ "enum": ["uncategorized", "unapproved"]
641
+ }
642
+ ],
643
+ "responses": {
644
+ "200": {
645
+ "description": "The list of requested Transactions.",
646
+ "schema": {
647
+ "$ref": "#/definitions/TransactionsResponse"
648
+ }
649
+ },
650
+ "404": {
651
+ "description": "No Transactions were found.",
652
+ "schema": {
653
+ "$ref": "#/definitions/ErrorResponse"
654
+ }
655
+ },
656
+ "400": {
657
+ "description": "An error occurred.",
658
+ "schema": {
659
+ "$ref": "#/definitions/ErrorResponse"
660
+ }
661
+ }
662
+ }
663
+ },
664
+ "post": {
665
+ "tags": ["Transactions"],
666
+ "summary": "Create new transaction",
667
+ "description": "Creates a transaction",
668
+ "operationId": "createTransaction",
669
+ "produces": ["application/json"],
670
+ "parameters": [
671
+ {
672
+ "name": "budget_id",
673
+ "in": "path",
674
+ "description": "The ID of the Budget.",
675
+ "required": true,
676
+ "type": "string",
677
+ "format": "uuid"
678
+ },
679
+ {
680
+ "name": "transaction",
681
+ "in": "body",
682
+ "description": "The Transaction to create.",
683
+ "required": true,
684
+ "schema": {
685
+ "$ref": "#/definitions/SaveTransactionWrapper"
686
+ }
687
+ }
688
+ ],
689
+ "responses": {
690
+ "201": {
691
+ "description": "The Transaction was successfully created.",
692
+ "schema": {
693
+ "$ref": "#/definitions/TransactionResponse"
694
+ }
695
+ },
696
+ "400": {
697
+ "description": "An error occurred.",
698
+ "schema": {
699
+ "$ref": "#/definitions/ErrorResponse"
700
+ }
701
+ },
702
+ "422": {
703
+ "description":
704
+ "A transation with the same import_id already exists on the account so this transaction was not created.",
705
+ "schema": {
706
+ "$ref": "#/definitions/ErrorResponse"
707
+ }
708
+ }
709
+ }
710
+ }
711
+ },
712
+ "/budgets/{budget_id}/transactions/bulk": {
713
+ "post": {
714
+ "tags": ["Transactions"],
715
+ "summary": "Bulk create transactions",
716
+ "description": "Creates multiple transactions",
717
+ "operationId": "bulkCreateTransactions",
718
+ "produces": ["application/json"],
719
+ "parameters": [
720
+ {
721
+ "name": "budget_id",
722
+ "in": "path",
723
+ "description": "The ID of the Budget.",
724
+ "required": true,
725
+ "type": "string",
726
+ "format": "uuid"
727
+ },
728
+ {
729
+ "name": "transactions",
730
+ "in": "body",
731
+ "description": "The list of Transactions to create.",
732
+ "required": true,
733
+ "schema": {
734
+ "$ref": "#/definitions/BulkTransactions"
735
+ }
736
+ }
737
+ ],
738
+ "responses": {
739
+ "201": {
740
+ "description":
741
+ "The bulk request was processed sucessfully.",
742
+ "schema": {
743
+ "$ref": "#/definitions/BulkResponse"
744
+ }
745
+ },
746
+ "400": {
747
+ "description": "An error occurred.",
748
+ "schema": {
749
+ "$ref": "#/definitions/ErrorResponse"
750
+ }
751
+ }
752
+ }
753
+ }
754
+ },
755
+ "/budgets/{budget_id}/accounts/{account_id}/transactions": {
756
+ "get": {
757
+ "tags": ["Transactions"],
758
+ "summary": "List account transactions",
759
+ "description": "Returns all transactions for a specified account",
760
+ "operationId": "getTransactionsByAccount",
761
+ "produces": ["application/json"],
762
+ "parameters": [
763
+ {
764
+ "name": "budget_id",
765
+ "in": "path",
766
+ "description": "The ID of the Budget.",
767
+ "required": true,
768
+ "type": "string",
769
+ "format": "uuid"
770
+ },
771
+ {
772
+ "name": "account_id",
773
+ "in": "path",
774
+ "description": "The ID of the Account.",
775
+ "required": true,
776
+ "type": "string",
777
+ "format": "uuid"
778
+ },
779
+ {
780
+ "name": "since_date",
781
+ "in": "query",
782
+ "description": "Only return transactions on or after this date.",
783
+ "required": false,
784
+ "type": "string",
785
+ "format": "date"
786
+ }
787
+ ],
788
+ "responses": {
789
+ "200": {
790
+ "description": "The list of requested Transactions.",
791
+ "schema": {
792
+ "$ref": "#/definitions/TransactionsResponse"
793
+ }
794
+ },
795
+ "404": {
796
+ "description": "No Transactions were found",
797
+ "schema": {
798
+ "$ref": "#/definitions/ErrorResponse"
799
+ }
800
+ },
801
+ "default": {
802
+ "description": "An error occurred.",
803
+ "schema": {
804
+ "$ref": "#/definitions/ErrorResponse"
805
+ }
806
+ }
807
+ }
808
+ }
809
+ },
810
+ "/budgets/{budget_id}/categories/{category_id}/transactions": {
811
+ "get": {
812
+ "tags": ["Transactions"],
813
+ "summary": "List category transactions",
814
+ "description": "Returns all transactions for a specified category",
815
+ "operationId": "getTransactionsByCategory",
816
+ "produces": ["application/json"],
817
+ "parameters": [
818
+ {
819
+ "name": "budget_id",
820
+ "in": "path",
821
+ "description": "The ID of the Budget.",
822
+ "required": true,
823
+ "type": "string",
824
+ "format": "uuid"
825
+ },
826
+ {
827
+ "name": "category_id",
828
+ "in": "path",
829
+ "description": "The ID of the Category.",
830
+ "required": true,
831
+ "type": "string",
832
+ "format": "uuid"
833
+ },
834
+ {
835
+ "name": "since_date",
836
+ "in": "query",
837
+ "description": "Only return transactions on or after this date.",
838
+ "required": false,
839
+ "type": "string",
840
+ "format": "date"
841
+ }
842
+ ],
843
+ "responses": {
844
+ "200": {
845
+ "description": "The list of requested Transactions.",
846
+ "schema": {
847
+ "$ref": "#/definitions/TransactionsResponse"
848
+ }
849
+ },
850
+ "404": {
851
+ "description": "No Transactions were found.",
852
+ "schema": {
853
+ "$ref": "#/definitions/ErrorResponse"
854
+ }
855
+ },
856
+ "default": {
857
+ "description": "An error occurred.",
858
+ "schema": {
859
+ "$ref": "#/definitions/ErrorResponse"
860
+ }
861
+ }
862
+ }
863
+ }
864
+ },
865
+ "/budgets/{budget_id}/transactions/{transaction_id}": {
866
+ "get": {
867
+ "tags": ["Transactions"],
868
+ "summary": "Single transaction",
869
+ "description": "Returns a single transaction",
870
+ "operationId": "getTransactionsById",
871
+ "produces": ["application/json"],
872
+ "parameters": [
873
+ {
874
+ "name": "budget_id",
875
+ "in": "path",
876
+ "description": "The ID of the Budget.",
877
+ "required": true,
878
+ "type": "string",
879
+ "format": "uuid"
880
+ },
881
+ {
882
+ "name": "transaction_id",
883
+ "in": "path",
884
+ "description": "The ID of the Transaction.",
885
+ "required": true,
886
+ "type": "string",
887
+ "format": "uuid"
888
+ }
889
+ ],
890
+ "responses": {
891
+ "200": {
892
+ "description": "The requested Transaction.",
893
+ "schema": {
894
+ "$ref": "#/definitions/TransactionResponse"
895
+ }
896
+ },
897
+ "404": {
898
+ "description": "The Transaction was not found.",
899
+ "schema": {
900
+ "$ref": "#/definitions/ErrorResponse"
901
+ }
902
+ },
903
+ "default": {
904
+ "description": "An error occurred.",
905
+ "schema": {
906
+ "$ref": "#/definitions/ErrorResponse"
907
+ }
908
+ }
909
+ }
910
+ },
911
+ "put": {
912
+ "tags": ["Transactions"],
913
+ "summary": "Updates an existing transaction",
914
+ "description": "Updates a transaction",
915
+ "operationId": "updateTransaction",
916
+ "produces": ["application/json"],
917
+ "parameters": [
918
+ {
919
+ "name": "budget_id",
920
+ "in": "path",
921
+ "description": "The ID of the Budget.",
922
+ "required": true,
923
+ "type": "string",
924
+ "format": "uuid"
925
+ },
926
+ {
927
+ "name": "transaction_id",
928
+ "in": "path",
929
+ "description": "The ID of the Transaction.",
930
+ "required": true,
931
+ "type": "string",
932
+ "format": "uuid"
933
+ },
934
+ {
935
+ "name": "transaction",
936
+ "in": "body",
937
+ "description": "The Transaction to update.",
938
+ "required": true,
939
+ "schema": {
940
+ "$ref": "#/definitions/SaveTransactionWrapper"
941
+ }
942
+ }
943
+ ],
944
+ "responses": {
945
+ "200": {
946
+ "description": "The Transaction was successfull updated.",
947
+ "schema": {
948
+ "$ref": "#/definitions/TransactionResponse"
949
+ }
950
+ },
951
+ "400": {
952
+ "description": "An error occurred.",
953
+ "schema": {
954
+ "$ref": "#/definitions/ErrorResponse"
955
+ }
956
+ }
957
+ }
958
+ }
959
+ },
960
+ "/budgets/{budget_id}/scheduled_transactions": {
961
+ "get": {
962
+ "tags": ["Scheduled Transactions"],
963
+ "summary": "List scheduled transactions",
964
+ "description": "Returns all scheduled transactions",
965
+ "operationId": "getScheduledTransactions",
966
+ "produces": ["application/json"],
967
+ "parameters": [
968
+ {
969
+ "name": "budget_id",
970
+ "in": "path",
971
+ "description": "The ID of the Budget.",
972
+ "required": true,
973
+ "type": "string",
974
+ "format": "uuid"
975
+ }
976
+ ],
977
+ "responses": {
978
+ "200": {
979
+ "description": "The list of requested Scheduled Transactions.",
980
+ "schema": {
981
+ "$ref": "#/definitions/ScheduledTransactionsResponse"
982
+ }
983
+ },
984
+ "404": {
985
+ "description": "No Scheduled Transactions were found.",
986
+ "schema": {
987
+ "$ref": "#/definitions/ErrorResponse"
988
+ }
989
+ },
990
+ "default": {
991
+ "description": "An error occurred.",
992
+ "schema": {
993
+ "$ref": "#/definitions/ErrorResponse"
994
+ }
995
+ }
996
+ }
997
+ }
998
+ },
999
+ "/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}": {
1000
+ "get": {
1001
+ "tags": ["Scheduled Transactions"],
1002
+ "summary": "Single scheduled transaction",
1003
+ "description": "Returns a single scheduled transaction",
1004
+ "operationId": "getScheduledTransactionById",
1005
+ "produces": ["application/json"],
1006
+ "parameters": [
1007
+ {
1008
+ "name": "budget_id",
1009
+ "in": "path",
1010
+ "description": "The ID of the Budget.",
1011
+ "required": true,
1012
+ "type": "string",
1013
+ "format": "uuid"
1014
+ },
1015
+ {
1016
+ "name": "scheduled_transaction_id",
1017
+ "in": "path",
1018
+ "description": "The ID of the Scheduled Transaction.",
1019
+ "required": true,
1020
+ "type": "string",
1021
+ "format": "uuid"
1022
+ }
1023
+ ],
1024
+ "responses": {
1025
+ "200": {
1026
+ "description": "The requested Scheduled Transaction.",
1027
+ "schema": {
1028
+ "$ref": "#/definitions/ScheduledTransactionResponse"
1029
+ }
1030
+ },
1031
+ "404": {
1032
+ "description": "The Scheduled Transaction was not found.",
1033
+ "schema": {
1034
+ "$ref": "#/definitions/ErrorResponse"
1035
+ }
1036
+ },
1037
+ "default": {
1038
+ "description": "An error occurred.",
1039
+ "schema": {
1040
+ "$ref": "#/definitions/ErrorResponse"
1041
+ }
1042
+ }
1043
+ }
1044
+ }
1045
+ }
1046
+ },
1047
+ "securityDefinitions": {
1048
+ "bearer": {
1049
+ "type": "apiKey",
1050
+ "name": "Authorization",
1051
+ "in": "header"
1052
+ }
1053
+ },
1054
+ "definitions": {
1055
+ "ErrorResponse": {
1056
+ "type": "object",
1057
+ "required": ["error"],
1058
+ "properties": {
1059
+ "error": {
1060
+ "$ref": "#/definitions/ErrorDetail"
1061
+ }
1062
+ }
1063
+ },
1064
+ "ErrorDetail": {
1065
+ "type": "object",
1066
+ "required": ["id", "name", "detail"],
1067
+ "properties": {
1068
+ "id": {
1069
+ "type": "string"
1070
+ },
1071
+ "name": {
1072
+ "type": "string"
1073
+ },
1074
+ "detail": {
1075
+ "type": "string"
1076
+ }
1077
+ }
1078
+ },
1079
+ "BudgetSummaryResponse": {
1080
+ "type": "object",
1081
+ "required": ["data"],
1082
+ "properties": {
1083
+ "data": {
1084
+ "$ref": "#/definitions/BudgetSummaryWrapper"
1085
+ }
1086
+ }
1087
+ },
1088
+ "BudgetSummaryWrapper": {
1089
+ "type": "object",
1090
+ "required": ["budgets"],
1091
+ "properties": {
1092
+ "budgets": {
1093
+ "type": "array",
1094
+ "items": {
1095
+ "$ref": "#/definitions/BudgetSummary"
1096
+ }
1097
+ }
1098
+ }
1099
+ },
1100
+ "BudgetDetailResponse": {
1101
+ "type": "object",
1102
+ "required": ["data"],
1103
+ "properties": {
1104
+ "data": {
1105
+ "$ref": "#/definitions/BudgetDetailWrapper"
1106
+ }
1107
+ }
1108
+ },
1109
+ "BudgetDetailWrapper": {
1110
+ "type": "object",
1111
+ "required": ["budget", "server_knowledge"],
1112
+ "properties": {
1113
+ "budget": {
1114
+ "$ref": "#/definitions/BudgetDetail"
1115
+ },
1116
+ "server_knowledge": {
1117
+ "type": "number",
1118
+ "description": "The knowledge of the server"
1119
+ }
1120
+ }
1121
+ },
1122
+ "BudgetSummary": {
1123
+ "type": "object",
1124
+ "required": ["id", "name"],
1125
+ "properties": {
1126
+ "id": {
1127
+ "type": "string",
1128
+ "format": "uuid"
1129
+ },
1130
+ "name": {
1131
+ "type": "string"
1132
+ },
1133
+ "last_modified_on": {
1134
+ "type": "string",
1135
+ "format": "date-time",
1136
+ "description": "The last time any changes were made to the budget from either a web or mobile client."
1137
+ },
1138
+ "date_format": {
1139
+ "$ref": "#/definitions/DateFormat"
1140
+ },
1141
+ "currency_format": {
1142
+ "$ref": "#/definitions/CurrencyFormat"
1143
+ }
1144
+ }
1145
+ },
1146
+ "DateFormat": {
1147
+ "type": "object",
1148
+ "required": ["locale"],
1149
+ "properties": {
1150
+ "locale": {
1151
+ "type": "string"
1152
+ }
1153
+ }
1154
+ },
1155
+ "CurrencyFormat": {
1156
+ "type": "object",
1157
+ "required": ["locale"],
1158
+ "properties": {
1159
+ "locale": {
1160
+ "type": "string"
1161
+ }
1162
+ }
1163
+ },
1164
+ "BudgetDetail": {
1165
+ "allOf": [
1166
+ {
1167
+ "$ref": "#/definitions/BudgetSummary"
1168
+ },
1169
+ {
1170
+ "properties": {
1171
+ "accounts": {
1172
+ "type": "array",
1173
+ "items": {
1174
+ "$ref": "#/definitions/Account"
1175
+ }
1176
+ },
1177
+ "payees": {
1178
+ "type": "array",
1179
+ "items": {
1180
+ "$ref": "#/definitions/Payee"
1181
+ }
1182
+ },
1183
+ "payee_locations": {
1184
+ "type": "array",
1185
+ "items": {
1186
+ "$ref": "#/definitions/PayeeLocation"
1187
+ }
1188
+ },
1189
+ "category_groups": {
1190
+ "type": "array",
1191
+ "items": {
1192
+ "$ref": "#/definitions/CategoryGroup"
1193
+ }
1194
+ },
1195
+ "categories": {
1196
+ "type": "array",
1197
+ "items": {
1198
+ "$ref": "#/definitions/Category"
1199
+ }
1200
+ },
1201
+ "months": {
1202
+ "type": "array",
1203
+ "items": {
1204
+ "$ref": "#/definitions/MonthDetail"
1205
+ }
1206
+ },
1207
+ "transactions": {
1208
+ "type": "array",
1209
+ "items": {
1210
+ "$ref": "#/definitions/TransactionSummary"
1211
+ }
1212
+ },
1213
+ "subtransactions": {
1214
+ "type": "array",
1215
+ "items": {
1216
+ "$ref": "#/definitions/SubTransaction"
1217
+ }
1218
+ },
1219
+ "scheduled_transactions": {
1220
+ "type": "array",
1221
+ "items": {
1222
+ "$ref": "#/definitions/ScheduledTransactionSummary"
1223
+ }
1224
+ },
1225
+ "scheduled_subtransactions": {
1226
+ "type": "array",
1227
+ "items": {
1228
+ "$ref": "#/definitions/ScheduledSubTransaction"
1229
+ }
1230
+ }
1231
+ }
1232
+ }
1233
+ ]
1234
+ },
1235
+ "AccountsResponse": {
1236
+ "type": "object",
1237
+ "required": ["data"],
1238
+ "properties": {
1239
+ "data": {
1240
+ "$ref": "#/definitions/AccountsWrapper"
1241
+ }
1242
+ }
1243
+ },
1244
+ "AccountsWrapper": {
1245
+ "type": "object",
1246
+ "required": ["accounts"],
1247
+ "properties": {
1248
+ "accounts": {
1249
+ "type": "array",
1250
+ "items": {
1251
+ "$ref": "#/definitions/Account"
1252
+ }
1253
+ }
1254
+ }
1255
+ },
1256
+ "AccountResponse": {
1257
+ "type": "object",
1258
+ "required": ["data"],
1259
+ "properties": {
1260
+ "data": {
1261
+ "$ref": "#/definitions/AccountWrapper"
1262
+ }
1263
+ }
1264
+ },
1265
+ "AccountWrapper": {
1266
+ "type": "object",
1267
+ "required": ["account"],
1268
+ "properties": {
1269
+ "account": {
1270
+ "$ref": "#/definitions/Account"
1271
+ }
1272
+ }
1273
+ },
1274
+ "Account": {
1275
+ "type": "object",
1276
+ "required": [
1277
+ "id",
1278
+ "name",
1279
+ "type",
1280
+ "on_budget",
1281
+ "closed",
1282
+ "note",
1283
+ "balance",
1284
+ "cleared_balance",
1285
+ "uncleared_balance"
1286
+ ],
1287
+ "properties": {
1288
+ "id": {
1289
+ "type": "string",
1290
+ "format": "uuid"
1291
+ },
1292
+ "name": {
1293
+ "type": "string"
1294
+ },
1295
+ "type": {
1296
+ "type": "string",
1297
+ "enum": ["Checking", "Savings", "CreditCard"]
1298
+ },
1299
+ "on_budget": {
1300
+ "type": "boolean",
1301
+ "description": "Whether this account is on budget or not"
1302
+ },
1303
+ "closed": {
1304
+ "type": "boolean",
1305
+ "description": "Whether this account is closed or not"
1306
+ },
1307
+ "note": {
1308
+ "type": "string"
1309
+ },
1310
+ "balance": {
1311
+ "type": "number",
1312
+ "format": "1234000",
1313
+ "description":
1314
+ "The current balance of the account in milliunits format"
1315
+ },
1316
+ "cleared_balance": {
1317
+ "type": "number",
1318
+ "format": "1234000",
1319
+ "description":
1320
+ "The current cleared balance of the account in milliunits format"
1321
+ },
1322
+ "uncleared_balance": {
1323
+ "type": "number",
1324
+ "format": "1234000",
1325
+ "description":
1326
+ "The current uncleared balance of the account in milliunits format"
1327
+ }
1328
+ }
1329
+ },
1330
+ "CategoriesResponse": {
1331
+ "type": "object",
1332
+ "required": ["data"],
1333
+ "properties": {
1334
+ "data": {
1335
+ "$ref": "#/definitions/CategoryGroupsWrapper"
1336
+ }
1337
+ }
1338
+ },
1339
+ "CategoryGroupsWrapper": {
1340
+ "type": "object",
1341
+ "required": ["category_groups"],
1342
+ "properties": {
1343
+ "category_groups": {
1344
+ "type": "array",
1345
+ "items": {
1346
+ "$ref": "#/definitions/CategoryGroupWithCategories"
1347
+ }
1348
+ }
1349
+ }
1350
+ },
1351
+ "CategoryResponse": {
1352
+ "type": "object",
1353
+ "required": ["data"],
1354
+ "properties": {
1355
+ "data": {
1356
+ "$ref": "#/definitions/CategoryWrapper"
1357
+ }
1358
+ }
1359
+ },
1360
+ "CategoryWrapper": {
1361
+ "type": "object",
1362
+ "required": ["category"],
1363
+ "properties": {
1364
+ "category": {
1365
+ "$ref": "#/definitions/Category"
1366
+ }
1367
+ }
1368
+ },
1369
+ "CategoryGroup": {
1370
+ "type": "object",
1371
+ "required": ["id", "name", "hidden"],
1372
+ "properties": {
1373
+ "id": {
1374
+ "type": "string",
1375
+ "format": "uuid"
1376
+ },
1377
+ "name": {
1378
+ "type": "string"
1379
+ },
1380
+ "hidden": {
1381
+ "description": "Whether or not the category group is hidden",
1382
+ "type": "boolean"
1383
+ }
1384
+ }
1385
+ },
1386
+ "CategoryGroupWithCategories": {
1387
+ "allOf": [
1388
+ {
1389
+ "$ref": "#/definitions/CategoryGroup"
1390
+ },
1391
+ {
1392
+ "required": ["categories"],
1393
+ "properties": {
1394
+ "categories": {
1395
+ "type": "array",
1396
+ "description": "Category group categories",
1397
+ "items": {
1398
+ "$ref": "#/definitions/Category"
1399
+ }
1400
+ }
1401
+ }
1402
+ }
1403
+ ]
1404
+ },
1405
+ "Category": {
1406
+ "type": "object",
1407
+ "required": [
1408
+ "id",
1409
+ "category_group_id",
1410
+ "name",
1411
+ "hidden",
1412
+ "note",
1413
+ "activity",
1414
+ "balance",
1415
+ "budgeted"
1416
+ ],
1417
+ "properties": {
1418
+ "id": {
1419
+ "type": "string",
1420
+ "format": "uuid"
1421
+ },
1422
+ "category_group_id": {
1423
+ "type": "string",
1424
+ "format": "uuid"
1425
+ },
1426
+ "name": {
1427
+ "type": "string"
1428
+ },
1429
+ "hidden": {
1430
+ "description": "Whether or not the category is hidden",
1431
+ "type": "boolean"
1432
+ },
1433
+ "note": {
1434
+ "type": "string"
1435
+ },
1436
+ "budgeted": {
1437
+ "type": "number",
1438
+ "description": "Budgeted amount in current month in milliunits format"
1439
+ },
1440
+ "activity": {
1441
+ "type": "number",
1442
+ "description": "Activity amount in current month in milliunits format"
1443
+ },
1444
+ "balance": {
1445
+ "type": "number",
1446
+ "description": "Balance in current month in milliunits format"
1447
+ }
1448
+ }
1449
+ },
1450
+ "PayeesResponse": {
1451
+ "type": "object",
1452
+ "required": ["data"],
1453
+ "properties": {
1454
+ "data": {
1455
+ "$ref": "#/definitions/PayeesWrapper"
1456
+ }
1457
+ }
1458
+ },
1459
+ "PayeesWrapper": {
1460
+ "type": "object",
1461
+ "required": ["payees"],
1462
+ "properties": {
1463
+ "payees": {
1464
+ "type": "array",
1465
+ "items": {
1466
+ "$ref": "#/definitions/Payee"
1467
+ }
1468
+ }
1469
+ }
1470
+ },
1471
+ "PayeeResponse": {
1472
+ "type": "object",
1473
+ "required": ["data"],
1474
+ "properties": {
1475
+ "data": {
1476
+ "$ref": "#/definitions/PayeeWrapper"
1477
+ }
1478
+ }
1479
+ },
1480
+ "PayeeWrapper": {
1481
+ "type": "object",
1482
+ "required": ["payee"],
1483
+ "properties": {
1484
+ "payee": {
1485
+ "$ref": "#/definitions/Payee"
1486
+ }
1487
+ }
1488
+ },
1489
+ "Payee": {
1490
+ "type": "object",
1491
+ "required": ["id", "name", "transfer_account_id"],
1492
+ "properties": {
1493
+ "id": {
1494
+ "type": "string",
1495
+ "format": "uuid"
1496
+ },
1497
+ "name": {
1498
+ "type": "string"
1499
+ },
1500
+ "transfer_account_id": {
1501
+ "description":
1502
+ "If a transfer payee, the account_id to which this payee transfers to",
1503
+ "type": "string"
1504
+ }
1505
+ }
1506
+ },
1507
+ "PayeeLocationsResponse": {
1508
+ "type": "object",
1509
+ "required": ["data"],
1510
+ "properties": {
1511
+ "data": {
1512
+ "$ref": "#/definitions/PayeeLocationsWrapper"
1513
+ }
1514
+ }
1515
+ },
1516
+ "PayeeLocationsWrapper": {
1517
+ "type": "object",
1518
+ "required": ["payee_locations"],
1519
+ "properties": {
1520
+ "payee_locations": {
1521
+ "type": "array",
1522
+ "items": {
1523
+ "$ref": "#/definitions/PayeeLocation"
1524
+ }
1525
+ }
1526
+ }
1527
+ },
1528
+ "PayeeLocationResponse": {
1529
+ "type": "object",
1530
+ "required": ["data"],
1531
+ "properties": {
1532
+ "data": {
1533
+ "$ref": "#/definitions/PayeeLocationWrapper"
1534
+ }
1535
+ }
1536
+ },
1537
+ "PayeeLocationWrapper": {
1538
+ "type": "object",
1539
+ "required": ["payee_location"],
1540
+ "properties": {
1541
+ "payee_location": {
1542
+ "$ref": "#/definitions/PayeeLocation"
1543
+ }
1544
+ }
1545
+ },
1546
+ "PayeeLocation": {
1547
+ "type": "object",
1548
+ "required": ["id", "payee_id", "latitude", "longitude"],
1549
+ "properties": {
1550
+ "id": {
1551
+ "type": "string",
1552
+ "format": "uuid"
1553
+ },
1554
+ "payee_id": {
1555
+ "type": "string",
1556
+ "format": "uuid"
1557
+ },
1558
+ "latitude": {
1559
+ "type": "string"
1560
+ },
1561
+ "longitude": {
1562
+ "type": "string"
1563
+ }
1564
+ }
1565
+ },
1566
+ "TransactionsResponse": {
1567
+ "type": "object",
1568
+ "required": ["data"],
1569
+ "properties": {
1570
+ "data": {
1571
+ "$ref": "#/definitions/TransactionsWrapper"
1572
+ }
1573
+ }
1574
+ },
1575
+ "TransactionsWrapper": {
1576
+ "type": "object",
1577
+ "required": ["transactions"],
1578
+ "properties": {
1579
+ "transactions": {
1580
+ "type": "array",
1581
+ "items": {
1582
+ "$ref": "#/definitions/TransactionDetail"
1583
+ }
1584
+ }
1585
+ }
1586
+ },
1587
+ "TransactionResponse": {
1588
+ "type": "object",
1589
+ "required": ["data"],
1590
+ "properties": {
1591
+ "data": {
1592
+ "$ref": "#/definitions/TransactionWrapper"
1593
+ }
1594
+ }
1595
+ },
1596
+ "TransactionWrapper": {
1597
+ "type": "object",
1598
+ "required": ["transaction"],
1599
+ "properties": {
1600
+ "transaction": {
1601
+ "$ref": "#/definitions/TransactionDetail"
1602
+ }
1603
+ }
1604
+ },
1605
+ "TransactionSummary": {
1606
+ "type": "object",
1607
+ "required": [
1608
+ "id",
1609
+ "date",
1610
+ "amount",
1611
+ "memo",
1612
+ "cleared",
1613
+ "approved",
1614
+ "flag_color",
1615
+ "account_id",
1616
+ "payee_id",
1617
+ "category_id",
1618
+ "transfer_account_id",
1619
+ "import_id"
1620
+ ],
1621
+ "properties": {
1622
+ "id": {
1623
+ "type": "string",
1624
+ "format": "uuid"
1625
+ },
1626
+ "date": {
1627
+ "type": "string",
1628
+ "format": "date"
1629
+ },
1630
+ "amount": {
1631
+ "type": "number",
1632
+ "format": "1234000",
1633
+ "description": "The transaction amount in milliunits format"
1634
+ },
1635
+ "memo": {
1636
+ "type": "string"
1637
+ },
1638
+ "cleared": {
1639
+ "type": "string",
1640
+ "enum": ["cleared", "uncleared", "reconciled"],
1641
+ "description": "The cleared status of the transaction"
1642
+ },
1643
+ "approved": {
1644
+ "type": "boolean",
1645
+ "description": "Whether or not the transaction is approved"
1646
+ },
1647
+ "flag_color": {
1648
+ "type": "string"
1649
+ },
1650
+ "account_id": {
1651
+ "type": "string",
1652
+ "format": "uuid"
1653
+ },
1654
+ "payee_id": {
1655
+ "type": "string",
1656
+ "format": "uuid"
1657
+ },
1658
+ "category_id": {
1659
+ "type": "string",
1660
+ "format": "uuid"
1661
+ },
1662
+ "transfer_account_id": {
1663
+ "type": "string",
1664
+ "format": "uuid"
1665
+ },
1666
+ "import_id": {
1667
+ "type": "string",
1668
+ "description":
1669
+ "If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurance]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'."
1670
+ }
1671
+ }
1672
+ },
1673
+ "TransactionDetail": {
1674
+ "allOf": [
1675
+ {
1676
+ "$ref": "#/definitions/TransactionSummary"
1677
+ },
1678
+ {
1679
+ "required": ["subtransactions"],
1680
+ "properties": {
1681
+ "subtransactions": {
1682
+ "type": "array",
1683
+ "description": "If a split transaction, the sub-transactions.",
1684
+ "items": {
1685
+ "$ref": "#/definitions/SubTransaction"
1686
+ }
1687
+ }
1688
+ }
1689
+ }
1690
+ ]
1691
+ },
1692
+ "SaveTransactionWrapper": {
1693
+ "type": "object",
1694
+ "required": ["transaction"],
1695
+ "properties": {
1696
+ "transaction": {
1697
+ "$ref": "#/definitions/SaveTransaction"
1698
+ }
1699
+ }
1700
+ },
1701
+ "SaveTransaction": {
1702
+ "type": "object",
1703
+ "required": ["account_id", "date", "amount"],
1704
+ "properties": {
1705
+ "account_id": {
1706
+ "type": "string",
1707
+ "format": "uuid"
1708
+ },
1709
+ "date": {
1710
+ "type": "string",
1711
+ "format": "date"
1712
+ },
1713
+ "amount": {
1714
+ "type": "number",
1715
+ "format": "1234000",
1716
+ "description": "The transaction amount in milliunits format"
1717
+ },
1718
+ "payee_id": {
1719
+ "type": "string",
1720
+ "format": "uuid",
1721
+ "description":
1722
+ "The payee for the transaction. Transfer payees are not permitted and will be ignored if supplied."
1723
+ },
1724
+ "payee_name": {
1725
+ "type": "string",
1726
+ "description":
1727
+ "The payee name. If a payee_name value is provided and payee_id is not included or has a null value, payee_name will be used to create or use an existing payee."
1728
+ },
1729
+ "category_id": {
1730
+ "type": "string",
1731
+ "format": "uuid",
1732
+ "description":
1733
+ "The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied."
1734
+ },
1735
+ "memo": {
1736
+ "type": "string"
1737
+ },
1738
+ "cleared": {
1739
+ "type": "string",
1740
+ "enum": ["Cleared", "Uncleared", "Reconciled"],
1741
+ "description": "The cleared status of the transaction"
1742
+ },
1743
+ "approved": {
1744
+ "type": "boolean",
1745
+ "description":
1746
+ "Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default."
1747
+ },
1748
+ "flag_color": {
1749
+ "type": "string",
1750
+ "enum": ["red", "orange", "yellow", "green", "blue", "purple"],
1751
+ "description": "The transaction flag"
1752
+ },
1753
+ "import_id": {
1754
+ "type": "string",
1755
+ "description":
1756
+ "If specified for a new transaction, the transaction will be treated as Imported and assigned this import_id. If another transaction on the same account with this same import_id is later attempted to be created, it will be skipped to prevent duplication. Transactions imported through File Based Import or Direct Import and not through the API, are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurance]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import. If import_id is specified as null, the transaction will be treated as a user entered transaction."
1757
+ }
1758
+ }
1759
+ },
1760
+ "BulkIdWrapper": {
1761
+ "type": "object",
1762
+ "required": ["bulk"],
1763
+ "properties": {
1764
+ "bulk": {
1765
+ "$ref": "#/definitions/BulkIds"
1766
+ }
1767
+ }
1768
+ },
1769
+ "BulkIds": {
1770
+ "type": "object",
1771
+ "required": ["transaction_ids", "duplicate_import_ids"],
1772
+ "properties": {
1773
+ "transaction_ids": {
1774
+ "type": "array",
1775
+ "description": "The list of Transaction IDs that were created.",
1776
+ "items": {
1777
+ "type": "string"
1778
+ }
1779
+ },
1780
+ "duplicate_import_ids": {
1781
+ "type": "array",
1782
+ "description":
1783
+ "If any Transactions were not created because they had an import_id matching a transaction already on the same account, the specified import_id(s) will be included in this list.",
1784
+ "items": {
1785
+ "type": "string"
1786
+ }
1787
+ }
1788
+ }
1789
+ },
1790
+ "BulkResponse": {
1791
+ "type": "object",
1792
+ "required": ["data"],
1793
+ "properties": {
1794
+ "data": {
1795
+ "$ref": "#/definitions/BulkIdWrapper"
1796
+ }
1797
+ }
1798
+ },
1799
+ "BulkTransactions": {
1800
+ "type": "object",
1801
+ "required": ["transactions"],
1802
+ "properties": {
1803
+ "transactions": {
1804
+ "type": "array",
1805
+ "items": {
1806
+ "$ref": "#/definitions/SaveTransaction"
1807
+ }
1808
+ }
1809
+ }
1810
+ },
1811
+ "SubTransaction": {
1812
+ "type": "object",
1813
+ "required": [
1814
+ "id",
1815
+ "transaction_id",
1816
+ "amount",
1817
+ "memo",
1818
+ "payee_id",
1819
+ "category_id",
1820
+ "transfer_account_id"
1821
+ ],
1822
+ "properties": {
1823
+ "id": {
1824
+ "type": "string",
1825
+ "format": "uuid"
1826
+ },
1827
+ "transaction_id": {
1828
+ "type": "string",
1829
+ "format": "uuid"
1830
+ },
1831
+ "amount": {
1832
+ "type": "number",
1833
+ "format": "1234000",
1834
+ "description": "The sub-transaction amount in milliunits format"
1835
+ },
1836
+ "memo": {
1837
+ "type": "string"
1838
+ },
1839
+ "payee_id": {
1840
+ "type": "string",
1841
+ "format": "uuid"
1842
+ },
1843
+ "category_id": {
1844
+ "type": "string",
1845
+ "format": "uuid"
1846
+ },
1847
+ "transfer_account_id": {
1848
+ "type": "string",
1849
+ "format": "uuid",
1850
+ "description":
1851
+ "If a transfer, the account_id which the subtransaction transfers to"
1852
+ }
1853
+ }
1854
+ },
1855
+ "ScheduledTransactionsResponse": {
1856
+ "type": "object",
1857
+ "required": ["data"],
1858
+ "properties": {
1859
+ "data": {
1860
+ "$ref": "#/definitions/ScheduledTransactionsWrapper"
1861
+ }
1862
+ }
1863
+ },
1864
+ "ScheduledTransactionsWrapper": {
1865
+ "type": "object",
1866
+ "required": ["scheduled_transactions"],
1867
+ "properties": {
1868
+ "scheduled_transactions": {
1869
+ "type": "array",
1870
+ "items": {
1871
+ "$ref": "#/definitions/ScheduledTransactionDetail"
1872
+ }
1873
+ }
1874
+ }
1875
+ },
1876
+ "ScheduledTransactionResponse": {
1877
+ "type": "object",
1878
+ "required": ["data"],
1879
+ "properties": {
1880
+ "data": {
1881
+ "$ref": "#/definitions/ScheduledTransactionWrapper"
1882
+ }
1883
+ }
1884
+ },
1885
+ "ScheduledTransactionWrapper": {
1886
+ "type": "object",
1887
+ "required": ["scheduled_transaction"],
1888
+ "properties": {
1889
+ "scheduled_transaction": {
1890
+ "$ref": "#/definitions/ScheduledTransactionDetail"
1891
+ }
1892
+ }
1893
+ },
1894
+ "ScheduledTransactionSummary": {
1895
+ "type": "object",
1896
+ "required": [
1897
+ "id",
1898
+ "date_first",
1899
+ "date_next",
1900
+ "frequency",
1901
+ "amount",
1902
+ "memo",
1903
+ "flag_color",
1904
+ "account_id",
1905
+ "payee_id",
1906
+ "category_id",
1907
+ "transfer_account_id"
1908
+ ],
1909
+ "properties": {
1910
+ "id": {
1911
+ "type": "string",
1912
+ "format": "uuid"
1913
+ },
1914
+ "date_first": {
1915
+ "type": "string",
1916
+ "format": "date",
1917
+ "description":
1918
+ "The first date for which the Scheduled Transaction was scheduled."
1919
+ },
1920
+ "date_next": {
1921
+ "type": "string",
1922
+ "format": "date",
1923
+ "description":
1924
+ "The next date for which the Scheduled Transaction is scheduled."
1925
+ },
1926
+ "frequency": {
1927
+ "type": "string",
1928
+ "enum": [
1929
+ "never",
1930
+ "daily",
1931
+ "weekly",
1932
+ "everyOtherWeek",
1933
+ "twiceAMonth",
1934
+ "every4Weeks",
1935
+ "monthly",
1936
+ "everyOtherMonth",
1937
+ "every3Months",
1938
+ "every4Months",
1939
+ "twiceAYear",
1940
+ "yearly",
1941
+ "everyOtherYear"
1942
+ ]
1943
+ },
1944
+ "amount": {
1945
+ "type": "number",
1946
+ "format": "1234000",
1947
+ "description": "The scheduled transaction amount in milliunits format"
1948
+ },
1949
+ "memo": {
1950
+ "type": "string"
1951
+ },
1952
+ "flag_color": {
1953
+ "type": "string"
1954
+ },
1955
+ "account_id": {
1956
+ "type": "string",
1957
+ "format": "uuid"
1958
+ },
1959
+ "payee_id": {
1960
+ "type": "string",
1961
+ "format": "uuid"
1962
+ },
1963
+ "category_id": {
1964
+ "type": "string",
1965
+ "format": "uuid"
1966
+ },
1967
+ "transfer_account_id": {
1968
+ "type": "string",
1969
+ "format": "uuid",
1970
+ "description":
1971
+ "If a transfer, the account_id which the scheduled transaction transfers to"
1972
+ }
1973
+ }
1974
+ },
1975
+ "ScheduledTransactionDetail": {
1976
+ "allOf": [
1977
+ {
1978
+ "$ref": "#/definitions/ScheduledTransactionSummary"
1979
+ },
1980
+ {
1981
+ "required": ["subtransactions"],
1982
+ "properties": {
1983
+ "subtransactions": {
1984
+ "type": "array",
1985
+ "description":
1986
+ "If a split scheduled transaction, the sub-transactions.",
1987
+ "items": {
1988
+ "$ref": "#/definitions/ScheduledSubTransaction"
1989
+ }
1990
+ }
1991
+ }
1992
+ }
1993
+ ]
1994
+ },
1995
+ "ScheduledSubTransaction": {
1996
+ "type": "object",
1997
+ "required": [
1998
+ "id",
1999
+ "scheduled_transaction_id",
2000
+ "amount",
2001
+ "memo",
2002
+ "payee_id",
2003
+ "category_id",
2004
+ "transfer_account_id"
2005
+ ],
2006
+ "properties": {
2007
+ "id": {
2008
+ "type": "string",
2009
+ "format": "uuid"
2010
+ },
2011
+ "scheduled_transaction_id": {
2012
+ "type": "string",
2013
+ "format": "uuid"
2014
+ },
2015
+ "amount": {
2016
+ "type": "number",
2017
+ "format": "1234000",
2018
+ "description":
2019
+ "The scheduled sub-transaction amount in milliunits format"
2020
+ },
2021
+ "memo": {
2022
+ "type": "string"
2023
+ },
2024
+ "payee_id": {
2025
+ "type": "string",
2026
+ "format": "uuid"
2027
+ },
2028
+ "category_id": {
2029
+ "type": "string",
2030
+ "format": "uuid"
2031
+ },
2032
+ "transfer_account_id": {
2033
+ "type": "string",
2034
+ "format": "uuid",
2035
+ "description":
2036
+ "If a transfer, the account_id which the scheduled sub transaction transfers to"
2037
+ }
2038
+ }
2039
+ },
2040
+ "MonthSummariesResponse": {
2041
+ "type": "object",
2042
+ "required": ["data"],
2043
+ "properties": {
2044
+ "data": {
2045
+ "$ref": "#/definitions/MonthSummariesWrapper"
2046
+ }
2047
+ }
2048
+ },
2049
+ "MonthSummariesWrapper": {
2050
+ "type": "object",
2051
+ "required": ["months"],
2052
+ "properties": {
2053
+ "months": {
2054
+ "type": "array",
2055
+ "items": {
2056
+ "$ref": "#/definitions/MonthSummary"
2057
+ }
2058
+ }
2059
+ }
2060
+ },
2061
+ "MonthDetailResponse": {
2062
+ "type": "object",
2063
+ "required": ["data"],
2064
+ "properties": {
2065
+ "data": {
2066
+ "$ref": "#/definitions/MonthDetailWrapper"
2067
+ }
2068
+ }
2069
+ },
2070
+ "MonthDetailWrapper": {
2071
+ "type": "object",
2072
+ "required": ["month"],
2073
+ "properties": {
2074
+ "month": {
2075
+ "$ref": "#/definitions/MonthDetail"
2076
+ }
2077
+ }
2078
+ },
2079
+ "MonthSummary": {
2080
+ "type": "object",
2081
+ "required": ["month", "note", "to_be_budgeted", "age_of_money"],
2082
+ "properties": {
2083
+ "month": {
2084
+ "type": "string",
2085
+ "format": "date"
2086
+ },
2087
+ "note": {
2088
+ "type": "string"
2089
+ },
2090
+ "to_be_budgeted": {
2091
+ "type": "number",
2092
+ "format": "1234000",
2093
+ "description":
2094
+ "The current balance of the account in milliunits format"
2095
+ },
2096
+ "age_of_money": {
2097
+ "type": "number"
2098
+ }
2099
+ }
2100
+ },
2101
+ "MonthDetail": {
2102
+ "allOf": [
2103
+ {
2104
+ "$ref": "#/definitions/MonthSummary"
2105
+ },
2106
+ {
2107
+ "required": ["categories"],
2108
+ "properties": {
2109
+ "categories": {
2110
+ "type": "array",
2111
+ "description": "The budget month categories",
2112
+ "items": {
2113
+ "$ref": "#/definitions/Category"
2114
+ }
2115
+ }
2116
+ }
2117
+ }
2118
+ ]
2119
+ }
2120
+ }
2121
+ }