ynab 1.5.0 → 1.6.0

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