ynab 1.31.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/DEVELOPMENT.md +11 -0
  3. data/Gemfile +8 -0
  4. data/Gemfile.lock +42 -0
  5. data/README.md +3 -3
  6. data/Rakefile +58 -0
  7. data/config.json +9 -0
  8. data/docs/Account.md +25 -0
  9. data/docs/AccountResponse.md +8 -0
  10. data/docs/AccountResponseData.md +8 -0
  11. data/docs/AccountType.md +7 -0
  12. data/docs/AccountWrapper.md +8 -0
  13. data/docs/AccountsApi.md +70 -0
  14. data/docs/AccountsResponse.md +8 -0
  15. data/docs/AccountsResponseData.md +9 -0
  16. data/docs/AccountsWrapper.md +9 -0
  17. data/docs/BudgetDetail.md +24 -0
  18. data/docs/BudgetDetailAllOf.md +17 -0
  19. data/docs/BudgetDetailResponse.md +8 -0
  20. data/docs/BudgetDetailResponseData.md +9 -0
  21. data/docs/BudgetDetailWrapper.md +9 -0
  22. data/docs/BudgetSettings.md +9 -0
  23. data/docs/BudgetSettingsResponse.md +8 -0
  24. data/docs/BudgetSettingsResponseData.md +8 -0
  25. data/docs/BudgetSettingsWrapper.md +8 -0
  26. data/docs/BudgetSummary.md +15 -0
  27. data/docs/BudgetSummaryResponse.md +8 -0
  28. data/docs/BudgetSummaryResponseData.md +9 -0
  29. data/docs/BudgetSummaryWrapper.md +9 -0
  30. data/docs/BudgetsApi.md +68 -0
  31. data/docs/BulkIdWrapper.md +8 -0
  32. data/docs/BulkIds.md +9 -0
  33. data/docs/BulkResponse.md +8 -0
  34. data/docs/BulkResponseData.md +8 -0
  35. data/docs/BulkResponseDataBulk.md +9 -0
  36. data/docs/BulkTransactionCreateResponse.md +8 -0
  37. data/docs/BulkTransactionIds.md +8 -0
  38. data/docs/BulkTransactions.md +8 -0
  39. data/docs/CategoriesApi.md +94 -0
  40. data/docs/CategoriesResponse.md +8 -0
  41. data/docs/CategoriesResponseData.md +9 -0
  42. data/docs/Category.md +30 -0
  43. data/docs/CategoryGroup.md +11 -0
  44. data/docs/CategoryGroupWithCategories.md +12 -0
  45. data/docs/CategoryGroupWithCategoriesAllOf.md +8 -0
  46. data/docs/CategoryGroupsWrapper.md +9 -0
  47. data/docs/CategoryResponse.md +8 -0
  48. data/docs/CategoryResponseData.md +8 -0
  49. data/docs/CategoryWrapper.md +9 -0
  50. data/docs/CurrencyFormat.md +15 -0
  51. data/docs/DateFormat.md +8 -0
  52. data/docs/DeprecatedApi.md +28 -0
  53. data/docs/ErrorDetail.md +10 -0
  54. data/docs/ErrorResponse.md +8 -0
  55. data/docs/HybridTransaction.md +30 -0
  56. data/docs/HybridTransactionAllOf.md +12 -0
  57. data/docs/HybridTransactionsResponse.md +8 -0
  58. data/docs/HybridTransactionsResponseData.md +9 -0
  59. data/docs/HybridTransactionsWrapper.md +8 -0
  60. data/docs/LoanAccountPeriodicValue.md +7 -0
  61. data/docs/MonthDetail.md +16 -0
  62. data/docs/MonthDetailAllOf.md +8 -0
  63. data/docs/MonthDetailResponse.md +8 -0
  64. data/docs/MonthDetailResponseData.md +8 -0
  65. data/docs/MonthDetailWrapper.md +8 -0
  66. data/docs/MonthSummariesResponse.md +8 -0
  67. data/docs/MonthSummariesResponseData.md +9 -0
  68. data/docs/MonthSummariesWrapper.md +9 -0
  69. data/docs/MonthSummary.md +15 -0
  70. data/docs/MonthsApi.md +49 -0
  71. data/docs/PatchMonthCategoryWrapper.md +8 -0
  72. data/docs/PatchTransactionsWrapper.md +8 -0
  73. data/docs/Payee.md +11 -0
  74. data/docs/PayeeLocation.md +12 -0
  75. data/docs/PayeeLocationResponse.md +8 -0
  76. data/docs/PayeeLocationResponseData.md +8 -0
  77. data/docs/PayeeLocationWrapper.md +8 -0
  78. data/docs/PayeeLocationsApi.md +69 -0
  79. data/docs/PayeeLocationsResponse.md +8 -0
  80. data/docs/PayeeLocationsResponseData.md +8 -0
  81. data/docs/PayeeLocationsWrapper.md +8 -0
  82. data/docs/PayeeResponse.md +8 -0
  83. data/docs/PayeeResponseData.md +8 -0
  84. data/docs/PayeeWrapper.md +8 -0
  85. data/docs/PayeesApi.md +49 -0
  86. data/docs/PayeesResponse.md +8 -0
  87. data/docs/PayeesResponseData.md +9 -0
  88. data/docs/PayeesWrapper.md +9 -0
  89. data/docs/PostAccountWrapper.md +8 -0
  90. data/docs/PostTransactionsWrapper.md +9 -0
  91. data/docs/PutTransactionWrapper.md +8 -0
  92. data/docs/SaveAccount.md +10 -0
  93. data/docs/SaveAccountWrapper.md +8 -0
  94. data/docs/SaveCategoryResponse.md +8 -0
  95. data/docs/SaveCategoryResponseData.md +9 -0
  96. data/docs/SaveMonthCategory.md +8 -0
  97. data/docs/SaveMonthCategoryWrapper.md +8 -0
  98. data/docs/SaveSubTransaction.md +12 -0
  99. data/docs/SaveTransaction.md +19 -0
  100. data/docs/SaveTransactionWithId.md +20 -0
  101. data/docs/SaveTransactionWithIdAllOf.md +8 -0
  102. data/docs/SaveTransactionWithOptionalFields.md +19 -0
  103. data/docs/SaveTransactionWrapper.md +8 -0
  104. data/docs/SaveTransactionsResponse.md +8 -0
  105. data/docs/SaveTransactionsResponseData.md +12 -0
  106. data/docs/SaveTransactionsWrapper.md +9 -0
  107. data/docs/ScheduledSubTransaction.md +15 -0
  108. data/docs/ScheduledTransactionDetail.md +23 -0
  109. data/docs/ScheduledTransactionDetailAllOf.md +11 -0
  110. data/docs/ScheduledTransactionResponse.md +8 -0
  111. data/docs/ScheduledTransactionResponseData.md +8 -0
  112. data/docs/ScheduledTransactionSummary.md +19 -0
  113. data/docs/ScheduledTransactionWrapper.md +8 -0
  114. data/docs/ScheduledTransactionsApi.md +49 -0
  115. data/docs/ScheduledTransactionsResponse.md +8 -0
  116. data/docs/ScheduledTransactionsResponseData.md +9 -0
  117. data/docs/ScheduledTransactionsWrapper.md +8 -0
  118. data/docs/SubTransaction.md +18 -0
  119. data/docs/TransactionDetail.md +29 -0
  120. data/docs/TransactionDetailAllOf.md +11 -0
  121. data/docs/TransactionResponse.md +8 -0
  122. data/docs/TransactionResponseData.md +8 -0
  123. data/docs/TransactionSummary.md +25 -0
  124. data/docs/TransactionWrapper.md +8 -0
  125. data/docs/TransactionsApi.md +228 -0
  126. data/docs/TransactionsImportResponse.md +8 -0
  127. data/docs/TransactionsImportResponseData.md +8 -0
  128. data/docs/TransactionsResponse.md +8 -0
  129. data/docs/TransactionsResponseData.md +9 -0
  130. data/docs/TransactionsWrapper.md +9 -0
  131. data/docs/UpdateTransaction.md +20 -0
  132. data/docs/UpdateTransactionsWrapper.md +8 -0
  133. data/docs/User.md +8 -0
  134. data/docs/UserApi.md +25 -0
  135. data/docs/UserResponse.md +8 -0
  136. data/docs/UserResponseData.md +8 -0
  137. data/docs/UserWrapper.md +8 -0
  138. data/examples/budget-list.rb +21 -0
  139. data/examples/budget-month.rb +33 -0
  140. data/examples/category-balance.rb +23 -0
  141. data/examples/create-multiple-transactions.rb +42 -0
  142. data/examples/create-transaction.rb +30 -0
  143. data/examples/update-category-budgeted.rb +25 -0
  144. data/examples/update-multiple-transactions.rb +20 -0
  145. data/lib/ynab/api/accounts_api.rb +78 -41
  146. data/lib/ynab/api/budgets_api.rb +68 -36
  147. data/lib/ynab/api/categories_api.rb +108 -60
  148. data/lib/ynab/api/deprecated_api.rb +32 -17
  149. data/lib/ynab/api/months_api.rb +49 -28
  150. data/lib/ynab/api/payee_locations_api.rb +73 -41
  151. data/lib/ynab/api/payees_api.rb +49 -28
  152. data/lib/ynab/api/scheduled_transactions_api.rb +49 -28
  153. data/lib/ynab/api/transactions_api.rb +268 -140
  154. data/lib/ynab/api/user_api.rb +22 -12
  155. data/lib/ynab/api_client.rb +97 -95
  156. data/lib/ynab/configuration.rb +101 -14
  157. data/lib/ynab/models/account.rb +117 -55
  158. data/lib/ynab/models/account_response.rb +53 -18
  159. data/lib/ynab/models/account_response_data.rb +53 -18
  160. data/lib/ynab/models/account_type.rb +30 -20
  161. data/lib/ynab/models/accounts_response.rb +53 -18
  162. data/lib/ynab/models/accounts_response_data.rb +54 -19
  163. data/lib/ynab/models/budget_detail.rb +80 -35
  164. data/lib/ynab/models/budget_detail_all_of.rb +320 -0
  165. data/lib/ynab/models/budget_detail_response.rb +53 -18
  166. data/lib/ynab/models/budget_detail_response_data.rb +54 -19
  167. data/lib/ynab/models/budget_settings.rb +56 -29
  168. data/lib/ynab/models/budget_settings_response.rb +53 -18
  169. data/lib/ynab/models/budget_settings_response_data.rb +53 -18
  170. data/lib/ynab/models/budget_summary.rb +63 -26
  171. data/lib/ynab/models/budget_summary_response.rb +53 -18
  172. data/lib/ynab/models/budget_summary_response_data.rb +54 -20
  173. data/lib/ynab/models/bulk_response.rb +53 -18
  174. data/lib/ynab/models/bulk_response_data.rb +53 -18
  175. data/lib/ynab/models/bulk_response_data_bulk.rb +54 -19
  176. data/lib/ynab/models/bulk_transactions.rb +53 -18
  177. data/lib/ynab/models/categories_response.rb +53 -18
  178. data/lib/ynab/models/categories_response_data.rb +54 -19
  179. data/lib/ynab/models/category.rb +110 -48
  180. data/lib/ynab/models/category_group.rb +58 -23
  181. data/lib/ynab/models/category_group_with_categories.rb +67 -24
  182. data/lib/ynab/models/{save_month_category_wrapper.rb → category_group_with_categories_all_of.rb} +67 -29
  183. data/lib/ynab/models/category_response.rb +53 -18
  184. data/lib/ynab/models/category_response_data.rb +53 -18
  185. data/lib/ynab/models/currency_format.rb +62 -27
  186. data/lib/ynab/models/date_format.rb +53 -18
  187. data/lib/ynab/models/error_detail.rb +55 -20
  188. data/lib/ynab/models/error_response.rb +53 -18
  189. data/lib/ynab/models/hybrid_transaction.rb +118 -46
  190. data/lib/ynab/models/hybrid_transaction_all_of.rb +304 -0
  191. data/lib/ynab/models/hybrid_transactions_response.rb +53 -18
  192. data/lib/ynab/models/hybrid_transactions_response_data.rb +54 -19
  193. data/lib/ynab/models/month_detail.rb +72 -27
  194. data/lib/ynab/models/{update_transactions_wrapper.rb → month_detail_all_of.rb} +66 -30
  195. data/lib/ynab/models/month_detail_response.rb +53 -18
  196. data/lib/ynab/models/month_detail_response_data.rb +53 -18
  197. data/lib/ynab/models/month_summaries_response.rb +53 -18
  198. data/lib/ynab/models/month_summaries_response_data.rb +54 -19
  199. data/lib/ynab/models/month_summary.rb +63 -26
  200. data/lib/ynab/models/patch_month_category_wrapper.rb +53 -18
  201. data/lib/ynab/models/patch_transactions_wrapper.rb +53 -18
  202. data/lib/ynab/models/payee.rb +58 -22
  203. data/lib/ynab/models/payee_location.rb +58 -23
  204. data/lib/ynab/models/payee_location_response.rb +53 -18
  205. data/lib/ynab/models/payee_location_response_data.rb +53 -18
  206. data/lib/ynab/models/payee_locations_response.rb +53 -18
  207. data/lib/ynab/models/payee_locations_response_data.rb +53 -18
  208. data/lib/ynab/models/payee_response.rb +53 -18
  209. data/lib/ynab/models/payee_response_data.rb +53 -18
  210. data/lib/ynab/models/payees_response.rb +53 -18
  211. data/lib/ynab/models/payees_response_data.rb +54 -19
  212. data/lib/ynab/models/post_account_wrapper.rb +53 -18
  213. data/lib/ynab/models/post_transactions_wrapper.rb +54 -19
  214. data/lib/ynab/models/put_transaction_wrapper.rb +53 -18
  215. data/lib/ynab/models/save_account.rb +77 -20
  216. data/lib/ynab/models/save_category_response.rb +53 -18
  217. data/lib/ynab/models/save_category_response_data.rb +54 -19
  218. data/lib/ynab/models/save_month_category.rb +53 -18
  219. data/lib/ynab/models/save_sub_transaction.rb +61 -22
  220. data/lib/ynab/models/save_transaction.rb +88 -33
  221. data/lib/ynab/models/save_transaction_with_id.rb +102 -46
  222. data/lib/ynab/models/{save_transactions_wrapper.rb → save_transaction_with_id_all_of.rb} +60 -36
  223. data/lib/ynab/models/save_transaction_with_optional_fields.rb +81 -33
  224. data/lib/ynab/models/save_transactions_response.rb +53 -18
  225. data/lib/ynab/models/save_transactions_response_data.rb +57 -23
  226. data/lib/ynab/models/scheduled_sub_transaction.rb +66 -27
  227. data/lib/ynab/models/scheduled_transaction_detail.rb +94 -36
  228. data/lib/ynab/models/scheduled_transaction_detail_all_of.rb +262 -0
  229. data/lib/ynab/models/scheduled_transaction_response.rb +53 -18
  230. data/lib/ynab/models/scheduled_transaction_response_data.rb +53 -18
  231. data/lib/ynab/models/scheduled_transaction_summary.rb +80 -32
  232. data/lib/ynab/models/scheduled_transactions_response.rb +53 -18
  233. data/lib/ynab/models/scheduled_transactions_response_data.rb +54 -19
  234. data/lib/ynab/models/sub_transaction.rb +71 -29
  235. data/lib/ynab/models/transaction_detail.rb +112 -44
  236. data/lib/ynab/models/{save_transaction_wrapper.rb → transaction_detail_all_of.rb} +102 -29
  237. data/lib/ynab/models/transaction_response.rb +53 -18
  238. data/lib/ynab/models/transaction_response_data.rb +53 -18
  239. data/lib/ynab/models/transaction_summary.rb +98 -40
  240. data/lib/ynab/models/transactions_import_response.rb +53 -18
  241. data/lib/ynab/models/transactions_import_response_data.rb +53 -18
  242. data/lib/ynab/models/transactions_response.rb +53 -18
  243. data/lib/ynab/models/transactions_response_data.rb +54 -19
  244. data/lib/ynab/models/user.rb +53 -18
  245. data/lib/ynab/models/user_response.rb +53 -18
  246. data/lib/ynab/models/user_response_data.rb +53 -18
  247. data/lib/ynab/version.rb +1 -1
  248. data/lib/ynab.rb +19 -14
  249. data/open_api_spec.yaml +3012 -0
  250. data/templates/api_client.mustache +274 -0
  251. data/templates/api_client_typhoeus_partial.mustache +156 -0
  252. data/templates/api_doc.mustache +44 -0
  253. data/templates/gem.mustache +84 -0
  254. data/templates/partial_model_generic_doc.mustache +9 -0
  255. data/ynab.gemspec +38 -0
  256. metadata +192 -85
  257. data/lib/ynab/models/loan_account_periodic_value.rb +0 -175
  258. data/lib/ynab/models/save_account_wrapper.rb +0 -189
  259. data/lib/ynab/models/update_transaction.rb +0 -407
  260. data/spec/models/transaction_detail_spec.rb +0 -11
