quantix-mcp 0.3.7 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/agents/copilot-instructions.md +32 -32
- package/.github/copilot-instructions.md +17 -17
- package/.github/workflows/publish.yaml +28 -28
- package/.opencode/command/speckit.analyze.md +184 -184
- package/.opencode/command/speckit.checklist.md +294 -294
- package/.opencode/command/speckit.clarify.md +181 -181
- package/.opencode/command/speckit.constitution.md +84 -84
- package/.opencode/command/speckit.implement.md +135 -135
- package/.opencode/command/speckit.plan.md +89 -89
- package/.opencode/command/speckit.specify.md +258 -258
- package/.opencode/command/speckit.tasks.md +137 -137
- package/.opencode/command/speckit.taskstoissues.md +30 -30
- package/.specify/memory/constitution.md +58 -58
- package/.specify/templates/constitution-template.md +50 -50
- package/.vscode/launch.json +14 -14
- package/CLAUDE.md +64 -64
- package/README.md +176 -176
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/tools/accounts.d.ts.map +1 -1
- package/dist/tools/accounts.js +64 -28
- package/dist/tools/accounts.js.map +1 -1
- package/dist/tools/categories.d.ts.map +1 -1
- package/dist/tools/categories.js +46 -20
- package/dist/tools/categories.js.map +1 -1
- package/dist/tools/credit-cards.d.ts.map +1 -1
- package/dist/tools/credit-cards.js +89 -33
- package/dist/tools/credit-cards.js.map +1 -1
- package/dist/tools/data.d.ts.map +1 -1
- package/dist/tools/data.js +19 -8
- package/dist/tools/data.js.map +1 -1
- package/dist/tools/settings.d.ts.map +1 -1
- package/dist/tools/settings.js +28 -12
- package/dist/tools/settings.js.map +1 -1
- package/dist/tools/summary.d.ts.map +1 -1
- package/dist/tools/summary.js +17 -11
- package/dist/tools/summary.js.map +1 -1
- package/dist/tools/transactions.d.ts.map +1 -1
- package/dist/tools/transactions.js +86 -50
- package/dist/tools/transactions.js.map +1 -1
- package/dist/tools/transfers.d.ts +3 -0
- package/dist/tools/transfers.d.ts.map +1 -0
- package/dist/tools/transfers.js +107 -0
- package/dist/tools/transfers.js.map +1 -0
- package/dist/types/schemas.d.ts +25 -0
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +28 -2
- package/dist/types/schemas.js.map +1 -1
- package/dist/utils/toolHelpers.d.ts +7 -0
- package/dist/utils/toolHelpers.d.ts.map +1 -0
- package/dist/utils/toolHelpers.js +11 -0
- package/dist/utils/toolHelpers.js.map +1 -0
- package/openapi.yaml +2045 -1828
- package/package.json +41 -41
- package/specs/001-mcp-api-integration/checklists/requirements.md +34 -34
- package/specs/001-mcp-api-integration/contracts/openapi.yaml +635 -635
- package/specs/001-mcp-api-integration/data-model.md +106 -106
- package/specs/001-mcp-api-integration/plan.md +73 -73
- package/specs/001-mcp-api-integration/quickstart.md +74 -74
- package/specs/001-mcp-api-integration/research.md +58 -58
- package/specs/001-mcp-api-integration/spec.md +119 -119
- package/specs/001-mcp-api-integration/tasks.md +64 -64
- package/src/config.ts +36 -36
- package/src/index.ts +49 -47
- package/src/services/apiClient.ts +49 -49
- package/src/tools/accounts.ts +140 -111
- package/src/tools/categories.ts +102 -81
- package/src/tools/credit-cards.ts +184 -147
- package/src/tools/data.ts +45 -36
- package/src/tools/settings.ts +64 -51
- package/src/tools/summary.ts +29 -24
- package/src/tools/transactions.ts +157 -128
- package/src/tools/transfers.ts +122 -0
- package/src/types/schemas.ts +260 -235
- package/src/utils/toolHelpers.ts +11 -0
- package/tests/benchmark.test.d.ts +1 -1
- package/tests/benchmark.test.js +32 -32
- package/tests/benchmark.test.ts +38 -38
- package/tests/server.test.d.ts +1 -1
- package/tests/server.test.js +12 -12
- package/tests/server.test.ts +14 -14
- package/tests/setup.d.ts +3 -3
- package/tests/setup.js +16 -16
- package/tests/setup.ts +20 -20
- package/tests/tools/accounts.test.ts +159 -118
- package/tests/tools/categories.test.d.ts +1 -1
- package/tests/tools/categories.test.js +62 -62
- package/tests/tools/categories.test.ts +120 -78
- package/tests/tools/credit-cards.test.d.ts +1 -1
- package/tests/tools/credit-cards.test.js +70 -70
- package/tests/tools/credit-cards.test.ts +131 -89
- package/tests/tools/data.test.ts +100 -0
- package/tests/tools/settings.test.ts +116 -0
- package/tests/tools/summary.test.d.ts +1 -1
- package/tests/tools/summary.test.js +35 -35
- package/tests/tools/summary.test.ts +63 -42
- package/tests/tools/transactions.test.d.ts +1 -1
- package/tests/tools/transactions.test.js +66 -66
- package/tests/tools/transactions.test.ts +133 -82
- package/tests/tools/transfers.test.ts +141 -0
- package/tsconfig.json +52 -52
- package/vitest.config.d.ts +2 -2
- package/vitest.config.js +13 -13
- package/vitest.config.ts +14 -14
package/openapi.yaml
CHANGED
|
@@ -1,1828 +1,2045 @@
|
|
|
1
|
-
openapi: 3.0.0
|
|
2
|
-
info:
|
|
3
|
-
title: Quantix Personal Finance Manager API
|
|
4
|
-
description: API for managing personal finances including transactions, credit cards, categories, and recurring payments
|
|
5
|
-
version: 1.0.0
|
|
6
|
-
contact:
|
|
7
|
-
name: Quantix Support
|
|
8
|
-
email: support@quantix.example.com
|
|
9
|
-
|
|
10
|
-
servers:
|
|
11
|
-
- url: https://api.quantix.example.com
|
|
12
|
-
description: Production server
|
|
13
|
-
- url: https://staging.quantix.example.com
|
|
14
|
-
description: Staging server
|
|
15
|
-
|
|
16
|
-
components:
|
|
17
|
-
securitySchemes:
|
|
18
|
-
ApiKeyAuth:
|
|
19
|
-
type: apiKey
|
|
20
|
-
in: header
|
|
21
|
-
name: API-KEY
|
|
22
|
-
description: API key for authentication, configured via QUANTIX_API_KEY environment variable
|
|
23
|
-
|
|
24
|
-
schemas:
|
|
25
|
-
Category:
|
|
26
|
-
type: object
|
|
27
|
-
required:
|
|
28
|
-
- name
|
|
29
|
-
- type
|
|
30
|
-
properties:
|
|
31
|
-
id:
|
|
32
|
-
type: string
|
|
33
|
-
description: Unique identifier for the category
|
|
34
|
-
example: "cat_123456789"
|
|
35
|
-
name:
|
|
36
|
-
type: string
|
|
37
|
-
description: Name of the category
|
|
38
|
-
example: "Groceries"
|
|
39
|
-
type:
|
|
40
|
-
type: string
|
|
41
|
-
enum: [INCOME, EXPENSE]
|
|
42
|
-
description: Type of the category
|
|
43
|
-
example: "EXPENSE"
|
|
44
|
-
color:
|
|
45
|
-
type: string
|
|
46
|
-
nullable: true
|
|
47
|
-
description: Color for the category in hexadecimal format
|
|
48
|
-
example: "#FF5733"
|
|
49
|
-
createdAt:
|
|
50
|
-
type: string
|
|
51
|
-
format: date-time
|
|
52
|
-
description: Timestamp when the category was created
|
|
53
|
-
example: "2026-01-30T10:00:00Z"
|
|
54
|
-
|
|
55
|
-
Transaction:
|
|
56
|
-
type: object
|
|
57
|
-
required:
|
|
58
|
-
- type
|
|
59
|
-
- name
|
|
60
|
-
- amount
|
|
61
|
-
- date
|
|
62
|
-
properties:
|
|
63
|
-
id:
|
|
64
|
-
type: string
|
|
65
|
-
description: Unique identifier for the transaction
|
|
66
|
-
example: "txn_123456789"
|
|
67
|
-
type:
|
|
68
|
-
type: string
|
|
69
|
-
enum: [INCOME, EXPENSE]
|
|
70
|
-
description: Type of the transaction
|
|
71
|
-
example: "EXPENSE"
|
|
72
|
-
name:
|
|
73
|
-
type: string
|
|
74
|
-
description: Description of the transaction
|
|
75
|
-
example: "Weekly groceries"
|
|
76
|
-
amount:
|
|
77
|
-
type: number
|
|
78
|
-
format: float
|
|
79
|
-
minimum: 0
|
|
80
|
-
description: Amount of the transaction
|
|
81
|
-
example: 125.75
|
|
82
|
-
date:
|
|
83
|
-
type: string
|
|
84
|
-
format: date
|
|
85
|
-
description: Date of the transaction
|
|
86
|
-
example: "2026-01-30"
|
|
87
|
-
purchaseDate:
|
|
88
|
-
type: string
|
|
89
|
-
format: date
|
|
90
|
-
description: Actual purchase date (credit card only, optional)
|
|
91
|
-
example: "2026-02-10"
|
|
92
|
-
nullable: true
|
|
93
|
-
categoryId:
|
|
94
|
-
type: string
|
|
95
|
-
description: ID of the associated category
|
|
96
|
-
example: "cat_123456789"
|
|
97
|
-
category:
|
|
98
|
-
$ref: '#/components/schemas/Category'
|
|
99
|
-
description: Associated category object
|
|
100
|
-
paymentMethod:
|
|
101
|
-
type: string
|
|
102
|
-
enum: [CASH, PIX, DEBIT, CREDIT]
|
|
103
|
-
description: Method of payment
|
|
104
|
-
example: "CREDIT"
|
|
105
|
-
creditCardId:
|
|
106
|
-
type: string
|
|
107
|
-
description: ID of the associated credit card (required if paymentMethod is CREDIT)
|
|
108
|
-
example: "cc_123456789"
|
|
109
|
-
creditCard:
|
|
110
|
-
$ref: '#/components/schemas/CreditCard'
|
|
111
|
-
description: Associated credit card object
|
|
112
|
-
installmentGroupId:
|
|
113
|
-
type: string
|
|
114
|
-
description: ID to group installment transactions
|
|
115
|
-
example: "ig_123456789"
|
|
116
|
-
installmentNumber:
|
|
117
|
-
type: integer
|
|
118
|
-
minimum: 1
|
|
119
|
-
description: Current installment number in a series
|
|
120
|
-
example: 2
|
|
121
|
-
installmentTotal:
|
|
122
|
-
type: integer
|
|
123
|
-
minimum: 1
|
|
124
|
-
description: Total number of installments in the series
|
|
125
|
-
example: 5
|
|
126
|
-
recurrenceRuleId:
|
|
127
|
-
type: string
|
|
128
|
-
description: ID of the associated recurrence rule
|
|
129
|
-
example: "rr_123456789"
|
|
130
|
-
accountId:
|
|
131
|
-
type: string
|
|
132
|
-
description: ID of the associated account (required if paymentMethod is not CREDIT)
|
|
133
|
-
example: "acc_123456789"
|
|
134
|
-
account:
|
|
135
|
-
$ref: '#/components/schemas/Account'
|
|
136
|
-
description: Associated account object
|
|
137
|
-
paid:
|
|
138
|
-
type: boolean
|
|
139
|
-
default: false
|
|
140
|
-
description: Whether the transaction has been paid/received
|
|
141
|
-
example: true
|
|
142
|
-
createdAt:
|
|
143
|
-
type: string
|
|
144
|
-
format: date-time
|
|
145
|
-
description: Timestamp when the transaction was created
|
|
146
|
-
example: "2026-01-30T10:00:00Z"
|
|
147
|
-
|
|
148
|
-
CreditCard:
|
|
149
|
-
type: object
|
|
150
|
-
required:
|
|
151
|
-
- name
|
|
152
|
-
- limitAmount
|
|
153
|
-
- closingDay
|
|
154
|
-
- dueDay
|
|
155
|
-
properties:
|
|
156
|
-
id:
|
|
157
|
-
type: string
|
|
158
|
-
description: Unique identifier for the credit card
|
|
159
|
-
example: "cc_123456789"
|
|
160
|
-
name:
|
|
161
|
-
type: string
|
|
162
|
-
description: Name of the credit card
|
|
163
|
-
example: "Nubank Platinum"
|
|
164
|
-
brand:
|
|
165
|
-
type: string
|
|
166
|
-
description: Brand of the credit card
|
|
167
|
-
example: "Visa"
|
|
168
|
-
limitAmount:
|
|
169
|
-
type: number
|
|
170
|
-
format: float
|
|
171
|
-
minimum: 0
|
|
172
|
-
description: Credit limit of the card
|
|
173
|
-
example: 5000.00
|
|
174
|
-
closingDay:
|
|
175
|
-
type: integer
|
|
176
|
-
minimum: 1
|
|
177
|
-
maximum: 31
|
|
178
|
-
description: Day of the month when the billing cycle closes
|
|
179
|
-
example: 15
|
|
180
|
-
dueDay:
|
|
181
|
-
type: integer
|
|
182
|
-
minimum: 1
|
|
183
|
-
maximum: 31
|
|
184
|
-
description: Day of the month when the bill is due
|
|
185
|
-
example: 22
|
|
186
|
-
availableLimit:
|
|
187
|
-
type: number
|
|
188
|
-
format: float
|
|
189
|
-
description: Available credit limit (limitAmount minus all pending unpaid expenses)
|
|
190
|
-
example: 3200.00
|
|
191
|
-
createdAt:
|
|
192
|
-
type: string
|
|
193
|
-
format: date-time
|
|
194
|
-
description: Timestamp when the credit card was added
|
|
195
|
-
example: "2026-01-30T10:00:00Z"
|
|
196
|
-
|
|
197
|
-
RecurrenceRule:
|
|
198
|
-
type: object
|
|
199
|
-
required:
|
|
200
|
-
- frequency
|
|
201
|
-
properties:
|
|
202
|
-
id:
|
|
203
|
-
type: string
|
|
204
|
-
description: Unique identifier for the recurrence rule
|
|
205
|
-
example: "rr_123456789"
|
|
206
|
-
frequency:
|
|
207
|
-
type: string
|
|
208
|
-
enum: [MONTHLY, WEEKLY, YEARLY]
|
|
209
|
-
description: Frequency of recurrence
|
|
210
|
-
example: "MONTHLY"
|
|
211
|
-
interval:
|
|
212
|
-
type: integer
|
|
213
|
-
minimum: 1
|
|
214
|
-
default: 1
|
|
215
|
-
description: Interval multiplier for the frequency
|
|
216
|
-
example: 1
|
|
217
|
-
endDate:
|
|
218
|
-
type: string
|
|
219
|
-
format: date
|
|
220
|
-
description: Date when the recurrence should end (mutually exclusive with occurrences)
|
|
221
|
-
example: "2026-12-31"
|
|
222
|
-
occurrences:
|
|
223
|
-
type: integer
|
|
224
|
-
minimum: 2
|
|
225
|
-
description: Number of occurrences (mutually exclusive with endDate). When set, transaction names will be formatted as "Name (N/total)"
|
|
226
|
-
example: 12
|
|
227
|
-
createdAt:
|
|
228
|
-
type: string
|
|
229
|
-
format: date-time
|
|
230
|
-
description: Timestamp when the recurrence rule was created
|
|
231
|
-
example: "2026-01-30T10:00:00Z"
|
|
232
|
-
|
|
233
|
-
Statement:
|
|
234
|
-
type: object
|
|
235
|
-
properties:
|
|
236
|
-
cardId:
|
|
237
|
-
type: string
|
|
238
|
-
description: ID of the credit card
|
|
239
|
-
example: "cc_123456789"
|
|
240
|
-
periodStart:
|
|
241
|
-
type: string
|
|
242
|
-
format: date
|
|
243
|
-
description: Start date of the billing period
|
|
244
|
-
example: "2026-02-16"
|
|
245
|
-
periodEnd:
|
|
246
|
-
type: string
|
|
247
|
-
format: date
|
|
248
|
-
description: End date of the billing period
|
|
249
|
-
example: "2026-03-15"
|
|
250
|
-
dueDate:
|
|
251
|
-
type: string
|
|
252
|
-
format: date
|
|
253
|
-
description: Due date of the statement
|
|
254
|
-
example: "2026-03-22"
|
|
255
|
-
transactions:
|
|
256
|
-
type: array
|
|
257
|
-
items:
|
|
258
|
-
$ref: '#/components/schemas/Transaction'
|
|
259
|
-
description: List of transactions in the statement period
|
|
260
|
-
total:
|
|
261
|
-
type: number
|
|
262
|
-
format: float
|
|
263
|
-
description: Total amount of the statement
|
|
264
|
-
example: 3450.00
|
|
265
|
-
availableLimit:
|
|
266
|
-
type: number
|
|
267
|
-
format: float
|
|
268
|
-
description: Available credit limit
|
|
269
|
-
example: 1550.00
|
|
270
|
-
|
|
271
|
-
StatementStatus:
|
|
272
|
-
type: object
|
|
273
|
-
properties:
|
|
274
|
-
cardId:
|
|
275
|
-
type: string
|
|
276
|
-
description: ID of the credit card
|
|
277
|
-
example: "cc_123456789"
|
|
278
|
-
month:
|
|
279
|
-
type: string
|
|
280
|
-
description: Month for the statement (YYYY-MM format)
|
|
281
|
-
example: "2026-03"
|
|
282
|
-
isPaid:
|
|
283
|
-
type: boolean
|
|
284
|
-
description: Whether all transactions in the statement are paid
|
|
285
|
-
example: true
|
|
286
|
-
|
|
287
|
-
Account:
|
|
288
|
-
type: object
|
|
289
|
-
required:
|
|
290
|
-
- name
|
|
291
|
-
- type
|
|
292
|
-
- initialBalance
|
|
293
|
-
properties:
|
|
294
|
-
id:
|
|
295
|
-
type: string
|
|
296
|
-
description: Unique identifier for the account
|
|
297
|
-
example: "acc_123456789"
|
|
298
|
-
name:
|
|
299
|
-
type: string
|
|
300
|
-
description: Name of the account
|
|
301
|
-
example: "Itaú Checking Account"
|
|
302
|
-
type:
|
|
303
|
-
type: string
|
|
304
|
-
enum: [BANK_ACCOUNT, WALLET, SAVINGS_ACCOUNT, INVESTMENT_ACCOUNT, OTHER]
|
|
305
|
-
description: Type of account
|
|
306
|
-
example: "BANK_ACCOUNT"
|
|
307
|
-
initialBalance:
|
|
308
|
-
type: number
|
|
309
|
-
format: float
|
|
310
|
-
description: Initial balance when the account was created
|
|
311
|
-
example: 1000.00
|
|
312
|
-
currentBalance:
|
|
313
|
-
type: number
|
|
314
|
-
format: float
|
|
315
|
-
description: Current balance of the account
|
|
316
|
-
example: 850.00
|
|
317
|
-
createdAt:
|
|
318
|
-
type: string
|
|
319
|
-
format: date-time
|
|
320
|
-
description: Timestamp when the account was created
|
|
321
|
-
example: "2026-02-11T12:00:00Z"
|
|
322
|
-
updatedAt:
|
|
323
|
-
type: string
|
|
324
|
-
format: date-time
|
|
325
|
-
description: Timestamp when the account was last updated
|
|
326
|
-
example: "2026-02-11T15:30:00Z"
|
|
327
|
-
|
|
328
|
-
AccountBalance:
|
|
329
|
-
type: object
|
|
330
|
-
properties:
|
|
331
|
-
accountId:
|
|
332
|
-
type: string
|
|
333
|
-
description: ID of the account
|
|
334
|
-
example: "acc_123456789"
|
|
335
|
-
currentBalance:
|
|
336
|
-
type: number
|
|
337
|
-
format: float
|
|
338
|
-
description: Current balance of the account
|
|
339
|
-
example: 850.00
|
|
340
|
-
calculatedAt:
|
|
341
|
-
type: string
|
|
342
|
-
format: date-time
|
|
343
|
-
description: Timestamp when the balance was calculated
|
|
344
|
-
example: "2026-02-11T16:00:00Z"
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
CategoryBreakdown:
|
|
348
|
-
type: object
|
|
349
|
-
properties:
|
|
350
|
-
categoryId:
|
|
351
|
-
type: string
|
|
352
|
-
nullable: true
|
|
353
|
-
description: Category ID (null if uncategorized)
|
|
354
|
-
example: "cat-123"
|
|
355
|
-
categoryName:
|
|
356
|
-
type: string
|
|
357
|
-
nullable: true
|
|
358
|
-
description: Category name (null if uncategorized)
|
|
359
|
-
example: "Housing"
|
|
360
|
-
color:
|
|
361
|
-
type: string
|
|
362
|
-
nullable: true
|
|
363
|
-
description: Category color in hex format
|
|
364
|
-
example: "#ff5733"
|
|
365
|
-
total:
|
|
366
|
-
type: number
|
|
367
|
-
format: float
|
|
368
|
-
description: Total amount for this category
|
|
369
|
-
example: 1500.00
|
|
370
|
-
|
|
371
|
-
Summary:
|
|
372
|
-
type: object
|
|
373
|
-
properties:
|
|
374
|
-
period:
|
|
375
|
-
type: object
|
|
376
|
-
description: The period covered by this summary
|
|
377
|
-
properties:
|
|
378
|
-
month:
|
|
379
|
-
type: string
|
|
380
|
-
description: Month in YYYY-MM format (present when queried by month)
|
|
381
|
-
example: "2026-02"
|
|
382
|
-
startDate:
|
|
383
|
-
type: string
|
|
384
|
-
description: Start date in YYYY-MM-DD format (present when queried by range)
|
|
385
|
-
example: "2026-01-01"
|
|
386
|
-
endDate:
|
|
387
|
-
type: string
|
|
388
|
-
description: End date in YYYY-MM-DD format (present when queried by range)
|
|
389
|
-
example: "2026-03-31"
|
|
390
|
-
income:
|
|
391
|
-
type: number
|
|
392
|
-
format: float
|
|
393
|
-
description: Total income for the period (paid + pending)
|
|
394
|
-
example: 10000.00
|
|
395
|
-
expenses:
|
|
396
|
-
type: number
|
|
397
|
-
format: float
|
|
398
|
-
description: Total expenses for the period (paid + pending)
|
|
399
|
-
example: 4000.00
|
|
400
|
-
pendingIncome:
|
|
401
|
-
type: number
|
|
402
|
-
format: float
|
|
403
|
-
description: Sum of income transactions not yet marked as received
|
|
404
|
-
example: 1000.00
|
|
405
|
-
pendingExpenses:
|
|
406
|
-
type: number
|
|
407
|
-
format: float
|
|
408
|
-
description: Sum of expense transactions not yet marked as paid
|
|
409
|
-
example: 500.00
|
|
410
|
-
balance:
|
|
411
|
-
type: number
|
|
412
|
-
format: float
|
|
413
|
-
description: Net balance (income - expenses)
|
|
414
|
-
example: 6000.00
|
|
415
|
-
creditCardExpenses:
|
|
416
|
-
type: array
|
|
417
|
-
description: Credit card totals for the period
|
|
418
|
-
items:
|
|
419
|
-
type: object
|
|
420
|
-
properties:
|
|
421
|
-
cardId:
|
|
422
|
-
type: string
|
|
423
|
-
description: Credit card ID
|
|
424
|
-
example: "abc-123"
|
|
425
|
-
cardName:
|
|
426
|
-
type: string
|
|
427
|
-
description: Credit card name
|
|
428
|
-
example: "Nubank"
|
|
429
|
-
total:
|
|
430
|
-
type: number
|
|
431
|
-
format: float
|
|
432
|
-
description: Total charged to this card in the period
|
|
433
|
-
example: 2500.00
|
|
434
|
-
dueDate:
|
|
435
|
-
type: string
|
|
436
|
-
format: date
|
|
437
|
-
nullable: true
|
|
438
|
-
description: Statement due date (only present when queried by month)
|
|
439
|
-
example: "2026-03-22"
|
|
440
|
-
isPaid:
|
|
441
|
-
type: boolean
|
|
442
|
-
nullable: true
|
|
443
|
-
description: Whether the statement is fully paid (only present when queried by month)
|
|
444
|
-
example: false
|
|
445
|
-
expensesByCategory:
|
|
446
|
-
type: array
|
|
447
|
-
description: Expense totals grouped by category, sorted by total descending
|
|
448
|
-
items:
|
|
449
|
-
$ref: '#/components/schemas/CategoryBreakdown'
|
|
450
|
-
incomeByCategory:
|
|
451
|
-
type: array
|
|
452
|
-
description: Income totals grouped by category, sorted by total descending
|
|
453
|
-
items:
|
|
454
|
-
$ref: '#/components/schemas/CategoryBreakdown'
|
|
455
|
-
accounts:
|
|
456
|
-
type: array
|
|
457
|
-
description: >
|
|
458
|
-
All accounts with their current balance (initialBalance + paid income - paid expenses).
|
|
459
|
-
Not filtered by period.
|
|
460
|
-
items:
|
|
461
|
-
$ref: '#/components/schemas/AccountSummary'
|
|
462
|
-
totalBalance:
|
|
463
|
-
type: number
|
|
464
|
-
format: float
|
|
465
|
-
description: Sum of all account balances. Not filtered by period.
|
|
466
|
-
example: 8500.00
|
|
467
|
-
|
|
468
|
-
AccountSummary:
|
|
469
|
-
type: object
|
|
470
|
-
properties:
|
|
471
|
-
accountId:
|
|
472
|
-
type: string
|
|
473
|
-
description: Account ID
|
|
474
|
-
example: "acc-123"
|
|
475
|
-
accountName:
|
|
476
|
-
type: string
|
|
477
|
-
description: Account name
|
|
478
|
-
example: "Nubank"
|
|
479
|
-
accountType:
|
|
480
|
-
type: string
|
|
481
|
-
enum: [BANK_ACCOUNT, WALLET, SAVINGS_ACCOUNT, INVESTMENT_ACCOUNT, OTHER]
|
|
482
|
-
description: Account type
|
|
483
|
-
example: "BANK_ACCOUNT"
|
|
484
|
-
balance:
|
|
485
|
-
type: number
|
|
486
|
-
format: float
|
|
487
|
-
description: Current balance (initialBalance + paid income - paid expenses)
|
|
488
|
-
example: 2500.00
|
|
489
|
-
|
|
490
|
-
CreateTransactionRequest:
|
|
491
|
-
type: object
|
|
492
|
-
required:
|
|
493
|
-
- type
|
|
494
|
-
- name
|
|
495
|
-
- amount
|
|
496
|
-
- date
|
|
497
|
-
properties:
|
|
498
|
-
type:
|
|
499
|
-
$ref: '#/components/schemas/Transaction/properties/type'
|
|
500
|
-
name:
|
|
501
|
-
$ref: '#/components/schemas/Transaction/properties/name'
|
|
502
|
-
amount:
|
|
503
|
-
$ref: '#/components/schemas/Transaction/properties/amount'
|
|
504
|
-
date:
|
|
505
|
-
type: string
|
|
506
|
-
format: date
|
|
507
|
-
description: |
|
|
508
|
-
Date of the transaction.
|
|
509
|
-
For CREDIT payments, if targetDueMonth is provided, the date will be calculated based on the credit card's due day.
|
|
510
|
-
Otherwise, this date will be used directly.
|
|
511
|
-
example: "2026-01-30"
|
|
512
|
-
categoryId:
|
|
513
|
-
$ref: '#/components/schemas/Transaction/properties/categoryId'
|
|
514
|
-
paymentMethod:
|
|
515
|
-
$ref: '#/components/schemas/Transaction/properties/paymentMethod'
|
|
516
|
-
creditCardId:
|
|
517
|
-
$ref: '#/components/schemas/Transaction/properties/creditCardId'
|
|
518
|
-
installments:
|
|
519
|
-
type: integer
|
|
520
|
-
minimum: 1
|
|
521
|
-
description: Number of installments (optional)
|
|
522
|
-
example: 3
|
|
523
|
-
targetDueMonth:
|
|
524
|
-
type: string
|
|
525
|
-
pattern: "^\\d{4}-\\d{2}$"
|
|
526
|
-
description: |
|
|
527
|
-
Target month for due date in YYYY-MM format (optional).
|
|
528
|
-
When provided for CREDIT payments, the transaction date(s) will be set to the credit card's due day in the specified month.
|
|
529
|
-
For installments, each installment will be scheduled in subsequent months on the due day.
|
|
530
|
-
Example: if credit card due day is 10, and targetDueMonth is "2026-03", the transaction date will be 2026-03-10.
|
|
531
|
-
example: "2026-03"
|
|
532
|
-
accountId:
|
|
533
|
-
type: string
|
|
534
|
-
description: ID of the associated account (required if paymentMethod is not CREDIT)
|
|
535
|
-
example: "acc_123456789"
|
|
536
|
-
recurrence:
|
|
537
|
-
type: object
|
|
538
|
-
properties:
|
|
539
|
-
frequency:
|
|
540
|
-
$ref: '#/components/schemas/RecurrenceRule/properties/frequency'
|
|
541
|
-
interval:
|
|
542
|
-
$ref: '#/components/schemas/RecurrenceRule/properties/interval'
|
|
543
|
-
endDate:
|
|
544
|
-
$ref: '#/components/schemas/RecurrenceRule/properties/endDate'
|
|
545
|
-
occurrences:
|
|
546
|
-
$ref: '#/components/schemas/RecurrenceRule/properties/occurrences'
|
|
547
|
-
isPaid:
|
|
548
|
-
type: boolean
|
|
549
|
-
description: Whether the transaction is already paid at creation time (defaults to false)
|
|
550
|
-
example: false
|
|
551
|
-
purchaseDate:
|
|
552
|
-
type: string
|
|
553
|
-
format: date
|
|
554
|
-
description: Actual purchase date (credit card only, optional)
|
|
555
|
-
example: "2026-02-10"
|
|
556
|
-
|
|
557
|
-
UpdateTransactionRequest:
|
|
558
|
-
type: object
|
|
559
|
-
properties:
|
|
560
|
-
type:
|
|
561
|
-
$ref: '#/components/schemas/Transaction/properties/type'
|
|
562
|
-
name:
|
|
563
|
-
$ref: '#/components/schemas/Transaction/properties/name'
|
|
564
|
-
amount:
|
|
565
|
-
$ref: '#/components/schemas/Transaction/properties/amount'
|
|
566
|
-
date:
|
|
567
|
-
type: string
|
|
568
|
-
format: date
|
|
569
|
-
description: |
|
|
570
|
-
Date of the transaction.
|
|
571
|
-
For CREDIT payments, if targetDueMonth is provided, the date will be calculated based on the credit card's due day.
|
|
572
|
-
Otherwise, this date will be used directly.
|
|
573
|
-
example: "2026-01-30"
|
|
574
|
-
categoryId:
|
|
575
|
-
$ref: '#/components/schemas/Transaction/properties/categoryId'
|
|
576
|
-
paymentMethod:
|
|
577
|
-
$ref: '#/components/schemas/Transaction/properties/paymentMethod'
|
|
578
|
-
creditCardId:
|
|
579
|
-
$ref: '#/components/schemas/Transaction/properties/creditCardId'
|
|
580
|
-
targetDueMonth:
|
|
581
|
-
type: string
|
|
582
|
-
pattern: "^\\d{4}-\\d{2}$"
|
|
583
|
-
description: |
|
|
584
|
-
Target month for due date in YYYY-MM format (optional).
|
|
585
|
-
When provided for CREDIT payments, the transaction date will be set to the credit card's due day in the specified month.
|
|
586
|
-
Example: if credit card due day is 10, and targetDueMonth is "2026-03", the transaction date will be 2026-03-10.
|
|
587
|
-
example: "2026-03"
|
|
588
|
-
accountId:
|
|
589
|
-
type: string
|
|
590
|
-
description: ID of the associated account (required if paymentMethod is not CREDIT)
|
|
591
|
-
example: "acc_123456789"
|
|
592
|
-
recurrence:
|
|
593
|
-
type: object
|
|
594
|
-
properties:
|
|
595
|
-
frequency:
|
|
596
|
-
$ref: '#/components/schemas/RecurrenceRule/properties/frequency'
|
|
597
|
-
interval:
|
|
598
|
-
$ref: '#/components/schemas/RecurrenceRule/properties/interval'
|
|
599
|
-
endDate:
|
|
600
|
-
$ref: '#/components/schemas/RecurrenceRule/properties/endDate'
|
|
601
|
-
occurrences:
|
|
602
|
-
$ref: '#/components/schemas/RecurrenceRule/properties/occurrences'
|
|
603
|
-
|
|
604
|
-
Settings:
|
|
605
|
-
type: object
|
|
606
|
-
required:
|
|
607
|
-
- userName
|
|
608
|
-
- language
|
|
609
|
-
- currency
|
|
610
|
-
properties:
|
|
611
|
-
userName:
|
|
612
|
-
type: string
|
|
613
|
-
description: Name of the user
|
|
614
|
-
example: "John Doe"
|
|
615
|
-
language:
|
|
616
|
-
type: string
|
|
617
|
-
enum: [pt-BR, en-US]
|
|
618
|
-
description: Preferred language
|
|
619
|
-
example: "pt-BR"
|
|
620
|
-
currency:
|
|
621
|
-
type: string
|
|
622
|
-
enum: [BRL, USD, EUR, GBP, JPY, CAD, AUD, CHF]
|
|
623
|
-
description: Default currency
|
|
624
|
-
example: "BRL"
|
|
625
|
-
createdAt:
|
|
626
|
-
type: string
|
|
627
|
-
format: date-time
|
|
628
|
-
description: Timestamp when settings were created
|
|
629
|
-
example: "2026-01-30T10:00:00Z"
|
|
630
|
-
updatedAt:
|
|
631
|
-
type: string
|
|
632
|
-
format: date-time
|
|
633
|
-
description: Timestamp when settings were last updated
|
|
634
|
-
example: "2026-01-30T10:00:00Z"
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
'
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
description: Category
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
'
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
'
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
description:
|
|
1040
|
-
example: "
|
|
1041
|
-
responses:
|
|
1042
|
-
'200':
|
|
1043
|
-
description: Statement
|
|
1044
|
-
content:
|
|
1045
|
-
application/json:
|
|
1046
|
-
schema:
|
|
1047
|
-
type: object
|
|
1048
|
-
properties:
|
|
1049
|
-
message:
|
|
1050
|
-
type: string
|
|
1051
|
-
example: "Statement for 2026
|
|
1052
|
-
'400':
|
|
1053
|
-
description: Invalid input or statement is already
|
|
1054
|
-
'401':
|
|
1055
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
1056
|
-
'404':
|
|
1057
|
-
description: Credit card not found
|
|
1058
|
-
|
|
1059
|
-
/credit-cards/{id}/statement
|
|
1060
|
-
|
|
1061
|
-
summary:
|
|
1062
|
-
parameters:
|
|
1063
|
-
- name: id
|
|
1064
|
-
in: path
|
|
1065
|
-
required: true
|
|
1066
|
-
schema:
|
|
1067
|
-
type: string
|
|
1068
|
-
description: Credit card ID
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
'
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
description:
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
description:
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
description:
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
'
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
'
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
- **
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
'
|
|
1392
|
-
description: Transaction
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
'
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
description: Account
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
summary:
|
|
1595
|
-
parameters:
|
|
1596
|
-
- name: id
|
|
1597
|
-
in: path
|
|
1598
|
-
required: true
|
|
1599
|
-
schema:
|
|
1600
|
-
type: string
|
|
1601
|
-
description: Account ID
|
|
1602
|
-
responses:
|
|
1603
|
-
'
|
|
1604
|
-
description:
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
responses:
|
|
1623
|
-
'200':
|
|
1624
|
-
description:
|
|
1625
|
-
content:
|
|
1626
|
-
application/json:
|
|
1627
|
-
schema:
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
'
|
|
1817
|
-
description:
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
'
|
|
1827
|
-
description: Settings
|
|
1828
|
-
|
|
1
|
+
openapi: 3.0.0
|
|
2
|
+
info:
|
|
3
|
+
title: Quantix Personal Finance Manager API
|
|
4
|
+
description: API for managing personal finances including transactions, credit cards, categories, and recurring payments
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
contact:
|
|
7
|
+
name: Quantix Support
|
|
8
|
+
email: support@quantix.example.com
|
|
9
|
+
|
|
10
|
+
servers:
|
|
11
|
+
- url: https://api.quantix.example.com
|
|
12
|
+
description: Production server
|
|
13
|
+
- url: https://staging.quantix.example.com
|
|
14
|
+
description: Staging server
|
|
15
|
+
|
|
16
|
+
components:
|
|
17
|
+
securitySchemes:
|
|
18
|
+
ApiKeyAuth:
|
|
19
|
+
type: apiKey
|
|
20
|
+
in: header
|
|
21
|
+
name: API-KEY
|
|
22
|
+
description: API key for authentication, configured via QUANTIX_API_KEY environment variable
|
|
23
|
+
|
|
24
|
+
schemas:
|
|
25
|
+
Category:
|
|
26
|
+
type: object
|
|
27
|
+
required:
|
|
28
|
+
- name
|
|
29
|
+
- type
|
|
30
|
+
properties:
|
|
31
|
+
id:
|
|
32
|
+
type: string
|
|
33
|
+
description: Unique identifier for the category
|
|
34
|
+
example: "cat_123456789"
|
|
35
|
+
name:
|
|
36
|
+
type: string
|
|
37
|
+
description: Name of the category
|
|
38
|
+
example: "Groceries"
|
|
39
|
+
type:
|
|
40
|
+
type: string
|
|
41
|
+
enum: [INCOME, EXPENSE]
|
|
42
|
+
description: Type of the category
|
|
43
|
+
example: "EXPENSE"
|
|
44
|
+
color:
|
|
45
|
+
type: string
|
|
46
|
+
nullable: true
|
|
47
|
+
description: Color for the category in hexadecimal format
|
|
48
|
+
example: "#FF5733"
|
|
49
|
+
createdAt:
|
|
50
|
+
type: string
|
|
51
|
+
format: date-time
|
|
52
|
+
description: Timestamp when the category was created
|
|
53
|
+
example: "2026-01-30T10:00:00Z"
|
|
54
|
+
|
|
55
|
+
Transaction:
|
|
56
|
+
type: object
|
|
57
|
+
required:
|
|
58
|
+
- type
|
|
59
|
+
- name
|
|
60
|
+
- amount
|
|
61
|
+
- date
|
|
62
|
+
properties:
|
|
63
|
+
id:
|
|
64
|
+
type: string
|
|
65
|
+
description: Unique identifier for the transaction
|
|
66
|
+
example: "txn_123456789"
|
|
67
|
+
type:
|
|
68
|
+
type: string
|
|
69
|
+
enum: [INCOME, EXPENSE]
|
|
70
|
+
description: Type of the transaction
|
|
71
|
+
example: "EXPENSE"
|
|
72
|
+
name:
|
|
73
|
+
type: string
|
|
74
|
+
description: Description of the transaction
|
|
75
|
+
example: "Weekly groceries"
|
|
76
|
+
amount:
|
|
77
|
+
type: number
|
|
78
|
+
format: float
|
|
79
|
+
minimum: 0
|
|
80
|
+
description: Amount of the transaction
|
|
81
|
+
example: 125.75
|
|
82
|
+
date:
|
|
83
|
+
type: string
|
|
84
|
+
format: date
|
|
85
|
+
description: Date of the transaction
|
|
86
|
+
example: "2026-01-30"
|
|
87
|
+
purchaseDate:
|
|
88
|
+
type: string
|
|
89
|
+
format: date
|
|
90
|
+
description: Actual purchase date (credit card only, optional)
|
|
91
|
+
example: "2026-02-10"
|
|
92
|
+
nullable: true
|
|
93
|
+
categoryId:
|
|
94
|
+
type: string
|
|
95
|
+
description: ID of the associated category
|
|
96
|
+
example: "cat_123456789"
|
|
97
|
+
category:
|
|
98
|
+
$ref: '#/components/schemas/Category'
|
|
99
|
+
description: Associated category object
|
|
100
|
+
paymentMethod:
|
|
101
|
+
type: string
|
|
102
|
+
enum: [CASH, PIX, DEBIT, CREDIT]
|
|
103
|
+
description: Method of payment
|
|
104
|
+
example: "CREDIT"
|
|
105
|
+
creditCardId:
|
|
106
|
+
type: string
|
|
107
|
+
description: ID of the associated credit card (required if paymentMethod is CREDIT)
|
|
108
|
+
example: "cc_123456789"
|
|
109
|
+
creditCard:
|
|
110
|
+
$ref: '#/components/schemas/CreditCard'
|
|
111
|
+
description: Associated credit card object
|
|
112
|
+
installmentGroupId:
|
|
113
|
+
type: string
|
|
114
|
+
description: ID to group installment transactions
|
|
115
|
+
example: "ig_123456789"
|
|
116
|
+
installmentNumber:
|
|
117
|
+
type: integer
|
|
118
|
+
minimum: 1
|
|
119
|
+
description: Current installment number in a series
|
|
120
|
+
example: 2
|
|
121
|
+
installmentTotal:
|
|
122
|
+
type: integer
|
|
123
|
+
minimum: 1
|
|
124
|
+
description: Total number of installments in the series
|
|
125
|
+
example: 5
|
|
126
|
+
recurrenceRuleId:
|
|
127
|
+
type: string
|
|
128
|
+
description: ID of the associated recurrence rule
|
|
129
|
+
example: "rr_123456789"
|
|
130
|
+
accountId:
|
|
131
|
+
type: string
|
|
132
|
+
description: ID of the associated account (required if paymentMethod is not CREDIT)
|
|
133
|
+
example: "acc_123456789"
|
|
134
|
+
account:
|
|
135
|
+
$ref: '#/components/schemas/Account'
|
|
136
|
+
description: Associated account object
|
|
137
|
+
paid:
|
|
138
|
+
type: boolean
|
|
139
|
+
default: false
|
|
140
|
+
description: Whether the transaction has been paid/received
|
|
141
|
+
example: true
|
|
142
|
+
createdAt:
|
|
143
|
+
type: string
|
|
144
|
+
format: date-time
|
|
145
|
+
description: Timestamp when the transaction was created
|
|
146
|
+
example: "2026-01-30T10:00:00Z"
|
|
147
|
+
|
|
148
|
+
CreditCard:
|
|
149
|
+
type: object
|
|
150
|
+
required:
|
|
151
|
+
- name
|
|
152
|
+
- limitAmount
|
|
153
|
+
- closingDay
|
|
154
|
+
- dueDay
|
|
155
|
+
properties:
|
|
156
|
+
id:
|
|
157
|
+
type: string
|
|
158
|
+
description: Unique identifier for the credit card
|
|
159
|
+
example: "cc_123456789"
|
|
160
|
+
name:
|
|
161
|
+
type: string
|
|
162
|
+
description: Name of the credit card
|
|
163
|
+
example: "Nubank Platinum"
|
|
164
|
+
brand:
|
|
165
|
+
type: string
|
|
166
|
+
description: Brand of the credit card
|
|
167
|
+
example: "Visa"
|
|
168
|
+
limitAmount:
|
|
169
|
+
type: number
|
|
170
|
+
format: float
|
|
171
|
+
minimum: 0
|
|
172
|
+
description: Credit limit of the card
|
|
173
|
+
example: 5000.00
|
|
174
|
+
closingDay:
|
|
175
|
+
type: integer
|
|
176
|
+
minimum: 1
|
|
177
|
+
maximum: 31
|
|
178
|
+
description: Day of the month when the billing cycle closes
|
|
179
|
+
example: 15
|
|
180
|
+
dueDay:
|
|
181
|
+
type: integer
|
|
182
|
+
minimum: 1
|
|
183
|
+
maximum: 31
|
|
184
|
+
description: Day of the month when the bill is due
|
|
185
|
+
example: 22
|
|
186
|
+
availableLimit:
|
|
187
|
+
type: number
|
|
188
|
+
format: float
|
|
189
|
+
description: Available credit limit (limitAmount minus all pending unpaid expenses)
|
|
190
|
+
example: 3200.00
|
|
191
|
+
createdAt:
|
|
192
|
+
type: string
|
|
193
|
+
format: date-time
|
|
194
|
+
description: Timestamp when the credit card was added
|
|
195
|
+
example: "2026-01-30T10:00:00Z"
|
|
196
|
+
|
|
197
|
+
RecurrenceRule:
|
|
198
|
+
type: object
|
|
199
|
+
required:
|
|
200
|
+
- frequency
|
|
201
|
+
properties:
|
|
202
|
+
id:
|
|
203
|
+
type: string
|
|
204
|
+
description: Unique identifier for the recurrence rule
|
|
205
|
+
example: "rr_123456789"
|
|
206
|
+
frequency:
|
|
207
|
+
type: string
|
|
208
|
+
enum: [MONTHLY, WEEKLY, YEARLY]
|
|
209
|
+
description: Frequency of recurrence
|
|
210
|
+
example: "MONTHLY"
|
|
211
|
+
interval:
|
|
212
|
+
type: integer
|
|
213
|
+
minimum: 1
|
|
214
|
+
default: 1
|
|
215
|
+
description: Interval multiplier for the frequency
|
|
216
|
+
example: 1
|
|
217
|
+
endDate:
|
|
218
|
+
type: string
|
|
219
|
+
format: date
|
|
220
|
+
description: Date when the recurrence should end (mutually exclusive with occurrences)
|
|
221
|
+
example: "2026-12-31"
|
|
222
|
+
occurrences:
|
|
223
|
+
type: integer
|
|
224
|
+
minimum: 2
|
|
225
|
+
description: Number of occurrences (mutually exclusive with endDate). When set, transaction names will be formatted as "Name (N/total)"
|
|
226
|
+
example: 12
|
|
227
|
+
createdAt:
|
|
228
|
+
type: string
|
|
229
|
+
format: date-time
|
|
230
|
+
description: Timestamp when the recurrence rule was created
|
|
231
|
+
example: "2026-01-30T10:00:00Z"
|
|
232
|
+
|
|
233
|
+
Statement:
|
|
234
|
+
type: object
|
|
235
|
+
properties:
|
|
236
|
+
cardId:
|
|
237
|
+
type: string
|
|
238
|
+
description: ID of the credit card
|
|
239
|
+
example: "cc_123456789"
|
|
240
|
+
periodStart:
|
|
241
|
+
type: string
|
|
242
|
+
format: date
|
|
243
|
+
description: Start date of the billing period
|
|
244
|
+
example: "2026-02-16"
|
|
245
|
+
periodEnd:
|
|
246
|
+
type: string
|
|
247
|
+
format: date
|
|
248
|
+
description: End date of the billing period
|
|
249
|
+
example: "2026-03-15"
|
|
250
|
+
dueDate:
|
|
251
|
+
type: string
|
|
252
|
+
format: date
|
|
253
|
+
description: Due date of the statement
|
|
254
|
+
example: "2026-03-22"
|
|
255
|
+
transactions:
|
|
256
|
+
type: array
|
|
257
|
+
items:
|
|
258
|
+
$ref: '#/components/schemas/Transaction'
|
|
259
|
+
description: List of transactions in the statement period
|
|
260
|
+
total:
|
|
261
|
+
type: number
|
|
262
|
+
format: float
|
|
263
|
+
description: Total amount of the statement
|
|
264
|
+
example: 3450.00
|
|
265
|
+
availableLimit:
|
|
266
|
+
type: number
|
|
267
|
+
format: float
|
|
268
|
+
description: Available credit limit
|
|
269
|
+
example: 1550.00
|
|
270
|
+
|
|
271
|
+
StatementStatus:
|
|
272
|
+
type: object
|
|
273
|
+
properties:
|
|
274
|
+
cardId:
|
|
275
|
+
type: string
|
|
276
|
+
description: ID of the credit card
|
|
277
|
+
example: "cc_123456789"
|
|
278
|
+
month:
|
|
279
|
+
type: string
|
|
280
|
+
description: Month for the statement (YYYY-MM format)
|
|
281
|
+
example: "2026-03"
|
|
282
|
+
isPaid:
|
|
283
|
+
type: boolean
|
|
284
|
+
description: Whether all transactions in the statement are paid
|
|
285
|
+
example: true
|
|
286
|
+
|
|
287
|
+
Account:
|
|
288
|
+
type: object
|
|
289
|
+
required:
|
|
290
|
+
- name
|
|
291
|
+
- type
|
|
292
|
+
- initialBalance
|
|
293
|
+
properties:
|
|
294
|
+
id:
|
|
295
|
+
type: string
|
|
296
|
+
description: Unique identifier for the account
|
|
297
|
+
example: "acc_123456789"
|
|
298
|
+
name:
|
|
299
|
+
type: string
|
|
300
|
+
description: Name of the account
|
|
301
|
+
example: "Itaú Checking Account"
|
|
302
|
+
type:
|
|
303
|
+
type: string
|
|
304
|
+
enum: [BANK_ACCOUNT, WALLET, SAVINGS_ACCOUNT, INVESTMENT_ACCOUNT, OTHER]
|
|
305
|
+
description: Type of account
|
|
306
|
+
example: "BANK_ACCOUNT"
|
|
307
|
+
initialBalance:
|
|
308
|
+
type: number
|
|
309
|
+
format: float
|
|
310
|
+
description: Initial balance when the account was created
|
|
311
|
+
example: 1000.00
|
|
312
|
+
currentBalance:
|
|
313
|
+
type: number
|
|
314
|
+
format: float
|
|
315
|
+
description: Current balance of the account
|
|
316
|
+
example: 850.00
|
|
317
|
+
createdAt:
|
|
318
|
+
type: string
|
|
319
|
+
format: date-time
|
|
320
|
+
description: Timestamp when the account was created
|
|
321
|
+
example: "2026-02-11T12:00:00Z"
|
|
322
|
+
updatedAt:
|
|
323
|
+
type: string
|
|
324
|
+
format: date-time
|
|
325
|
+
description: Timestamp when the account was last updated
|
|
326
|
+
example: "2026-02-11T15:30:00Z"
|
|
327
|
+
|
|
328
|
+
AccountBalance:
|
|
329
|
+
type: object
|
|
330
|
+
properties:
|
|
331
|
+
accountId:
|
|
332
|
+
type: string
|
|
333
|
+
description: ID of the account
|
|
334
|
+
example: "acc_123456789"
|
|
335
|
+
currentBalance:
|
|
336
|
+
type: number
|
|
337
|
+
format: float
|
|
338
|
+
description: Current balance of the account
|
|
339
|
+
example: 850.00
|
|
340
|
+
calculatedAt:
|
|
341
|
+
type: string
|
|
342
|
+
format: date-time
|
|
343
|
+
description: Timestamp when the balance was calculated
|
|
344
|
+
example: "2026-02-11T16:00:00Z"
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
CategoryBreakdown:
|
|
348
|
+
type: object
|
|
349
|
+
properties:
|
|
350
|
+
categoryId:
|
|
351
|
+
type: string
|
|
352
|
+
nullable: true
|
|
353
|
+
description: Category ID (null if uncategorized)
|
|
354
|
+
example: "cat-123"
|
|
355
|
+
categoryName:
|
|
356
|
+
type: string
|
|
357
|
+
nullable: true
|
|
358
|
+
description: Category name (null if uncategorized)
|
|
359
|
+
example: "Housing"
|
|
360
|
+
color:
|
|
361
|
+
type: string
|
|
362
|
+
nullable: true
|
|
363
|
+
description: Category color in hex format
|
|
364
|
+
example: "#ff5733"
|
|
365
|
+
total:
|
|
366
|
+
type: number
|
|
367
|
+
format: float
|
|
368
|
+
description: Total amount for this category
|
|
369
|
+
example: 1500.00
|
|
370
|
+
|
|
371
|
+
Summary:
|
|
372
|
+
type: object
|
|
373
|
+
properties:
|
|
374
|
+
period:
|
|
375
|
+
type: object
|
|
376
|
+
description: The period covered by this summary
|
|
377
|
+
properties:
|
|
378
|
+
month:
|
|
379
|
+
type: string
|
|
380
|
+
description: Month in YYYY-MM format (present when queried by month)
|
|
381
|
+
example: "2026-02"
|
|
382
|
+
startDate:
|
|
383
|
+
type: string
|
|
384
|
+
description: Start date in YYYY-MM-DD format (present when queried by range)
|
|
385
|
+
example: "2026-01-01"
|
|
386
|
+
endDate:
|
|
387
|
+
type: string
|
|
388
|
+
description: End date in YYYY-MM-DD format (present when queried by range)
|
|
389
|
+
example: "2026-03-31"
|
|
390
|
+
income:
|
|
391
|
+
type: number
|
|
392
|
+
format: float
|
|
393
|
+
description: Total income for the period (paid + pending)
|
|
394
|
+
example: 10000.00
|
|
395
|
+
expenses:
|
|
396
|
+
type: number
|
|
397
|
+
format: float
|
|
398
|
+
description: Total expenses for the period (paid + pending)
|
|
399
|
+
example: 4000.00
|
|
400
|
+
pendingIncome:
|
|
401
|
+
type: number
|
|
402
|
+
format: float
|
|
403
|
+
description: Sum of income transactions not yet marked as received
|
|
404
|
+
example: 1000.00
|
|
405
|
+
pendingExpenses:
|
|
406
|
+
type: number
|
|
407
|
+
format: float
|
|
408
|
+
description: Sum of expense transactions not yet marked as paid
|
|
409
|
+
example: 500.00
|
|
410
|
+
balance:
|
|
411
|
+
type: number
|
|
412
|
+
format: float
|
|
413
|
+
description: Net balance (income - expenses)
|
|
414
|
+
example: 6000.00
|
|
415
|
+
creditCardExpenses:
|
|
416
|
+
type: array
|
|
417
|
+
description: Credit card totals for the period
|
|
418
|
+
items:
|
|
419
|
+
type: object
|
|
420
|
+
properties:
|
|
421
|
+
cardId:
|
|
422
|
+
type: string
|
|
423
|
+
description: Credit card ID
|
|
424
|
+
example: "abc-123"
|
|
425
|
+
cardName:
|
|
426
|
+
type: string
|
|
427
|
+
description: Credit card name
|
|
428
|
+
example: "Nubank"
|
|
429
|
+
total:
|
|
430
|
+
type: number
|
|
431
|
+
format: float
|
|
432
|
+
description: Total charged to this card in the period
|
|
433
|
+
example: 2500.00
|
|
434
|
+
dueDate:
|
|
435
|
+
type: string
|
|
436
|
+
format: date
|
|
437
|
+
nullable: true
|
|
438
|
+
description: Statement due date (only present when queried by month)
|
|
439
|
+
example: "2026-03-22"
|
|
440
|
+
isPaid:
|
|
441
|
+
type: boolean
|
|
442
|
+
nullable: true
|
|
443
|
+
description: Whether the statement is fully paid (only present when queried by month)
|
|
444
|
+
example: false
|
|
445
|
+
expensesByCategory:
|
|
446
|
+
type: array
|
|
447
|
+
description: Expense totals grouped by category, sorted by total descending
|
|
448
|
+
items:
|
|
449
|
+
$ref: '#/components/schemas/CategoryBreakdown'
|
|
450
|
+
incomeByCategory:
|
|
451
|
+
type: array
|
|
452
|
+
description: Income totals grouped by category, sorted by total descending
|
|
453
|
+
items:
|
|
454
|
+
$ref: '#/components/schemas/CategoryBreakdown'
|
|
455
|
+
accounts:
|
|
456
|
+
type: array
|
|
457
|
+
description: >
|
|
458
|
+
All accounts with their current balance (initialBalance + paid income - paid expenses).
|
|
459
|
+
Not filtered by period.
|
|
460
|
+
items:
|
|
461
|
+
$ref: '#/components/schemas/AccountSummary'
|
|
462
|
+
totalBalance:
|
|
463
|
+
type: number
|
|
464
|
+
format: float
|
|
465
|
+
description: Sum of all account balances. Not filtered by period.
|
|
466
|
+
example: 8500.00
|
|
467
|
+
|
|
468
|
+
AccountSummary:
|
|
469
|
+
type: object
|
|
470
|
+
properties:
|
|
471
|
+
accountId:
|
|
472
|
+
type: string
|
|
473
|
+
description: Account ID
|
|
474
|
+
example: "acc-123"
|
|
475
|
+
accountName:
|
|
476
|
+
type: string
|
|
477
|
+
description: Account name
|
|
478
|
+
example: "Nubank"
|
|
479
|
+
accountType:
|
|
480
|
+
type: string
|
|
481
|
+
enum: [BANK_ACCOUNT, WALLET, SAVINGS_ACCOUNT, INVESTMENT_ACCOUNT, OTHER]
|
|
482
|
+
description: Account type
|
|
483
|
+
example: "BANK_ACCOUNT"
|
|
484
|
+
balance:
|
|
485
|
+
type: number
|
|
486
|
+
format: float
|
|
487
|
+
description: Current balance (initialBalance + paid income - paid expenses)
|
|
488
|
+
example: 2500.00
|
|
489
|
+
|
|
490
|
+
CreateTransactionRequest:
|
|
491
|
+
type: object
|
|
492
|
+
required:
|
|
493
|
+
- type
|
|
494
|
+
- name
|
|
495
|
+
- amount
|
|
496
|
+
- date
|
|
497
|
+
properties:
|
|
498
|
+
type:
|
|
499
|
+
$ref: '#/components/schemas/Transaction/properties/type'
|
|
500
|
+
name:
|
|
501
|
+
$ref: '#/components/schemas/Transaction/properties/name'
|
|
502
|
+
amount:
|
|
503
|
+
$ref: '#/components/schemas/Transaction/properties/amount'
|
|
504
|
+
date:
|
|
505
|
+
type: string
|
|
506
|
+
format: date
|
|
507
|
+
description: |
|
|
508
|
+
Date of the transaction.
|
|
509
|
+
For CREDIT payments, if targetDueMonth is provided, the date will be calculated based on the credit card's due day.
|
|
510
|
+
Otherwise, this date will be used directly.
|
|
511
|
+
example: "2026-01-30"
|
|
512
|
+
categoryId:
|
|
513
|
+
$ref: '#/components/schemas/Transaction/properties/categoryId'
|
|
514
|
+
paymentMethod:
|
|
515
|
+
$ref: '#/components/schemas/Transaction/properties/paymentMethod'
|
|
516
|
+
creditCardId:
|
|
517
|
+
$ref: '#/components/schemas/Transaction/properties/creditCardId'
|
|
518
|
+
installments:
|
|
519
|
+
type: integer
|
|
520
|
+
minimum: 1
|
|
521
|
+
description: Number of installments (optional)
|
|
522
|
+
example: 3
|
|
523
|
+
targetDueMonth:
|
|
524
|
+
type: string
|
|
525
|
+
pattern: "^\\d{4}-\\d{2}$"
|
|
526
|
+
description: |
|
|
527
|
+
Target month for due date in YYYY-MM format (optional).
|
|
528
|
+
When provided for CREDIT payments, the transaction date(s) will be set to the credit card's due day in the specified month.
|
|
529
|
+
For installments, each installment will be scheduled in subsequent months on the due day.
|
|
530
|
+
Example: if credit card due day is 10, and targetDueMonth is "2026-03", the transaction date will be 2026-03-10.
|
|
531
|
+
example: "2026-03"
|
|
532
|
+
accountId:
|
|
533
|
+
type: string
|
|
534
|
+
description: ID of the associated account (required if paymentMethod is not CREDIT)
|
|
535
|
+
example: "acc_123456789"
|
|
536
|
+
recurrence:
|
|
537
|
+
type: object
|
|
538
|
+
properties:
|
|
539
|
+
frequency:
|
|
540
|
+
$ref: '#/components/schemas/RecurrenceRule/properties/frequency'
|
|
541
|
+
interval:
|
|
542
|
+
$ref: '#/components/schemas/RecurrenceRule/properties/interval'
|
|
543
|
+
endDate:
|
|
544
|
+
$ref: '#/components/schemas/RecurrenceRule/properties/endDate'
|
|
545
|
+
occurrences:
|
|
546
|
+
$ref: '#/components/schemas/RecurrenceRule/properties/occurrences'
|
|
547
|
+
isPaid:
|
|
548
|
+
type: boolean
|
|
549
|
+
description: Whether the transaction is already paid at creation time (defaults to false)
|
|
550
|
+
example: false
|
|
551
|
+
purchaseDate:
|
|
552
|
+
type: string
|
|
553
|
+
format: date
|
|
554
|
+
description: Actual purchase date (credit card only, optional)
|
|
555
|
+
example: "2026-02-10"
|
|
556
|
+
|
|
557
|
+
UpdateTransactionRequest:
|
|
558
|
+
type: object
|
|
559
|
+
properties:
|
|
560
|
+
type:
|
|
561
|
+
$ref: '#/components/schemas/Transaction/properties/type'
|
|
562
|
+
name:
|
|
563
|
+
$ref: '#/components/schemas/Transaction/properties/name'
|
|
564
|
+
amount:
|
|
565
|
+
$ref: '#/components/schemas/Transaction/properties/amount'
|
|
566
|
+
date:
|
|
567
|
+
type: string
|
|
568
|
+
format: date
|
|
569
|
+
description: |
|
|
570
|
+
Date of the transaction.
|
|
571
|
+
For CREDIT payments, if targetDueMonth is provided, the date will be calculated based on the credit card's due day.
|
|
572
|
+
Otherwise, this date will be used directly.
|
|
573
|
+
example: "2026-01-30"
|
|
574
|
+
categoryId:
|
|
575
|
+
$ref: '#/components/schemas/Transaction/properties/categoryId'
|
|
576
|
+
paymentMethod:
|
|
577
|
+
$ref: '#/components/schemas/Transaction/properties/paymentMethod'
|
|
578
|
+
creditCardId:
|
|
579
|
+
$ref: '#/components/schemas/Transaction/properties/creditCardId'
|
|
580
|
+
targetDueMonth:
|
|
581
|
+
type: string
|
|
582
|
+
pattern: "^\\d{4}-\\d{2}$"
|
|
583
|
+
description: |
|
|
584
|
+
Target month for due date in YYYY-MM format (optional).
|
|
585
|
+
When provided for CREDIT payments, the transaction date will be set to the credit card's due day in the specified month.
|
|
586
|
+
Example: if credit card due day is 10, and targetDueMonth is "2026-03", the transaction date will be 2026-03-10.
|
|
587
|
+
example: "2026-03"
|
|
588
|
+
accountId:
|
|
589
|
+
type: string
|
|
590
|
+
description: ID of the associated account (required if paymentMethod is not CREDIT)
|
|
591
|
+
example: "acc_123456789"
|
|
592
|
+
recurrence:
|
|
593
|
+
type: object
|
|
594
|
+
properties:
|
|
595
|
+
frequency:
|
|
596
|
+
$ref: '#/components/schemas/RecurrenceRule/properties/frequency'
|
|
597
|
+
interval:
|
|
598
|
+
$ref: '#/components/schemas/RecurrenceRule/properties/interval'
|
|
599
|
+
endDate:
|
|
600
|
+
$ref: '#/components/schemas/RecurrenceRule/properties/endDate'
|
|
601
|
+
occurrences:
|
|
602
|
+
$ref: '#/components/schemas/RecurrenceRule/properties/occurrences'
|
|
603
|
+
|
|
604
|
+
Settings:
|
|
605
|
+
type: object
|
|
606
|
+
required:
|
|
607
|
+
- userName
|
|
608
|
+
- language
|
|
609
|
+
- currency
|
|
610
|
+
properties:
|
|
611
|
+
userName:
|
|
612
|
+
type: string
|
|
613
|
+
description: Name of the user
|
|
614
|
+
example: "John Doe"
|
|
615
|
+
language:
|
|
616
|
+
type: string
|
|
617
|
+
enum: [pt-BR, en-US]
|
|
618
|
+
description: Preferred language
|
|
619
|
+
example: "pt-BR"
|
|
620
|
+
currency:
|
|
621
|
+
type: string
|
|
622
|
+
enum: [BRL, USD, EUR, GBP, JPY, CAD, AUD, CHF]
|
|
623
|
+
description: Default currency
|
|
624
|
+
example: "BRL"
|
|
625
|
+
createdAt:
|
|
626
|
+
type: string
|
|
627
|
+
format: date-time
|
|
628
|
+
description: Timestamp when settings were created
|
|
629
|
+
example: "2026-01-30T10:00:00Z"
|
|
630
|
+
updatedAt:
|
|
631
|
+
type: string
|
|
632
|
+
format: date-time
|
|
633
|
+
description: Timestamp when settings were last updated
|
|
634
|
+
example: "2026-01-30T10:00:00Z"
|
|
635
|
+
|
|
636
|
+
Transfer:
|
|
637
|
+
type: object
|
|
638
|
+
required:
|
|
639
|
+
- sourceAccountId
|
|
640
|
+
- destinationAccountId
|
|
641
|
+
- amount
|
|
642
|
+
- date
|
|
643
|
+
properties:
|
|
644
|
+
id:
|
|
645
|
+
type: string
|
|
646
|
+
description: Unique identifier for the transfer
|
|
647
|
+
example: "tr_123456789"
|
|
648
|
+
sourceAccountId:
|
|
649
|
+
type: string
|
|
650
|
+
description: ID of the account funds are transferred from
|
|
651
|
+
example: "acc_111111111"
|
|
652
|
+
destinationAccountId:
|
|
653
|
+
type: string
|
|
654
|
+
description: ID of the account funds are transferred to
|
|
655
|
+
example: "acc_222222222"
|
|
656
|
+
amount:
|
|
657
|
+
type: number
|
|
658
|
+
format: float
|
|
659
|
+
minimum: 0.01
|
|
660
|
+
description: Amount to transfer
|
|
661
|
+
example: 100.00
|
|
662
|
+
date:
|
|
663
|
+
type: string
|
|
664
|
+
format: date
|
|
665
|
+
description: Date of the transfer (YYYY-MM-DD)
|
|
666
|
+
example: "2026-02-17"
|
|
667
|
+
createdAt:
|
|
668
|
+
type: string
|
|
669
|
+
format: date-time
|
|
670
|
+
description: Timestamp when the transfer was created
|
|
671
|
+
example: "2026-02-17T10:00:00Z"
|
|
672
|
+
updatedAt:
|
|
673
|
+
type: string
|
|
674
|
+
format: date-time
|
|
675
|
+
description: Timestamp when the transfer was last updated
|
|
676
|
+
example: "2026-02-17T10:00:00Z"
|
|
677
|
+
|
|
678
|
+
responses:
|
|
679
|
+
UnauthorizedError:
|
|
680
|
+
description: API key is missing or invalid
|
|
681
|
+
content:
|
|
682
|
+
application/json:
|
|
683
|
+
schema:
|
|
684
|
+
type: object
|
|
685
|
+
properties:
|
|
686
|
+
statusCode:
|
|
687
|
+
type: integer
|
|
688
|
+
example: 401
|
|
689
|
+
error:
|
|
690
|
+
type: string
|
|
691
|
+
example: "Unauthorized"
|
|
692
|
+
message:
|
|
693
|
+
type: string
|
|
694
|
+
example: "Invalid API key"
|
|
695
|
+
|
|
696
|
+
security:
|
|
697
|
+
- ApiKeyAuth: []
|
|
698
|
+
|
|
699
|
+
paths:
|
|
700
|
+
/categories:
|
|
701
|
+
post:
|
|
702
|
+
summary: Create a new category
|
|
703
|
+
requestBody:
|
|
704
|
+
required: true
|
|
705
|
+
content:
|
|
706
|
+
application/json:
|
|
707
|
+
schema:
|
|
708
|
+
type: object
|
|
709
|
+
required:
|
|
710
|
+
- name
|
|
711
|
+
- type
|
|
712
|
+
properties:
|
|
713
|
+
name:
|
|
714
|
+
type: string
|
|
715
|
+
example: "Groceries"
|
|
716
|
+
type:
|
|
717
|
+
type: string
|
|
718
|
+
enum: [INCOME, EXPENSE]
|
|
719
|
+
example: "EXPENSE"
|
|
720
|
+
color:
|
|
721
|
+
type: string
|
|
722
|
+
nullable: true
|
|
723
|
+
pattern: "^#[0-9A-Fa-f]{6}$"
|
|
724
|
+
description: Color in hexadecimal format
|
|
725
|
+
example: "#FF5733"
|
|
726
|
+
responses:
|
|
727
|
+
'201':
|
|
728
|
+
description: Category created successfully
|
|
729
|
+
content:
|
|
730
|
+
application/json:
|
|
731
|
+
schema:
|
|
732
|
+
$ref: '#/components/schemas/Category'
|
|
733
|
+
'400':
|
|
734
|
+
description: Invalid input
|
|
735
|
+
'401':
|
|
736
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
737
|
+
|
|
738
|
+
get:
|
|
739
|
+
summary: Get all categories
|
|
740
|
+
responses:
|
|
741
|
+
'200':
|
|
742
|
+
description: List of categories
|
|
743
|
+
content:
|
|
744
|
+
application/json:
|
|
745
|
+
schema:
|
|
746
|
+
type: array
|
|
747
|
+
items:
|
|
748
|
+
$ref: '#/components/schemas/Category'
|
|
749
|
+
'401':
|
|
750
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
751
|
+
|
|
752
|
+
/categories/{id}:
|
|
753
|
+
get:
|
|
754
|
+
summary: Get a category by ID
|
|
755
|
+
parameters:
|
|
756
|
+
- name: id
|
|
757
|
+
in: path
|
|
758
|
+
required: true
|
|
759
|
+
schema:
|
|
760
|
+
type: string
|
|
761
|
+
description: Category ID
|
|
762
|
+
responses:
|
|
763
|
+
'200':
|
|
764
|
+
description: Category found
|
|
765
|
+
content:
|
|
766
|
+
application/json:
|
|
767
|
+
schema:
|
|
768
|
+
$ref: '#/components/schemas/Category'
|
|
769
|
+
'401':
|
|
770
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
771
|
+
'404':
|
|
772
|
+
description: Category not found
|
|
773
|
+
|
|
774
|
+
patch:
|
|
775
|
+
summary: Update a category
|
|
776
|
+
parameters:
|
|
777
|
+
- name: id
|
|
778
|
+
in: path
|
|
779
|
+
required: true
|
|
780
|
+
schema:
|
|
781
|
+
type: string
|
|
782
|
+
description: Category ID
|
|
783
|
+
requestBody:
|
|
784
|
+
required: true
|
|
785
|
+
content:
|
|
786
|
+
application/json:
|
|
787
|
+
schema:
|
|
788
|
+
type: object
|
|
789
|
+
properties:
|
|
790
|
+
name:
|
|
791
|
+
type: string
|
|
792
|
+
example: "Groceries"
|
|
793
|
+
color:
|
|
794
|
+
type: string
|
|
795
|
+
nullable: true
|
|
796
|
+
pattern: "^#[0-9A-Fa-f]{6}$"
|
|
797
|
+
description: Color in hexadecimal format
|
|
798
|
+
example: "#FF5733"
|
|
799
|
+
responses:
|
|
800
|
+
'200':
|
|
801
|
+
description: Category updated successfully
|
|
802
|
+
content:
|
|
803
|
+
application/json:
|
|
804
|
+
schema:
|
|
805
|
+
$ref: '#/components/schemas/Category'
|
|
806
|
+
'400':
|
|
807
|
+
description: Invalid input
|
|
808
|
+
'401':
|
|
809
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
810
|
+
'404':
|
|
811
|
+
description: Category not found
|
|
812
|
+
|
|
813
|
+
delete:
|
|
814
|
+
summary: Delete a category
|
|
815
|
+
parameters:
|
|
816
|
+
- name: id
|
|
817
|
+
in: path
|
|
818
|
+
required: true
|
|
819
|
+
schema:
|
|
820
|
+
type: string
|
|
821
|
+
description: Category ID
|
|
822
|
+
responses:
|
|
823
|
+
'200':
|
|
824
|
+
description: Category deleted successfully
|
|
825
|
+
'401':
|
|
826
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
827
|
+
'404':
|
|
828
|
+
description: Category not found
|
|
829
|
+
|
|
830
|
+
/credit-cards:
|
|
831
|
+
post:
|
|
832
|
+
summary: Create a new credit card
|
|
833
|
+
requestBody:
|
|
834
|
+
required: true
|
|
835
|
+
content:
|
|
836
|
+
application/json:
|
|
837
|
+
schema:
|
|
838
|
+
type: object
|
|
839
|
+
required:
|
|
840
|
+
- name
|
|
841
|
+
- limitAmount
|
|
842
|
+
- closingDay
|
|
843
|
+
- dueDay
|
|
844
|
+
properties:
|
|
845
|
+
name:
|
|
846
|
+
type: string
|
|
847
|
+
example: "Nubank Platinum"
|
|
848
|
+
brand:
|
|
849
|
+
type: string
|
|
850
|
+
example: "Visa"
|
|
851
|
+
limitAmount:
|
|
852
|
+
type: number
|
|
853
|
+
format: float
|
|
854
|
+
example: 5000.00
|
|
855
|
+
closingDay:
|
|
856
|
+
type: integer
|
|
857
|
+
minimum: 1
|
|
858
|
+
maximum: 31
|
|
859
|
+
example: 15
|
|
860
|
+
dueDay:
|
|
861
|
+
type: integer
|
|
862
|
+
minimum: 1
|
|
863
|
+
maximum: 31
|
|
864
|
+
example: 22
|
|
865
|
+
responses:
|
|
866
|
+
'201':
|
|
867
|
+
description: Credit card created successfully
|
|
868
|
+
content:
|
|
869
|
+
application/json:
|
|
870
|
+
schema:
|
|
871
|
+
$ref: '#/components/schemas/CreditCard'
|
|
872
|
+
'400':
|
|
873
|
+
description: Invalid input
|
|
874
|
+
'401':
|
|
875
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
876
|
+
|
|
877
|
+
get:
|
|
878
|
+
summary: Get all credit cards
|
|
879
|
+
responses:
|
|
880
|
+
'200':
|
|
881
|
+
description: List of credit cards
|
|
882
|
+
content:
|
|
883
|
+
application/json:
|
|
884
|
+
schema:
|
|
885
|
+
type: array
|
|
886
|
+
items:
|
|
887
|
+
$ref: '#/components/schemas/CreditCard'
|
|
888
|
+
'401':
|
|
889
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
890
|
+
|
|
891
|
+
/credit-cards/{id}:
|
|
892
|
+
get:
|
|
893
|
+
summary: Get a credit card by ID
|
|
894
|
+
parameters:
|
|
895
|
+
- name: id
|
|
896
|
+
in: path
|
|
897
|
+
required: true
|
|
898
|
+
schema:
|
|
899
|
+
type: string
|
|
900
|
+
description: Credit card ID
|
|
901
|
+
responses:
|
|
902
|
+
'200':
|
|
903
|
+
description: Credit card found
|
|
904
|
+
content:
|
|
905
|
+
application/json:
|
|
906
|
+
schema:
|
|
907
|
+
$ref: '#/components/schemas/CreditCard'
|
|
908
|
+
'401':
|
|
909
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
910
|
+
'404':
|
|
911
|
+
description: Credit card not found
|
|
912
|
+
|
|
913
|
+
patch:
|
|
914
|
+
summary: Update a credit card
|
|
915
|
+
parameters:
|
|
916
|
+
- name: id
|
|
917
|
+
in: path
|
|
918
|
+
required: true
|
|
919
|
+
schema:
|
|
920
|
+
type: string
|
|
921
|
+
description: Credit card ID
|
|
922
|
+
requestBody:
|
|
923
|
+
required: true
|
|
924
|
+
content:
|
|
925
|
+
application/json:
|
|
926
|
+
schema:
|
|
927
|
+
type: object
|
|
928
|
+
properties:
|
|
929
|
+
name:
|
|
930
|
+
type: string
|
|
931
|
+
example: "Nubank Platinum"
|
|
932
|
+
brand:
|
|
933
|
+
type: string
|
|
934
|
+
example: "Visa"
|
|
935
|
+
limitAmount:
|
|
936
|
+
type: number
|
|
937
|
+
format: float
|
|
938
|
+
example: 5000.00
|
|
939
|
+
closingDay:
|
|
940
|
+
type: integer
|
|
941
|
+
minimum: 1
|
|
942
|
+
maximum: 31
|
|
943
|
+
example: 15
|
|
944
|
+
dueDay:
|
|
945
|
+
type: integer
|
|
946
|
+
minimum: 1
|
|
947
|
+
maximum: 31
|
|
948
|
+
example: 22
|
|
949
|
+
responses:
|
|
950
|
+
'200':
|
|
951
|
+
description: Credit card updated successfully
|
|
952
|
+
content:
|
|
953
|
+
application/json:
|
|
954
|
+
schema:
|
|
955
|
+
$ref: '#/components/schemas/CreditCard'
|
|
956
|
+
'400':
|
|
957
|
+
description: Invalid input
|
|
958
|
+
'401':
|
|
959
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
960
|
+
'404':
|
|
961
|
+
description: Credit card not found
|
|
962
|
+
|
|
963
|
+
delete:
|
|
964
|
+
summary: Delete a credit card
|
|
965
|
+
parameters:
|
|
966
|
+
- name: id
|
|
967
|
+
in: path
|
|
968
|
+
required: true
|
|
969
|
+
schema:
|
|
970
|
+
type: string
|
|
971
|
+
description: Credit card ID
|
|
972
|
+
responses:
|
|
973
|
+
'200':
|
|
974
|
+
description: Credit card deleted successfully
|
|
975
|
+
'400':
|
|
976
|
+
description: Cannot delete credit card with associated transactions
|
|
977
|
+
'401':
|
|
978
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
979
|
+
'404':
|
|
980
|
+
description: Credit card not found
|
|
981
|
+
|
|
982
|
+
/credit-cards/{id}/statement:
|
|
983
|
+
get:
|
|
984
|
+
summary: Get credit card statement for a specific month
|
|
985
|
+
parameters:
|
|
986
|
+
- name: id
|
|
987
|
+
in: path
|
|
988
|
+
required: true
|
|
989
|
+
schema:
|
|
990
|
+
type: string
|
|
991
|
+
description: Credit card ID
|
|
992
|
+
- name: month
|
|
993
|
+
in: query
|
|
994
|
+
required: true
|
|
995
|
+
schema:
|
|
996
|
+
type: string
|
|
997
|
+
pattern: "^\\d{4}-\\d{2}$"
|
|
998
|
+
description: Month in YYYY-MM format
|
|
999
|
+
example: "2026-03"
|
|
1000
|
+
responses:
|
|
1001
|
+
'200':
|
|
1002
|
+
description: Credit card statement
|
|
1003
|
+
content:
|
|
1004
|
+
application/json:
|
|
1005
|
+
schema:
|
|
1006
|
+
$ref: '#/components/schemas/Statement'
|
|
1007
|
+
'401':
|
|
1008
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1009
|
+
'404':
|
|
1010
|
+
description: Credit card not found
|
|
1011
|
+
|
|
1012
|
+
/credit-cards/{id}/pay-statement:
|
|
1013
|
+
post:
|
|
1014
|
+
summary: Mark all transactions in a credit card statement as paid
|
|
1015
|
+
parameters:
|
|
1016
|
+
- name: id
|
|
1017
|
+
in: path
|
|
1018
|
+
required: true
|
|
1019
|
+
schema:
|
|
1020
|
+
type: string
|
|
1021
|
+
description: Credit card ID
|
|
1022
|
+
requestBody:
|
|
1023
|
+
required: true
|
|
1024
|
+
content:
|
|
1025
|
+
application/json:
|
|
1026
|
+
schema:
|
|
1027
|
+
type: object
|
|
1028
|
+
required:
|
|
1029
|
+
- month
|
|
1030
|
+
- paymentAccountId
|
|
1031
|
+
properties:
|
|
1032
|
+
month:
|
|
1033
|
+
type: string
|
|
1034
|
+
pattern: "^\\d{4}-\\d{2}$"
|
|
1035
|
+
description: Month in YYYY-MM format
|
|
1036
|
+
example: "2026-03"
|
|
1037
|
+
paymentAccountId:
|
|
1038
|
+
type: string
|
|
1039
|
+
description: ID of the account to debit for the payment
|
|
1040
|
+
example: "acc_123456789"
|
|
1041
|
+
responses:
|
|
1042
|
+
'200':
|
|
1043
|
+
description: Statement marked as paid
|
|
1044
|
+
content:
|
|
1045
|
+
application/json:
|
|
1046
|
+
schema:
|
|
1047
|
+
type: object
|
|
1048
|
+
properties:
|
|
1049
|
+
message:
|
|
1050
|
+
type: string
|
|
1051
|
+
example: "Statement for March 2026 marked as paid and linked to account acc_123456789"
|
|
1052
|
+
'400':
|
|
1053
|
+
description: Invalid input or statement is already paid
|
|
1054
|
+
'401':
|
|
1055
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1056
|
+
'404':
|
|
1057
|
+
description: Credit card not found
|
|
1058
|
+
|
|
1059
|
+
/credit-cards/{id}/reopen-statement:
|
|
1060
|
+
post:
|
|
1061
|
+
summary: Reopen a credit card statement by marking all transactions as unpaid
|
|
1062
|
+
parameters:
|
|
1063
|
+
- name: id
|
|
1064
|
+
in: path
|
|
1065
|
+
required: true
|
|
1066
|
+
schema:
|
|
1067
|
+
type: string
|
|
1068
|
+
description: Credit card ID
|
|
1069
|
+
requestBody:
|
|
1070
|
+
required: true
|
|
1071
|
+
content:
|
|
1072
|
+
application/json:
|
|
1073
|
+
schema:
|
|
1074
|
+
type: object
|
|
1075
|
+
required:
|
|
1076
|
+
- month
|
|
1077
|
+
properties:
|
|
1078
|
+
month:
|
|
1079
|
+
type: string
|
|
1080
|
+
pattern: "^\\d{4}-\\d{2}$"
|
|
1081
|
+
description: Month in YYYY-MM format
|
|
1082
|
+
example: "2026-03"
|
|
1083
|
+
responses:
|
|
1084
|
+
'200':
|
|
1085
|
+
description: Statement reopened successfully
|
|
1086
|
+
content:
|
|
1087
|
+
application/json:
|
|
1088
|
+
schema:
|
|
1089
|
+
type: object
|
|
1090
|
+
properties:
|
|
1091
|
+
message:
|
|
1092
|
+
type: string
|
|
1093
|
+
example: "Statement for 2026-03 successfully reopened. 5 transaction(s) marked as unpaid."
|
|
1094
|
+
'400':
|
|
1095
|
+
description: Invalid input or statement is already open
|
|
1096
|
+
'401':
|
|
1097
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1098
|
+
'404':
|
|
1099
|
+
description: Credit card not found
|
|
1100
|
+
|
|
1101
|
+
/credit-cards/{id}/statement-status:
|
|
1102
|
+
get:
|
|
1103
|
+
summary: Get credit card statement payment status for a specific month
|
|
1104
|
+
parameters:
|
|
1105
|
+
- name: id
|
|
1106
|
+
in: path
|
|
1107
|
+
required: true
|
|
1108
|
+
schema:
|
|
1109
|
+
type: string
|
|
1110
|
+
description: Credit card ID
|
|
1111
|
+
- name: month
|
|
1112
|
+
in: query
|
|
1113
|
+
required: true
|
|
1114
|
+
schema:
|
|
1115
|
+
type: string
|
|
1116
|
+
pattern: "^\\d{4}-\\d{2}$"
|
|
1117
|
+
description: Month in YYYY-MM format
|
|
1118
|
+
example: "2026-03"
|
|
1119
|
+
responses:
|
|
1120
|
+
'200':
|
|
1121
|
+
description: Credit card statement status
|
|
1122
|
+
content:
|
|
1123
|
+
application/json:
|
|
1124
|
+
schema:
|
|
1125
|
+
$ref: '#/components/schemas/StatementStatus'
|
|
1126
|
+
'401':
|
|
1127
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1128
|
+
'404':
|
|
1129
|
+
description: Credit card not found
|
|
1130
|
+
|
|
1131
|
+
/transactions:
|
|
1132
|
+
post:
|
|
1133
|
+
summary: Create a new transaction
|
|
1134
|
+
requestBody:
|
|
1135
|
+
required: true
|
|
1136
|
+
content:
|
|
1137
|
+
application/json:
|
|
1138
|
+
schema:
|
|
1139
|
+
type: object
|
|
1140
|
+
required:
|
|
1141
|
+
- type
|
|
1142
|
+
- name
|
|
1143
|
+
- amount
|
|
1144
|
+
- date
|
|
1145
|
+
properties:
|
|
1146
|
+
type:
|
|
1147
|
+
$ref: '#/components/schemas/Transaction/properties/type'
|
|
1148
|
+
name:
|
|
1149
|
+
$ref: '#/components/schemas/Transaction/properties/name'
|
|
1150
|
+
amount:
|
|
1151
|
+
$ref: '#/components/schemas/Transaction/properties/amount'
|
|
1152
|
+
date:
|
|
1153
|
+
$ref: '#/components/schemas/Transaction/properties/date'
|
|
1154
|
+
categoryId:
|
|
1155
|
+
$ref: '#/components/schemas/Transaction/properties/categoryId'
|
|
1156
|
+
paymentMethod:
|
|
1157
|
+
$ref: '#/components/schemas/Transaction/properties/paymentMethod'
|
|
1158
|
+
creditCardId:
|
|
1159
|
+
$ref: '#/components/schemas/Transaction/properties/creditCardId'
|
|
1160
|
+
accountId:
|
|
1161
|
+
type: string
|
|
1162
|
+
description: ID of the associated account (required if paymentMethod is not CREDIT)
|
|
1163
|
+
example: "acc_123456789"
|
|
1164
|
+
installments:
|
|
1165
|
+
type: integer
|
|
1166
|
+
minimum: 1
|
|
1167
|
+
description: Number of installments (optional)
|
|
1168
|
+
example: 3
|
|
1169
|
+
targetDueMonth:
|
|
1170
|
+
type: string
|
|
1171
|
+
pattern: "^\\d{4}-\\d{2}$"
|
|
1172
|
+
description: Target month for due date in YYYY-MM format (optional)
|
|
1173
|
+
example: "2026-03"
|
|
1174
|
+
purchaseDate:
|
|
1175
|
+
type: string
|
|
1176
|
+
format: date
|
|
1177
|
+
description: Actual purchase date (credit card only, optional)
|
|
1178
|
+
example: "2026-02-10"
|
|
1179
|
+
recurrence:
|
|
1180
|
+
type: object
|
|
1181
|
+
properties:
|
|
1182
|
+
frequency:
|
|
1183
|
+
$ref: '#/components/schemas/RecurrenceRule/properties/frequency'
|
|
1184
|
+
interval:
|
|
1185
|
+
$ref: '#/components/schemas/RecurrenceRule/properties/interval'
|
|
1186
|
+
endDate:
|
|
1187
|
+
$ref: '#/components/schemas/RecurrenceRule/properties/endDate'
|
|
1188
|
+
occurrences:
|
|
1189
|
+
$ref: '#/components/schemas/RecurrenceRule/properties/occurrences'
|
|
1190
|
+
responses:
|
|
1191
|
+
'201':
|
|
1192
|
+
description: Transaction created successfully
|
|
1193
|
+
content:
|
|
1194
|
+
application/json:
|
|
1195
|
+
schema:
|
|
1196
|
+
$ref: '#/components/schemas/Transaction'
|
|
1197
|
+
'400':
|
|
1198
|
+
description: Invalid input or target statement is already closed (paid)
|
|
1199
|
+
'401':
|
|
1200
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1201
|
+
|
|
1202
|
+
get:
|
|
1203
|
+
summary: Get all transactions
|
|
1204
|
+
parameters:
|
|
1205
|
+
- name: month
|
|
1206
|
+
in: query
|
|
1207
|
+
required: false
|
|
1208
|
+
schema:
|
|
1209
|
+
type: string
|
|
1210
|
+
pattern: "^\\d{4}-\\d{2}$"
|
|
1211
|
+
description: Filter transactions by month (YYYY-MM format)
|
|
1212
|
+
example: "2026-03"
|
|
1213
|
+
- name: accountId
|
|
1214
|
+
in: query
|
|
1215
|
+
required: false
|
|
1216
|
+
schema:
|
|
1217
|
+
type: string
|
|
1218
|
+
description: Filter transactions by account ID
|
|
1219
|
+
example: "acc_123456789"
|
|
1220
|
+
- name: categoryId
|
|
1221
|
+
in: query
|
|
1222
|
+
required: false
|
|
1223
|
+
schema:
|
|
1224
|
+
type: string
|
|
1225
|
+
description: Filter transactions by category ID
|
|
1226
|
+
example: "cat_123456789"
|
|
1227
|
+
- name: creditCardId
|
|
1228
|
+
in: query
|
|
1229
|
+
required: false
|
|
1230
|
+
schema:
|
|
1231
|
+
type: string
|
|
1232
|
+
description: Filter transactions by credit card ID
|
|
1233
|
+
example: "cc_123456789"
|
|
1234
|
+
- name: type
|
|
1235
|
+
in: query
|
|
1236
|
+
required: false
|
|
1237
|
+
schema:
|
|
1238
|
+
type: string
|
|
1239
|
+
enum: [INCOME, EXPENSE]
|
|
1240
|
+
description: Filter transactions by type
|
|
1241
|
+
example: "EXPENSE"
|
|
1242
|
+
- name: startDate
|
|
1243
|
+
in: query
|
|
1244
|
+
required: false
|
|
1245
|
+
schema:
|
|
1246
|
+
type: string
|
|
1247
|
+
format: date
|
|
1248
|
+
description: Filter transactions starting from this date (inclusive)
|
|
1249
|
+
example: "2026-01-01"
|
|
1250
|
+
- name: endDate
|
|
1251
|
+
in: query
|
|
1252
|
+
required: false
|
|
1253
|
+
schema:
|
|
1254
|
+
type: string
|
|
1255
|
+
format: date
|
|
1256
|
+
description: Filter transactions up to this date (inclusive)
|
|
1257
|
+
example: "2026-01-31"
|
|
1258
|
+
- name: paid
|
|
1259
|
+
in: query
|
|
1260
|
+
required: false
|
|
1261
|
+
schema:
|
|
1262
|
+
type: boolean
|
|
1263
|
+
description: Filter by payment status (true = paid, false = unpaid)
|
|
1264
|
+
example: false
|
|
1265
|
+
responses:
|
|
1266
|
+
'200':
|
|
1267
|
+
description: List of transactions
|
|
1268
|
+
content:
|
|
1269
|
+
application/json:
|
|
1270
|
+
schema:
|
|
1271
|
+
type: array
|
|
1272
|
+
items:
|
|
1273
|
+
$ref: '#/components/schemas/Transaction'
|
|
1274
|
+
'401':
|
|
1275
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1276
|
+
|
|
1277
|
+
/transactions/{id}/pay:
|
|
1278
|
+
patch:
|
|
1279
|
+
summary: Mark a transaction as paid/received
|
|
1280
|
+
description: |
|
|
1281
|
+
Marks a transaction as paid or received.
|
|
1282
|
+
**Note:** Credit card transactions cannot be marked as paid directly. They are automatically
|
|
1283
|
+
marked as paid when the credit card statement is paid via the `POST /credit-cards/{id}/pay-statement` endpoint.
|
|
1284
|
+
parameters:
|
|
1285
|
+
- name: id
|
|
1286
|
+
in: path
|
|
1287
|
+
required: true
|
|
1288
|
+
schema:
|
|
1289
|
+
type: string
|
|
1290
|
+
description: Transaction ID
|
|
1291
|
+
responses:
|
|
1292
|
+
'200':
|
|
1293
|
+
description: Transaction marked as paid
|
|
1294
|
+
content:
|
|
1295
|
+
application/json:
|
|
1296
|
+
schema:
|
|
1297
|
+
$ref: '#/components/schemas/Transaction'
|
|
1298
|
+
'400':
|
|
1299
|
+
description: Cannot mark credit card transaction as paid directly
|
|
1300
|
+
'401':
|
|
1301
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1302
|
+
'404':
|
|
1303
|
+
description: Transaction not found
|
|
1304
|
+
|
|
1305
|
+
/transactions/{id}/unpay:
|
|
1306
|
+
patch:
|
|
1307
|
+
summary: Mark a transaction as unpaid
|
|
1308
|
+
parameters:
|
|
1309
|
+
- name: id
|
|
1310
|
+
in: path
|
|
1311
|
+
required: true
|
|
1312
|
+
schema:
|
|
1313
|
+
type: string
|
|
1314
|
+
description: Transaction ID
|
|
1315
|
+
responses:
|
|
1316
|
+
'200':
|
|
1317
|
+
description: Transaction marked as unpaid
|
|
1318
|
+
content:
|
|
1319
|
+
application/json:
|
|
1320
|
+
schema:
|
|
1321
|
+
$ref: '#/components/schemas/Transaction'
|
|
1322
|
+
'404':
|
|
1323
|
+
description: Transaction not found
|
|
1324
|
+
'401':
|
|
1325
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1326
|
+
|
|
1327
|
+
/transactions/{id}:
|
|
1328
|
+
get:
|
|
1329
|
+
summary: Get a transaction by ID
|
|
1330
|
+
parameters:
|
|
1331
|
+
- name: id
|
|
1332
|
+
in: path
|
|
1333
|
+
required: true
|
|
1334
|
+
schema:
|
|
1335
|
+
type: string
|
|
1336
|
+
description: Transaction ID
|
|
1337
|
+
responses:
|
|
1338
|
+
'200':
|
|
1339
|
+
description: Transaction found
|
|
1340
|
+
content:
|
|
1341
|
+
application/json:
|
|
1342
|
+
schema:
|
|
1343
|
+
$ref: '#/components/schemas/Transaction'
|
|
1344
|
+
'401':
|
|
1345
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1346
|
+
'404':
|
|
1347
|
+
description: Transaction not found
|
|
1348
|
+
|
|
1349
|
+
patch:
|
|
1350
|
+
summary: Update a transaction
|
|
1351
|
+
description: |
|
|
1352
|
+
Update a transaction.
|
|
1353
|
+
**Note:** Transactions that have already been paid cannot be edited.
|
|
1354
|
+
For credit card transactions, you can use targetDueMonth to automatically calculate the date based on the credit card's due day.
|
|
1355
|
+
|
|
1356
|
+
**Recurring Transactions - Editable Fields by Mode:**
|
|
1357
|
+
- **SINGLE**: Can edit `name`, `categoryId`, `date`, `targetDueMonth`, `amount`
|
|
1358
|
+
- **PENDING/ALL**: Can edit `name`, `categoryId`, `amount`, `paymentMethod`, `accountId`, `creditCardId` (date and type are restricted to prevent desynchronization)
|
|
1359
|
+
|
|
1360
|
+
**Installment Transactions - Editable Fields by Mode:**
|
|
1361
|
+
- **PENDING/ALL**: Only `name`, `categoryId`, and `amount` are propagated to other installments. All other fields are ignored for the bulk update.
|
|
1362
|
+
parameters:
|
|
1363
|
+
- name: id
|
|
1364
|
+
in: path
|
|
1365
|
+
required: true
|
|
1366
|
+
schema:
|
|
1367
|
+
type: string
|
|
1368
|
+
description: Transaction ID
|
|
1369
|
+
- name: mode
|
|
1370
|
+
in: query
|
|
1371
|
+
required: false
|
|
1372
|
+
schema:
|
|
1373
|
+
type: string
|
|
1374
|
+
enum: [SINGLE, PENDING, ALL]
|
|
1375
|
+
default: SINGLE
|
|
1376
|
+
description: |
|
|
1377
|
+
Update mode for recurring or installment transactions:
|
|
1378
|
+
- **SINGLE**: Update only this specific transaction (default)
|
|
1379
|
+
- **PENDING**: Update this transaction and all future unpaid transactions in the same recurrence series or installment group
|
|
1380
|
+
- **ALL**: For recurrences, update all transactions (paid or unpaid). For installments, behaves the same as PENDING (only unpaid installments from this one onward are updated)
|
|
1381
|
+
|
|
1382
|
+
If the transaction is not part of a recurrence series or installment group, this parameter is ignored.
|
|
1383
|
+
example: SINGLE
|
|
1384
|
+
requestBody:
|
|
1385
|
+
required: true
|
|
1386
|
+
content:
|
|
1387
|
+
application/json:
|
|
1388
|
+
schema:
|
|
1389
|
+
$ref: '#/components/schemas/UpdateTransactionRequest'
|
|
1390
|
+
responses:
|
|
1391
|
+
'200':
|
|
1392
|
+
description: Transaction updated successfully
|
|
1393
|
+
content:
|
|
1394
|
+
application/json:
|
|
1395
|
+
schema:
|
|
1396
|
+
$ref: '#/components/schemas/Transaction'
|
|
1397
|
+
'400':
|
|
1398
|
+
description: Invalid input or transaction is already paid
|
|
1399
|
+
'401':
|
|
1400
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1401
|
+
'404':
|
|
1402
|
+
description: Transaction not found
|
|
1403
|
+
|
|
1404
|
+
delete:
|
|
1405
|
+
summary: Delete a transaction
|
|
1406
|
+
parameters:
|
|
1407
|
+
- name: id
|
|
1408
|
+
in: path
|
|
1409
|
+
required: true
|
|
1410
|
+
schema:
|
|
1411
|
+
type: string
|
|
1412
|
+
description: Transaction ID
|
|
1413
|
+
- name: mode
|
|
1414
|
+
in: query
|
|
1415
|
+
required: false
|
|
1416
|
+
schema:
|
|
1417
|
+
type: string
|
|
1418
|
+
enum: [SINGLE, PENDING, ALL]
|
|
1419
|
+
default: SINGLE
|
|
1420
|
+
description: |
|
|
1421
|
+
Deletion mode for recurring or installment transactions:
|
|
1422
|
+
- **SINGLE**: Delete only this specific transaction (default)
|
|
1423
|
+
- **PENDING**: Delete this transaction and all future unpaid transactions in the same recurrence series or installment group
|
|
1424
|
+
- **ALL**: For recurrences, delete all transactions (paid or unpaid). For installments, behaves the same as PENDING (only unpaid installments from this one onward are deleted)
|
|
1425
|
+
|
|
1426
|
+
If the transaction is not part of a recurrence series or installment group, this parameter is ignored.
|
|
1427
|
+
example: SINGLE
|
|
1428
|
+
responses:
|
|
1429
|
+
'200':
|
|
1430
|
+
description: Transaction deleted successfully
|
|
1431
|
+
'401':
|
|
1432
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1433
|
+
'404':
|
|
1434
|
+
description: Transaction not found
|
|
1435
|
+
|
|
1436
|
+
/summary:
|
|
1437
|
+
get:
|
|
1438
|
+
summary: Get financial summary
|
|
1439
|
+
description: >
|
|
1440
|
+
Returns income, expenses, balance, credit card totals, and category breakdowns.
|
|
1441
|
+
Provide either `month` (YYYY-MM) or both `startDate` and `endDate` (YYYY-MM-DD).
|
|
1442
|
+
parameters:
|
|
1443
|
+
- name: month
|
|
1444
|
+
in: query
|
|
1445
|
+
required: false
|
|
1446
|
+
schema:
|
|
1447
|
+
type: string
|
|
1448
|
+
pattern: "^\\d{4}-\\d{2}$"
|
|
1449
|
+
description: Month in YYYY-MM format
|
|
1450
|
+
example: "2026-02"
|
|
1451
|
+
- name: startDate
|
|
1452
|
+
in: query
|
|
1453
|
+
required: false
|
|
1454
|
+
schema:
|
|
1455
|
+
type: string
|
|
1456
|
+
pattern: "^\\d{4}-\\d{2}-\\d{2}$"
|
|
1457
|
+
description: Start date in YYYY-MM-DD format (use with endDate for a custom range)
|
|
1458
|
+
example: "2026-01-01"
|
|
1459
|
+
- name: endDate
|
|
1460
|
+
in: query
|
|
1461
|
+
required: false
|
|
1462
|
+
schema:
|
|
1463
|
+
type: string
|
|
1464
|
+
pattern: "^\\d{4}-\\d{2}-\\d{2}$"
|
|
1465
|
+
description: End date in YYYY-MM-DD format (use with startDate for a custom range)
|
|
1466
|
+
example: "2026-03-31"
|
|
1467
|
+
responses:
|
|
1468
|
+
'200':
|
|
1469
|
+
description: Financial summary for the given period
|
|
1470
|
+
content:
|
|
1471
|
+
application/json:
|
|
1472
|
+
schema:
|
|
1473
|
+
$ref: '#/components/schemas/Summary'
|
|
1474
|
+
'400':
|
|
1475
|
+
description: Invalid or missing period parameters
|
|
1476
|
+
'401':
|
|
1477
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1478
|
+
|
|
1479
|
+
/accounts:
|
|
1480
|
+
post:
|
|
1481
|
+
summary: Create a new account
|
|
1482
|
+
requestBody:
|
|
1483
|
+
required: true
|
|
1484
|
+
content:
|
|
1485
|
+
application/json:
|
|
1486
|
+
schema:
|
|
1487
|
+
type: object
|
|
1488
|
+
required:
|
|
1489
|
+
- name
|
|
1490
|
+
- type
|
|
1491
|
+
properties:
|
|
1492
|
+
name:
|
|
1493
|
+
type: string
|
|
1494
|
+
description: Name of the account
|
|
1495
|
+
example: "Itaú Checking Account"
|
|
1496
|
+
type:
|
|
1497
|
+
type: string
|
|
1498
|
+
enum: [BANK_ACCOUNT, WALLET, SAVINGS_ACCOUNT, INVESTMENT_ACCOUNT, OTHER]
|
|
1499
|
+
description: Type of account
|
|
1500
|
+
example: "BANK_ACCOUNT"
|
|
1501
|
+
initialBalance:
|
|
1502
|
+
type: number
|
|
1503
|
+
format: float
|
|
1504
|
+
description: Initial balance for the account
|
|
1505
|
+
example: 1000.00
|
|
1506
|
+
responses:
|
|
1507
|
+
'201':
|
|
1508
|
+
description: Account created successfully
|
|
1509
|
+
content:
|
|
1510
|
+
application/json:
|
|
1511
|
+
schema:
|
|
1512
|
+
$ref: '#/components/schemas/Account'
|
|
1513
|
+
'400':
|
|
1514
|
+
description: Invalid input
|
|
1515
|
+
'401':
|
|
1516
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1517
|
+
|
|
1518
|
+
get:
|
|
1519
|
+
summary: Get all accounts
|
|
1520
|
+
responses:
|
|
1521
|
+
'200':
|
|
1522
|
+
description: List of accounts with current balances
|
|
1523
|
+
content:
|
|
1524
|
+
application/json:
|
|
1525
|
+
schema:
|
|
1526
|
+
type: array
|
|
1527
|
+
items:
|
|
1528
|
+
$ref: '#/components/schemas/Account'
|
|
1529
|
+
'401':
|
|
1530
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1531
|
+
|
|
1532
|
+
/accounts/{id}:
|
|
1533
|
+
get:
|
|
1534
|
+
summary: Get a specific account
|
|
1535
|
+
parameters:
|
|
1536
|
+
- name: id
|
|
1537
|
+
in: path
|
|
1538
|
+
required: true
|
|
1539
|
+
schema:
|
|
1540
|
+
type: string
|
|
1541
|
+
description: Account ID
|
|
1542
|
+
responses:
|
|
1543
|
+
'200':
|
|
1544
|
+
description: Account details
|
|
1545
|
+
content:
|
|
1546
|
+
application/json:
|
|
1547
|
+
schema:
|
|
1548
|
+
$ref: '#/components/schemas/Account'
|
|
1549
|
+
'401':
|
|
1550
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1551
|
+
'404':
|
|
1552
|
+
description: Account not found
|
|
1553
|
+
|
|
1554
|
+
patch:
|
|
1555
|
+
summary: Update an account
|
|
1556
|
+
parameters:
|
|
1557
|
+
- name: id
|
|
1558
|
+
in: path
|
|
1559
|
+
required: true
|
|
1560
|
+
schema:
|
|
1561
|
+
type: string
|
|
1562
|
+
description: Account ID
|
|
1563
|
+
requestBody:
|
|
1564
|
+
required: true
|
|
1565
|
+
content:
|
|
1566
|
+
application/json:
|
|
1567
|
+
schema:
|
|
1568
|
+
type: object
|
|
1569
|
+
properties:
|
|
1570
|
+
name:
|
|
1571
|
+
type: string
|
|
1572
|
+
description: Name of the account
|
|
1573
|
+
example: "Itaú Savings Account"
|
|
1574
|
+
type:
|
|
1575
|
+
type: string
|
|
1576
|
+
enum: [BANK_ACCOUNT, WALLET, SAVINGS_ACCOUNT, INVESTMENT_ACCOUNT, OTHER]
|
|
1577
|
+
description: Type of account
|
|
1578
|
+
example: "SAVINGS_ACCOUNT"
|
|
1579
|
+
responses:
|
|
1580
|
+
'200':
|
|
1581
|
+
description: Account updated successfully
|
|
1582
|
+
content:
|
|
1583
|
+
application/json:
|
|
1584
|
+
schema:
|
|
1585
|
+
$ref: '#/components/schemas/Account'
|
|
1586
|
+
'400':
|
|
1587
|
+
description: Invalid input
|
|
1588
|
+
'401':
|
|
1589
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1590
|
+
'404':
|
|
1591
|
+
description: Account not found
|
|
1592
|
+
|
|
1593
|
+
delete:
|
|
1594
|
+
summary: Delete an account
|
|
1595
|
+
parameters:
|
|
1596
|
+
- name: id
|
|
1597
|
+
in: path
|
|
1598
|
+
required: true
|
|
1599
|
+
schema:
|
|
1600
|
+
type: string
|
|
1601
|
+
description: Account ID
|
|
1602
|
+
responses:
|
|
1603
|
+
'204':
|
|
1604
|
+
description: Account deleted successfully
|
|
1605
|
+
'401':
|
|
1606
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1607
|
+
'404':
|
|
1608
|
+
description: Account not found
|
|
1609
|
+
'409':
|
|
1610
|
+
description: Cannot delete account with associated transactions
|
|
1611
|
+
|
|
1612
|
+
/accounts/{id}/balance:
|
|
1613
|
+
get:
|
|
1614
|
+
summary: Get the current balance for an account
|
|
1615
|
+
parameters:
|
|
1616
|
+
- name: id
|
|
1617
|
+
in: path
|
|
1618
|
+
required: true
|
|
1619
|
+
schema:
|
|
1620
|
+
type: string
|
|
1621
|
+
description: Account ID
|
|
1622
|
+
responses:
|
|
1623
|
+
'200':
|
|
1624
|
+
description: Account balance
|
|
1625
|
+
content:
|
|
1626
|
+
application/json:
|
|
1627
|
+
schema:
|
|
1628
|
+
$ref: '#/components/schemas/AccountBalance'
|
|
1629
|
+
'401':
|
|
1630
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1631
|
+
'404':
|
|
1632
|
+
description: Account not found
|
|
1633
|
+
|
|
1634
|
+
/accounts/{id}/transactions:
|
|
1635
|
+
get:
|
|
1636
|
+
summary: Get all transactions linked to an account
|
|
1637
|
+
parameters:
|
|
1638
|
+
- name: id
|
|
1639
|
+
in: path
|
|
1640
|
+
required: true
|
|
1641
|
+
schema:
|
|
1642
|
+
type: string
|
|
1643
|
+
description: Account ID
|
|
1644
|
+
responses:
|
|
1645
|
+
'200':
|
|
1646
|
+
description: List of transactions linked to the account
|
|
1647
|
+
content:
|
|
1648
|
+
application/json:
|
|
1649
|
+
schema:
|
|
1650
|
+
type: array
|
|
1651
|
+
items:
|
|
1652
|
+
$ref: '#/components/schemas/Transaction'
|
|
1653
|
+
'401':
|
|
1654
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1655
|
+
'404':
|
|
1656
|
+
description: Account not found
|
|
1657
|
+
|
|
1658
|
+
/export:
|
|
1659
|
+
get:
|
|
1660
|
+
summary: Export all user data
|
|
1661
|
+
description: Returns a complete backup of all user data including settings, categories, accounts, credit cards, recurrence rules, and transactions.
|
|
1662
|
+
security:
|
|
1663
|
+
- ApiKeyAuth: []
|
|
1664
|
+
responses:
|
|
1665
|
+
'200':
|
|
1666
|
+
description: Export payload with all data
|
|
1667
|
+
content:
|
|
1668
|
+
application/json:
|
|
1669
|
+
schema:
|
|
1670
|
+
type: object
|
|
1671
|
+
properties:
|
|
1672
|
+
version:
|
|
1673
|
+
type: string
|
|
1674
|
+
example: "1.0"
|
|
1675
|
+
exportedAt:
|
|
1676
|
+
type: string
|
|
1677
|
+
format: date-time
|
|
1678
|
+
example: "2026-02-14T21:00:00.000Z"
|
|
1679
|
+
data:
|
|
1680
|
+
type: object
|
|
1681
|
+
properties:
|
|
1682
|
+
settings:
|
|
1683
|
+
nullable: true
|
|
1684
|
+
$ref: '#/components/schemas/Settings'
|
|
1685
|
+
categories:
|
|
1686
|
+
type: array
|
|
1687
|
+
items:
|
|
1688
|
+
$ref: '#/components/schemas/Category'
|
|
1689
|
+
accounts:
|
|
1690
|
+
type: array
|
|
1691
|
+
items:
|
|
1692
|
+
$ref: '#/components/schemas/Account'
|
|
1693
|
+
creditCards:
|
|
1694
|
+
type: array
|
|
1695
|
+
items:
|
|
1696
|
+
$ref: '#/components/schemas/CreditCard'
|
|
1697
|
+
recurrenceRules:
|
|
1698
|
+
type: array
|
|
1699
|
+
items:
|
|
1700
|
+
$ref: '#/components/schemas/RecurrenceRule'
|
|
1701
|
+
transactions:
|
|
1702
|
+
type: array
|
|
1703
|
+
items:
|
|
1704
|
+
$ref: '#/components/schemas/Transaction'
|
|
1705
|
+
'401':
|
|
1706
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1707
|
+
|
|
1708
|
+
/import:
|
|
1709
|
+
post:
|
|
1710
|
+
summary: Import user data
|
|
1711
|
+
description: |
|
|
1712
|
+
Imports a previously exported backup. Supports two modes:
|
|
1713
|
+
- **reset**: Clears all existing data and replaces it with the imported data.
|
|
1714
|
+
- **increment**: Adds new records from the import, ignoring records whose IDs already exist.
|
|
1715
|
+
security:
|
|
1716
|
+
- ApiKeyAuth: []
|
|
1717
|
+
requestBody:
|
|
1718
|
+
required: true
|
|
1719
|
+
content:
|
|
1720
|
+
application/json:
|
|
1721
|
+
schema:
|
|
1722
|
+
type: object
|
|
1723
|
+
required:
|
|
1724
|
+
- mode
|
|
1725
|
+
- version
|
|
1726
|
+
- exportedAt
|
|
1727
|
+
- data
|
|
1728
|
+
properties:
|
|
1729
|
+
mode:
|
|
1730
|
+
type: string
|
|
1731
|
+
enum: [reset, increment]
|
|
1732
|
+
description: Import mode
|
|
1733
|
+
example: "reset"
|
|
1734
|
+
version:
|
|
1735
|
+
type: string
|
|
1736
|
+
description: Export format version. Must be "1.0".
|
|
1737
|
+
example: "1.0"
|
|
1738
|
+
exportedAt:
|
|
1739
|
+
type: string
|
|
1740
|
+
format: date-time
|
|
1741
|
+
example: "2026-02-14T21:00:00.000Z"
|
|
1742
|
+
data:
|
|
1743
|
+
type: object
|
|
1744
|
+
properties:
|
|
1745
|
+
settings:
|
|
1746
|
+
nullable: true
|
|
1747
|
+
$ref: '#/components/schemas/Settings'
|
|
1748
|
+
categories:
|
|
1749
|
+
type: array
|
|
1750
|
+
items:
|
|
1751
|
+
$ref: '#/components/schemas/Category'
|
|
1752
|
+
accounts:
|
|
1753
|
+
type: array
|
|
1754
|
+
items:
|
|
1755
|
+
$ref: '#/components/schemas/Account'
|
|
1756
|
+
creditCards:
|
|
1757
|
+
type: array
|
|
1758
|
+
items:
|
|
1759
|
+
$ref: '#/components/schemas/CreditCard'
|
|
1760
|
+
recurrenceRules:
|
|
1761
|
+
type: array
|
|
1762
|
+
items:
|
|
1763
|
+
$ref: '#/components/schemas/RecurrenceRule'
|
|
1764
|
+
transactions:
|
|
1765
|
+
type: array
|
|
1766
|
+
items:
|
|
1767
|
+
$ref: '#/components/schemas/Transaction'
|
|
1768
|
+
responses:
|
|
1769
|
+
'200':
|
|
1770
|
+
description: Import completed successfully
|
|
1771
|
+
content:
|
|
1772
|
+
application/json:
|
|
1773
|
+
schema:
|
|
1774
|
+
type: object
|
|
1775
|
+
properties:
|
|
1776
|
+
message:
|
|
1777
|
+
type: string
|
|
1778
|
+
example: "Import completed successfully (mode: reset)"
|
|
1779
|
+
'400':
|
|
1780
|
+
description: Invalid input or unsupported version
|
|
1781
|
+
'401':
|
|
1782
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1783
|
+
|
|
1784
|
+
/settings:
|
|
1785
|
+
post:
|
|
1786
|
+
summary: Create global settings (only if not exists)
|
|
1787
|
+
requestBody:
|
|
1788
|
+
required: true
|
|
1789
|
+
content:
|
|
1790
|
+
application/json:
|
|
1791
|
+
schema:
|
|
1792
|
+
type: object
|
|
1793
|
+
required:
|
|
1794
|
+
- userName
|
|
1795
|
+
- language
|
|
1796
|
+
- currency
|
|
1797
|
+
properties:
|
|
1798
|
+
userName:
|
|
1799
|
+
type: string
|
|
1800
|
+
example: "John Doe"
|
|
1801
|
+
language:
|
|
1802
|
+
type: string
|
|
1803
|
+
enum: [pt-BR, en-US]
|
|
1804
|
+
example: "pt-BR"
|
|
1805
|
+
currency:
|
|
1806
|
+
type: string
|
|
1807
|
+
enum: [BRL, USD, EUR, GBP, JPY, CAD, AUD, CHF]
|
|
1808
|
+
example: "BRL"
|
|
1809
|
+
responses:
|
|
1810
|
+
'201':
|
|
1811
|
+
description: Settings created successfully
|
|
1812
|
+
content:
|
|
1813
|
+
application/json:
|
|
1814
|
+
schema:
|
|
1815
|
+
$ref: '#/components/schemas/Settings'
|
|
1816
|
+
'400':
|
|
1817
|
+
description: Invalid input
|
|
1818
|
+
'401':
|
|
1819
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1820
|
+
'409':
|
|
1821
|
+
description: Settings already exist
|
|
1822
|
+
|
|
1823
|
+
get:
|
|
1824
|
+
summary: Get global settings
|
|
1825
|
+
responses:
|
|
1826
|
+
'200':
|
|
1827
|
+
description: Settings retrieved successfully
|
|
1828
|
+
content:
|
|
1829
|
+
application/json:
|
|
1830
|
+
schema:
|
|
1831
|
+
$ref: '#/components/schemas/Settings'
|
|
1832
|
+
'401':
|
|
1833
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1834
|
+
'404':
|
|
1835
|
+
description: Settings not found
|
|
1836
|
+
|
|
1837
|
+
put:
|
|
1838
|
+
summary: Update global settings
|
|
1839
|
+
requestBody:
|
|
1840
|
+
required: true
|
|
1841
|
+
content:
|
|
1842
|
+
application/json:
|
|
1843
|
+
schema:
|
|
1844
|
+
type: object
|
|
1845
|
+
properties:
|
|
1846
|
+
userName:
|
|
1847
|
+
type: string
|
|
1848
|
+
example: "John Doe"
|
|
1849
|
+
language:
|
|
1850
|
+
type: string
|
|
1851
|
+
enum: [pt-BR, en-US]
|
|
1852
|
+
example: "pt-BR"
|
|
1853
|
+
currency:
|
|
1854
|
+
type: string
|
|
1855
|
+
enum: [BRL, USD, EUR, GBP, JPY, CAD, AUD, CHF]
|
|
1856
|
+
example: "BRL"
|
|
1857
|
+
responses:
|
|
1858
|
+
'200':
|
|
1859
|
+
description: Settings updated successfully
|
|
1860
|
+
content:
|
|
1861
|
+
application/json:
|
|
1862
|
+
schema:
|
|
1863
|
+
$ref: '#/components/schemas/Settings'
|
|
1864
|
+
'400':
|
|
1865
|
+
description: Invalid input
|
|
1866
|
+
'401':
|
|
1867
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1868
|
+
'404':
|
|
1869
|
+
description: Settings not found
|
|
1870
|
+
|
|
1871
|
+
/transfers:
|
|
1872
|
+
post:
|
|
1873
|
+
tags:
|
|
1874
|
+
- transfers
|
|
1875
|
+
summary: Create a new transfer between accounts
|
|
1876
|
+
security:
|
|
1877
|
+
- ApiKeyAuth: []
|
|
1878
|
+
requestBody:
|
|
1879
|
+
required: true
|
|
1880
|
+
content:
|
|
1881
|
+
application/json:
|
|
1882
|
+
schema:
|
|
1883
|
+
type: object
|
|
1884
|
+
required:
|
|
1885
|
+
- sourceAccountId
|
|
1886
|
+
- destinationAccountId
|
|
1887
|
+
- amount
|
|
1888
|
+
- date
|
|
1889
|
+
properties:
|
|
1890
|
+
sourceAccountId:
|
|
1891
|
+
type: string
|
|
1892
|
+
destinationAccountId:
|
|
1893
|
+
type: string
|
|
1894
|
+
amount:
|
|
1895
|
+
type: number
|
|
1896
|
+
minimum: 0.01
|
|
1897
|
+
date:
|
|
1898
|
+
type: string
|
|
1899
|
+
format: date
|
|
1900
|
+
responses:
|
|
1901
|
+
'201':
|
|
1902
|
+
description: Transfer created successfully
|
|
1903
|
+
content:
|
|
1904
|
+
application/json:
|
|
1905
|
+
schema:
|
|
1906
|
+
$ref: '#/components/schemas/Transfer'
|
|
1907
|
+
'400':
|
|
1908
|
+
description: Invalid input
|
|
1909
|
+
'401':
|
|
1910
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1911
|
+
'404':
|
|
1912
|
+
description: Account not found
|
|
1913
|
+
get:
|
|
1914
|
+
tags:
|
|
1915
|
+
- transfers
|
|
1916
|
+
summary: List transfers with optional filters
|
|
1917
|
+
security:
|
|
1918
|
+
- ApiKeyAuth: []
|
|
1919
|
+
parameters:
|
|
1920
|
+
- name: accountId
|
|
1921
|
+
in: query
|
|
1922
|
+
required: false
|
|
1923
|
+
description: Filter by account ID (source or destination)
|
|
1924
|
+
schema:
|
|
1925
|
+
type: string
|
|
1926
|
+
- name: month
|
|
1927
|
+
in: query
|
|
1928
|
+
required: false
|
|
1929
|
+
description: Filter by month (YYYY-MM format)
|
|
1930
|
+
schema:
|
|
1931
|
+
type: string
|
|
1932
|
+
pattern: '^\d{4}-\d{2}$'
|
|
1933
|
+
example: "2026-02"
|
|
1934
|
+
- name: startDate
|
|
1935
|
+
in: query
|
|
1936
|
+
required: false
|
|
1937
|
+
description: Filter from date (YYYY-MM-DD)
|
|
1938
|
+
schema:
|
|
1939
|
+
type: string
|
|
1940
|
+
format: date
|
|
1941
|
+
- name: endDate
|
|
1942
|
+
in: query
|
|
1943
|
+
required: false
|
|
1944
|
+
description: Filter to date (YYYY-MM-DD)
|
|
1945
|
+
schema:
|
|
1946
|
+
type: string
|
|
1947
|
+
format: date
|
|
1948
|
+
responses:
|
|
1949
|
+
'200':
|
|
1950
|
+
description: List of transfers
|
|
1951
|
+
content:
|
|
1952
|
+
application/json:
|
|
1953
|
+
schema:
|
|
1954
|
+
type: array
|
|
1955
|
+
items:
|
|
1956
|
+
$ref: '#/components/schemas/Transfer'
|
|
1957
|
+
'401':
|
|
1958
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1959
|
+
|
|
1960
|
+
/transfers/{id}:
|
|
1961
|
+
get:
|
|
1962
|
+
tags:
|
|
1963
|
+
- transfers
|
|
1964
|
+
summary: Get a transfer by ID
|
|
1965
|
+
security:
|
|
1966
|
+
- ApiKeyAuth: []
|
|
1967
|
+
parameters:
|
|
1968
|
+
- name: id
|
|
1969
|
+
in: path
|
|
1970
|
+
required: true
|
|
1971
|
+
schema:
|
|
1972
|
+
type: string
|
|
1973
|
+
responses:
|
|
1974
|
+
'200':
|
|
1975
|
+
description: Transfer retrieved successfully
|
|
1976
|
+
content:
|
|
1977
|
+
application/json:
|
|
1978
|
+
schema:
|
|
1979
|
+
$ref: '#/components/schemas/Transfer'
|
|
1980
|
+
'401':
|
|
1981
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
1982
|
+
'404':
|
|
1983
|
+
description: Transfer not found
|
|
1984
|
+
patch:
|
|
1985
|
+
tags:
|
|
1986
|
+
- transfers
|
|
1987
|
+
summary: Update a transfer
|
|
1988
|
+
security:
|
|
1989
|
+
- ApiKeyAuth: []
|
|
1990
|
+
parameters:
|
|
1991
|
+
- name: id
|
|
1992
|
+
in: path
|
|
1993
|
+
required: true
|
|
1994
|
+
schema:
|
|
1995
|
+
type: string
|
|
1996
|
+
requestBody:
|
|
1997
|
+
required: true
|
|
1998
|
+
content:
|
|
1999
|
+
application/json:
|
|
2000
|
+
schema:
|
|
2001
|
+
type: object
|
|
2002
|
+
properties:
|
|
2003
|
+
sourceAccountId:
|
|
2004
|
+
type: string
|
|
2005
|
+
destinationAccountId:
|
|
2006
|
+
type: string
|
|
2007
|
+
amount:
|
|
2008
|
+
type: number
|
|
2009
|
+
minimum: 0.01
|
|
2010
|
+
date:
|
|
2011
|
+
type: string
|
|
2012
|
+
format: date
|
|
2013
|
+
responses:
|
|
2014
|
+
'200':
|
|
2015
|
+
description: Transfer updated successfully
|
|
2016
|
+
content:
|
|
2017
|
+
application/json:
|
|
2018
|
+
schema:
|
|
2019
|
+
$ref: '#/components/schemas/Transfer'
|
|
2020
|
+
'400':
|
|
2021
|
+
description: Invalid input
|
|
2022
|
+
'401':
|
|
2023
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
2024
|
+
'404':
|
|
2025
|
+
description: Transfer not found
|
|
2026
|
+
delete:
|
|
2027
|
+
tags:
|
|
2028
|
+
- transfers
|
|
2029
|
+
summary: Delete a transfer
|
|
2030
|
+
security:
|
|
2031
|
+
- ApiKeyAuth: []
|
|
2032
|
+
parameters:
|
|
2033
|
+
- name: id
|
|
2034
|
+
in: path
|
|
2035
|
+
required: true
|
|
2036
|
+
schema:
|
|
2037
|
+
type: string
|
|
2038
|
+
responses:
|
|
2039
|
+
'204':
|
|
2040
|
+
description: Transfer deleted successfully
|
|
2041
|
+
'401':
|
|
2042
|
+
$ref: '#/components/responses/UnauthorizedError'
|
|
2043
|
+
'404':
|
|
2044
|
+
description: Transfer not found
|
|
2045
|
+
|