@@ -0,0 +1,3012 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: YNAB API Endpoints
4
+ description: >-
5
+ Our API uses a REST based design, leverages the JSON data format, and relies
6
+ upon HTTPS for transport. We respond with meaningful HTTP response codes and
7
+ if an error occurs, we include error details in the response body. API
8
+ Documentation is at https://api.ynab.com
9
+ version: 1.0.0
10
+ servers:
11
+ - url: https://api.ynab.com/v1
12
+ security:
13
+ - bearer: []
14
+ tags:
15
+ - name: User
16
+ - name: Budgets
17
+ - name: Accounts
18
+ description: The accounts for a budget
19
+ - name: Categories
20
+ description: The categories for a budget
21
+ - name: Payees
22
+ description: The payees for a budget
23
+ - name: Payee Locations
24
+ description: >-
25
+ When you enter a transaction and specify a payee on the YNAB mobile apps,
26
+ the GPS coordinates for that location are stored, with your permission, so
27
+ that the next time you are in the same place (like the Grocery store) we
28
+ can pre-populate nearby payees for you! It’s handy and saves you time.
29
+ This resource makes these locations available. Locations will not be
30
+ available for all payees.
31
+ - name: Months
32
+ description: >-
33
+ Each budget contains one or more months, which is where Ready to Assign,
34
+ Age of Money and category (budgeted / activity / balances) amounts are
35
+ available.
36
+ - name: Transactions
37
+ description: The transactions for a budget
38
+ - name: Scheduled Transactions
39
+ description: The scheduled transactions for a budget
40
+ paths:
41
+ /user:
42
+ get:
43
+ tags:
44
+ - User
45
+ summary: User info
46
+ description: Returns authenticated user information
47
+ operationId: getUser
48
+ responses:
49
+ '200':
50
+ description: The user info
51
+ content:
52
+ application/json:
53
+ schema:
54
+ $ref: '#/components/schemas/UserResponse'
55
+ default:
56
+ description: An error occurred
57
+ content:
58
+ application/json:
59
+ schema:
60
+ $ref: '#/components/schemas/ErrorResponse'
61
+ /budgets:
62
+ get:
63
+ tags:
64
+ - Budgets
65
+ summary: List budgets
66
+ description: Returns budgets list with summary information
67
+ operationId: getBudgets
68
+ parameters:
69
+ - name: include_accounts
70
+ in: query
71
+ description: Whether to include the list of budget accounts
72
+ schema:
73
+ type: boolean
74
+ responses:
75
+ '200':
76
+ description: The list of budgets
77
+ content:
78
+ application/json:
79
+ schema:
80
+ $ref: '#/components/schemas/BudgetSummaryResponse'
81
+ '404':
82
+ description: No budgets were found
83
+ content:
84
+ application/json:
85
+ schema:
86
+ $ref: '#/components/schemas/ErrorResponse'
87
+ default:
88
+ description: An error occurred
89
+ content:
90
+ application/json:
91
+ schema:
92
+ $ref: '#/components/schemas/ErrorResponse'
93
+ /budgets/{budget_id}:
94
+ get:
95
+ tags:
96
+ - Budgets
97
+ summary: Single budget
98
+ description: >-
99
+ Returns a single budget with all related entities. This resource is
100
+ effectively a full budget export.
101
+ operationId: getBudgetById
102
+ parameters:
103
+ - name: budget_id
104
+ in: path
105
+ description: >-
106
+ The id of the budget. "last-used" can be used to specify the last
107
+ used budget and "default" can be used if default budget selection is
108
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
109
+ required: true
110
+ schema:
111
+ type: string
112
+ - name: last_knowledge_of_server
113
+ in: query
114
+ description: >-
115
+ The starting server knowledge. If provided, only entities that have
116
+ changed since `last_knowledge_of_server` will be included.
117
+ schema:
118
+ type: integer
119
+ format: int64
120
+ responses:
121
+ '200':
122
+ description: The requested budget
123
+ content:
124
+ application/json:
125
+ schema:
126
+ $ref: '#/components/schemas/BudgetDetailResponse'
127
+ '404':
128
+ description: The specified budget was not found
129
+ content:
130
+ application/json:
131
+ schema:
132
+ $ref: '#/components/schemas/ErrorResponse'
133
+ default:
134
+ description: An error occurred
135
+ content:
136
+ application/json:
137
+ schema:
138
+ $ref: '#/components/schemas/ErrorResponse'
139
+ /budgets/{budget_id}/settings:
140
+ get:
141
+ tags:
142
+ - Budgets
143
+ summary: Budget Settings
144
+ description: Returns settings for a budget
145
+ operationId: getBudgetSettingsById
146
+ parameters:
147
+ - name: budget_id
148
+ in: path
149
+ description: >-
150
+ The id of the budget. "last-used" can be used to specify the last
151
+ used budget and "default" can be used if default budget selection is
152
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
153
+ required: true
154
+ schema:
155
+ type: string
156
+ responses:
157
+ '200':
158
+ description: The requested budget settings
159
+ content:
160
+ application/json:
161
+ schema:
162
+ $ref: '#/components/schemas/BudgetSettingsResponse'
163
+ '404':
164
+ description: The specified Budget was not found
165
+ content:
166
+ application/json:
167
+ schema:
168
+ $ref: '#/components/schemas/ErrorResponse'
169
+ default:
170
+ description: An error occurred
171
+ content:
172
+ application/json:
173
+ schema:
174
+ $ref: '#/components/schemas/ErrorResponse'
175
+ /budgets/{budget_id}/accounts:
176
+ get:
177
+ tags:
178
+ - Accounts
179
+ summary: Account list
180
+ description: Returns all accounts
181
+ operationId: getAccounts
182
+ parameters:
183
+ - name: budget_id
184
+ in: path
185
+ description: >-
186
+ The id of the budget. "last-used" can be used to specify the last
187
+ used budget and "default" can be used if default budget selection is
188
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
189
+ required: true
190
+ schema:
191
+ type: string
192
+ - name: last_knowledge_of_server
193
+ in: query
194
+ description: >-
195
+ The starting server knowledge. If provided, only entities that have
196
+ changed since `last_knowledge_of_server` will be included.
197
+ schema:
198
+ type: integer
199
+ format: int64
200
+ responses:
201
+ '200':
202
+ description: The list of requested accounts
203
+ content:
204
+ application/json:
205
+ schema:
206
+ $ref: '#/components/schemas/AccountsResponse'
207
+ '404':
208
+ description: No accounts were found
209
+ content:
210
+ application/json:
211
+ schema:
212
+ $ref: '#/components/schemas/ErrorResponse'
213
+ default:
214
+ description: An error occurred
215
+ content:
216
+ application/json:
217
+ schema:
218
+ $ref: '#/components/schemas/ErrorResponse'
219
+ post:
220
+ tags:
221
+ - Accounts
222
+ summary: Create a new account
223
+ description: Creates a new account
224
+ operationId: createAccount
225
+ parameters:
226
+ - name: budget_id
227
+ in: path
228
+ description: >-
229
+ The id of the budget ("last-used" can be used to specify the last
230
+ used budget and "default" can be used if default budget selection is
231
+ enabled (see: https://api.ynab.com/#oauth-default-budget)
232
+ required: true
233
+ schema:
234
+ type: string
235
+ requestBody:
236
+ description: The account to create.
237
+ content:
238
+ 'application/json':
239
+ schema:
240
+ $ref: '#/components/schemas/PostAccountWrapper'
241
+ required: true
242
+ responses:
243
+ '201':
244
+ description: The account was successfully created
245
+ content:
246
+ application/json:
247
+ schema:
248
+ $ref: '#/components/schemas/AccountResponse'
249
+ '400':
250
+ description: >-
251
+ The request could not be understood due to malformed syntax or
252
+ validation error(s).
253
+ content:
254
+ application/json:
255
+ schema:
256
+ $ref: '#/components/schemas/ErrorResponse'
257
+ x-codegen-request-body-name: data
258
+ /budgets/{budget_id}/accounts/{account_id}:
259
+ get:
260
+ tags:
261
+ - Accounts
262
+ summary: Single account
263
+ description: Returns a single account
264
+ operationId: getAccountById
265
+ parameters:
266
+ - name: budget_id
267
+ in: path
268
+ description: >-
269
+ The id of the budget. "last-used" can be used to specify the last
270
+ used budget and "default" can be used if default budget selection is
271
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
272
+ required: true
273
+ schema:
274
+ type: string
275
+ - name: account_id
276
+ in: path
277
+ description: The id of the account
278
+ required: true
279
+ schema:
280
+ type: string
281
+ format: uuid
282
+ responses:
283
+ '200':
284
+ description: The requested account
285
+ content:
286
+ application/json:
287
+ schema:
288
+ $ref: '#/components/schemas/AccountResponse'
289
+ '404':
290
+ description: The requested account was not found
291
+ content:
292
+ application/json:
293
+ schema:
294
+ $ref: '#/components/schemas/ErrorResponse'
295
+ default:
296
+ description: An error occurred
297
+ content:
298
+ application/json:
299
+ schema:
300
+ $ref: '#/components/schemas/ErrorResponse'
301
+ /budgets/{budget_id}/categories:
302
+ get:
303
+ tags:
304
+ - Categories
305
+ summary: List categories
306
+ description: >-
307
+ Returns all categories grouped by category group. Amounts (budgeted,
308
+ activity, balance, etc.) are specific to the current budget month (UTC).
309
+ operationId: getCategories
310
+ parameters:
311
+ - name: budget_id
312
+ in: path
313
+ description: >-
314
+ The id of the budget. "last-used" can be used to specify the last
315
+ used budget and "default" can be used if default budget selection is
316
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
317
+ required: true
318
+ schema:
319
+ type: string
320
+ - name: last_knowledge_of_server
321
+ in: query
322
+ description: >-
323
+ The starting server knowledge. If provided, only entities that have
324
+ changed since `last_knowledge_of_server` will be included.
325
+ schema:
326
+ type: integer
327
+ format: int64
328
+ responses:
329
+ '200':
330
+ description: The categories grouped by category group
331
+ content:
332
+ application/json:
333
+ schema:
334
+ $ref: '#/components/schemas/CategoriesResponse'
335
+ '404':
336
+ description: No categories were found
337
+ content:
338
+ application/json:
339
+ schema:
340
+ $ref: '#/components/schemas/ErrorResponse'
341
+ default:
342
+ description: An error occurred
343
+ content:
344
+ application/json:
345
+ schema:
346
+ $ref: '#/components/schemas/ErrorResponse'
347
+ /budgets/{budget_id}/categories/{category_id}:
348
+ get:
349
+ tags:
350
+ - Categories
351
+ summary: Single category
352
+ description: >-
353
+ Returns a single category. Amounts (budgeted, activity, balance, etc.)
354
+ are specific to the current budget month (UTC).
355
+ operationId: getCategoryById
356
+ parameters:
357
+ - name: budget_id
358
+ in: path
359
+ description: >-
360
+ The id of the budget. "last-used" can be used to specify the last
361
+ used budget and "default" can be used if default budget selection is
362
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
363
+ required: true
364
+ schema:
365
+ type: string
366
+ - name: category_id
367
+ in: path
368
+ description: The id of the category
369
+ required: true
370
+ schema:
371
+ type: string
372
+ responses:
373
+ '200':
374
+ description: The requested category
375
+ content:
376
+ application/json:
377
+ schema:
378
+ $ref: '#/components/schemas/CategoryResponse'
379
+ '404':
380
+ description: The category not was found
381
+ content:
382
+ application/json:
383
+ schema:
384
+ $ref: '#/components/schemas/ErrorResponse'
385
+ default:
386
+ description: An error occurred
387
+ content:
388
+ application/json:
389
+ schema:
390
+ $ref: '#/components/schemas/ErrorResponse'
391
+ /budgets/{budget_id}/months/{month}/categories/{category_id}:
392
+ get:
393
+ tags:
394
+ - Categories
395
+ summary: Single category for a specific budget month
396
+ description: >-
397
+ Returns a single category for a specific budget month. Amounts
398
+ (budgeted, activity, balance, etc.) are specific to the current budget
399
+ month (UTC).
400
+ operationId: getMonthCategoryById
401
+ parameters:
402
+ - name: budget_id
403
+ in: path
404
+ description: >-
405
+ The id of the budget. "last-used" can be used to specify the last
406
+ used budget and "default" can be used if default budget selection is
407
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
408
+ required: true
409
+ schema:
410
+ type: string
411
+ - name: month
412
+ in: path
413
+ description: >-
414
+ The budget month in ISO format (e.g. 2016-12-01) ("current" can also
415
+ be used to specify the current calendar month (UTC))
416
+ required: true
417
+ schema:
418
+ type: string
419
+ format: date
420
+ - name: category_id
421
+ in: path
422
+ description: The id of the category
423
+ required: true
424
+ schema:
425
+ type: string
426
+ responses:
427
+ '200':
428
+ description: The requested month category
429
+ content:
430
+ application/json:
431
+ schema:
432
+ $ref: '#/components/schemas/CategoryResponse'
433
+ '404':
434
+ description: The month category was not was found
435
+ content:
436
+ application/json:
437
+ schema:
438
+ $ref: '#/components/schemas/ErrorResponse'
439
+ default:
440
+ description: An error occurred
441
+ content:
442
+ application/json:
443
+ schema:
444
+ $ref: '#/components/schemas/ErrorResponse'
445
+ patch:
446
+ tags:
447
+ - Categories
448
+ summary: Update a category for a specific month
449
+ description: >-
450
+ Update a category for a specific month. Only `budgeted` amount can be
451
+ updated.
452
+ operationId: updateMonthCategory
453
+ parameters:
454
+ - name: budget_id
455
+ in: path
456
+ description: >-
457
+ The id of the budget. "last-used" can be used to specify the last
458
+ used budget and "default" can be used if default budget selection is
459
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
460
+ required: true
461
+ schema:
462
+ type: string
463
+ - name: month
464
+ in: path
465
+ description: >-
466
+ The budget month in ISO format (e.g. 2016-12-01) ("current" can also
467
+ be used to specify the current calendar month (UTC))
468
+ required: true
469
+ schema:
470
+ type: string
471
+ format: date
472
+ - name: category_id
473
+ in: path
474
+ description: The id of the category
475
+ required: true
476
+ schema:
477
+ type: string
478
+ requestBody:
479
+ description: >-
480
+ The category to update. Only `budgeted` amount can be updated and any
481
+ other fields specified will be ignored.
482
+ content:
483
+ 'application/json':
484
+ schema:
485
+ $ref: '#/components/schemas/PatchMonthCategoryWrapper'
486
+ required: true
487
+ responses:
488
+ '200':
489
+ description: The month category was successfully updated
490
+ content:
491
+ application/json:
492
+ schema:
493
+ $ref: '#/components/schemas/SaveCategoryResponse'
494
+ '400':
495
+ description: >-
496
+ The request could not be understood due to malformed syntax or
497
+ validation error(s)
498
+ content:
499
+ application/json:
500
+ schema:
501
+ $ref: '#/components/schemas/ErrorResponse'
502
+ x-codegen-request-body-name: data
503
+ /budgets/{budget_id}/payees:
504
+ get:
505
+ tags:
506
+ - Payees
507
+ summary: List payees
508
+ description: Returns all payees
509
+ operationId: getPayees
510
+ parameters:
511
+ - name: budget_id
512
+ in: path
513
+ description: >-
514
+ The id of the budget. "last-used" can be used to specify the last
515
+ used budget and "default" can be used if default budget selection is
516
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
517
+ required: true
518
+ schema:
519
+ type: string
520
+ - name: last_knowledge_of_server
521
+ in: query
522
+ description: >-
523
+ The starting server knowledge. If provided, only entities that have
524
+ changed since `last_knowledge_of_server` will be included.
525
+ schema:
526
+ type: integer
527
+ format: int64
528
+ responses:
529
+ '200':
530
+ description: The requested list of payees
531
+ content:
532
+ application/json:
533
+ schema:
534
+ $ref: '#/components/schemas/PayeesResponse'
535
+ '404':
536
+ description: No payees were found
537
+ content:
538
+ application/json:
539
+ schema:
540
+ $ref: '#/components/schemas/ErrorResponse'
541
+ default:
542
+ description: An error occurred
543
+ content:
544
+ application/json:
545
+ schema:
546
+ $ref: '#/components/schemas/ErrorResponse'
547
+ /budgets/{budget_id}/payees/{payee_id}:
548
+ get:
549
+ tags:
550
+ - Payees
551
+ summary: Single payee
552
+ description: Returns a single payee
553
+ operationId: getPayeeById
554
+ parameters:
555
+ - name: budget_id
556
+ in: path
557
+ description: >-
558
+ The id of the budget. "last-used" can be used to specify the last
559
+ used budget and "default" can be used if default budget selection is
560
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
561
+ required: true
562
+ schema:
563
+ type: string
564
+ - name: payee_id
565
+ in: path
566
+ description: The id of the payee
567
+ required: true
568
+ schema:
569
+ type: string
570
+ responses:
571
+ '200':
572
+ description: The requested payee
573
+ content:
574
+ application/json:
575
+ schema:
576
+ $ref: '#/components/schemas/PayeeResponse'
577
+ '404':
578
+ description: The payee was not found
579
+ content:
580
+ application/json:
581
+ schema:
582
+ $ref: '#/components/schemas/ErrorResponse'
583
+ default:
584
+ description: An error occurred
585
+ content:
586
+ application/json:
587
+ schema:
588
+ $ref: '#/components/schemas/ErrorResponse'
589
+ /budgets/{budget_id}/payee_locations:
590
+ get:
591
+ tags:
592
+ - Payee Locations
593
+ summary: List payee locations
594
+ description: Returns all payee locations
595
+ operationId: getPayeeLocations
596
+ parameters:
597
+ - name: budget_id
598
+ in: path
599
+ description: >-
600
+ The id of the budget. "last-used" can be used to specify the last
601
+ used budget and "default" can be used if default budget selection is
602
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
603
+ required: true
604
+ schema:
605
+ type: string
606
+ responses:
607
+ '200':
608
+ description: The list of payee locations
609
+ content:
610
+ application/json:
611
+ schema:
612
+ $ref: '#/components/schemas/PayeeLocationsResponse'
613
+ '404':
614
+ description: No payees locations were found
615
+ content:
616
+ application/json:
617
+ schema:
618
+ $ref: '#/components/schemas/ErrorResponse'
619
+ default:
620
+ description: An error occurred
621
+ content:
622
+ application/json:
623
+ schema:
624
+ $ref: '#/components/schemas/ErrorResponse'
625
+ /budgets/{budget_id}/payee_locations/{payee_location_id}:
626
+ get:
627
+ tags:
628
+ - Payee Locations
629
+ summary: Single payee location
630
+ description: Returns a single payee location
631
+ operationId: getPayeeLocationById
632
+ parameters:
633
+ - name: budget_id
634
+ in: path
635
+ description: >-
636
+ The id of the budget. "last-used" can be used to specify the last
637
+ used budget and "default" can be used if default budget selection is
638
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
639
+ required: true
640
+ schema:
641
+ type: string
642
+ - name: payee_location_id
643
+ in: path
644
+ description: id of payee location
645
+ required: true
646
+ schema:
647
+ type: string
648
+ responses:
649
+ '200':
650
+ description: The payee location
651
+ content:
652
+ application/json:
653
+ schema:
654
+ $ref: '#/components/schemas/PayeeLocationResponse'
655
+ '404':
656
+ description: The payee location was not found
657
+ content:
658
+ application/json:
659
+ schema:
660
+ $ref: '#/components/schemas/ErrorResponse'
661
+ default:
662
+ description: An error occurred
663
+ content:
664
+ application/json:
665
+ schema:
666
+ $ref: '#/components/schemas/ErrorResponse'
667
+ /budgets/{budget_id}/payees/{payee_id}/payee_locations:
668
+ get:
669
+ tags:
670
+ - Payee Locations
671
+ summary: List locations for a payee
672
+ description: Returns all payee locations for a specified payee
673
+ operationId: getPayeeLocationsByPayee
674
+ parameters:
675
+ - name: budget_id
676
+ in: path
677
+ description: >-
678
+ The id of the budget. "last-used" can be used to specify the last
679
+ used budget and "default" can be used if default budget selection is
680
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
681
+ required: true
682
+ schema:
683
+ type: string
684
+ - name: payee_id
685
+ in: path
686
+ description: id of payee
687
+ required: true
688
+ schema:
689
+ type: string
690
+ responses:
691
+ '200':
692
+ description: The list of requested payee locations
693
+ content:
694
+ application/json:
695
+ schema:
696
+ $ref: '#/components/schemas/PayeeLocationsResponse'
697
+ '404':
698
+ description: No payees locations were found
699
+ content:
700
+ application/json:
701
+ schema:
702
+ $ref: '#/components/schemas/ErrorResponse'
703
+ default:
704
+ description: An error occurred
705
+ content:
706
+ application/json:
707
+ schema:
708
+ $ref: '#/components/schemas/ErrorResponse'
709
+ /budgets/{budget_id}/months:
710
+ get:
711
+ tags:
712
+ - Months
713
+ summary: List budget months
714
+ description: Returns all budget months
715
+ operationId: getBudgetMonths
716
+ parameters:
717
+ - name: budget_id
718
+ in: path
719
+ description: >-
720
+ The id of the budget. "last-used" can be used to specify the last
721
+ used budget and "default" can be used if default budget selection is
722
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
723
+ required: true
724
+ schema:
725
+ type: string
726
+ - name: last_knowledge_of_server
727
+ in: query
728
+ description: >-
729
+ The starting server knowledge. If provided, only entities that have
730
+ changed since `last_knowledge_of_server` will be included.
731
+ schema:
732
+ type: integer
733
+ format: int64
734
+ responses:
735
+ '200':
736
+ description: The list of budget months
737
+ content:
738
+ application/json:
739
+ schema:
740
+ $ref: '#/components/schemas/MonthSummariesResponse'
741
+ '404':
742
+ description: No budget months were found
743
+ content:
744
+ application/json:
745
+ schema:
746
+ $ref: '#/components/schemas/ErrorResponse'
747
+ default:
748
+ description: An error occurred
749
+ content:
750
+ application/json:
751
+ schema:
752
+ $ref: '#/components/schemas/ErrorResponse'
753
+ /budgets/{budget_id}/months/{month}:
754
+ get:
755
+ tags:
756
+ - Months
757
+ summary: Single budget month
758
+ description: Returns a single budget month
759
+ operationId: getBudgetMonth
760
+ parameters:
761
+ - name: budget_id
762
+ in: path
763
+ description: >-
764
+ The id of the budget. "last-used" can be used to specify the last
765
+ used budget and "default" can be used if default budget selection is
766
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
767
+ required: true
768
+ schema:
769
+ type: string
770
+ - name: month
771
+ in: path
772
+ description: >-
773
+ The budget month in ISO format (e.g. 2016-12-01) ("current" can also
774
+ be used to specify the current calendar month (UTC))
775
+ required: true
776
+ schema:
777
+ type: string
778
+ format: date
779
+ responses:
780
+ '200':
781
+ description: The budget month detail
782
+ content:
783
+ application/json:
784
+ schema:
785
+ $ref: '#/components/schemas/MonthDetailResponse'
786
+ '404':
787
+ description: The budget month was not found
788
+ content:
789
+ application/json:
790
+ schema:
791
+ $ref: '#/components/schemas/ErrorResponse'
792
+ default:
793
+ description: An error occurred
794
+ content:
795
+ application/json:
796
+ schema:
797
+ $ref: '#/components/schemas/ErrorResponse'
798
+ /budgets/{budget_id}/transactions:
799
+ get:
800
+ tags:
801
+ - Transactions
802
+ summary: List transactions
803
+ description: Returns budget transactions
804
+ operationId: getTransactions
805
+ parameters:
806
+ - name: budget_id
807
+ in: path
808
+ description: >-
809
+ The id of the budget. "last-used" can be used to specify the last
810
+ used budget and "default" can be used if default budget selection is
811
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
812
+ required: true
813
+ schema:
814
+ type: string
815
+ - name: since_date
816
+ in: query
817
+ description: >-
818
+ If specified, only transactions on or after this date will be
819
+ included. The date should be ISO formatted (e.g. 2016-12-30).
820
+ schema:
821
+ type: string
822
+ format: date
823
+ - name: type
824
+ in: query
825
+ description: >-
826
+ If specified, only transactions of the specified type will be
827
+ included. "uncategorized" and "unapproved" are currently supported.
828
+ schema:
829
+ type: string
830
+ enum:
831
+ - uncategorized
832
+ - unapproved
833
+ - name: last_knowledge_of_server
834
+ in: query
835
+ description: >-
836
+ The starting server knowledge. If provided, only entities that have
837
+ changed since `last_knowledge_of_server` will be included.
838
+ schema:
839
+ type: integer
840
+ format: int64
841
+ responses:
842
+ '200':
843
+ description: The list of requested transactions
844
+ content:
845
+ application/json:
846
+ schema:
847
+ $ref: '#/components/schemas/TransactionsResponse'
848
+ '400':
849
+ description: An error occurred
850
+ content:
851
+ application/json:
852
+ schema:
853
+ $ref: '#/components/schemas/ErrorResponse'
854
+ '404':
855
+ description: No transactions were found
856
+ content:
857
+ application/json:
858
+ schema:
859
+ $ref: '#/components/schemas/ErrorResponse'
860
+ post:
861
+ tags:
862
+ - Transactions
863
+ summary: Create a single transaction or multiple transactions
864
+ description: >-
865
+ Creates a single transaction or multiple transactions. If you provide a
866
+ body containing a `transaction` object, a single transaction will be
867
+ created and if you provide a body containing a `transactions` array,
868
+ multiple transactions will be created. Scheduled transactions cannot be
869
+ created on this endpoint.
870
+ operationId: createTransaction
871
+ parameters:
872
+ - name: budget_id
873
+ in: path
874
+ description: >-
875
+ The id of the budget. "last-used" can be used to specify the last
876
+ used budget and "default" can be used if default budget selection is
877
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
878
+ required: true
879
+ schema:
880
+ type: string
881
+ requestBody:
882
+ description: >-
883
+ The transaction or transactions to create. To create a single
884
+ transaction you can specify a value for the `transaction` object and
885
+ to create multiple transactions you can specify an array of
886
+ `transactions`. It is expected that you will only provide a value for
887
+ one of these objects.
888
+ content:
889
+ 'application/json':
890
+ schema:
891
+ $ref: '#/components/schemas/PostTransactionsWrapper'
892
+ required: true
893
+ responses:
894
+ '201':
895
+ description: The transaction or transactions were successfully created
896
+ content:
897
+ application/json:
898
+ schema:
899
+ $ref: '#/components/schemas/SaveTransactionsResponse'
900
+ '400':
901
+ description: >-
902
+ The request could not be understood due to malformed syntax or
903
+ validation error(s).
904
+ content:
905
+ application/json:
906
+ schema:
907
+ $ref: '#/components/schemas/ErrorResponse'
908
+ '409':
909
+ description: >-
910
+ A transaction on the same account with the same `import_id` already
911
+ exists.
912
+ content:
913
+ application/json:
914
+ schema:
915
+ $ref: '#/components/schemas/ErrorResponse'
916
+ x-codegen-request-body-name: data
917
+ patch:
918
+ tags:
919
+ - Transactions
920
+ summary: Update multiple transactions
921
+ description: Updates multiple transactions, by `id` or `import_id`.
922
+ operationId: updateTransactions
923
+ parameters:
924
+ - name: budget_id
925
+ in: path
926
+ description: >-
927
+ The id of the budget. "last-used" can be used to specify the last
928
+ used budget and "default" can be used if default budget selection is
929
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
930
+ required: true
931
+ schema:
932
+ type: string
933
+ requestBody:
934
+ description: >-
935
+ The transactions to update. Each transaction must have either an `id`
936
+ or `import_id` specified. If `id` is specified as null an `import_id`
937
+ value can be provided which will allow transaction(s) to be updated by
938
+ their `import_id`. If an `id` is specified, it will always be used for
939
+ lookup.
940
+ content:
941
+ 'application/json':
942
+ schema:
943
+ $ref: '#/components/schemas/PatchTransactionsWrapper'
944
+ required: true
945
+ responses:
946
+ '209':
947
+ description: The transactions were successfully updated
948
+ content:
949
+ application/json:
950
+ schema:
951
+ $ref: '#/components/schemas/SaveTransactionsResponse'
952
+ '400':
953
+ description: >-
954
+ The request could not be understood due to malformed syntax or
955
+ validation error(s).
956
+ content:
957
+ application/json:
958
+ schema:
959
+ $ref: '#/components/schemas/ErrorResponse'
960
+ x-codegen-request-body-name: data
961
+ /budgets/{budget_id}/transactions/import:
962
+ post:
963
+ tags:
964
+ - Transactions
965
+ summary: Import transactions
966
+ description: >-
967
+ Imports available transactions on all linked accounts for the given
968
+ budget. Linked accounts allow transactions to be imported directly from
969
+ a specified financial institution and this endpoint initiates that
970
+ import. Sending a request to this endpoint is the equivalent of
971
+ clicking "Import" on each account in the web application or tapping the
972
+ "New Transactions" banner in the mobile applications. The response for
973
+ this endpoint contains the transaction ids that have been imported.
974
+ operationId: importTransactions
975
+ parameters:
976
+ - name: budget_id
977
+ in: path
978
+ description: >-
979
+ The id of the budget. "last-used" can be used to specify the last
980
+ used budget and "default" can be used if default budget selection is
981
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
982
+ required: true
983
+ schema:
984
+ type: string
985
+ responses:
986
+ '200':
987
+ description: The request was successful but there were no transactions to import
988
+ content:
989
+ application/json:
990
+ schema:
991
+ $ref: '#/components/schemas/TransactionsImportResponse'
992
+ '201':
993
+ description: One or more transactions were imported successfully
994
+ content:
995
+ application/json:
996
+ schema:
997
+ $ref: '#/components/schemas/TransactionsImportResponse'
998
+ '400':
999
+ description: >-
1000
+ The request could not be understood due to malformed syntax or
1001
+ validation error(s)
1002
+ content:
1003
+ application/json:
1004
+ schema:
1005
+ $ref: '#/components/schemas/ErrorResponse'
1006
+ /budgets/{budget_id}/transactions/{transaction_id}:
1007
+ get:
1008
+ tags:
1009
+ - Transactions
1010
+ summary: Single transaction
1011
+ description: Returns a single transaction
1012
+ operationId: getTransactionById
1013
+ parameters:
1014
+ - name: budget_id
1015
+ in: path
1016
+ description: >-
1017
+ The id of the budget. "last-used" can be used to specify the last
1018
+ used budget and "default" can be used if default budget selection is
1019
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
1020
+ required: true
1021
+ schema:
1022
+ type: string
1023
+ - name: transaction_id
1024
+ in: path
1025
+ description: The id of the transaction
1026
+ required: true
1027
+ schema:
1028
+ type: string
1029
+ responses:
1030
+ '200':
1031
+ description: The requested transaction
1032
+ content:
1033
+ application/json:
1034
+ schema:
1035
+ $ref: '#/components/schemas/TransactionResponse'
1036
+ '404':
1037
+ description: The transaction was not found
1038
+ content:
1039
+ application/json:
1040
+ schema:
1041
+ $ref: '#/components/schemas/ErrorResponse'
1042
+ default:
1043
+ description: An error occurred
1044
+ content:
1045
+ application/json:
1046
+ schema:
1047
+ $ref: '#/components/schemas/ErrorResponse'
1048
+ put:
1049
+ tags:
1050
+ - Transactions
1051
+ summary: Updates an existing transaction
1052
+ description: Updates a single transaction
1053
+ operationId: updateTransaction
1054
+ parameters:
1055
+ - name: budget_id
1056
+ in: path
1057
+ description: >-
1058
+ The id of the budget. "last-used" can be used to specify the last
1059
+ used budget and "default" can be used if default budget selection is
1060
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
1061
+ required: true
1062
+ schema:
1063
+ type: string
1064
+ - name: transaction_id
1065
+ in: path
1066
+ description: The id of the transaction
1067
+ required: true
1068
+ schema:
1069
+ type: string
1070
+ requestBody:
1071
+ description: The transaction to update
1072
+ content:
1073
+ 'application/json':
1074
+ schema:
1075
+ $ref: '#/components/schemas/PutTransactionWrapper'
1076
+ required: true
1077
+ responses:
1078
+ '200':
1079
+ description: The transaction was successfully updated
1080
+ content:
1081
+ application/json:
1082
+ schema:
1083
+ $ref: '#/components/schemas/TransactionResponse'
1084
+ '400':
1085
+ description: >-
1086
+ The request could not be understood due to malformed syntax or
1087
+ validation error(s)
1088
+ content:
1089
+ application/json:
1090
+ schema:
1091
+ $ref: '#/components/schemas/ErrorResponse'
1092
+ x-codegen-request-body-name: data
1093
+ delete:
1094
+ tags:
1095
+ - Transactions
1096
+ summary: Deletes an existing transaction
1097
+ description: Deletes a transaction
1098
+ operationId: deleteTransaction
1099
+ parameters:
1100
+ - name: budget_id
1101
+ in: path
1102
+ description: >-
1103
+ The id of the budget. "last-used" can be used to specify the last
1104
+ used budget and "default" can be used if default budget selection is
1105
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
1106
+ required: true
1107
+ schema:
1108
+ type: string
1109
+ - name: transaction_id
1110
+ in: path
1111
+ description: The id of the transaction
1112
+ required: true
1113
+ schema:
1114
+ type: string
1115
+ responses:
1116
+ '200':
1117
+ description: The transaction was successfully deleted
1118
+ content:
1119
+ application/json:
1120
+ schema:
1121
+ $ref: '#/components/schemas/TransactionResponse'
1122
+ '404':
1123
+ description: The transaction was not found
1124
+ content:
1125
+ application/json:
1126
+ schema:
1127
+ $ref: '#/components/schemas/ErrorResponse'
1128
+ /budgets/{budget_id}/transactions/bulk:
1129
+ post:
1130
+ tags:
1131
+ - Deprecated
1132
+ summary: Bulk create transactions
1133
+ description: >-
1134
+ Creates multiple transactions. Although this endpoint is still
1135
+ supported, it is recommended to use 'POST
1136
+ /budgets/{budget_id}/transactions' to create multiple transactions.
1137
+ operationId: bulkCreateTransactions
1138
+ parameters:
1139
+ - name: budget_id
1140
+ in: path
1141
+ description: >-
1142
+ The id of the budget. "last-used" can be used to specify the last
1143
+ used budget and "default" can be used if default budget selection is
1144
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
1145
+ required: true
1146
+ schema:
1147
+ type: string
1148
+ requestBody:
1149
+ description: The list of transactions to create
1150
+ content:
1151
+ 'application/json':
1152
+ schema:
1153
+ $ref: '#/components/schemas/BulkTransactions'
1154
+ required: true
1155
+ responses:
1156
+ '201':
1157
+ description: The bulk request was processed successfully
1158
+ content:
1159
+ application/json:
1160
+ schema:
1161
+ $ref: '#/components/schemas/BulkResponse'
1162
+ '400':
1163
+ description: >-
1164
+ The request could not be understood due to malformed syntax or
1165
+ validation error(s)
1166
+ content:
1167
+ application/json:
1168
+ schema:
1169
+ $ref: '#/components/schemas/ErrorResponse'
1170
+ x-codegen-request-body-name: transactions
1171
+ /budgets/{budget_id}/accounts/{account_id}/transactions:
1172
+ get:
1173
+ tags:
1174
+ - Transactions
1175
+ summary: List account transactions
1176
+ description: Returns all transactions for a specified account
1177
+ operationId: getTransactionsByAccount
1178
+ parameters:
1179
+ - name: budget_id
1180
+ in: path
1181
+ description: >-
1182
+ The id of the budget. "last-used" can be used to specify the last
1183
+ used budget and "default" can be used if default budget selection is
1184
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
1185
+ required: true
1186
+ schema:
1187
+ type: string
1188
+ - name: account_id
1189
+ in: path
1190
+ description: The id of the account
1191
+ required: true
1192
+ schema:
1193
+ type: string
1194
+ - name: since_date
1195
+ in: query
1196
+ description: >-
1197
+ If specified, only transactions on or after this date will be
1198
+ included. The date should be ISO formatted (e.g. 2016-12-30).
1199
+ schema:
1200
+ type: string
1201
+ format: date
1202
+ - name: type
1203
+ in: query
1204
+ description: >-
1205
+ If specified, only transactions of the specified type will be
1206
+ included. "uncategorized" and "unapproved" are currently supported.
1207
+ schema:
1208
+ type: string
1209
+ enum:
1210
+ - uncategorized
1211
+ - unapproved
1212
+ - name: last_knowledge_of_server
1213
+ in: query
1214
+ description: >-
1215
+ The starting server knowledge. If provided, only entities that have
1216
+ changed since `last_knowledge_of_server` will be included.
1217
+ schema:
1218
+ type: integer
1219
+ format: int64
1220
+ responses:
1221
+ '200':
1222
+ description: The list of requested transactions
1223
+ content:
1224
+ application/json:
1225
+ schema:
1226
+ $ref: '#/components/schemas/TransactionsResponse'
1227
+ '404':
1228
+ description: No transactions were found
1229
+ content:
1230
+ application/json:
1231
+ schema:
1232
+ $ref: '#/components/schemas/ErrorResponse'
1233
+ default:
1234
+ description: An error occurred
1235
+ content:
1236
+ application/json:
1237
+ schema:
1238
+ $ref: '#/components/schemas/ErrorResponse'
1239
+ /budgets/{budget_id}/categories/{category_id}/transactions:
1240
+ get:
1241
+ tags:
1242
+ - Transactions
1243
+ summary: List category transactions
1244
+ description: Returns all transactions for a specified category
1245
+ operationId: getTransactionsByCategory
1246
+ parameters:
1247
+ - name: budget_id
1248
+ in: path
1249
+ description: >-
1250
+ The id of the budget. "last-used" can be used to specify the last
1251
+ used budget and "default" can be used if default budget selection is
1252
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
1253
+ required: true
1254
+ schema:
1255
+ type: string
1256
+ - name: category_id
1257
+ in: path
1258
+ description: The id of the category
1259
+ required: true
1260
+ schema:
1261
+ type: string
1262
+ - name: since_date
1263
+ in: query
1264
+ description: >-
1265
+ If specified, only transactions on or after this date will be
1266
+ included. The date should be ISO formatted (e.g. 2016-12-30).
1267
+ schema:
1268
+ type: string
1269
+ format: date
1270
+ - name: type
1271
+ in: query
1272
+ description: >-
1273
+ If specified, only transactions of the specified type will be
1274
+ included. "uncategorized" and "unapproved" are currently supported.
1275
+ schema:
1276
+ type: string
1277
+ enum:
1278
+ - uncategorized
1279
+ - unapproved
1280
+ - name: last_knowledge_of_server
1281
+ in: query
1282
+ description: >-
1283
+ The starting server knowledge. If provided, only entities that have
1284
+ changed since `last_knowledge_of_server` will be included.
1285
+ schema:
1286
+ type: integer
1287
+ format: int64
1288
+ responses:
1289
+ '200':
1290
+ description: The list of requested transactions
1291
+ content:
1292
+ application/json:
1293
+ schema:
1294
+ $ref: '#/components/schemas/HybridTransactionsResponse'
1295
+ '404':
1296
+ description: No transactions were found
1297
+ content:
1298
+ application/json:
1299
+ schema:
1300
+ $ref: '#/components/schemas/ErrorResponse'
1301
+ default:
1302
+ description: An error occurred
1303
+ content:
1304
+ application/json:
1305
+ schema:
1306
+ $ref: '#/components/schemas/ErrorResponse'
1307
+ /budgets/{budget_id}/payees/{payee_id}/transactions:
1308
+ get:
1309
+ tags:
1310
+ - Transactions
1311
+ summary: List payee transactions
1312
+ description: Returns all transactions for a specified payee
1313
+ operationId: getTransactionsByPayee
1314
+ parameters:
1315
+ - name: budget_id
1316
+ in: path
1317
+ description: >-
1318
+ The id of the budget. "last-used" can be used to specify the last
1319
+ used budget and "default" can be used if default budget selection is
1320
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
1321
+ required: true
1322
+ schema:
1323
+ type: string
1324
+ - name: payee_id
1325
+ in: path
1326
+ description: The id of the payee
1327
+ required: true
1328
+ schema:
1329
+ type: string
1330
+ - name: since_date
1331
+ in: query
1332
+ description: >-
1333
+ If specified, only transactions on or after this date will be
1334
+ included. The date should be ISO formatted (e.g. 2016-12-30).
1335
+ schema:
1336
+ type: string
1337
+ format: date
1338
+ - name: type
1339
+ in: query
1340
+ description: >-
1341
+ If specified, only transactions of the specified type will be
1342
+ included. "uncategorized" and "unapproved" are currently supported.
1343
+ schema:
1344
+ type: string
1345
+ enum:
1346
+ - uncategorized
1347
+ - unapproved
1348
+ - name: last_knowledge_of_server
1349
+ in: query
1350
+ description: >-
1351
+ The starting server knowledge. If provided, only entities that have
1352
+ changed since `last_knowledge_of_server` will be included.
1353
+ schema:
1354
+ type: integer
1355
+ format: int64
1356
+ responses:
1357
+ '200':
1358
+ description: The list of requested transactions
1359
+ content:
1360
+ application/json:
1361
+ schema:
1362
+ $ref: '#/components/schemas/HybridTransactionsResponse'
1363
+ '404':
1364
+ description: No transactions were found
1365
+ content:
1366
+ application/json:
1367
+ schema:
1368
+ $ref: '#/components/schemas/ErrorResponse'
1369
+ default:
1370
+ description: An error occurred
1371
+ content:
1372
+ application/json:
1373
+ schema:
1374
+ $ref: '#/components/schemas/ErrorResponse'
1375
+ /budgets/{budget_id}/scheduled_transactions:
1376
+ get:
1377
+ tags:
1378
+ - Scheduled Transactions
1379
+ summary: List scheduled transactions
1380
+ description: Returns all scheduled transactions
1381
+ operationId: getScheduledTransactions
1382
+ parameters:
1383
+ - name: budget_id
1384
+ in: path
1385
+ description: >-
1386
+ The id of the budget. "last-used" can be used to specify the last
1387
+ used budget and "default" can be used if default budget selection is
1388
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
1389
+ required: true
1390
+ schema:
1391
+ type: string
1392
+ - name: last_knowledge_of_server
1393
+ in: query
1394
+ description: >-
1395
+ The starting server knowledge. If provided, only entities that have
1396
+ changed since `last_knowledge_of_server` will be included.
1397
+ schema:
1398
+ type: integer
1399
+ format: int64
1400
+ responses:
1401
+ '200':
1402
+ description: The list of requested scheduled transactions
1403
+ content:
1404
+ application/json:
1405
+ schema:
1406
+ $ref: '#/components/schemas/ScheduledTransactionsResponse'
1407
+ '404':
1408
+ description: No scheduled transactions were found
1409
+ content:
1410
+ application/json:
1411
+ schema:
1412
+ $ref: '#/components/schemas/ErrorResponse'
1413
+ default:
1414
+ description: An error occurred
1415
+ content:
1416
+ application/json:
1417
+ schema:
1418
+ $ref: '#/components/schemas/ErrorResponse'
1419
+ /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}:
1420
+ get:
1421
+ tags:
1422
+ - Scheduled Transactions
1423
+ summary: Single scheduled transaction
1424
+ description: Returns a single scheduled transaction
1425
+ operationId: getScheduledTransactionById
1426
+ parameters:
1427
+ - name: budget_id
1428
+ in: path
1429
+ description: >-
1430
+ The id of the budget. "last-used" can be used to specify the last
1431
+ used budget and "default" can be used if default budget selection is
1432
+ enabled (see: https://api.ynab.com/#oauth-default-budget).
1433
+ required: true
1434
+ schema:
1435
+ type: string
1436
+ - name: scheduled_transaction_id
1437
+ in: path
1438
+ description: The id of the scheduled transaction
1439
+ required: true
1440
+ schema:
1441
+ type: string
1442
+ responses:
1443
+ '200':
1444
+ description: The requested Scheduled Transaction
1445
+ content:
1446
+ application/json:
1447
+ schema:
1448
+ $ref: '#/components/schemas/ScheduledTransactionResponse'
1449
+ '404':
1450
+ description: The scheduled transaction was not found
1451
+ content:
1452
+ application/json:
1453
+ schema:
1454
+ $ref: '#/components/schemas/ErrorResponse'
1455
+ default:
1456
+ description: An error occurred
1457
+ content:
1458
+ application/json:
1459
+ schema:
1460
+ $ref: '#/components/schemas/ErrorResponse'
1461
+ components:
1462
+ schemas:
1463
+ ErrorResponse:
1464
+ required:
1465
+ - error
1466
+ type: object
1467
+ properties:
1468
+ error:
1469
+ $ref: '#/components/schemas/ErrorDetail'
1470
+ ErrorDetail:
1471
+ required:
1472
+ - detail
1473
+ - id
1474
+ - name
1475
+ type: object
1476
+ properties:
1477
+ id:
1478
+ type: string
1479
+ name:
1480
+ type: string
1481
+ detail:
1482
+ type: string
1483
+ UserResponse:
1484
+ required:
1485
+ - data
1486
+ type: object
1487
+ properties:
1488
+ data:
1489
+ required:
1490
+ - user
1491
+ type: object
1492
+ properties:
1493
+ user:
1494
+ $ref: '#/components/schemas/User'
1495
+ User:
1496
+ required:
1497
+ - id
1498
+ type: object
1499
+ properties:
1500
+ id:
1501
+ type: string
1502
+ format: uuid
1503
+ DateFormat:
1504
+ required:
1505
+ - format
1506
+ type: object
1507
+ properties:
1508
+ format:
1509
+ type: string
1510
+ nullable: true
1511
+ description: >-
1512
+ The date format setting for the budget. In some cases the format will
1513
+ not be available and will be specified as null.
1514
+ CurrencyFormat:
1515
+ required:
1516
+ - currency_symbol
1517
+ - decimal_digits
1518
+ - decimal_separator
1519
+ - display_symbol
1520
+ - example_format
1521
+ - group_separator
1522
+ - iso_code
1523
+ - symbol_first
1524
+ type: object
1525
+ properties:
1526
+ iso_code:
1527
+ type: string
1528
+ example_format:
1529
+ type: string
1530
+ decimal_digits:
1531
+ type: integer
1532
+ format: int32
1533
+ decimal_separator:
1534
+ type: string
1535
+ symbol_first:
1536
+ type: boolean
1537
+ group_separator:
1538
+ type: string
1539
+ currency_symbol:
1540
+ type: string
1541
+ display_symbol:
1542
+ type: boolean
1543
+ nullable: true
1544
+ description: >-
1545
+ The currency format setting for the budget. In some cases the format
1546
+ will not be available and will be specified as null.
1547
+ BudgetSummaryResponse:
1548
+ required:
1549
+ - data
1550
+ type: object
1551
+ properties:
1552
+ data:
1553
+ required:
1554
+ - budgets
1555
+ type: object
1556
+ properties:
1557
+ budgets:
1558
+ type: array
1559
+ items:
1560
+ $ref: '#/components/schemas/BudgetSummary'
1561
+ default_budget:
1562
+ $ref: '#/components/schemas/BudgetSummary'
1563
+ BudgetSummary:
1564
+ required:
1565
+ - id
1566
+ - name
1567
+ type: object
1568
+ properties:
1569
+ id:
1570
+ type: string
1571
+ format: uuid
1572
+ name:
1573
+ type: string
1574
+ last_modified_on:
1575
+ type: string
1576
+ description: >-
1577
+ The last time any changes were made to the budget from either a web
1578
+ or mobile client
1579
+ format: date-time
1580
+ first_month:
1581
+ type: string
1582
+ description: The earliest budget month
1583
+ format: date
1584
+ last_month:
1585
+ type: string
1586
+ description: The latest budget month
1587
+ format: date
1588
+ date_format:
1589
+ $ref: '#/components/schemas/DateFormat'
1590
+ currency_format:
1591
+ $ref: '#/components/schemas/CurrencyFormat'
1592
+ accounts:
1593
+ type: array
1594
+ description: >-
1595
+ The budget accounts (only included if `include_accounts=true`
1596
+ specified as query parameter)
1597
+ items:
1598
+ $ref: '#/components/schemas/Account'
1599
+ BudgetDetailResponse:
1600
+ required:
1601
+ - data
1602
+ type: object
1603
+ properties:
1604
+ data:
1605
+ required:
1606
+ - budget
1607
+ - server_knowledge
1608
+ type: object
1609
+ properties:
1610
+ budget:
1611
+ $ref: '#/components/schemas/BudgetDetail'
1612
+ server_knowledge:
1613
+ type: integer
1614
+ description: The knowledge of the server
1615
+ format: int64
1616
+ BudgetDetail:
1617
+ allOf:
1618
+ - $ref: '#/components/schemas/BudgetSummary'
1619
+ - type: object
1620
+ properties:
1621
+ accounts:
1622
+ type: array
1623
+ items:
1624
+ $ref: '#/components/schemas/Account'
1625
+ payees:
1626
+ type: array
1627
+ items:
1628
+ $ref: '#/components/schemas/Payee'
1629
+ payee_locations:
1630
+ type: array
1631
+ items:
1632
+ $ref: '#/components/schemas/PayeeLocation'
1633
+ category_groups:
1634
+ type: array
1635
+ items:
1636
+ $ref: '#/components/schemas/CategoryGroup'
1637
+ categories:
1638
+ type: array
1639
+ items:
1640
+ $ref: '#/components/schemas/Category'
1641
+ months:
1642
+ type: array
1643
+ items:
1644
+ $ref: '#/components/schemas/MonthDetail'
1645
+ transactions:
1646
+ type: array
1647
+ items:
1648
+ $ref: '#/components/schemas/TransactionSummary'
1649
+ subtransactions:
1650
+ type: array
1651
+ items:
1652
+ $ref: '#/components/schemas/SubTransaction'
1653
+ scheduled_transactions:
1654
+ type: array
1655
+ items:
1656
+ $ref: '#/components/schemas/ScheduledTransactionSummary'
1657
+ scheduled_subtransactions:
1658
+ type: array
1659
+ items:
1660
+ $ref: '#/components/schemas/ScheduledSubTransaction'
1661
+ BudgetSettingsResponse:
1662
+ required:
1663
+ - data
1664
+ type: object
1665
+ properties:
1666
+ data:
1667
+ required:
1668
+ - settings
1669
+ type: object
1670
+ properties:
1671
+ settings:
1672
+ $ref: '#/components/schemas/BudgetSettings'
1673
+ BudgetSettings:
1674
+ required:
1675
+ - currency_format
1676
+ - date_format
1677
+ type: object
1678
+ properties:
1679
+ date_format:
1680
+ $ref: '#/components/schemas/DateFormat'
1681
+ currency_format:
1682
+ $ref: '#/components/schemas/CurrencyFormat'
1683
+ AccountsResponse:
1684
+ required:
1685
+ - data
1686
+ type: object
1687
+ properties:
1688
+ data:
1689
+ required:
1690
+ - accounts
1691
+ - server_knowledge
1692
+ type: object
1693
+ properties:
1694
+ accounts:
1695
+ type: array
1696
+ items:
1697
+ $ref: '#/components/schemas/Account'
1698
+ server_knowledge:
1699
+ type: integer
1700
+ description: The knowledge of the server
1701
+ format: int64
1702
+ AccountResponse:
1703
+ required:
1704
+ - data
1705
+ type: object
1706
+ properties:
1707
+ data:
1708
+ required:
1709
+ - account
1710
+ type: object
1711
+ properties:
1712
+ account:
1713
+ $ref: '#/components/schemas/Account'
1714
+ Account:
1715
+ required:
1716
+ - balance
1717
+ - cleared_balance
1718
+ - closed
1719
+ - deleted
1720
+ - id
1721
+ - name
1722
+ - on_budget
1723
+ - transfer_payee_id
1724
+ - type
1725
+ - uncleared_balance
1726
+ type: object
1727
+ properties:
1728
+ id:
1729
+ type: string
1730
+ format: uuid
1731
+ name:
1732
+ type: string
1733
+ type:
1734
+ $ref: '#/components/schemas/AccountType'
1735
+ on_budget:
1736
+ type: boolean
1737
+ description: Whether this account is on budget or not
1738
+ closed:
1739
+ type: boolean
1740
+ description: Whether this account is closed or not
1741
+ note:
1742
+ type: string
1743
+ nullable: true
1744
+ balance:
1745
+ type: integer
1746
+ description: The current balance of the account in milliunits format
1747
+ format: int64
1748
+ cleared_balance:
1749
+ type: integer
1750
+ description: The current cleared balance of the account in milliunits format
1751
+ format: int64
1752
+ uncleared_balance:
1753
+ type: integer
1754
+ description: The current uncleared balance of the account in milliunits format
1755
+ format: int64
1756
+ transfer_payee_id:
1757
+ type: string
1758
+ nullable: true
1759
+ description: The payee id which should be used when transferring to this account
1760
+ format: uuid
1761
+ direct_import_linked:
1762
+ type: boolean
1763
+ description: >-
1764
+ Whether or not the account is linked to a financial institution for
1765
+ automatic transaction import.
1766
+ direct_import_in_error:
1767
+ type: boolean
1768
+ description: >-
1769
+ If an account linked to a financial institution
1770
+ (direct_import_linked=true) and the linked connection is not in a
1771
+ healthy state, this will be true.
1772
+ last_reconciled_at:
1773
+ type: string
1774
+ nullable: true
1775
+ description: A date/time specifying when the account was last reconciled.
1776
+ format: date-time
1777
+ debt_original_balance:
1778
+ type: integer
1779
+ nullable: true
1780
+ description: >-
1781
+ The original debt/loan account balance, specified in milliunits
1782
+ format.
1783
+ format: int64
1784
+ debt_interest_rates:
1785
+ $ref: '#/components/schemas/LoanAccountPeriodicValue'
1786
+ debt_minimum_payments:
1787
+ $ref: '#/components/schemas/LoanAccountPeriodicValue'
1788
+ debt_escrow_amounts:
1789
+ $ref: '#/components/schemas/LoanAccountPeriodicValue'
1790
+ deleted:
1791
+ type: boolean
1792
+ description: >-
1793
+ Whether or not the account has been deleted. Deleted accounts will
1794
+ only be included in delta requests.
1795
+ PostAccountWrapper:
1796
+ required:
1797
+ - account
1798
+ type: object
1799
+ properties:
1800
+ account:
1801
+ $ref: '#/components/schemas/SaveAccount'
1802
+ SaveAccount:
1803
+ required:
1804
+ - balance
1805
+ - name
1806
+ - type
1807
+ type: object
1808
+ properties:
1809
+ name:
1810
+ type: string
1811
+ description: The name of the account
1812
+ type:
1813
+ $ref: '#/components/schemas/AccountType'
1814
+ balance:
1815
+ type: integer
1816
+ description: The current balance of the account in milliunits format
1817
+ format: int64
1818
+ LoanAccountPeriodicValue:
1819
+ type: object
1820
+ nullable: true
1821
+ additionalProperties:
1822
+ type: integer
1823
+ format: int64
1824
+ AccountType:
1825
+ type: string
1826
+ description: The type of account
1827
+ enum:
1828
+ - checking
1829
+ - savings
1830
+ - cash
1831
+ - creditCard
1832
+ - lineOfCredit
1833
+ - otherAsset
1834
+ - otherLiability
1835
+ - mortgage
1836
+ - autoLoan
1837
+ - studentLoan
1838
+ - personalLoan
1839
+ - medicalDebt
1840
+ - otherDebt
1841
+ CategoriesResponse:
1842
+ required:
1843
+ - data
1844
+ type: object
1845
+ properties:
1846
+ data:
1847
+ required:
1848
+ - category_groups
1849
+ - server_knowledge
1850
+ type: object
1851
+ properties:
1852
+ category_groups:
1853
+ type: array
1854
+ items:
1855
+ $ref: '#/components/schemas/CategoryGroupWithCategories'
1856
+ server_knowledge:
1857
+ type: integer
1858
+ description: The knowledge of the server
1859
+ format: int64
1860
+ CategoryResponse:
1861
+ required:
1862
+ - data
1863
+ type: object
1864
+ properties:
1865
+ data:
1866
+ required:
1867
+ - category
1868
+ type: object
1869
+ properties:
1870
+ category:
1871
+ $ref: '#/components/schemas/Category'
1872
+ CategoryGroupWithCategories:
1873
+ allOf:
1874
+ - $ref: '#/components/schemas/CategoryGroup'
1875
+ - required:
1876
+ - categories
1877
+ type: object
1878
+ properties:
1879
+ categories:
1880
+ type: array
1881
+ description: >-
1882
+ Category group categories. Amounts (budgeted, activity,
1883
+ balance, etc.) are specific to the current budget month (UTC).
1884
+ items:
1885
+ $ref: '#/components/schemas/Category'
1886
+ CategoryGroup:
1887
+ required:
1888
+ - deleted
1889
+ - hidden
1890
+ - id
1891
+ - name
1892
+ type: object
1893
+ properties:
1894
+ id:
1895
+ type: string
1896
+ format: uuid
1897
+ name:
1898
+ type: string
1899
+ hidden:
1900
+ type: boolean
1901
+ description: Whether or not the category group is hidden
1902
+ deleted:
1903
+ type: boolean
1904
+ description: >-
1905
+ Whether or not the category group has been deleted. Deleted
1906
+ category groups will only be included in delta requests.
1907
+ Category:
1908
+ required:
1909
+ - activity
1910
+ - balance
1911
+ - budgeted
1912
+ - category_group_id
1913
+ - deleted
1914
+ - hidden
1915
+ - id
1916
+ - name
1917
+ type: object
1918
+ properties:
1919
+ id:
1920
+ type: string
1921
+ format: uuid
1922
+ category_group_id:
1923
+ type: string
1924
+ format: uuid
1925
+ category_group_name:
1926
+ type: string
1927
+ name:
1928
+ type: string
1929
+ hidden:
1930
+ type: boolean
1931
+ description: Whether or not the category is hidden
1932
+ original_category_group_id:
1933
+ type: string
1934
+ description: 'DEPRECATED: No longer used. Value will always be null.'
1935
+ format: uuid
1936
+ nullable: true
1937
+ note:
1938
+ type: string
1939
+ nullable: true
1940
+ budgeted:
1941
+ type: integer
1942
+ description: Budgeted amount in milliunits format
1943
+ format: int64
1944
+ activity:
1945
+ type: integer
1946
+ description: Activity amount in milliunits format
1947
+ format: int64
1948
+ balance:
1949
+ type: integer
1950
+ description: Balance in milliunits format
1951
+ format: int64
1952
+ goal_type:
1953
+ type: string
1954
+ description: >-
1955
+ The type of goal, if the category has a goal (TB='Target Category
1956
+ Balance', TBD='Target Category Balance by Date', MF='Monthly
1957
+ Funding', NEED='Plan Your Spending')
1958
+ enum:
1959
+ - TB
1960
+ - TBD
1961
+ - MF
1962
+ - NEED
1963
+ - DEBT
1964
+ - null
1965
+ nullable: true
1966
+ goal_day:
1967
+ type: integer
1968
+ description: >-
1969
+ A day offset modifier for the goal's due date. When goal_cadence is
1970
+ 2 (Weekly), this value specifies which day of the week the goal is
1971
+ due (0 = Sunday, 6 = Saturday). Otherwise, this value specifies
1972
+ which day of the month the goal is due (1 = 1st, 31 = 31st, null =
1973
+ Last day of Month).
1974
+ format: int32
1975
+ nullable: true
1976
+ goal_cadence:
1977
+ type: integer
1978
+ description: >-
1979
+ The goal cadence. Value in range 0-14. There are two subsets of
1980
+ these values which behave differently. For values 0, 1, 2, and 13,
1981
+ the goal's due date repeats every goal_cadence *
1982
+ goal_cadence_frequency, where 0 = None, 1 = Monthly, 2 = Weekly, and
1983
+ 13 = Yearly. For example, goal_cadence 1 with goal_cadence_frequency
1984
+ 2 means the goal is due every other month. For values 3-12 and 14,
1985
+ goal_cadence_frequency is ignored and the goal's due date repeats
1986
+ every goal_cadence, where 3 = Every 2 Months, 4 = Every 3 Months,
1987
+ ..., 12 = Every 11 Months, and 14 = Every 2 Years.
1988
+ format: int32
1989
+ nullable: true
1990
+ goal_cadence_frequency:
1991
+ type: integer
1992
+ description: >-
1993
+ The goal cadence frequency. When goal_cadence is 0, 1, 2, or 13, a
1994
+ goal's due date repeats every goal_cadence * goal_cadence_frequency.
1995
+ For example, goal_cadence 1 with goal_cadence_frequency 2 means the
1996
+ goal is due every other month. When goal_cadence is 3-12 or 14,
1997
+ goal_cadence_frequency is ignored.
1998
+ format: int32
1999
+ nullable: true
2000
+ goal_creation_month:
2001
+ type: string
2002
+ description: The month a goal was created
2003
+ format: date
2004
+ nullable: true
2005
+ goal_target:
2006
+ type: integer
2007
+ description: The goal target amount in milliunits
2008
+ format: int64
2009
+ nullable: true
2010
+ goal_target_month:
2011
+ type: string
2012
+ description: >-
2013
+ The original target month for the goal to be completed. Only some
2014
+ goal types specify this date.
2015
+ format: date
2016
+ nullable: true
2017
+ goal_percentage_complete:
2018
+ type: integer
2019
+ description: The percentage completion of the goal
2020
+ format: int32
2021
+ nullable: true
2022
+ goal_months_to_budget:
2023
+ type: integer
2024
+ description: >-
2025
+ The number of months, including the current month, left in the
2026
+ current goal period.
2027
+ format: int32
2028
+ nullable: true
2029
+ goal_under_funded:
2030
+ type: integer
2031
+ description: >-
2032
+ The amount of funding still needed in the current month to stay on
2033
+ track towards completing the goal within the current goal period.
2034
+ This amount will generally correspond to the 'Underfunded' amount in
2035
+ the web and mobile clients except when viewing a category with a
2036
+ Needed for Spending Goal in a future month. The web and mobile
2037
+ clients will ignore any funding from a prior goal period when
2038
+ viewing category with a Needed for Spending Goal in a future month.
2039
+ format: int64
2040
+ nullable: true
2041
+ goal_overall_funded:
2042
+ type: integer
2043
+ description: >-
2044
+ The total amount funded towards the goal within the current goal
2045
+ period.
2046
+ format: int64
2047
+ nullable: true
2048
+ goal_overall_left:
2049
+ type: integer
2050
+ description: >-
2051
+ The amount of funding still needed to complete the goal within the
2052
+ current goal period.
2053
+ format: int64
2054
+ nullable: true
2055
+ deleted:
2056
+ type: boolean
2057
+ description: >-
2058
+ Whether or not the category has been deleted. Deleted categories
2059
+ will only be included in delta requests.
2060
+ SaveCategoryResponse:
2061
+ required:
2062
+ - data
2063
+ type: object
2064
+ properties:
2065
+ data:
2066
+ required:
2067
+ - category
2068
+ - server_knowledge
2069
+ type: object
2070
+ properties:
2071
+ category:
2072
+ $ref: '#/components/schemas/Category'
2073
+ server_knowledge:
2074
+ type: integer
2075
+ description: The knowledge of the server
2076
+ format: int64
2077
+ PayeesResponse:
2078
+ required:
2079
+ - data
2080
+ type: object
2081
+ properties:
2082
+ data:
2083
+ required:
2084
+ - payees
2085
+ - server_knowledge
2086
+ type: object
2087
+ properties:
2088
+ payees:
2089
+ type: array
2090
+ items:
2091
+ $ref: '#/components/schemas/Payee'
2092
+ server_knowledge:
2093
+ type: integer
2094
+ description: The knowledge of the server
2095
+ format: int64
2096
+ PayeeResponse:
2097
+ required:
2098
+ - data
2099
+ type: object
2100
+ properties:
2101
+ data:
2102
+ required:
2103
+ - payee
2104
+ type: object
2105
+ properties:
2106
+ payee:
2107
+ $ref: '#/components/schemas/Payee'
2108
+ Payee:
2109
+ required:
2110
+ - deleted
2111
+ - id
2112
+ - name
2113
+ type: object
2114
+ properties:
2115
+ id:
2116
+ type: string
2117
+ format: uuid
2118
+ name:
2119
+ type: string
2120
+ transfer_account_id:
2121
+ type: string
2122
+ nullable: true
2123
+ description: >-
2124
+ If a transfer payee, the `account_id` to which this payee transfers
2125
+ to
2126
+ deleted:
2127
+ type: boolean
2128
+ description: >-
2129
+ Whether or not the payee has been deleted. Deleted payees will only
2130
+ be included in delta requests.
2131
+ PayeeLocationsResponse:
2132
+ required:
2133
+ - data
2134
+ type: object
2135
+ properties:
2136
+ data:
2137
+ required:
2138
+ - payee_locations
2139
+ type: object
2140
+ properties:
2141
+ payee_locations:
2142
+ type: array
2143
+ items:
2144
+ $ref: '#/components/schemas/PayeeLocation'
2145
+ PayeeLocationResponse:
2146
+ required:
2147
+ - data
2148
+ type: object
2149
+ properties:
2150
+ data:
2151
+ required:
2152
+ - payee_location
2153
+ type: object
2154
+ properties:
2155
+ payee_location:
2156
+ $ref: '#/components/schemas/PayeeLocation'
2157
+ PayeeLocation:
2158
+ required:
2159
+ - deleted
2160
+ - id
2161
+ - latitude
2162
+ - longitude
2163
+ - payee_id
2164
+ type: object
2165
+ properties:
2166
+ id:
2167
+ type: string
2168
+ format: uuid
2169
+ payee_id:
2170
+ type: string
2171
+ format: uuid
2172
+ latitude:
2173
+ type: string
2174
+ longitude:
2175
+ type: string
2176
+ deleted:
2177
+ type: boolean
2178
+ description: >-
2179
+ Whether or not the payee location has been deleted. Deleted payee
2180
+ locations will only be included in delta requests.
2181
+ TransactionsResponse:
2182
+ required:
2183
+ - data
2184
+ type: object
2185
+ properties:
2186
+ data:
2187
+ required:
2188
+ - server_knowledge
2189
+ - transactions
2190
+ type: object
2191
+ properties:
2192
+ transactions:
2193
+ type: array
2194
+ items:
2195
+ $ref: '#/components/schemas/TransactionDetail'
2196
+ server_knowledge:
2197
+ type: integer
2198
+ description: The knowledge of the server
2199
+ format: int64
2200
+ HybridTransactionsResponse:
2201
+ required:
2202
+ - data
2203
+ type: object
2204
+ properties:
2205
+ data:
2206
+ required:
2207
+ - transactions
2208
+ type: object
2209
+ properties:
2210
+ transactions:
2211
+ type: array
2212
+ items:
2213
+ $ref: '#/components/schemas/HybridTransaction'
2214
+ server_knowledge:
2215
+ type: integer
2216
+ description: The knowledge of the server
2217
+ format: int64
2218
+ PutTransactionWrapper:
2219
+ required:
2220
+ - transaction
2221
+ type: object
2222
+ properties:
2223
+ transaction:
2224
+ $ref: '#/components/schemas/SaveTransaction'
2225
+ PostTransactionsWrapper:
2226
+ type: object
2227
+ properties:
2228
+ transaction:
2229
+ $ref: '#/components/schemas/SaveTransaction'
2230
+ transactions:
2231
+ type: array
2232
+ items:
2233
+ $ref: '#/components/schemas/SaveTransaction'
2234
+ SaveTransaction:
2235
+ allOf:
2236
+ - type: object
2237
+ - $ref: '#/components/schemas/SaveTransactionWithOptionalFields'
2238
+ PatchTransactionsWrapper:
2239
+ required:
2240
+ - transactions
2241
+ type: object
2242
+ properties:
2243
+ transactions:
2244
+ type: array
2245
+ items:
2246
+ $ref: '#/components/schemas/SaveTransactionWithId'
2247
+ SaveTransactionWithId:
2248
+ allOf:
2249
+ - type: object
2250
+ properties:
2251
+ id:
2252
+ type: string
2253
+ - $ref: '#/components/schemas/SaveTransactionWithOptionalFields'
2254
+ SaveTransactionWithOptionalFields:
2255
+ type: object
2256
+ properties:
2257
+ account_id:
2258
+ type: string
2259
+ format: uuid
2260
+ date:
2261
+ type: string
2262
+ description: >-
2263
+ The transaction date in ISO format (e.g. 2016-12-01). Future dates
2264
+ (scheduled transactions) are not permitted. Split transaction dates
2265
+ cannot be changed and if a different date is supplied it will be
2266
+ ignored.
2267
+ format: date
2268
+ amount:
2269
+ type: integer
2270
+ description: >-
2271
+ The transaction amount in milliunits format. Split transaction
2272
+ amounts cannot be changed and if a different amount is supplied it
2273
+ will be ignored.
2274
+ format: int64
2275
+ payee_id:
2276
+ type: string
2277
+ nullable: true
2278
+ description: >-
2279
+ The payee for the transaction. To create a transfer between two
2280
+ accounts, use the account transfer payee pointing to the target
2281
+ account. Account transfer payees are specified as
2282
+ `tranfer_payee_id` on the account resource.
2283
+ format: uuid
2284
+ payee_name:
2285
+ maxLength: 50
2286
+ type: string
2287
+ nullable: true
2288
+ description: >-
2289
+ The payee name. If a `payee_name` value is provided and `payee_id`
2290
+ has a null value, the `payee_name` value will be used to resolve the
2291
+ payee by either (1) a matching payee rename rule (only if
2292
+ `import_id` is also specified) or (2) a payee with the same name or
2293
+ (3) creation of a new payee.
2294
+ category_id:
2295
+ type: string
2296
+ nullable: true
2297
+ description: >-
2298
+ The category for the transaction. To configure a split transaction,
2299
+ you can specify null for `category_id` and provide a
2300
+ `subtransactions` array as part of the transaction object. If an
2301
+ existing transaction is a split, the `category_id` cannot be
2302
+ changed. Credit Card Payment categories are not permitted and will
2303
+ be ignored if supplied.
2304
+ format: uuid
2305
+ memo:
2306
+ maxLength: 200
2307
+ type: string
2308
+ nullable: true
2309
+ cleared:
2310
+ type: string
2311
+ description: The cleared status of the transaction
2312
+ enum:
2313
+ - cleared
2314
+ - uncleared
2315
+ - reconciled
2316
+ approved:
2317
+ type: boolean
2318
+ description: >-
2319
+ Whether or not the transaction is approved. If not supplied,
2320
+ transaction will be unapproved by default.
2321
+ flag_color:
2322
+ type: string
2323
+ description: The transaction flag
2324
+ enum:
2325
+ - red
2326
+ - orange
2327
+ - yellow
2328
+ - green
2329
+ - blue
2330
+ - purple
2331
+ - null
2332
+ import_id:
2333
+ maxLength: 36
2334
+ type: string
2335
+ nullable: true
2336
+ description: >-
2337
+ If specified, the new transaction will be assigned this `import_id`
2338
+ and considered "imported". We will also attempt to match this
2339
+ imported transaction to an existing "user-entered" transation on the
2340
+ same account, with the same amount, and with a date +/-10 days from
2341
+ the imported transaction date.<br><br>Transactions imported through
2342
+ File Based Import or Direct Import (not through the API) are
2343
+ assigned an import_id in the format:
2344
+ 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a
2345
+ transaction dated 2015-12-30 in the amount of -$294.23 USD would
2346
+ have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second
2347
+ transaction on the same account was imported and had the same date
2348
+ and same amount, its import_id would be
2349
+ 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent
2350
+ duplicates through Direct Import and File Based Import.<br><br>If
2351
+ import_id is omitted or specified as null, the transaction will be
2352
+ treated as a "user-entered" transaction. As such, it will be
2353
+ eligible to be matched against transactions later being imported
2354
+ (via DI, FBI, or API).
2355
+ subtransactions:
2356
+ type: array
2357
+ description: >-
2358
+ An array of subtransactions to configure a transaction as a split.
2359
+ Updating `subtransactions` on an existing split transaction is not
2360
+ supported.
2361
+ items:
2362
+ $ref: '#/components/schemas/SaveSubTransaction'
2363
+ SaveSubTransaction:
2364
+ required:
2365
+ - amount
2366
+ type: object
2367
+ properties:
2368
+ amount:
2369
+ type: integer
2370
+ description: The subtransaction amount in milliunits format.
2371
+ format: int64
2372
+ payee_id:
2373
+ type: string
2374
+ nullable: true
2375
+ description: The payee for the subtransaction.
2376
+ format: uuid
2377
+ payee_name:
2378
+ maxLength: 50
2379
+ type: string
2380
+ nullable: true
2381
+ description: >-
2382
+ The payee name. If a `payee_name` value is provided and `payee_id`
2383
+ has a null value, the `payee_name` value will be used to resolve the
2384
+ payee by either (1) a matching payee rename rule (only if import_id
2385
+ is also specified on parent transaction) or (2) a payee with the
2386
+ same name or (3) creation of a new payee.
2387
+ category_id:
2388
+ type: string
2389
+ nullable: true
2390
+ description: >-
2391
+ The category for the subtransaction. Credit Card Payment categories
2392
+ are not permitted and will be ignored if supplied.
2393
+ format: uuid
2394
+ memo:
2395
+ maxLength: 200
2396
+ type: string
2397
+ nullable: true
2398
+ SaveTransactionsResponse:
2399
+ required:
2400
+ - data
2401
+ type: object
2402
+ properties:
2403
+ data:
2404
+ required:
2405
+ - server_knowledge
2406
+ - transaction_ids
2407
+ type: object
2408
+ properties:
2409
+ transaction_ids:
2410
+ type: array
2411
+ description: The transaction ids that were saved
2412
+ items:
2413
+ type: string
2414
+ transaction:
2415
+ $ref: '#/components/schemas/TransactionDetail'
2416
+ transactions:
2417
+ type: array
2418
+ description: >-
2419
+ If multiple transactions were specified, the transactions that
2420
+ were saved
2421
+ items:
2422
+ $ref: '#/components/schemas/TransactionDetail'
2423
+ duplicate_import_ids:
2424
+ type: array
2425
+ description: >-
2426
+ If multiple transactions were specified, a list of import_ids
2427
+ that were not created because of an existing `import_id` found
2428
+ on the same account
2429
+ items:
2430
+ type: string
2431
+ server_knowledge:
2432
+ type: integer
2433
+ description: The knowledge of the server
2434
+ format: int64
2435
+ TransactionResponse:
2436
+ required:
2437
+ - data
2438
+ type: object
2439
+ properties:
2440
+ data:
2441
+ required:
2442
+ - transaction
2443
+ type: object
2444
+ properties:
2445
+ transaction:
2446
+ $ref: '#/components/schemas/TransactionDetail'
2447
+ TransactionSummary:
2448
+ required:
2449
+ - account_id
2450
+ - amount
2451
+ - approved
2452
+ - cleared
2453
+ - date
2454
+ - deleted
2455
+ - id
2456
+ type: object
2457
+ properties:
2458
+ id:
2459
+ type: string
2460
+ date:
2461
+ type: string
2462
+ description: The transaction date in ISO format (e.g. 2016-12-01)
2463
+ format: date
2464
+ amount:
2465
+ type: integer
2466
+ description: The transaction amount in milliunits format
2467
+ format: int64
2468
+ memo:
2469
+ type: string
2470
+ nullable: true
2471
+ cleared:
2472
+ type: string
2473
+ description: The cleared status of the transaction
2474
+ enum:
2475
+ - cleared
2476
+ - uncleared
2477
+ - reconciled
2478
+ approved:
2479
+ type: boolean
2480
+ description: Whether or not the transaction is approved
2481
+ flag_color:
2482
+ type: string
2483
+ description: The transaction flag
2484
+ enum:
2485
+ - red
2486
+ - orange
2487
+ - yellow
2488
+ - green
2489
+ - blue
2490
+ - purple
2491
+ - null
2492
+ nullable: true
2493
+ account_id:
2494
+ type: string
2495
+ format: uuid
2496
+ payee_id:
2497
+ type: string
2498
+ nullable: true
2499
+ format: uuid
2500
+ category_id:
2501
+ type: string
2502
+ nullable: true
2503
+ format: uuid
2504
+ transfer_account_id:
2505
+ type: string
2506
+ nullable: true
2507
+ description: If a transfer transaction, the account to which it transfers
2508
+ format: uuid
2509
+ transfer_transaction_id:
2510
+ type: string
2511
+ nullable: true
2512
+ description: >-
2513
+ If a transfer transaction, the id of transaction on the other side
2514
+ of the transfer
2515
+ matched_transaction_id:
2516
+ type: string
2517
+ nullable: true
2518
+ description: If transaction is matched, the id of the matched transaction
2519
+ import_id:
2520
+ type: string
2521
+ nullable: true
2522
+ description: >-
2523
+ If the transaction was imported, this field is a unique (by account)
2524
+ import identifier. If this transaction was imported through File
2525
+ Based Import or Direct Import and not through the API, the import_id
2526
+ will have the format:
2527
+ 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a
2528
+ transaction dated 2015-12-30 in the amount of -$294.23 USD would
2529
+ have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second
2530
+ transaction on the same account was imported and had the same date
2531
+ and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'.
2532
+ import_payee_name:
2533
+ type: string
2534
+ nullable: true
2535
+ description: >-
2536
+ If the transaction was imported, the payee name that was used when
2537
+ importing and before applying any payee rename rules
2538
+ import_payee_name_original:
2539
+ type: string
2540
+ nullable: true
2541
+ description: >-
2542
+ If the transaction was imported, the original payee name as it
2543
+ appeared on the statement
2544
+ debt_transaction_type:
2545
+ type: string
2546
+ description: >-
2547
+ If the transaction is a debt/loan account transaction, the type of
2548
+ transaction
2549
+ enum:
2550
+ - payment
2551
+ - refund
2552
+ - fee
2553
+ - interest
2554
+ - escrow
2555
+ - balancedAdjustment
2556
+ - credit
2557
+ - charge
2558
+ - null
2559
+ nullable: true
2560
+ deleted:
2561
+ type: boolean
2562
+ description: >-
2563
+ Whether or not the transaction has been deleted. Deleted
2564
+ transactions will only be included in delta requests.
2565
+ TransactionDetail:
2566
+ allOf:
2567
+ - $ref: '#/components/schemas/TransactionSummary'
2568
+ - required:
2569
+ - account_name
2570
+ - subtransactions
2571
+ type: object
2572
+ properties:
2573
+ account_name:
2574
+ type: string
2575
+ payee_name:
2576
+ type: string
2577
+ nullable: true
2578
+ category_name:
2579
+ type: string
2580
+ nullable: true
2581
+ description: >-
2582
+ The name of the category. If a split transaction, this will be
2583
+ 'Split'.
2584
+ subtransactions:
2585
+ type: array
2586
+ description: If a split transaction, the subtransactions.
2587
+ items:
2588
+ $ref: '#/components/schemas/SubTransaction'
2589
+ HybridTransaction:
2590
+ allOf:
2591
+ - $ref: '#/components/schemas/TransactionSummary'
2592
+ - required:
2593
+ - account_name
2594
+ - type
2595
+ type: object
2596
+ properties:
2597
+ type:
2598
+ type: string
2599
+ description: >-
2600
+ Whether the hybrid transaction represents a regular transaction
2601
+ or a subtransaction
2602
+ enum:
2603
+ - transaction
2604
+ - subtransaction
2605
+ parent_transaction_id:
2606
+ type: string
2607
+ nullable: true
2608
+ description: >-
2609
+ For subtransaction types, this is the id of the parent
2610
+ transaction. For transaction types, this id will be always be
2611
+ null.
2612
+ account_name:
2613
+ type: string
2614
+ payee_name:
2615
+ type: string
2616
+ nullable: true
2617
+ category_name:
2618
+ type: string
2619
+ description: >-
2620
+ The name of the category. If a split transaction, this will be
2621
+ 'Split'.
2622
+ PatchMonthCategoryWrapper:
2623
+ required:
2624
+ - category
2625
+ type: object
2626
+ properties:
2627
+ category:
2628
+ $ref: '#/components/schemas/SaveMonthCategory'
2629
+ SaveMonthCategory:
2630
+ required:
2631
+ - budgeted
2632
+ type: object
2633
+ properties:
2634
+ budgeted:
2635
+ type: integer
2636
+ description: Budgeted amount in milliunits format
2637
+ format: int64
2638
+ TransactionsImportResponse:
2639
+ required:
2640
+ - data
2641
+ type: object
2642
+ properties:
2643
+ data:
2644
+ required:
2645
+ - transaction_ids
2646
+ type: object
2647
+ properties:
2648
+ transaction_ids:
2649
+ type: array
2650
+ description: The list of transaction ids that were imported.
2651
+ items:
2652
+ type: string
2653
+ BulkResponse:
2654
+ required:
2655
+ - data
2656
+ type: object
2657
+ properties:
2658
+ data:
2659
+ required:
2660
+ - bulk
2661
+ type: object
2662
+ properties:
2663
+ bulk:
2664
+ required:
2665
+ - duplicate_import_ids
2666
+ - transaction_ids
2667
+ type: object
2668
+ properties:
2669
+ transaction_ids:
2670
+ type: array
2671
+ description: The list of Transaction ids that were created.
2672
+ items:
2673
+ type: string
2674
+ duplicate_import_ids:
2675
+ type: array
2676
+ description: >-
2677
+ If any Transactions were not created because they had an
2678
+ `import_id` matching a transaction already on the same
2679
+ account, the specified import_id(s) will be included in this
2680
+ list.
2681
+ items:
2682
+ type: string
2683
+ BulkTransactions:
2684
+ required:
2685
+ - transactions
2686
+ type: object
2687
+ properties:
2688
+ transactions:
2689
+ type: array
2690
+ items:
2691
+ $ref: '#/components/schemas/SaveTransaction'
2692
+ SubTransaction:
2693
+ required:
2694
+ - amount
2695
+ - deleted
2696
+ - id
2697
+ - transaction_id
2698
+ type: object
2699
+ properties:
2700
+ id:
2701
+ type: string
2702
+ transaction_id:
2703
+ type: string
2704
+ amount:
2705
+ type: integer
2706
+ description: The subtransaction amount in milliunits format
2707
+ format: int64
2708
+ memo:
2709
+ type: string
2710
+ nullable: true
2711
+ payee_id:
2712
+ type: string
2713
+ format: uuid
2714
+ nullable: true
2715
+ payee_name:
2716
+ type: string
2717
+ nullable: true
2718
+ category_id:
2719
+ type: string
2720
+ nullable: true
2721
+ format: uuid
2722
+ category_name:
2723
+ type: string
2724
+ nullable: true
2725
+ transfer_account_id:
2726
+ type: string
2727
+ nullable: true
2728
+ description: If a transfer, the account_id which the subtransaction transfers to
2729
+ format: uuid
2730
+ transfer_transaction_id:
2731
+ type: string
2732
+ nullable: true
2733
+ description: >-
2734
+ If a transfer, the id of transaction on the other side of the
2735
+ transfer
2736
+ deleted:
2737
+ type: boolean
2738
+ description: >-
2739
+ Whether or not the subtransaction has been deleted. Deleted
2740
+ subtransactions will only be included in delta requests.
2741
+ ScheduledTransactionsResponse:
2742
+ required:
2743
+ - data
2744
+ type: object
2745
+ properties:
2746
+ data:
2747
+ required:
2748
+ - scheduled_transactions
2749
+ - server_knowledge
2750
+ type: object
2751
+ properties:
2752
+ scheduled_transactions:
2753
+ type: array
2754
+ items:
2755
+ $ref: '#/components/schemas/ScheduledTransactionDetail'
2756
+ server_knowledge:
2757
+ type: integer
2758
+ description: The knowledge of the server
2759
+ format: int64
2760
+ ScheduledTransactionResponse:
2761
+ required:
2762
+ - data
2763
+ type: object
2764
+ properties:
2765
+ data:
2766
+ required:
2767
+ - scheduled_transaction
2768
+ type: object
2769
+ properties:
2770
+ scheduled_transaction:
2771
+ $ref: '#/components/schemas/ScheduledTransactionDetail'
2772
+ ScheduledTransactionSummary:
2773
+ required:
2774
+ - account_id
2775
+ - amount
2776
+ - date_first
2777
+ - date_next
2778
+ - deleted
2779
+ - frequency
2780
+ - id
2781
+ type: object
2782
+ properties:
2783
+ id:
2784
+ type: string
2785
+ format: uuid
2786
+ date_first:
2787
+ type: string
2788
+ description: The first date for which the Scheduled Transaction was scheduled.
2789
+ format: date
2790
+ date_next:
2791
+ type: string
2792
+ description: The next date for which the Scheduled Transaction is scheduled.
2793
+ format: date
2794
+ frequency:
2795
+ type: string
2796
+ enum:
2797
+ - never
2798
+ - daily
2799
+ - weekly
2800
+ - everyOtherWeek
2801
+ - twiceAMonth
2802
+ - every4Weeks
2803
+ - monthly
2804
+ - everyOtherMonth
2805
+ - every3Months
2806
+ - every4Months
2807
+ - twiceAYear
2808
+ - yearly
2809
+ - everyOtherYear
2810
+ amount:
2811
+ type: integer
2812
+ description: The scheduled transaction amount in milliunits format
2813
+ format: int64
2814
+ memo:
2815
+ type: string
2816
+ nullable: true
2817
+ flag_color:
2818
+ type: string
2819
+ description: The scheduled transaction flag
2820
+ enum:
2821
+ - red
2822
+ - orange
2823
+ - yellow
2824
+ - green
2825
+ - blue
2826
+ - purple
2827
+ - null
2828
+ nullable: true
2829
+ account_id:
2830
+ type: string
2831
+ format: uuid
2832
+ payee_id:
2833
+ type: string
2834
+ nullable: true
2835
+ format: uuid
2836
+ category_id:
2837
+ type: string
2838
+ nullable: true
2839
+ format: uuid
2840
+ transfer_account_id:
2841
+ type: string
2842
+ nullable: true
2843
+ description: >-
2844
+ If a transfer, the account_id which the scheduled transaction
2845
+ transfers to
2846
+ format: uuid
2847
+ deleted:
2848
+ type: boolean
2849
+ description: >-
2850
+ Whether or not the scheduled transaction has been deleted. Deleted
2851
+ scheduled transactions will only be included in delta requests.
2852
+ ScheduledTransactionDetail:
2853
+ allOf:
2854
+ - $ref: '#/components/schemas/ScheduledTransactionSummary'
2855
+ - required:
2856
+ - account_name
2857
+ - subtransactions
2858
+ type: object
2859
+ properties:
2860
+ account_name:
2861
+ type: string
2862
+ payee_name:
2863
+ type: string
2864
+ nullable: true
2865
+ category_name:
2866
+ type: string
2867
+ nullable: true
2868
+ description: >-
2869
+ The name of the category. If a split scheduled transaction,
2870
+ this will be 'Split'.
2871
+ subtransactions:
2872
+ type: array
2873
+ description: If a split scheduled transaction, the subtransactions.
2874
+ items:
2875
+ $ref: '#/components/schemas/ScheduledSubTransaction'
2876
+ ScheduledSubTransaction:
2877
+ required:
2878
+ - amount
2879
+ - deleted
2880
+ - id
2881
+ - scheduled_transaction_id
2882
+ type: object
2883
+ properties:
2884
+ id:
2885
+ type: string
2886
+ format: uuid
2887
+ scheduled_transaction_id:
2888
+ type: string
2889
+ format: uuid
2890
+ amount:
2891
+ type: integer
2892
+ description: The scheduled subtransaction amount in milliunits format
2893
+ format: int64
2894
+ memo:
2895
+ type: string
2896
+ nullable: true
2897
+ payee_id:
2898
+ type: string
2899
+ nullable: true
2900
+ format: uuid
2901
+ category_id:
2902
+ type: string
2903
+ nullable: true
2904
+ format: uuid
2905
+ transfer_account_id:
2906
+ type: string
2907
+ nullable: true
2908
+ description: >-
2909
+ If a transfer, the account_id which the scheduled subtransaction
2910
+ transfers to
2911
+ format: uuid
2912
+ deleted:
2913
+ type: boolean
2914
+ description: >-
2915
+ Whether or not the scheduled subtransaction has been deleted.
2916
+ Deleted scheduled subtransactions will only be included in delta
2917
+ requests.
2918
+ MonthSummariesResponse:
2919
+ required:
2920
+ - data
2921
+ type: object
2922
+ properties:
2923
+ data:
2924
+ required:
2925
+ - months
2926
+ - server_knowledge
2927
+ type: object
2928
+ properties:
2929
+ months:
2930
+ type: array
2931
+ items:
2932
+ $ref: '#/components/schemas/MonthSummary'
2933
+ server_knowledge:
2934
+ type: integer
2935
+ description: The knowledge of the server
2936
+ format: int64
2937
+ MonthDetailResponse:
2938
+ required:
2939
+ - data
2940
+ type: object
2941
+ properties:
2942
+ data:
2943
+ required:
2944
+ - month
2945
+ type: object
2946
+ properties:
2947
+ month:
2948
+ $ref: '#/components/schemas/MonthDetail'
2949
+ MonthSummary:
2950
+ required:
2951
+ - activity
2952
+ - budgeted
2953
+ - deleted
2954
+ - income
2955
+ - month
2956
+ - to_be_budgeted
2957
+ type: object
2958
+ properties:
2959
+ month:
2960
+ type: string
2961
+ format: date
2962
+ note:
2963
+ type: string
2964
+ nullable: true
2965
+ income:
2966
+ type: integer
2967
+ description: >-
2968
+ The total amount of transactions categorized to 'Inflow: Ready to
2969
+ Assign' in the month
2970
+ format: int64
2971
+ budgeted:
2972
+ type: integer
2973
+ description: The total amount budgeted in the month
2974
+ format: int64
2975
+ activity:
2976
+ type: integer
2977
+ description: >-
2978
+ The total amount of transactions in the month, excluding those
2979
+ categorized to 'Inflow: Ready to Assign'
2980
+ format: int64
2981
+ to_be_budgeted:
2982
+ type: integer
2983
+ description: The available amount for 'Ready to Assign'
2984
+ format: int64
2985
+ age_of_money:
2986
+ type: integer
2987
+ description: The Age of Money as of the month
2988
+ format: int32
2989
+ nullable: true
2990
+ deleted:
2991
+ type: boolean
2992
+ description: >-
2993
+ Whether or not the month has been deleted. Deleted months will only
2994
+ be included in delta requests.
2995
+ MonthDetail:
2996
+ allOf:
2997
+ - $ref: '#/components/schemas/MonthSummary'
2998
+ - required:
2999
+ - categories
3000
+ type: object
3001
+ properties:
3002
+ categories:
3003
+ type: array
3004
+ description: >-
3005
+ The budget month categories. Amounts (budgeted, activity,
3006
+ balance, etc.) are specific to the {month} parameter specified.
3007
+ items:
3008
+ $ref: '#/components/schemas/Category'
3009
+ securitySchemes:
3010
+ bearer:
3011
+ type: http
3012
+ scheme: bearer