quantix-mcp 0.3.9 → 0.4.3
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/.claude/settings.local.json +2 -1
- package/CLAUDE.md +6 -0
- package/GEMINI.md +58 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/tools/accounts.d.ts.map +1 -1
- package/dist/tools/accounts.js +0 -15
- package/dist/tools/accounts.js.map +1 -1
- package/dist/tools/credit-cards.d.ts.map +1 -1
- package/dist/tools/credit-cards.js +16 -1
- package/dist/tools/credit-cards.js.map +1 -1
- package/dist/tools/subscriptions.d.ts +3 -0
- package/dist/tools/subscriptions.d.ts.map +1 -0
- package/dist/tools/subscriptions.js +128 -0
- package/dist/tools/subscriptions.js.map +1 -0
- package/dist/tools/transactions.d.ts.map +1 -1
- package/dist/tools/transactions.js +4 -5
- package/dist/tools/transactions.js.map +1 -1
- package/dist/types/schemas.d.ts +40 -0
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +41 -1
- package/dist/types/schemas.js.map +1 -1
- package/openapi.yaml +1877 -1643
- package/package.json +1 -1
- package/src/index.ts +13 -2
- package/src/tools/accounts.ts +0 -18
- package/src/tools/credit-cards.ts +20 -1
- package/src/tools/subscriptions.ts +159 -0
- package/src/tools/transactions.ts +4 -5
- package/src/types/schemas.ts +45 -1
- package/tests/tools/subscriptions.test.ts +173 -0
package/openapi.yaml
CHANGED
|
@@ -1,1950 +1,1044 @@
|
|
|
1
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
2
|
paths:
|
|
3
|
+
/:
|
|
4
|
+
get:
|
|
5
|
+
operationId: getHello
|
|
6
|
+
parameters: []
|
|
7
|
+
responses:
|
|
8
|
+
'200':
|
|
9
|
+
description: ''
|
|
10
|
+
tags:
|
|
11
|
+
- App
|
|
700
12
|
/categories:
|
|
701
13
|
post:
|
|
702
|
-
|
|
14
|
+
operationId: create
|
|
15
|
+
parameters:
|
|
16
|
+
- &ref_0
|
|
17
|
+
name: x-api-key
|
|
18
|
+
in: header
|
|
19
|
+
required: false
|
|
20
|
+
schema:
|
|
21
|
+
type: string
|
|
703
22
|
requestBody:
|
|
704
23
|
required: true
|
|
705
24
|
content:
|
|
706
25
|
application/json:
|
|
707
26
|
schema:
|
|
708
|
-
|
|
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"
|
|
27
|
+
$ref: '#/components/schemas/CreateCategoryDto'
|
|
726
28
|
responses:
|
|
727
29
|
'201':
|
|
728
|
-
description: Category created successfully
|
|
729
|
-
content:
|
|
730
|
-
application/json:
|
|
731
|
-
schema:
|
|
732
|
-
$ref: '#/components/schemas/Category'
|
|
30
|
+
description: Category created successfully.
|
|
733
31
|
'400':
|
|
734
|
-
description: Invalid input
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
32
|
+
description: Invalid input.
|
|
33
|
+
security: &ref_1
|
|
34
|
+
- bearer: []
|
|
35
|
+
summary: Create a new category
|
|
36
|
+
tags: &ref_2
|
|
37
|
+
- categories
|
|
738
38
|
get:
|
|
739
|
-
|
|
39
|
+
operationId: findAll
|
|
40
|
+
parameters:
|
|
41
|
+
- *ref_0
|
|
740
42
|
responses:
|
|
741
43
|
'200':
|
|
742
|
-
description: List of categories
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
type: array
|
|
747
|
-
items:
|
|
748
|
-
$ref: '#/components/schemas/Category'
|
|
749
|
-
'401':
|
|
750
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
751
|
-
|
|
44
|
+
description: List of categories.
|
|
45
|
+
security: *ref_1
|
|
46
|
+
summary: Get all categories
|
|
47
|
+
tags: *ref_2
|
|
752
48
|
/categories/{id}:
|
|
753
49
|
get:
|
|
50
|
+
operationId: findOne
|
|
51
|
+
parameters:
|
|
52
|
+
- *ref_0
|
|
53
|
+
- name: id
|
|
54
|
+
required: true
|
|
55
|
+
in: path
|
|
56
|
+
schema:
|
|
57
|
+
type: string
|
|
58
|
+
responses:
|
|
59
|
+
'200':
|
|
60
|
+
description: Category found.
|
|
61
|
+
'404':
|
|
62
|
+
description: Category not found.
|
|
63
|
+
security: *ref_1
|
|
754
64
|
summary: Get a category by ID
|
|
65
|
+
tags: *ref_2
|
|
66
|
+
patch:
|
|
67
|
+
operationId: update
|
|
755
68
|
parameters:
|
|
69
|
+
- *ref_0
|
|
756
70
|
- name: id
|
|
71
|
+
required: true
|
|
757
72
|
in: path
|
|
73
|
+
schema:
|
|
74
|
+
type: string
|
|
75
|
+
requestBody:
|
|
76
|
+
required: true
|
|
77
|
+
content:
|
|
78
|
+
application/json:
|
|
79
|
+
schema:
|
|
80
|
+
$ref: '#/components/schemas/UpdateCategoryDto'
|
|
81
|
+
responses:
|
|
82
|
+
'200':
|
|
83
|
+
description: Category updated successfully.
|
|
84
|
+
'404':
|
|
85
|
+
description: Category not found.
|
|
86
|
+
security: *ref_1
|
|
87
|
+
summary: Update a category
|
|
88
|
+
tags: *ref_2
|
|
89
|
+
delete:
|
|
90
|
+
operationId: remove
|
|
91
|
+
parameters:
|
|
92
|
+
- *ref_0
|
|
93
|
+
- name: id
|
|
94
|
+
required: true
|
|
95
|
+
in: path
|
|
96
|
+
schema:
|
|
97
|
+
type: string
|
|
98
|
+
responses:
|
|
99
|
+
'200':
|
|
100
|
+
description: Category deleted successfully.
|
|
101
|
+
'404':
|
|
102
|
+
description: Category not found.
|
|
103
|
+
security: *ref_1
|
|
104
|
+
summary: Delete a category
|
|
105
|
+
tags: *ref_2
|
|
106
|
+
/auth/register:
|
|
107
|
+
post:
|
|
108
|
+
operationId: register
|
|
109
|
+
parameters: []
|
|
110
|
+
requestBody:
|
|
111
|
+
required: true
|
|
112
|
+
content:
|
|
113
|
+
application/json:
|
|
114
|
+
schema:
|
|
115
|
+
$ref: '#/components/schemas/RegisterDto'
|
|
116
|
+
responses:
|
|
117
|
+
'201':
|
|
118
|
+
description: User successfully registered
|
|
119
|
+
'409':
|
|
120
|
+
description: Email already exists
|
|
121
|
+
summary: Register a new user
|
|
122
|
+
tags: &ref_3
|
|
123
|
+
- auth
|
|
124
|
+
/auth/login:
|
|
125
|
+
post:
|
|
126
|
+
operationId: login
|
|
127
|
+
parameters:
|
|
128
|
+
- name: user-agent
|
|
758
129
|
required: true
|
|
130
|
+
in: header
|
|
759
131
|
schema:
|
|
760
132
|
type: string
|
|
761
|
-
|
|
133
|
+
requestBody:
|
|
134
|
+
required: true
|
|
135
|
+
content:
|
|
136
|
+
application/json:
|
|
137
|
+
schema:
|
|
138
|
+
$ref: '#/components/schemas/LoginDto'
|
|
139
|
+
responses:
|
|
140
|
+
'200':
|
|
141
|
+
description: Login successful, returns JWT
|
|
142
|
+
'401':
|
|
143
|
+
description: Invalid credentials
|
|
144
|
+
summary: Login with email and password
|
|
145
|
+
tags: *ref_3
|
|
146
|
+
/auth/refresh:
|
|
147
|
+
post:
|
|
148
|
+
operationId: refresh
|
|
149
|
+
parameters: []
|
|
150
|
+
responses:
|
|
151
|
+
'200':
|
|
152
|
+
description: Token refreshed successfully
|
|
153
|
+
'401':
|
|
154
|
+
description: Invalid refresh token
|
|
155
|
+
summary: Refresh access token using refresh token cookie
|
|
156
|
+
tags: *ref_3
|
|
157
|
+
/auth/logout:
|
|
158
|
+
post:
|
|
159
|
+
operationId: logout
|
|
160
|
+
parameters: []
|
|
161
|
+
responses:
|
|
162
|
+
'200':
|
|
163
|
+
description: Logout successful
|
|
164
|
+
security:
|
|
165
|
+
- bearer: []
|
|
166
|
+
summary: Logout and invalidate session
|
|
167
|
+
tags: *ref_3
|
|
168
|
+
/auth/change-password:
|
|
169
|
+
post:
|
|
170
|
+
operationId: changePassword
|
|
171
|
+
parameters: []
|
|
172
|
+
requestBody:
|
|
173
|
+
required: true
|
|
174
|
+
content:
|
|
175
|
+
application/json:
|
|
176
|
+
schema:
|
|
177
|
+
$ref: '#/components/schemas/ChangePasswordDto'
|
|
178
|
+
responses:
|
|
179
|
+
'200':
|
|
180
|
+
description: Password changed successfully
|
|
181
|
+
'401':
|
|
182
|
+
description: Current password incorrect
|
|
183
|
+
security:
|
|
184
|
+
- bearer: []
|
|
185
|
+
summary: Change authenticated user password
|
|
186
|
+
tags: *ref_3
|
|
187
|
+
/auth/forgot-password:
|
|
188
|
+
post:
|
|
189
|
+
operationId: forgotPassword
|
|
190
|
+
parameters: []
|
|
191
|
+
requestBody:
|
|
192
|
+
required: true
|
|
193
|
+
content:
|
|
194
|
+
application/json:
|
|
195
|
+
schema:
|
|
196
|
+
$ref: '#/components/schemas/ForgotPasswordDto'
|
|
762
197
|
responses:
|
|
763
198
|
'200':
|
|
764
|
-
description:
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
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
|
|
199
|
+
description: If email exists, a reset link will be sent
|
|
200
|
+
summary: Request a password reset link
|
|
201
|
+
tags: *ref_3
|
|
202
|
+
/auth/reset-password:
|
|
203
|
+
post:
|
|
204
|
+
operationId: resetPassword
|
|
205
|
+
parameters: []
|
|
783
206
|
requestBody:
|
|
784
207
|
required: true
|
|
785
208
|
content:
|
|
786
209
|
application/json:
|
|
787
210
|
schema:
|
|
788
|
-
|
|
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"
|
|
211
|
+
$ref: '#/components/schemas/ResetPasswordDto'
|
|
799
212
|
responses:
|
|
800
213
|
'200':
|
|
801
|
-
description:
|
|
802
|
-
content:
|
|
803
|
-
application/json:
|
|
804
|
-
schema:
|
|
805
|
-
$ref: '#/components/schemas/Category'
|
|
214
|
+
description: Password reset successfully
|
|
806
215
|
'400':
|
|
807
|
-
description: Invalid
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
216
|
+
description: Invalid or expired token
|
|
217
|
+
summary: Reset password using token
|
|
218
|
+
tags: *ref_3
|
|
219
|
+
/auth/sessions:
|
|
220
|
+
get:
|
|
221
|
+
operationId: getSessions
|
|
222
|
+
parameters: []
|
|
223
|
+
responses:
|
|
224
|
+
'200':
|
|
225
|
+
description: Returns list of sessions
|
|
226
|
+
security:
|
|
227
|
+
- bearer: []
|
|
228
|
+
summary: List active sessions for current user
|
|
229
|
+
tags: *ref_3
|
|
813
230
|
delete:
|
|
814
|
-
|
|
231
|
+
operationId: revokeAllOtherSessions
|
|
232
|
+
parameters: []
|
|
233
|
+
responses:
|
|
234
|
+
'200':
|
|
235
|
+
description: Other sessions revoked successfully
|
|
236
|
+
security:
|
|
237
|
+
- bearer: []
|
|
238
|
+
summary: Revoke all other sessions
|
|
239
|
+
tags: *ref_3
|
|
240
|
+
/auth/sessions/{id}:
|
|
241
|
+
delete:
|
|
242
|
+
operationId: revokeSession
|
|
815
243
|
parameters:
|
|
816
244
|
- name: id
|
|
817
|
-
in: path
|
|
818
245
|
required: true
|
|
246
|
+
in: path
|
|
819
247
|
schema:
|
|
820
248
|
type: string
|
|
821
|
-
description: Category ID
|
|
822
249
|
responses:
|
|
823
250
|
'200':
|
|
824
|
-
description:
|
|
251
|
+
description: Session revoked successfully
|
|
252
|
+
security:
|
|
253
|
+
- bearer: []
|
|
254
|
+
summary: Revoke a specific session
|
|
255
|
+
tags: *ref_3
|
|
256
|
+
/auth/me:
|
|
257
|
+
get:
|
|
258
|
+
operationId: getProfile
|
|
259
|
+
parameters: []
|
|
260
|
+
responses:
|
|
261
|
+
'200':
|
|
262
|
+
description: Returns user profile
|
|
825
263
|
'401':
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
264
|
+
description: Unauthorized
|
|
265
|
+
security:
|
|
266
|
+
- bearer: []
|
|
267
|
+
summary: Get current user profile
|
|
268
|
+
tags: *ref_3
|
|
269
|
+
/transactions:
|
|
831
270
|
post:
|
|
832
|
-
|
|
271
|
+
operationId: create
|
|
272
|
+
parameters:
|
|
273
|
+
- &ref_4
|
|
274
|
+
name: x-api-key
|
|
275
|
+
in: header
|
|
276
|
+
required: false
|
|
277
|
+
schema:
|
|
278
|
+
type: string
|
|
833
279
|
requestBody:
|
|
834
280
|
required: true
|
|
835
281
|
content:
|
|
836
282
|
application/json:
|
|
837
283
|
schema:
|
|
838
|
-
|
|
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
|
|
284
|
+
$ref: '#/components/schemas/CreateTransactionDto'
|
|
865
285
|
responses:
|
|
866
286
|
'201':
|
|
867
|
-
description:
|
|
868
|
-
content:
|
|
869
|
-
application/json:
|
|
870
|
-
schema:
|
|
871
|
-
$ref: '#/components/schemas/CreditCard'
|
|
287
|
+
description: Transaction created successfully.
|
|
872
288
|
'400':
|
|
873
|
-
description: Invalid input
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
289
|
+
description: Invalid input.
|
|
290
|
+
security: &ref_5
|
|
291
|
+
- bearer: []
|
|
292
|
+
summary: Create a new transaction
|
|
293
|
+
tags: &ref_6
|
|
294
|
+
- transactions
|
|
877
295
|
get:
|
|
878
|
-
|
|
296
|
+
operationId: findAll
|
|
297
|
+
parameters:
|
|
298
|
+
- *ref_4
|
|
299
|
+
- name: month
|
|
300
|
+
required: false
|
|
301
|
+
in: query
|
|
302
|
+
description: Filter by month (YYYY-MM)
|
|
303
|
+
schema:
|
|
304
|
+
example: 2026-03
|
|
305
|
+
type: string
|
|
306
|
+
- name: accountId
|
|
307
|
+
required: false
|
|
308
|
+
in: query
|
|
309
|
+
description: Filter by account ID
|
|
310
|
+
schema:
|
|
311
|
+
example: acc_123456789
|
|
312
|
+
type: string
|
|
313
|
+
- name: categoryId
|
|
314
|
+
required: false
|
|
315
|
+
in: query
|
|
316
|
+
description: Filter by category ID
|
|
317
|
+
schema:
|
|
318
|
+
example: cat_123456789
|
|
319
|
+
type: string
|
|
320
|
+
- name: creditCardId
|
|
321
|
+
required: false
|
|
322
|
+
in: query
|
|
323
|
+
description: Filter by credit card ID
|
|
324
|
+
schema:
|
|
325
|
+
example: cc_123456789
|
|
326
|
+
type: string
|
|
327
|
+
- name: type
|
|
328
|
+
required: false
|
|
329
|
+
in: query
|
|
330
|
+
description: Filter by transaction type
|
|
331
|
+
schema:
|
|
332
|
+
example: EXPENSE
|
|
333
|
+
type: string
|
|
334
|
+
enum:
|
|
335
|
+
- INCOME
|
|
336
|
+
- EXPENSE
|
|
337
|
+
- name: startDate
|
|
338
|
+
required: false
|
|
339
|
+
in: query
|
|
340
|
+
description: Filter by start date (YYYY-MM-DD)
|
|
341
|
+
schema:
|
|
342
|
+
example: '2026-01-01'
|
|
343
|
+
type: string
|
|
344
|
+
- name: endDate
|
|
345
|
+
required: false
|
|
346
|
+
in: query
|
|
347
|
+
description: Filter by end date (YYYY-MM-DD)
|
|
348
|
+
schema:
|
|
349
|
+
example: '2026-01-31'
|
|
350
|
+
type: string
|
|
351
|
+
- name: paid
|
|
352
|
+
required: false
|
|
353
|
+
in: query
|
|
354
|
+
description: Filter by payment status (true = paid, false = unpaid)
|
|
355
|
+
schema:
|
|
356
|
+
example: false
|
|
357
|
+
type: boolean
|
|
879
358
|
responses:
|
|
880
359
|
'200':
|
|
881
|
-
description: List of
|
|
360
|
+
description: List of transactions with related data.
|
|
882
361
|
content:
|
|
883
362
|
application/json:
|
|
884
363
|
schema:
|
|
885
364
|
type: array
|
|
886
365
|
items:
|
|
887
|
-
$ref: '#/components/schemas/
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
/
|
|
366
|
+
$ref: '#/components/schemas/TransactionWithRelationsDto'
|
|
367
|
+
security: *ref_5
|
|
368
|
+
summary: Get all transactions with optional filters
|
|
369
|
+
tags: *ref_6
|
|
370
|
+
/transactions/{id}:
|
|
892
371
|
get:
|
|
893
|
-
|
|
372
|
+
operationId: findOne
|
|
894
373
|
parameters:
|
|
374
|
+
- *ref_4
|
|
895
375
|
- name: id
|
|
896
|
-
in: path
|
|
897
376
|
required: true
|
|
377
|
+
in: path
|
|
898
378
|
schema:
|
|
899
379
|
type: string
|
|
900
|
-
description: Credit card ID
|
|
901
380
|
responses:
|
|
902
381
|
'200':
|
|
903
|
-
description:
|
|
382
|
+
description: Transaction found with related data.
|
|
904
383
|
content:
|
|
905
384
|
application/json:
|
|
906
385
|
schema:
|
|
907
|
-
$ref: '#/components/schemas/
|
|
908
|
-
'401':
|
|
909
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
386
|
+
$ref: '#/components/schemas/TransactionWithRelationsDto'
|
|
910
387
|
'404':
|
|
911
|
-
description:
|
|
912
|
-
|
|
388
|
+
description: Transaction not found.
|
|
389
|
+
security: *ref_5
|
|
390
|
+
summary: Get a transaction by ID
|
|
391
|
+
tags: *ref_6
|
|
913
392
|
patch:
|
|
914
|
-
|
|
393
|
+
operationId: update
|
|
915
394
|
parameters:
|
|
395
|
+
- *ref_4
|
|
916
396
|
- name: id
|
|
917
|
-
in: path
|
|
918
397
|
required: true
|
|
398
|
+
in: path
|
|
399
|
+
schema:
|
|
400
|
+
type: string
|
|
401
|
+
- name: mode
|
|
402
|
+
required: false
|
|
403
|
+
in: query
|
|
404
|
+
description: >-
|
|
405
|
+
Update mode for recurring transactions: SINGLE (only this
|
|
406
|
+
transaction), PENDING (this and future pending transactions), ALL
|
|
407
|
+
(all transactions in the series)
|
|
919
408
|
schema:
|
|
409
|
+
enum:
|
|
410
|
+
- SINGLE
|
|
411
|
+
- PENDING
|
|
412
|
+
- ALL
|
|
920
413
|
type: string
|
|
921
|
-
description: Credit card ID
|
|
922
414
|
requestBody:
|
|
923
415
|
required: true
|
|
924
416
|
content:
|
|
925
417
|
application/json:
|
|
926
418
|
schema:
|
|
927
|
-
|
|
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
|
|
419
|
+
$ref: '#/components/schemas/UpdateTransactionDto'
|
|
949
420
|
responses:
|
|
950
421
|
'200':
|
|
951
|
-
description:
|
|
422
|
+
description: Transaction updated successfully with related data.
|
|
952
423
|
content:
|
|
953
424
|
application/json:
|
|
954
425
|
schema:
|
|
955
|
-
$ref: '#/components/schemas/
|
|
956
|
-
'400':
|
|
957
|
-
description: Invalid input
|
|
958
|
-
'401':
|
|
959
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
426
|
+
$ref: '#/components/schemas/TransactionWithRelationsDto'
|
|
960
427
|
'404':
|
|
961
|
-
description:
|
|
962
|
-
|
|
428
|
+
description: Transaction not found.
|
|
429
|
+
security: *ref_5
|
|
430
|
+
summary: Update a transaction
|
|
431
|
+
tags: *ref_6
|
|
963
432
|
delete:
|
|
964
|
-
|
|
433
|
+
operationId: remove
|
|
965
434
|
parameters:
|
|
435
|
+
- *ref_4
|
|
966
436
|
- name: id
|
|
967
|
-
in: path
|
|
968
437
|
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
438
|
in: path
|
|
988
|
-
required: true
|
|
989
439
|
schema:
|
|
990
440
|
type: string
|
|
991
|
-
|
|
992
|
-
|
|
441
|
+
- name: mode
|
|
442
|
+
required: false
|
|
993
443
|
in: query
|
|
994
|
-
|
|
444
|
+
description: >-
|
|
445
|
+
Deletion mode for recurring transactions: SINGLE (only this
|
|
446
|
+
transaction), PENDING (this and future pending transactions), ALL
|
|
447
|
+
(all transactions in the series)
|
|
995
448
|
schema:
|
|
449
|
+
enum:
|
|
450
|
+
- SINGLE
|
|
451
|
+
- PENDING
|
|
452
|
+
- ALL
|
|
996
453
|
type: string
|
|
997
|
-
pattern: "^\\d{4}-\\d{2}$"
|
|
998
|
-
description: Month in YYYY-MM format
|
|
999
|
-
example: "2026-03"
|
|
1000
454
|
responses:
|
|
1001
455
|
'200':
|
|
1002
|
-
description:
|
|
1003
|
-
content:
|
|
1004
|
-
application/json:
|
|
1005
|
-
schema:
|
|
1006
|
-
$ref: '#/components/schemas/Statement'
|
|
1007
|
-
'401':
|
|
1008
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
456
|
+
description: Transaction deleted successfully.
|
|
1009
457
|
'404':
|
|
1010
|
-
description:
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
458
|
+
description: Transaction not found.
|
|
459
|
+
security: *ref_5
|
|
460
|
+
summary: Delete a transaction
|
|
461
|
+
tags: *ref_6
|
|
462
|
+
/transactions/{id}/pay:
|
|
463
|
+
patch:
|
|
464
|
+
operationId: markAsPaid
|
|
1015
465
|
parameters:
|
|
466
|
+
- *ref_4
|
|
1016
467
|
- name: id
|
|
1017
|
-
in: path
|
|
1018
468
|
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
469
|
in: path
|
|
1065
|
-
required: true
|
|
1066
470
|
schema:
|
|
1067
471
|
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
472
|
responses:
|
|
1084
473
|
'200':
|
|
1085
|
-
description:
|
|
474
|
+
description: Transaction marked as paid with related data.
|
|
1086
475
|
content:
|
|
1087
476
|
application/json:
|
|
1088
477
|
schema:
|
|
1089
|
-
|
|
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'
|
|
478
|
+
$ref: '#/components/schemas/TransactionWithRelationsDto'
|
|
1098
479
|
'404':
|
|
1099
|
-
description:
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
480
|
+
description: Transaction not found.
|
|
481
|
+
security: *ref_5
|
|
482
|
+
summary: Mark a transaction as paid
|
|
483
|
+
tags: *ref_6
|
|
484
|
+
/transactions/{id}/unpay:
|
|
485
|
+
patch:
|
|
486
|
+
operationId: markAsUnpaid
|
|
1104
487
|
parameters:
|
|
488
|
+
- *ref_4
|
|
1105
489
|
- 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
490
|
required: true
|
|
491
|
+
in: path
|
|
1114
492
|
schema:
|
|
1115
493
|
type: string
|
|
1116
|
-
pattern: "^\\d{4}-\\d{2}$"
|
|
1117
|
-
description: Month in YYYY-MM format
|
|
1118
|
-
example: "2026-03"
|
|
1119
494
|
responses:
|
|
1120
495
|
'200':
|
|
1121
|
-
description:
|
|
496
|
+
description: Transaction marked as unpaid with related data.
|
|
1122
497
|
content:
|
|
1123
498
|
application/json:
|
|
1124
499
|
schema:
|
|
1125
|
-
$ref: '#/components/schemas/
|
|
1126
|
-
'401':
|
|
1127
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
500
|
+
$ref: '#/components/schemas/TransactionWithRelationsDto'
|
|
1128
501
|
'404':
|
|
1129
|
-
description:
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
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
|
-
|
|
502
|
+
description: Transaction not found.
|
|
503
|
+
security: *ref_5
|
|
504
|
+
summary: Mark a transaction as unpaid
|
|
505
|
+
tags: *ref_6
|
|
506
|
+
/summary:
|
|
1202
507
|
get:
|
|
1203
|
-
|
|
508
|
+
description: >-
|
|
509
|
+
Returns income, expenses, balance, credit card totals, and category
|
|
510
|
+
breakdowns. Provide either `month` (YYYY-MM) or both `startDate` and
|
|
511
|
+
`endDate` (YYYY-MM-DD).
|
|
512
|
+
operationId: getSummary
|
|
1204
513
|
parameters:
|
|
1205
|
-
- name:
|
|
1206
|
-
in:
|
|
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
|
|
514
|
+
- name: x-api-key
|
|
515
|
+
in: header
|
|
1222
516
|
required: false
|
|
1223
517
|
schema:
|
|
1224
518
|
type: string
|
|
1225
|
-
|
|
1226
|
-
example: "cat_123456789"
|
|
1227
|
-
- name: creditCardId
|
|
1228
|
-
in: query
|
|
519
|
+
- name: month
|
|
1229
520
|
required: false
|
|
1230
|
-
schema:
|
|
1231
|
-
type: string
|
|
1232
|
-
description: Filter transactions by credit card ID
|
|
1233
|
-
example: "cc_123456789"
|
|
1234
|
-
- name: type
|
|
1235
521
|
in: query
|
|
1236
|
-
|
|
522
|
+
description: Month for the summary in YYYY-MM format
|
|
1237
523
|
schema:
|
|
524
|
+
example: 2026-02
|
|
1238
525
|
type: string
|
|
1239
|
-
enum: [INCOME, EXPENSE]
|
|
1240
|
-
description: Filter transactions by type
|
|
1241
|
-
example: "EXPENSE"
|
|
1242
526
|
- name: startDate
|
|
1243
|
-
in: query
|
|
1244
527
|
required: false
|
|
528
|
+
in: query
|
|
529
|
+
description: Start date for a custom range in YYYY-MM-DD format
|
|
1245
530
|
schema:
|
|
531
|
+
example: '2026-01-01'
|
|
1246
532
|
type: string
|
|
1247
|
-
format: date
|
|
1248
|
-
description: Filter transactions starting from this date (inclusive)
|
|
1249
|
-
example: "2026-01-01"
|
|
1250
533
|
- name: endDate
|
|
1251
|
-
in: query
|
|
1252
534
|
required: false
|
|
535
|
+
in: query
|
|
536
|
+
description: End date for a custom range in YYYY-MM-DD format
|
|
1253
537
|
schema:
|
|
538
|
+
example: '2026-03-31'
|
|
1254
539
|
type: string
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
540
|
+
responses:
|
|
541
|
+
'200':
|
|
542
|
+
description: Financial summary for the given period.
|
|
543
|
+
'400':
|
|
544
|
+
description: Invalid or missing period parameters.
|
|
545
|
+
security:
|
|
546
|
+
- bearer: []
|
|
547
|
+
summary: Get financial summary
|
|
548
|
+
tags:
|
|
549
|
+
- summary
|
|
550
|
+
/credit-cards:
|
|
551
|
+
post:
|
|
552
|
+
operationId: create
|
|
553
|
+
parameters:
|
|
554
|
+
- &ref_7
|
|
555
|
+
name: x-api-key
|
|
556
|
+
in: header
|
|
1260
557
|
required: false
|
|
1261
558
|
schema:
|
|
1262
|
-
type:
|
|
1263
|
-
|
|
1264
|
-
|
|
559
|
+
type: string
|
|
560
|
+
requestBody:
|
|
561
|
+
required: true
|
|
562
|
+
content:
|
|
563
|
+
application/json:
|
|
564
|
+
schema:
|
|
565
|
+
$ref: '#/components/schemas/CreateCreditCardDto'
|
|
566
|
+
responses:
|
|
567
|
+
'201':
|
|
568
|
+
description: Credit card created successfully.
|
|
569
|
+
'400':
|
|
570
|
+
description: Invalid input.
|
|
571
|
+
security: &ref_8
|
|
572
|
+
- bearer: []
|
|
573
|
+
summary: Create a new credit card
|
|
574
|
+
tags: &ref_9
|
|
575
|
+
- credit-cards
|
|
576
|
+
get:
|
|
577
|
+
operationId: findAll
|
|
578
|
+
parameters:
|
|
579
|
+
- *ref_7
|
|
1265
580
|
responses:
|
|
1266
581
|
'200':
|
|
1267
|
-
description: List of
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
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.
|
|
582
|
+
description: List of credit cards.
|
|
583
|
+
security: *ref_8
|
|
584
|
+
summary: Get all credit cards
|
|
585
|
+
tags: *ref_9
|
|
586
|
+
/credit-cards/{id}:
|
|
587
|
+
get:
|
|
588
|
+
operationId: findOne
|
|
1284
589
|
parameters:
|
|
590
|
+
- *ref_7
|
|
1285
591
|
- name: id
|
|
1286
|
-
in: path
|
|
1287
592
|
required: true
|
|
593
|
+
in: path
|
|
1288
594
|
schema:
|
|
1289
595
|
type: string
|
|
1290
|
-
description: Transaction ID
|
|
1291
596
|
responses:
|
|
1292
597
|
'200':
|
|
1293
|
-
description:
|
|
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'
|
|
598
|
+
description: Credit card found.
|
|
1302
599
|
'404':
|
|
1303
|
-
description:
|
|
1304
|
-
|
|
1305
|
-
|
|
600
|
+
description: Credit card not found.
|
|
601
|
+
security: *ref_8
|
|
602
|
+
summary: Get a credit card by ID
|
|
603
|
+
tags: *ref_9
|
|
1306
604
|
patch:
|
|
1307
|
-
|
|
605
|
+
operationId: update
|
|
1308
606
|
parameters:
|
|
607
|
+
- *ref_7
|
|
1309
608
|
- name: id
|
|
1310
|
-
in: path
|
|
1311
609
|
required: true
|
|
610
|
+
in: path
|
|
1312
611
|
schema:
|
|
1313
612
|
type: string
|
|
1314
|
-
|
|
613
|
+
requestBody:
|
|
614
|
+
required: true
|
|
615
|
+
content:
|
|
616
|
+
application/json:
|
|
617
|
+
schema:
|
|
618
|
+
$ref: '#/components/schemas/UpdateCreditCardDto'
|
|
1315
619
|
responses:
|
|
1316
620
|
'200':
|
|
1317
|
-
description:
|
|
1318
|
-
content:
|
|
1319
|
-
application/json:
|
|
1320
|
-
schema:
|
|
1321
|
-
$ref: '#/components/schemas/Transaction'
|
|
621
|
+
description: Credit card updated successfully.
|
|
1322
622
|
'404':
|
|
1323
|
-
description:
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
summary: Get a transaction by ID
|
|
623
|
+
description: Credit card not found.
|
|
624
|
+
security: *ref_8
|
|
625
|
+
summary: Update a credit card
|
|
626
|
+
tags: *ref_9
|
|
627
|
+
delete:
|
|
628
|
+
operationId: remove
|
|
1330
629
|
parameters:
|
|
630
|
+
- *ref_7
|
|
1331
631
|
- name: id
|
|
1332
|
-
in: path
|
|
1333
632
|
required: true
|
|
633
|
+
in: path
|
|
1334
634
|
schema:
|
|
1335
635
|
type: string
|
|
1336
|
-
description: Transaction ID
|
|
1337
636
|
responses:
|
|
1338
637
|
'200':
|
|
1339
|
-
description:
|
|
1340
|
-
content:
|
|
1341
|
-
application/json:
|
|
1342
|
-
schema:
|
|
1343
|
-
$ref: '#/components/schemas/Transaction'
|
|
1344
|
-
'401':
|
|
1345
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
638
|
+
description: Credit card deleted successfully.
|
|
1346
639
|
'404':
|
|
1347
|
-
description:
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
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.
|
|
640
|
+
description: Credit card not found.
|
|
641
|
+
security: *ref_8
|
|
642
|
+
summary: Delete a credit card
|
|
643
|
+
tags: *ref_9
|
|
644
|
+
/credit-cards/{id}/statement:
|
|
645
|
+
get:
|
|
646
|
+
operationId: getStatement
|
|
1362
647
|
parameters:
|
|
648
|
+
- *ref_7
|
|
1363
649
|
- name: id
|
|
1364
|
-
in: path
|
|
1365
650
|
required: true
|
|
651
|
+
in: path
|
|
1366
652
|
schema:
|
|
1367
653
|
type: string
|
|
1368
|
-
|
|
1369
|
-
|
|
654
|
+
- name: month
|
|
655
|
+
required: true
|
|
1370
656
|
in: query
|
|
1371
|
-
|
|
657
|
+
description: Month for the statement in YYYY-MM format
|
|
658
|
+
schema:
|
|
659
|
+
example: 2026-03
|
|
660
|
+
type: string
|
|
661
|
+
responses:
|
|
662
|
+
'200':
|
|
663
|
+
description: Credit card statement.
|
|
664
|
+
'404':
|
|
665
|
+
description: Credit card not found.
|
|
666
|
+
security: *ref_8
|
|
667
|
+
summary: Get credit card statement for a specific month
|
|
668
|
+
tags: *ref_9
|
|
669
|
+
/credit-cards/{id}/pay-statement:
|
|
670
|
+
post:
|
|
671
|
+
operationId: payStatement
|
|
672
|
+
parameters:
|
|
673
|
+
- *ref_7
|
|
674
|
+
- name: id
|
|
675
|
+
required: true
|
|
676
|
+
in: path
|
|
1372
677
|
schema:
|
|
1373
678
|
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
679
|
requestBody:
|
|
1385
680
|
required: true
|
|
1386
681
|
content:
|
|
1387
682
|
application/json:
|
|
1388
683
|
schema:
|
|
1389
|
-
$ref: '#/components/schemas/
|
|
684
|
+
$ref: '#/components/schemas/PayStatementDto'
|
|
1390
685
|
responses:
|
|
1391
686
|
'200':
|
|
1392
|
-
description:
|
|
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'
|
|
687
|
+
description: Statement marked as paid.
|
|
1401
688
|
'404':
|
|
1402
|
-
description:
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
689
|
+
description: Credit card not found.
|
|
690
|
+
security: *ref_8
|
|
691
|
+
summary: Mark all transactions in a credit card statement as paid
|
|
692
|
+
tags: *ref_9
|
|
693
|
+
/credit-cards/{id}/reopen-statement:
|
|
694
|
+
post:
|
|
695
|
+
operationId: reopenStatement
|
|
1406
696
|
parameters:
|
|
697
|
+
- *ref_7
|
|
1407
698
|
- name: id
|
|
1408
|
-
in: path
|
|
1409
699
|
required: true
|
|
700
|
+
in: path
|
|
1410
701
|
schema:
|
|
1411
702
|
type: string
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
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
|
|
703
|
+
requestBody:
|
|
704
|
+
required: true
|
|
705
|
+
content:
|
|
706
|
+
application/json:
|
|
707
|
+
schema:
|
|
708
|
+
$ref: '#/components/schemas/ReopenStatementDto'
|
|
1428
709
|
responses:
|
|
1429
710
|
'200':
|
|
1430
|
-
description:
|
|
1431
|
-
'
|
|
1432
|
-
|
|
711
|
+
description: Statement reopened successfully.
|
|
712
|
+
'400':
|
|
713
|
+
description: Statement is already open or invalid input.
|
|
1433
714
|
'404':
|
|
1434
|
-
description:
|
|
1435
|
-
|
|
1436
|
-
|
|
715
|
+
description: Credit card not found.
|
|
716
|
+
security: *ref_8
|
|
717
|
+
summary: Reopen a credit card statement by marking all transactions as unpaid
|
|
718
|
+
tags: *ref_9
|
|
719
|
+
/credit-cards/{id}/statement-status:
|
|
1437
720
|
get:
|
|
1438
|
-
|
|
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).
|
|
721
|
+
operationId: getStatementStatus
|
|
1442
722
|
parameters:
|
|
1443
|
-
-
|
|
1444
|
-
|
|
1445
|
-
required:
|
|
723
|
+
- *ref_7
|
|
724
|
+
- name: id
|
|
725
|
+
required: true
|
|
726
|
+
in: path
|
|
1446
727
|
schema:
|
|
1447
728
|
type: string
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
example: "2026-02"
|
|
1451
|
-
- name: startDate
|
|
729
|
+
- name: month
|
|
730
|
+
required: true
|
|
1452
731
|
in: query
|
|
1453
|
-
|
|
732
|
+
description: Month for the statement in YYYY-MM format
|
|
1454
733
|
schema:
|
|
734
|
+
example: 2026-03
|
|
1455
735
|
type: string
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
736
|
+
responses:
|
|
737
|
+
'200':
|
|
738
|
+
description: Credit card statement status.
|
|
739
|
+
'404':
|
|
740
|
+
description: Credit card not found.
|
|
741
|
+
security: *ref_8
|
|
742
|
+
summary: Get credit card statement payment status for a specific month
|
|
743
|
+
tags: *ref_9
|
|
744
|
+
/credit-cards/{id}/anticipations:
|
|
745
|
+
post:
|
|
746
|
+
operationId: createAnticipation
|
|
747
|
+
parameters:
|
|
748
|
+
- *ref_7
|
|
749
|
+
- name: id
|
|
750
|
+
required: true
|
|
751
|
+
in: path
|
|
1462
752
|
schema:
|
|
1463
753
|
type: string
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
754
|
+
requestBody:
|
|
755
|
+
required: true
|
|
756
|
+
content:
|
|
757
|
+
application/json:
|
|
758
|
+
schema:
|
|
759
|
+
$ref: '#/components/schemas/CreateAnticipationDto'
|
|
1467
760
|
responses:
|
|
1468
|
-
'
|
|
1469
|
-
description:
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
schema:
|
|
1473
|
-
$ref: '#/components/schemas/Summary'
|
|
761
|
+
'201':
|
|
762
|
+
description: >-
|
|
763
|
+
Anticipation created: credit card INCOME + account EXPENSE linked
|
|
764
|
+
pair.
|
|
1474
765
|
'400':
|
|
1475
|
-
description:
|
|
1476
|
-
'
|
|
1477
|
-
|
|
1478
|
-
|
|
766
|
+
description: Statement already closed or invalid input.
|
|
767
|
+
'404':
|
|
768
|
+
description: Credit card or account not found.
|
|
769
|
+
security: *ref_8
|
|
770
|
+
summary: Create a credit card anticipation (advance payment toward the statement)
|
|
771
|
+
tags: *ref_9
|
|
1479
772
|
/accounts:
|
|
1480
773
|
post:
|
|
1481
|
-
|
|
774
|
+
operationId: create
|
|
775
|
+
parameters:
|
|
776
|
+
- &ref_10
|
|
777
|
+
name: x-api-key
|
|
778
|
+
in: header
|
|
779
|
+
required: false
|
|
780
|
+
schema:
|
|
781
|
+
type: string
|
|
1482
782
|
requestBody:
|
|
1483
783
|
required: true
|
|
1484
784
|
content:
|
|
1485
785
|
application/json:
|
|
1486
786
|
schema:
|
|
1487
|
-
|
|
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
|
|
787
|
+
$ref: '#/components/schemas/CreateAccountDto'
|
|
1506
788
|
responses:
|
|
1507
789
|
'201':
|
|
1508
790
|
description: Account created successfully
|
|
1509
791
|
content:
|
|
1510
792
|
application/json:
|
|
1511
793
|
schema:
|
|
1512
|
-
$ref: '#/components/schemas/
|
|
794
|
+
$ref: '#/components/schemas/AccountResponseDto'
|
|
1513
795
|
'400':
|
|
1514
|
-
description: Invalid input
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
796
|
+
description: Invalid input data
|
|
797
|
+
security: &ref_11
|
|
798
|
+
- bearer: []
|
|
799
|
+
summary: Create a new account
|
|
800
|
+
tags: &ref_12
|
|
801
|
+
- accounts
|
|
1518
802
|
get:
|
|
1519
|
-
|
|
803
|
+
operationId: findAll
|
|
804
|
+
parameters:
|
|
805
|
+
- *ref_10
|
|
1520
806
|
responses:
|
|
1521
807
|
'200':
|
|
1522
|
-
description: List of accounts
|
|
808
|
+
description: List of all accounts
|
|
1523
809
|
content:
|
|
1524
810
|
application/json:
|
|
1525
811
|
schema:
|
|
1526
812
|
type: array
|
|
1527
813
|
items:
|
|
1528
|
-
$ref: '#/components/schemas/
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
814
|
+
$ref: '#/components/schemas/AccountResponseDto'
|
|
815
|
+
security: *ref_11
|
|
816
|
+
summary: Get all accounts
|
|
817
|
+
tags: *ref_12
|
|
1532
818
|
/accounts/{id}:
|
|
1533
819
|
get:
|
|
1534
|
-
|
|
820
|
+
operationId: findOne
|
|
1535
821
|
parameters:
|
|
822
|
+
- *ref_10
|
|
1536
823
|
- name: id
|
|
1537
|
-
in: path
|
|
1538
824
|
required: true
|
|
825
|
+
in: path
|
|
1539
826
|
schema:
|
|
1540
827
|
type: string
|
|
1541
|
-
description: Account ID
|
|
1542
828
|
responses:
|
|
1543
829
|
'200':
|
|
1544
|
-
description: Account
|
|
830
|
+
description: Account retrieved successfully
|
|
1545
831
|
content:
|
|
1546
832
|
application/json:
|
|
1547
833
|
schema:
|
|
1548
|
-
$ref: '#/components/schemas/
|
|
1549
|
-
'401':
|
|
1550
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
834
|
+
$ref: '#/components/schemas/AccountResponseDto'
|
|
1551
835
|
'404':
|
|
1552
836
|
description: Account not found
|
|
1553
|
-
|
|
837
|
+
security: *ref_11
|
|
838
|
+
summary: Get an account by ID
|
|
839
|
+
tags: *ref_12
|
|
1554
840
|
patch:
|
|
1555
|
-
|
|
841
|
+
operationId: update
|
|
1556
842
|
parameters:
|
|
843
|
+
- *ref_10
|
|
1557
844
|
- name: id
|
|
1558
|
-
in: path
|
|
1559
845
|
required: true
|
|
846
|
+
in: path
|
|
1560
847
|
schema:
|
|
1561
848
|
type: string
|
|
1562
|
-
description: Account ID
|
|
1563
849
|
requestBody:
|
|
1564
850
|
required: true
|
|
1565
851
|
content:
|
|
1566
852
|
application/json:
|
|
1567
853
|
schema:
|
|
1568
|
-
|
|
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"
|
|
854
|
+
$ref: '#/components/schemas/UpdateAccountDto'
|
|
1579
855
|
responses:
|
|
1580
856
|
'200':
|
|
1581
857
|
description: Account updated successfully
|
|
1582
858
|
content:
|
|
1583
859
|
application/json:
|
|
1584
860
|
schema:
|
|
1585
|
-
$ref: '#/components/schemas/
|
|
1586
|
-
'400':
|
|
1587
|
-
description: Invalid input
|
|
1588
|
-
'401':
|
|
1589
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
861
|
+
$ref: '#/components/schemas/AccountResponseDto'
|
|
1590
862
|
'404':
|
|
1591
863
|
description: Account not found
|
|
1592
|
-
|
|
864
|
+
security: *ref_11
|
|
865
|
+
summary: Update an account
|
|
866
|
+
tags: *ref_12
|
|
1593
867
|
delete:
|
|
1594
|
-
|
|
868
|
+
operationId: remove
|
|
1595
869
|
parameters:
|
|
870
|
+
- *ref_10
|
|
1596
871
|
- name: id
|
|
1597
|
-
in: path
|
|
1598
872
|
required: true
|
|
873
|
+
in: path
|
|
1599
874
|
schema:
|
|
1600
875
|
type: string
|
|
1601
|
-
description: Account ID
|
|
1602
876
|
responses:
|
|
1603
877
|
'204':
|
|
1604
878
|
description: Account deleted successfully
|
|
1605
|
-
'401':
|
|
1606
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
1607
879
|
'404':
|
|
1608
880
|
description: Account not found
|
|
1609
881
|
'409':
|
|
1610
882
|
description: Cannot delete account with associated transactions
|
|
1611
|
-
|
|
883
|
+
security: *ref_11
|
|
884
|
+
summary: Delete an account
|
|
885
|
+
tags: *ref_12
|
|
1612
886
|
/accounts/{id}/balance:
|
|
1613
887
|
get:
|
|
1614
|
-
|
|
888
|
+
operationId: getAccountBalance
|
|
1615
889
|
parameters:
|
|
890
|
+
- *ref_10
|
|
1616
891
|
- name: id
|
|
1617
|
-
in: path
|
|
1618
892
|
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
893
|
in: path
|
|
1640
|
-
required: true
|
|
1641
894
|
schema:
|
|
1642
895
|
type: string
|
|
1643
|
-
description: Account ID
|
|
1644
896
|
responses:
|
|
1645
897
|
'200':
|
|
1646
|
-
description:
|
|
898
|
+
description: Account balance retrieved successfully
|
|
1647
899
|
content:
|
|
1648
900
|
application/json:
|
|
1649
901
|
schema:
|
|
1650
|
-
type:
|
|
1651
|
-
items:
|
|
1652
|
-
$ref: '#/components/schemas/Transaction'
|
|
1653
|
-
'401':
|
|
1654
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
902
|
+
type: object
|
|
1655
903
|
'404':
|
|
1656
904
|
description: Account not found
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
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
|
-
|
|
905
|
+
security: *ref_11
|
|
906
|
+
summary: Get the current balance for an account
|
|
907
|
+
tags: *ref_12
|
|
1784
908
|
/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
909
|
get:
|
|
1824
|
-
|
|
910
|
+
operationId: findAll
|
|
911
|
+
parameters:
|
|
912
|
+
- &ref_13
|
|
913
|
+
name: x-api-key
|
|
914
|
+
in: header
|
|
915
|
+
required: false
|
|
916
|
+
schema:
|
|
917
|
+
type: string
|
|
1825
918
|
responses:
|
|
1826
919
|
'200':
|
|
1827
920
|
description: Settings retrieved successfully
|
|
1828
921
|
content:
|
|
1829
922
|
application/json:
|
|
1830
923
|
schema:
|
|
1831
|
-
$ref: '#/components/schemas/
|
|
1832
|
-
'401':
|
|
1833
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
924
|
+
$ref: '#/components/schemas/SettingsResponseDto'
|
|
1834
925
|
'404':
|
|
1835
926
|
description: Settings not found
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
summary:
|
|
927
|
+
security: &ref_14
|
|
928
|
+
- bearer: []
|
|
929
|
+
summary: Get user settings
|
|
930
|
+
tags: &ref_15
|
|
931
|
+
- settings
|
|
932
|
+
patch:
|
|
933
|
+
operationId: update
|
|
934
|
+
parameters:
|
|
935
|
+
- *ref_13
|
|
1839
936
|
requestBody:
|
|
1840
937
|
required: true
|
|
1841
938
|
content:
|
|
1842
939
|
application/json:
|
|
1843
940
|
schema:
|
|
1844
|
-
|
|
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"
|
|
941
|
+
$ref: '#/components/schemas/UpdateSettingsDto'
|
|
1857
942
|
responses:
|
|
1858
943
|
'200':
|
|
1859
944
|
description: Settings updated successfully
|
|
1860
945
|
content:
|
|
1861
946
|
application/json:
|
|
1862
947
|
schema:
|
|
1863
|
-
$ref: '#/components/schemas/
|
|
948
|
+
$ref: '#/components/schemas/SettingsResponseDto'
|
|
1864
949
|
'400':
|
|
1865
|
-
description: Invalid input
|
|
1866
|
-
'401':
|
|
1867
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
950
|
+
description: Invalid input data
|
|
1868
951
|
'404':
|
|
1869
952
|
description: Settings not found
|
|
1870
|
-
|
|
953
|
+
security: *ref_14
|
|
954
|
+
summary: Update user settings
|
|
955
|
+
tags: *ref_15
|
|
956
|
+
/export:
|
|
957
|
+
get:
|
|
958
|
+
operationId: export
|
|
959
|
+
parameters: []
|
|
960
|
+
responses:
|
|
961
|
+
'200':
|
|
962
|
+
description: ''
|
|
963
|
+
tags: &ref_16
|
|
964
|
+
- DataTransfer
|
|
965
|
+
/import:
|
|
966
|
+
post:
|
|
967
|
+
operationId: import
|
|
968
|
+
parameters: []
|
|
969
|
+
requestBody:
|
|
970
|
+
required: true
|
|
971
|
+
content:
|
|
972
|
+
application/json:
|
|
973
|
+
schema:
|
|
974
|
+
$ref: '#/components/schemas/ImportDataDto'
|
|
975
|
+
responses:
|
|
976
|
+
'201':
|
|
977
|
+
description: ''
|
|
978
|
+
tags: *ref_16
|
|
1871
979
|
/transfers:
|
|
1872
980
|
post:
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
981
|
+
operationId: create
|
|
982
|
+
parameters:
|
|
983
|
+
- &ref_17
|
|
984
|
+
name: x-api-key
|
|
985
|
+
in: header
|
|
986
|
+
required: false
|
|
987
|
+
schema:
|
|
988
|
+
type: string
|
|
1878
989
|
requestBody:
|
|
1879
990
|
required: true
|
|
1880
991
|
content:
|
|
1881
992
|
application/json:
|
|
1882
993
|
schema:
|
|
1883
|
-
|
|
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
|
|
994
|
+
$ref: '#/components/schemas/CreateTransferDto'
|
|
1900
995
|
responses:
|
|
1901
996
|
'201':
|
|
1902
|
-
description: Transfer created
|
|
997
|
+
description: Transfer created
|
|
1903
998
|
content:
|
|
1904
999
|
application/json:
|
|
1905
1000
|
schema:
|
|
1906
|
-
$ref: '#/components/schemas/
|
|
1001
|
+
$ref: '#/components/schemas/TransferResponseDto'
|
|
1907
1002
|
'400':
|
|
1908
1003
|
description: Invalid input
|
|
1909
|
-
'401':
|
|
1910
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
1911
1004
|
'404':
|
|
1912
1005
|
description: Account not found
|
|
1913
|
-
|
|
1914
|
-
|
|
1006
|
+
security: &ref_18
|
|
1007
|
+
- bearer: []
|
|
1008
|
+
summary: Create a new transfer between accounts
|
|
1009
|
+
tags: &ref_19
|
|
1915
1010
|
- transfers
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
- ApiKeyAuth: []
|
|
1011
|
+
get:
|
|
1012
|
+
operationId: findAll
|
|
1919
1013
|
parameters:
|
|
1014
|
+
- *ref_17
|
|
1920
1015
|
- name: accountId
|
|
1921
|
-
in: query
|
|
1922
1016
|
required: false
|
|
1017
|
+
in: query
|
|
1923
1018
|
description: Filter by account ID (source or destination)
|
|
1924
1019
|
schema:
|
|
1925
1020
|
type: string
|
|
1926
1021
|
- name: month
|
|
1927
|
-
in: query
|
|
1928
1022
|
required: false
|
|
1023
|
+
in: query
|
|
1929
1024
|
description: Filter by month (YYYY-MM format)
|
|
1930
1025
|
schema:
|
|
1026
|
+
example: 2026-02
|
|
1931
1027
|
type: string
|
|
1932
|
-
pattern: '^\d{4}-\d{2}$'
|
|
1933
|
-
example: "2026-02"
|
|
1934
1028
|
- name: startDate
|
|
1935
|
-
in: query
|
|
1936
1029
|
required: false
|
|
1030
|
+
in: query
|
|
1937
1031
|
description: Filter from date (YYYY-MM-DD)
|
|
1938
1032
|
schema:
|
|
1033
|
+
example: '2026-02-01'
|
|
1939
1034
|
type: string
|
|
1940
|
-
format: date
|
|
1941
1035
|
- name: endDate
|
|
1942
|
-
in: query
|
|
1943
1036
|
required: false
|
|
1037
|
+
in: query
|
|
1944
1038
|
description: Filter to date (YYYY-MM-DD)
|
|
1945
1039
|
schema:
|
|
1040
|
+
example: '2026-02-28'
|
|
1946
1041
|
type: string
|
|
1947
|
-
format: date
|
|
1948
1042
|
responses:
|
|
1949
1043
|
'200':
|
|
1950
1044
|
description: List of transfers
|
|
@@ -1953,44 +1047,39 @@ paths:
|
|
|
1953
1047
|
schema:
|
|
1954
1048
|
type: array
|
|
1955
1049
|
items:
|
|
1956
|
-
$ref: '#/components/schemas/
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1050
|
+
$ref: '#/components/schemas/TransferResponseDto'
|
|
1051
|
+
security: *ref_18
|
|
1052
|
+
summary: List transfers with optional filters
|
|
1053
|
+
tags: *ref_19
|
|
1960
1054
|
/transfers/{id}:
|
|
1961
1055
|
get:
|
|
1962
|
-
|
|
1963
|
-
- transfers
|
|
1964
|
-
summary: Get a transfer by ID
|
|
1965
|
-
security:
|
|
1966
|
-
- ApiKeyAuth: []
|
|
1056
|
+
operationId: findOne
|
|
1967
1057
|
parameters:
|
|
1058
|
+
- *ref_17
|
|
1968
1059
|
- name: id
|
|
1969
|
-
in: path
|
|
1970
1060
|
required: true
|
|
1061
|
+
in: path
|
|
1971
1062
|
schema:
|
|
1972
1063
|
type: string
|
|
1973
1064
|
responses:
|
|
1974
1065
|
'200':
|
|
1975
|
-
description: Transfer
|
|
1066
|
+
description: Transfer found
|
|
1976
1067
|
content:
|
|
1977
1068
|
application/json:
|
|
1978
1069
|
schema:
|
|
1979
|
-
$ref: '#/components/schemas/
|
|
1980
|
-
'401':
|
|
1981
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
1070
|
+
$ref: '#/components/schemas/TransferResponseDto'
|
|
1982
1071
|
'404':
|
|
1983
1072
|
description: Transfer not found
|
|
1073
|
+
security: *ref_18
|
|
1074
|
+
summary: Get a transfer by ID
|
|
1075
|
+
tags: *ref_19
|
|
1984
1076
|
patch:
|
|
1985
|
-
|
|
1986
|
-
- transfers
|
|
1987
|
-
summary: Update a transfer
|
|
1988
|
-
security:
|
|
1989
|
-
- ApiKeyAuth: []
|
|
1077
|
+
operationId: update
|
|
1990
1078
|
parameters:
|
|
1079
|
+
- *ref_17
|
|
1991
1080
|
- name: id
|
|
1992
|
-
in: path
|
|
1993
1081
|
required: true
|
|
1082
|
+
in: path
|
|
1994
1083
|
schema:
|
|
1995
1084
|
type: string
|
|
1996
1085
|
requestBody:
|
|
@@ -1998,48 +1087,1193 @@ paths:
|
|
|
1998
1087
|
content:
|
|
1999
1088
|
application/json:
|
|
2000
1089
|
schema:
|
|
2001
|
-
|
|
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
|
|
1090
|
+
$ref: '#/components/schemas/UpdateTransferDto'
|
|
2013
1091
|
responses:
|
|
2014
1092
|
'200':
|
|
2015
|
-
description: Transfer updated
|
|
1093
|
+
description: Transfer updated
|
|
2016
1094
|
content:
|
|
2017
1095
|
application/json:
|
|
2018
1096
|
schema:
|
|
2019
|
-
$ref: '#/components/schemas/
|
|
2020
|
-
'400':
|
|
2021
|
-
description: Invalid input
|
|
2022
|
-
'401':
|
|
2023
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
1097
|
+
$ref: '#/components/schemas/TransferResponseDto'
|
|
2024
1098
|
'404':
|
|
2025
1099
|
description: Transfer not found
|
|
1100
|
+
security: *ref_18
|
|
1101
|
+
summary: Update a transfer
|
|
1102
|
+
tags: *ref_19
|
|
2026
1103
|
delete:
|
|
2027
|
-
|
|
2028
|
-
- transfers
|
|
2029
|
-
summary: Delete a transfer
|
|
2030
|
-
security:
|
|
2031
|
-
- ApiKeyAuth: []
|
|
1104
|
+
operationId: remove
|
|
2032
1105
|
parameters:
|
|
1106
|
+
- *ref_17
|
|
2033
1107
|
- name: id
|
|
2034
|
-
in: path
|
|
2035
1108
|
required: true
|
|
1109
|
+
in: path
|
|
2036
1110
|
schema:
|
|
2037
1111
|
type: string
|
|
2038
1112
|
responses:
|
|
2039
1113
|
'204':
|
|
2040
|
-
description: Transfer deleted
|
|
2041
|
-
'401':
|
|
2042
|
-
$ref: '#/components/responses/UnauthorizedError'
|
|
1114
|
+
description: Transfer deleted
|
|
2043
1115
|
'404':
|
|
2044
1116
|
description: Transfer not found
|
|
1117
|
+
security: *ref_18
|
|
1118
|
+
summary: Delete a transfer
|
|
1119
|
+
tags: *ref_19
|
|
1120
|
+
/subscriptions:
|
|
1121
|
+
post:
|
|
1122
|
+
operationId: create
|
|
1123
|
+
parameters:
|
|
1124
|
+
- &ref_20
|
|
1125
|
+
name: x-api-key
|
|
1126
|
+
in: header
|
|
1127
|
+
required: false
|
|
1128
|
+
schema:
|
|
1129
|
+
type: string
|
|
1130
|
+
requestBody:
|
|
1131
|
+
required: true
|
|
1132
|
+
content:
|
|
1133
|
+
application/json:
|
|
1134
|
+
schema:
|
|
1135
|
+
$ref: '#/components/schemas/CreateSubscriptionDto'
|
|
1136
|
+
responses:
|
|
1137
|
+
'201':
|
|
1138
|
+
description: Subscription created successfully.
|
|
1139
|
+
'400':
|
|
1140
|
+
description: Invalid input.
|
|
1141
|
+
'404':
|
|
1142
|
+
description: Credit card not found.
|
|
1143
|
+
security: &ref_21
|
|
1144
|
+
- bearer: []
|
|
1145
|
+
summary: Create a new subscription
|
|
1146
|
+
tags: &ref_22
|
|
1147
|
+
- subscriptions
|
|
1148
|
+
get:
|
|
1149
|
+
operationId: findAll
|
|
1150
|
+
parameters:
|
|
1151
|
+
- *ref_20
|
|
1152
|
+
responses:
|
|
1153
|
+
'200':
|
|
1154
|
+
description: List of subscriptions.
|
|
1155
|
+
security: *ref_21
|
|
1156
|
+
summary: Get all subscriptions
|
|
1157
|
+
tags: *ref_22
|
|
1158
|
+
/subscriptions/active:
|
|
1159
|
+
get:
|
|
1160
|
+
operationId: findActive
|
|
1161
|
+
parameters:
|
|
1162
|
+
- *ref_20
|
|
1163
|
+
responses:
|
|
1164
|
+
'200':
|
|
1165
|
+
description: List of active subscriptions.
|
|
1166
|
+
security: *ref_21
|
|
1167
|
+
summary: Get all active subscriptions
|
|
1168
|
+
tags: *ref_22
|
|
1169
|
+
/subscriptions/{id}:
|
|
1170
|
+
get:
|
|
1171
|
+
operationId: findOne
|
|
1172
|
+
parameters:
|
|
1173
|
+
- *ref_20
|
|
1174
|
+
- name: id
|
|
1175
|
+
required: true
|
|
1176
|
+
in: path
|
|
1177
|
+
schema:
|
|
1178
|
+
type: string
|
|
1179
|
+
responses:
|
|
1180
|
+
'200':
|
|
1181
|
+
description: Subscription found.
|
|
1182
|
+
'404':
|
|
1183
|
+
description: Subscription not found.
|
|
1184
|
+
security: *ref_21
|
|
1185
|
+
summary: Get a subscription by ID
|
|
1186
|
+
tags: *ref_22
|
|
1187
|
+
patch:
|
|
1188
|
+
operationId: update
|
|
1189
|
+
parameters:
|
|
1190
|
+
- *ref_20
|
|
1191
|
+
- name: id
|
|
1192
|
+
required: true
|
|
1193
|
+
in: path
|
|
1194
|
+
schema:
|
|
1195
|
+
type: string
|
|
1196
|
+
requestBody:
|
|
1197
|
+
required: true
|
|
1198
|
+
content:
|
|
1199
|
+
application/json:
|
|
1200
|
+
schema:
|
|
1201
|
+
$ref: '#/components/schemas/UpdateSubscriptionDto'
|
|
1202
|
+
responses:
|
|
1203
|
+
'200':
|
|
1204
|
+
description: Subscription updated successfully.
|
|
1205
|
+
'404':
|
|
1206
|
+
description: Subscription or credit card not found.
|
|
1207
|
+
security: *ref_21
|
|
1208
|
+
summary: Update a subscription
|
|
1209
|
+
tags: *ref_22
|
|
1210
|
+
delete:
|
|
1211
|
+
operationId: remove
|
|
1212
|
+
parameters:
|
|
1213
|
+
- *ref_20
|
|
1214
|
+
- name: id
|
|
1215
|
+
required: true
|
|
1216
|
+
in: path
|
|
1217
|
+
schema:
|
|
1218
|
+
type: string
|
|
1219
|
+
responses:
|
|
1220
|
+
'200':
|
|
1221
|
+
description: Subscription deactivated successfully.
|
|
1222
|
+
'404':
|
|
1223
|
+
description: Subscription not found.
|
|
1224
|
+
security: *ref_21
|
|
1225
|
+
summary: Deactivate a subscription (soft delete)
|
|
1226
|
+
tags: *ref_22
|
|
1227
|
+
/subscriptions/{id}/permanent:
|
|
1228
|
+
delete:
|
|
1229
|
+
operationId: hardDelete
|
|
1230
|
+
parameters:
|
|
1231
|
+
- *ref_20
|
|
1232
|
+
- name: id
|
|
1233
|
+
required: true
|
|
1234
|
+
in: path
|
|
1235
|
+
schema:
|
|
1236
|
+
type: string
|
|
1237
|
+
responses:
|
|
1238
|
+
'200':
|
|
1239
|
+
description: Subscription deleted permanently.
|
|
1240
|
+
'404':
|
|
1241
|
+
description: Subscription not found.
|
|
1242
|
+
security: *ref_21
|
|
1243
|
+
summary: Permanently delete a subscription
|
|
1244
|
+
tags: *ref_22
|
|
1245
|
+
/subscriptions/{id}/reactivate:
|
|
1246
|
+
patch:
|
|
1247
|
+
operationId: reactivate
|
|
1248
|
+
parameters:
|
|
1249
|
+
- *ref_20
|
|
1250
|
+
- name: id
|
|
1251
|
+
required: true
|
|
1252
|
+
in: path
|
|
1253
|
+
schema:
|
|
1254
|
+
type: string
|
|
1255
|
+
responses:
|
|
1256
|
+
'200':
|
|
1257
|
+
description: Subscription reactivated successfully.
|
|
1258
|
+
'404':
|
|
1259
|
+
description: Subscription not found.
|
|
1260
|
+
security: *ref_21
|
|
1261
|
+
summary: Reactivate a deactivated subscription
|
|
1262
|
+
tags: *ref_22
|
|
1263
|
+
/api-keys:
|
|
1264
|
+
post:
|
|
1265
|
+
operationId: create
|
|
1266
|
+
parameters: []
|
|
1267
|
+
requestBody:
|
|
1268
|
+
required: true
|
|
1269
|
+
content:
|
|
1270
|
+
application/json:
|
|
1271
|
+
schema:
|
|
1272
|
+
$ref: '#/components/schemas/CreateApiKeyDto'
|
|
1273
|
+
responses:
|
|
1274
|
+
'201':
|
|
1275
|
+
description: ''
|
|
1276
|
+
content:
|
|
1277
|
+
application/json:
|
|
1278
|
+
schema:
|
|
1279
|
+
$ref: '#/components/schemas/ApiKeyResponseDto'
|
|
1280
|
+
security: &ref_23
|
|
1281
|
+
- bearer: []
|
|
1282
|
+
summary: Create a new API Key
|
|
1283
|
+
tags: &ref_24
|
|
1284
|
+
- api-keys
|
|
1285
|
+
get:
|
|
1286
|
+
operationId: findAll
|
|
1287
|
+
parameters: []
|
|
1288
|
+
responses:
|
|
1289
|
+
'200':
|
|
1290
|
+
description: ''
|
|
1291
|
+
content:
|
|
1292
|
+
application/json:
|
|
1293
|
+
schema:
|
|
1294
|
+
type: array
|
|
1295
|
+
items:
|
|
1296
|
+
$ref: '#/components/schemas/ApiKeyResponseDto'
|
|
1297
|
+
security: *ref_23
|
|
1298
|
+
summary: List your API Keys
|
|
1299
|
+
tags: *ref_24
|
|
1300
|
+
/api-keys/{id}:
|
|
1301
|
+
delete:
|
|
1302
|
+
operationId: revoke
|
|
1303
|
+
parameters:
|
|
1304
|
+
- name: id
|
|
1305
|
+
required: true
|
|
1306
|
+
in: path
|
|
1307
|
+
schema:
|
|
1308
|
+
type: string
|
|
1309
|
+
responses:
|
|
1310
|
+
'204':
|
|
1311
|
+
description: ''
|
|
1312
|
+
security: *ref_23
|
|
1313
|
+
summary: Revoke an API Key
|
|
1314
|
+
tags: *ref_24
|
|
1315
|
+
info:
|
|
1316
|
+
title: Quantix Personal Finance Manager API
|
|
1317
|
+
description: >-
|
|
1318
|
+
O Quantix é um gerenciador financeiro pessoal moderno, projetado para ajudar
|
|
1319
|
+
indivíduos a controlarem suas finanças de maneira simples, eficaz e segura.
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
## Principais Recursos
|
|
1323
|
+
|
|
1324
|
+
- **Multi-usuário**: Suporte total a múltiplos usuários com isolamento
|
|
1325
|
+
completo de dados.
|
|
1326
|
+
|
|
1327
|
+
- **Controle de Transações**: Gestão de receitas, despesas e transferências
|
|
1328
|
+
entre contas.
|
|
1329
|
+
|
|
1330
|
+
- **Cartões de Crédito**: Acompanhamento de faturas, limites e pagamentos.
|
|
1331
|
+
|
|
1332
|
+
- **Categorias e Organização**: Classificação visual de gastos com
|
|
1333
|
+
categorias personalizáveis.
|
|
1334
|
+
|
|
1335
|
+
- **Assinaturas e Recorrência**: Automação de lançamentos frequentes
|
|
1336
|
+
(Netflix, aluguel, etc.).
|
|
1337
|
+
|
|
1338
|
+
- **Segurança**: Autenticação robusta via JWT e armazenamento seguro de
|
|
1339
|
+
senhas com Bcrypt.
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
## Autenticação
|
|
1343
|
+
|
|
1344
|
+
Esta API utiliza autenticação baseada em **JWT (JSON Web Token)**.
|
|
2045
1345
|
|
|
1346
|
+
1. Registre-se ou faça login através dos endpoints de `/auth` para receber
|
|
1347
|
+
seu token de acesso.
|
|
1348
|
+
|
|
1349
|
+
2. Inclua o token no header de autorização em todas as requisições
|
|
1350
|
+
protegidas:
|
|
1351
|
+
|
|
1352
|
+
```
|
|
1353
|
+
|
|
1354
|
+
Authorization: Bearer <seu-token-aqui>
|
|
1355
|
+
|
|
1356
|
+
```
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
## Base URL
|
|
1360
|
+
|
|
1361
|
+
Todos os endpoints da API são relativos a: `http://localhost:3000/api`
|
|
1362
|
+
|
|
1363
|
+
version: 0.4.2
|
|
1364
|
+
contact:
|
|
1365
|
+
name: Quantix Support
|
|
1366
|
+
url: https://github.com/marcosnunesmbs/quantix
|
|
1367
|
+
email: support@example.com
|
|
1368
|
+
license:
|
|
1369
|
+
name: MIT
|
|
1370
|
+
url: https://github.com/marcosnunesmbs/quantix/blob/main/LICENSE
|
|
1371
|
+
tags: []
|
|
1372
|
+
servers: []
|
|
1373
|
+
components:
|
|
1374
|
+
securitySchemes:
|
|
1375
|
+
bearer:
|
|
1376
|
+
scheme: bearer
|
|
1377
|
+
bearerFormat: JWT
|
|
1378
|
+
type: http
|
|
1379
|
+
schemas:
|
|
1380
|
+
CreateCategoryDto:
|
|
1381
|
+
type: object
|
|
1382
|
+
properties:
|
|
1383
|
+
name:
|
|
1384
|
+
type: string
|
|
1385
|
+
description: Name of the category
|
|
1386
|
+
example: Groceries
|
|
1387
|
+
type:
|
|
1388
|
+
type: string
|
|
1389
|
+
description: Type of the category
|
|
1390
|
+
enum:
|
|
1391
|
+
- INCOME
|
|
1392
|
+
- EXPENSE
|
|
1393
|
+
example: EXPENSE
|
|
1394
|
+
color:
|
|
1395
|
+
type: object
|
|
1396
|
+
description: Color for the category in hexadecimal format
|
|
1397
|
+
example: '#FF5733'
|
|
1398
|
+
nullable: true
|
|
1399
|
+
required:
|
|
1400
|
+
- name
|
|
1401
|
+
- type
|
|
1402
|
+
UpdateCategoryDto:
|
|
1403
|
+
type: object
|
|
1404
|
+
properties:
|
|
1405
|
+
name:
|
|
1406
|
+
type: string
|
|
1407
|
+
description: Name of the category
|
|
1408
|
+
example: Groceries
|
|
1409
|
+
color:
|
|
1410
|
+
type: object
|
|
1411
|
+
description: Color for the category in hexadecimal format
|
|
1412
|
+
example: '#FF5733'
|
|
1413
|
+
nullable: true
|
|
1414
|
+
RegisterDto:
|
|
1415
|
+
type: object
|
|
1416
|
+
properties:
|
|
1417
|
+
name:
|
|
1418
|
+
type: string
|
|
1419
|
+
description: User name
|
|
1420
|
+
email:
|
|
1421
|
+
type: string
|
|
1422
|
+
description: User email
|
|
1423
|
+
password:
|
|
1424
|
+
type: string
|
|
1425
|
+
description: User password
|
|
1426
|
+
minLength: 6
|
|
1427
|
+
required:
|
|
1428
|
+
- name
|
|
1429
|
+
- email
|
|
1430
|
+
- password
|
|
1431
|
+
LoginDto:
|
|
1432
|
+
type: object
|
|
1433
|
+
properties:
|
|
1434
|
+
email:
|
|
1435
|
+
type: string
|
|
1436
|
+
description: User email
|
|
1437
|
+
password:
|
|
1438
|
+
type: string
|
|
1439
|
+
description: User password
|
|
1440
|
+
required:
|
|
1441
|
+
- email
|
|
1442
|
+
- password
|
|
1443
|
+
ChangePasswordDto:
|
|
1444
|
+
type: object
|
|
1445
|
+
properties:
|
|
1446
|
+
currentPassword:
|
|
1447
|
+
type: string
|
|
1448
|
+
description: Current user password
|
|
1449
|
+
newPassword:
|
|
1450
|
+
type: string
|
|
1451
|
+
description: New user password
|
|
1452
|
+
minLength: 6
|
|
1453
|
+
required:
|
|
1454
|
+
- currentPassword
|
|
1455
|
+
- newPassword
|
|
1456
|
+
ForgotPasswordDto:
|
|
1457
|
+
type: object
|
|
1458
|
+
properties:
|
|
1459
|
+
email:
|
|
1460
|
+
type: string
|
|
1461
|
+
description: User email
|
|
1462
|
+
required:
|
|
1463
|
+
- email
|
|
1464
|
+
ResetPasswordDto:
|
|
1465
|
+
type: object
|
|
1466
|
+
properties:
|
|
1467
|
+
token:
|
|
1468
|
+
type: string
|
|
1469
|
+
description: Reset token received by email
|
|
1470
|
+
newPassword:
|
|
1471
|
+
type: string
|
|
1472
|
+
description: New user password
|
|
1473
|
+
minLength: 6
|
|
1474
|
+
required:
|
|
1475
|
+
- token
|
|
1476
|
+
- newPassword
|
|
1477
|
+
RecurrenceDto:
|
|
1478
|
+
type: object
|
|
1479
|
+
properties:
|
|
1480
|
+
frequency:
|
|
1481
|
+
type: string
|
|
1482
|
+
description: Frequency of recurrence
|
|
1483
|
+
enum:
|
|
1484
|
+
- WEEKLY
|
|
1485
|
+
- MONTHLY
|
|
1486
|
+
- YEARLY
|
|
1487
|
+
example: MONTHLY
|
|
1488
|
+
interval:
|
|
1489
|
+
type: number
|
|
1490
|
+
description: Interval between recurrences
|
|
1491
|
+
example: 1
|
|
1492
|
+
minimum: 1
|
|
1493
|
+
startDate:
|
|
1494
|
+
type: object
|
|
1495
|
+
description: Start date for recurrence
|
|
1496
|
+
example: '2026-01-30'
|
|
1497
|
+
endDate:
|
|
1498
|
+
type: string
|
|
1499
|
+
description: >-
|
|
1500
|
+
End date for recurrence (optional, mutually exclusive with
|
|
1501
|
+
occurrences)
|
|
1502
|
+
example: '2026-12-31'
|
|
1503
|
+
occurrences:
|
|
1504
|
+
type: number
|
|
1505
|
+
description: Number of occurrences (optional, mutually exclusive with endDate)
|
|
1506
|
+
example: 12
|
|
1507
|
+
minimum: 2
|
|
1508
|
+
required:
|
|
1509
|
+
- frequency
|
|
1510
|
+
- interval
|
|
1511
|
+
- startDate
|
|
1512
|
+
CreateTransactionDto:
|
|
1513
|
+
type: object
|
|
1514
|
+
properties:
|
|
1515
|
+
type:
|
|
1516
|
+
type: string
|
|
1517
|
+
description: Type of the transaction
|
|
1518
|
+
enum: &ref_25
|
|
1519
|
+
- INCOME
|
|
1520
|
+
- EXPENSE
|
|
1521
|
+
example: EXPENSE
|
|
1522
|
+
name:
|
|
1523
|
+
type: object
|
|
1524
|
+
description: Name or description of the transaction
|
|
1525
|
+
example: Grocery shopping
|
|
1526
|
+
amount:
|
|
1527
|
+
type: object
|
|
1528
|
+
description: Amount of the transaction
|
|
1529
|
+
example: 125.75
|
|
1530
|
+
minimum: 0
|
|
1531
|
+
date:
|
|
1532
|
+
type: object
|
|
1533
|
+
description: >-
|
|
1534
|
+
Date of the transaction (for credit cards, this will be overridden
|
|
1535
|
+
by the due day of the card if targetDueMonth is provided)
|
|
1536
|
+
example: '2026-01-30'
|
|
1537
|
+
categoryId:
|
|
1538
|
+
type: string
|
|
1539
|
+
description: ID of the associated category
|
|
1540
|
+
example: cat_123456789
|
|
1541
|
+
paymentMethod:
|
|
1542
|
+
type: string
|
|
1543
|
+
description: Method of payment
|
|
1544
|
+
enum: &ref_26
|
|
1545
|
+
- CASH
|
|
1546
|
+
- PIX
|
|
1547
|
+
- DEBIT
|
|
1548
|
+
- CREDIT
|
|
1549
|
+
example: CREDIT
|
|
1550
|
+
creditCardId:
|
|
1551
|
+
type: string
|
|
1552
|
+
description: >-
|
|
1553
|
+
ID of the associated credit card (required if paymentMethod is
|
|
1554
|
+
CREDIT)
|
|
1555
|
+
example: cc_123456789
|
|
1556
|
+
installments:
|
|
1557
|
+
type: number
|
|
1558
|
+
description: Number of installments (optional)
|
|
1559
|
+
example: 3
|
|
1560
|
+
minimum: 1
|
|
1561
|
+
targetDueMonth:
|
|
1562
|
+
type: string
|
|
1563
|
+
description: Target month for due date in YYYY-MM format (optional)
|
|
1564
|
+
example: 2026-03
|
|
1565
|
+
isRecurring:
|
|
1566
|
+
type: boolean
|
|
1567
|
+
description: Whether the transaction is recurring
|
|
1568
|
+
example: false
|
|
1569
|
+
default: false
|
|
1570
|
+
recurrence:
|
|
1571
|
+
description: Recurrence information (optional)
|
|
1572
|
+
allOf:
|
|
1573
|
+
- $ref: '#/components/schemas/RecurrenceDto'
|
|
1574
|
+
accountId:
|
|
1575
|
+
type: string
|
|
1576
|
+
description: >-
|
|
1577
|
+
ID of the associated account (required if paymentMethod is not
|
|
1578
|
+
CREDIT)
|
|
1579
|
+
example: acc_123456789
|
|
1580
|
+
isPaid:
|
|
1581
|
+
type: boolean
|
|
1582
|
+
description: Whether the transaction has been paid
|
|
1583
|
+
example: false
|
|
1584
|
+
default: false
|
|
1585
|
+
purchaseDate:
|
|
1586
|
+
type: string
|
|
1587
|
+
description: Actual purchase date (credit card only)
|
|
1588
|
+
example: '2026-02-10'
|
|
1589
|
+
required:
|
|
1590
|
+
- type
|
|
1591
|
+
- name
|
|
1592
|
+
- amount
|
|
1593
|
+
- date
|
|
1594
|
+
CategoryDto:
|
|
1595
|
+
type: object
|
|
1596
|
+
properties:
|
|
1597
|
+
id:
|
|
1598
|
+
type: string
|
|
1599
|
+
name:
|
|
1600
|
+
type: string
|
|
1601
|
+
type:
|
|
1602
|
+
type: string
|
|
1603
|
+
enum:
|
|
1604
|
+
- INCOME
|
|
1605
|
+
- EXPENSE
|
|
1606
|
+
color:
|
|
1607
|
+
type: object
|
|
1608
|
+
nullable: true
|
|
1609
|
+
createdAt:
|
|
1610
|
+
format: date-time
|
|
1611
|
+
type: string
|
|
1612
|
+
required:
|
|
1613
|
+
- id
|
|
1614
|
+
- name
|
|
1615
|
+
- type
|
|
1616
|
+
- createdAt
|
|
1617
|
+
CreditCardDto:
|
|
1618
|
+
type: object
|
|
1619
|
+
properties:
|
|
1620
|
+
id:
|
|
1621
|
+
type: string
|
|
1622
|
+
name:
|
|
1623
|
+
type: string
|
|
1624
|
+
brand:
|
|
1625
|
+
type: string
|
|
1626
|
+
limitAmount:
|
|
1627
|
+
type: number
|
|
1628
|
+
closingDay:
|
|
1629
|
+
type: number
|
|
1630
|
+
dueDay:
|
|
1631
|
+
type: number
|
|
1632
|
+
availableLimit:
|
|
1633
|
+
type: number
|
|
1634
|
+
createdAt:
|
|
1635
|
+
format: date-time
|
|
1636
|
+
type: string
|
|
1637
|
+
required:
|
|
1638
|
+
- id
|
|
1639
|
+
- name
|
|
1640
|
+
- limitAmount
|
|
1641
|
+
- closingDay
|
|
1642
|
+
- dueDay
|
|
1643
|
+
- createdAt
|
|
1644
|
+
RecurrenceRule:
|
|
1645
|
+
type: object
|
|
1646
|
+
properties: {}
|
|
1647
|
+
SubscriptionDto:
|
|
1648
|
+
type: object
|
|
1649
|
+
properties:
|
|
1650
|
+
id:
|
|
1651
|
+
type: string
|
|
1652
|
+
name:
|
|
1653
|
+
type: string
|
|
1654
|
+
amount:
|
|
1655
|
+
type: number
|
|
1656
|
+
billingDay:
|
|
1657
|
+
type: number
|
|
1658
|
+
creditCardId:
|
|
1659
|
+
type: string
|
|
1660
|
+
categoryId:
|
|
1661
|
+
type: string
|
|
1662
|
+
active:
|
|
1663
|
+
type: boolean
|
|
1664
|
+
createdAt:
|
|
1665
|
+
format: date-time
|
|
1666
|
+
type: string
|
|
1667
|
+
updatedAt:
|
|
1668
|
+
format: date-time
|
|
1669
|
+
type: string
|
|
1670
|
+
required:
|
|
1671
|
+
- id
|
|
1672
|
+
- name
|
|
1673
|
+
- amount
|
|
1674
|
+
- billingDay
|
|
1675
|
+
- creditCardId
|
|
1676
|
+
- active
|
|
1677
|
+
- createdAt
|
|
1678
|
+
- updatedAt
|
|
1679
|
+
AccountDto:
|
|
1680
|
+
type: object
|
|
1681
|
+
properties:
|
|
1682
|
+
id:
|
|
1683
|
+
type: string
|
|
1684
|
+
name:
|
|
1685
|
+
type: string
|
|
1686
|
+
type:
|
|
1687
|
+
type: string
|
|
1688
|
+
initialBalance:
|
|
1689
|
+
type: number
|
|
1690
|
+
currentBalance:
|
|
1691
|
+
type: number
|
|
1692
|
+
createdAt:
|
|
1693
|
+
format: date-time
|
|
1694
|
+
type: string
|
|
1695
|
+
updatedAt:
|
|
1696
|
+
format: date-time
|
|
1697
|
+
type: string
|
|
1698
|
+
required:
|
|
1699
|
+
- name
|
|
1700
|
+
- type
|
|
1701
|
+
- initialBalance
|
|
1702
|
+
- currentBalance
|
|
1703
|
+
TransactionWithRelationsDto:
|
|
1704
|
+
type: object
|
|
1705
|
+
properties:
|
|
1706
|
+
id:
|
|
1707
|
+
type: string
|
|
1708
|
+
type:
|
|
1709
|
+
type: string
|
|
1710
|
+
enum:
|
|
1711
|
+
- INCOME
|
|
1712
|
+
- EXPENSE
|
|
1713
|
+
name:
|
|
1714
|
+
type: string
|
|
1715
|
+
amount:
|
|
1716
|
+
type: number
|
|
1717
|
+
date:
|
|
1718
|
+
format: date-time
|
|
1719
|
+
type: string
|
|
1720
|
+
categoryId:
|
|
1721
|
+
type: string
|
|
1722
|
+
category:
|
|
1723
|
+
$ref: '#/components/schemas/CategoryDto'
|
|
1724
|
+
paymentMethod:
|
|
1725
|
+
type: string
|
|
1726
|
+
enum:
|
|
1727
|
+
- CASH
|
|
1728
|
+
- PIX
|
|
1729
|
+
- DEBIT
|
|
1730
|
+
- CREDIT
|
|
1731
|
+
creditCardId:
|
|
1732
|
+
type: string
|
|
1733
|
+
creditCard:
|
|
1734
|
+
$ref: '#/components/schemas/CreditCardDto'
|
|
1735
|
+
recurrenceRule:
|
|
1736
|
+
$ref: '#/components/schemas/RecurrenceRule'
|
|
1737
|
+
subscriptionId:
|
|
1738
|
+
type: string
|
|
1739
|
+
subscription:
|
|
1740
|
+
$ref: '#/components/schemas/SubscriptionDto'
|
|
1741
|
+
accountId:
|
|
1742
|
+
type: string
|
|
1743
|
+
account:
|
|
1744
|
+
$ref: '#/components/schemas/AccountDto'
|
|
1745
|
+
installmentGroupId:
|
|
1746
|
+
type: string
|
|
1747
|
+
installmentNumber:
|
|
1748
|
+
type: number
|
|
1749
|
+
installmentTotal:
|
|
1750
|
+
type: number
|
|
1751
|
+
recurrenceRuleId:
|
|
1752
|
+
type: string
|
|
1753
|
+
paid:
|
|
1754
|
+
type: boolean
|
|
1755
|
+
createdAt:
|
|
1756
|
+
format: date-time
|
|
1757
|
+
type: string
|
|
1758
|
+
purchaseDate:
|
|
1759
|
+
format: date-time
|
|
1760
|
+
type: string
|
|
1761
|
+
linkedTransactionId:
|
|
1762
|
+
type: string
|
|
1763
|
+
isAnticipation:
|
|
1764
|
+
type: boolean
|
|
1765
|
+
description: >-
|
|
1766
|
+
Indicates if this transaction is part of a credit card anticipation
|
|
1767
|
+
pair
|
|
1768
|
+
required:
|
|
1769
|
+
- id
|
|
1770
|
+
- type
|
|
1771
|
+
- name
|
|
1772
|
+
- amount
|
|
1773
|
+
- date
|
|
1774
|
+
- paid
|
|
1775
|
+
- createdAt
|
|
1776
|
+
UpdateTransactionDto:
|
|
1777
|
+
type: object
|
|
1778
|
+
properties:
|
|
1779
|
+
type:
|
|
1780
|
+
type: string
|
|
1781
|
+
description: Type of the transaction
|
|
1782
|
+
enum: *ref_25
|
|
1783
|
+
example: EXPENSE
|
|
1784
|
+
name:
|
|
1785
|
+
type: object
|
|
1786
|
+
description: Name or description of the transaction
|
|
1787
|
+
example: Grocery shopping
|
|
1788
|
+
amount:
|
|
1789
|
+
type: object
|
|
1790
|
+
description: Amount of the transaction
|
|
1791
|
+
example: 125.75
|
|
1792
|
+
minimum: 0
|
|
1793
|
+
date:
|
|
1794
|
+
type: object
|
|
1795
|
+
description: >-
|
|
1796
|
+
Date of the transaction (for credit cards, this will be overridden
|
|
1797
|
+
by the due day of the card if targetDueMonth is provided)
|
|
1798
|
+
example: '2026-01-30'
|
|
1799
|
+
categoryId:
|
|
1800
|
+
type: string
|
|
1801
|
+
description: ID of the associated category
|
|
1802
|
+
example: cat_123456789
|
|
1803
|
+
paymentMethod:
|
|
1804
|
+
type: string
|
|
1805
|
+
description: Method of payment
|
|
1806
|
+
enum: *ref_26
|
|
1807
|
+
example: CREDIT
|
|
1808
|
+
creditCardId:
|
|
1809
|
+
type: string
|
|
1810
|
+
description: >-
|
|
1811
|
+
ID of the associated credit card (required if paymentMethod is
|
|
1812
|
+
CREDIT)
|
|
1813
|
+
example: cc_123456789
|
|
1814
|
+
installments:
|
|
1815
|
+
type: number
|
|
1816
|
+
description: Number of installments (optional)
|
|
1817
|
+
example: 3
|
|
1818
|
+
minimum: 1
|
|
1819
|
+
targetDueMonth:
|
|
1820
|
+
type: string
|
|
1821
|
+
description: >-
|
|
1822
|
+
Target month for due date in YYYY-MM format (optional). When
|
|
1823
|
+
provided for CREDIT payments, the transaction date will be set to
|
|
1824
|
+
the credit card's due day in the specified month.
|
|
1825
|
+
example: 2026-03
|
|
1826
|
+
isRecurring:
|
|
1827
|
+
type: boolean
|
|
1828
|
+
description: Whether the transaction is recurring
|
|
1829
|
+
example: false
|
|
1830
|
+
default: false
|
|
1831
|
+
recurrence:
|
|
1832
|
+
description: Recurrence information (optional)
|
|
1833
|
+
allOf:
|
|
1834
|
+
- $ref: '#/components/schemas/RecurrenceDto'
|
|
1835
|
+
accountId:
|
|
1836
|
+
type: string
|
|
1837
|
+
description: >-
|
|
1838
|
+
ID of the associated account (required if paymentMethod is not
|
|
1839
|
+
CREDIT)
|
|
1840
|
+
example: acc_123456789
|
|
1841
|
+
isPaid:
|
|
1842
|
+
type: boolean
|
|
1843
|
+
description: Whether the transaction has been paid
|
|
1844
|
+
example: false
|
|
1845
|
+
default: false
|
|
1846
|
+
purchaseDate:
|
|
1847
|
+
type: string
|
|
1848
|
+
description: Actual purchase date (credit card only)
|
|
1849
|
+
example: '2026-02-10'
|
|
1850
|
+
CreateCreditCardDto:
|
|
1851
|
+
type: object
|
|
1852
|
+
properties:
|
|
1853
|
+
name:
|
|
1854
|
+
type: string
|
|
1855
|
+
description: Name of the credit card
|
|
1856
|
+
example: Nubank Platinum
|
|
1857
|
+
brand:
|
|
1858
|
+
type: string
|
|
1859
|
+
description: Brand of the credit card
|
|
1860
|
+
example: Visa
|
|
1861
|
+
limitAmount:
|
|
1862
|
+
type: number
|
|
1863
|
+
description: Credit limit of the card
|
|
1864
|
+
example: 5000
|
|
1865
|
+
minimum: 0
|
|
1866
|
+
closingDay:
|
|
1867
|
+
type: number
|
|
1868
|
+
description: Day of the month when the billing cycle closes
|
|
1869
|
+
example: 15
|
|
1870
|
+
minimum: 1
|
|
1871
|
+
maximum: 31
|
|
1872
|
+
dueDay:
|
|
1873
|
+
type: number
|
|
1874
|
+
description: Day of the month when the bill is due
|
|
1875
|
+
example: 22
|
|
1876
|
+
minimum: 1
|
|
1877
|
+
maximum: 31
|
|
1878
|
+
required:
|
|
1879
|
+
- name
|
|
1880
|
+
- limitAmount
|
|
1881
|
+
- closingDay
|
|
1882
|
+
- dueDay
|
|
1883
|
+
UpdateCreditCardDto:
|
|
1884
|
+
type: object
|
|
1885
|
+
properties:
|
|
1886
|
+
name:
|
|
1887
|
+
type: string
|
|
1888
|
+
description: Name of the credit card
|
|
1889
|
+
example: Nubank Platinum
|
|
1890
|
+
brand:
|
|
1891
|
+
type: string
|
|
1892
|
+
description: Brand of the credit card
|
|
1893
|
+
example: Visa
|
|
1894
|
+
limitAmount:
|
|
1895
|
+
type: number
|
|
1896
|
+
description: Credit limit of the card
|
|
1897
|
+
example: 5000
|
|
1898
|
+
minimum: 0
|
|
1899
|
+
closingDay:
|
|
1900
|
+
type: number
|
|
1901
|
+
description: Day of the month when the billing cycle closes
|
|
1902
|
+
example: 15
|
|
1903
|
+
minimum: 1
|
|
1904
|
+
maximum: 31
|
|
1905
|
+
dueDay:
|
|
1906
|
+
type: number
|
|
1907
|
+
description: Day of the month when the bill is due
|
|
1908
|
+
example: 22
|
|
1909
|
+
minimum: 1
|
|
1910
|
+
maximum: 31
|
|
1911
|
+
PayStatementDto:
|
|
1912
|
+
type: object
|
|
1913
|
+
properties:
|
|
1914
|
+
month:
|
|
1915
|
+
type: object
|
|
1916
|
+
description: Month for the statement in YYYY-MM format
|
|
1917
|
+
example: 2026-03
|
|
1918
|
+
paymentAccountId:
|
|
1919
|
+
type: object
|
|
1920
|
+
description: ID of the account to debit for the payment
|
|
1921
|
+
example: acc_123456789
|
|
1922
|
+
required:
|
|
1923
|
+
- month
|
|
1924
|
+
- paymentAccountId
|
|
1925
|
+
ReopenStatementDto:
|
|
1926
|
+
type: object
|
|
1927
|
+
properties:
|
|
1928
|
+
month:
|
|
1929
|
+
type: object
|
|
1930
|
+
description: Month for the statement in YYYY-MM format
|
|
1931
|
+
example: 2026-03
|
|
1932
|
+
required:
|
|
1933
|
+
- month
|
|
1934
|
+
CreateAnticipationDto:
|
|
1935
|
+
type: object
|
|
1936
|
+
properties:
|
|
1937
|
+
name:
|
|
1938
|
+
type: string
|
|
1939
|
+
description: Name/description of the anticipation
|
|
1940
|
+
amount:
|
|
1941
|
+
type: number
|
|
1942
|
+
description: Amount to anticipate
|
|
1943
|
+
minimum: 0.01
|
|
1944
|
+
purchaseDate:
|
|
1945
|
+
type: string
|
|
1946
|
+
description: Date the money leaves the account (YYYY-MM-DD)
|
|
1947
|
+
example: '2026-02-23'
|
|
1948
|
+
targetDueMonth:
|
|
1949
|
+
type: string
|
|
1950
|
+
description: Target statement due month (YYYY-MM)
|
|
1951
|
+
example: 2026-03
|
|
1952
|
+
accountId:
|
|
1953
|
+
type: string
|
|
1954
|
+
description: Account ID from which money will be debited
|
|
1955
|
+
categoryId:
|
|
1956
|
+
type: string
|
|
1957
|
+
description: Category ID for both transactions
|
|
1958
|
+
required:
|
|
1959
|
+
- name
|
|
1960
|
+
- amount
|
|
1961
|
+
- purchaseDate
|
|
1962
|
+
- targetDueMonth
|
|
1963
|
+
- accountId
|
|
1964
|
+
CreateAccountDto:
|
|
1965
|
+
type: object
|
|
1966
|
+
properties:
|
|
1967
|
+
name:
|
|
1968
|
+
type: string
|
|
1969
|
+
description: Name of the account
|
|
1970
|
+
example: Itaú Checking Account
|
|
1971
|
+
type:
|
|
1972
|
+
type: string
|
|
1973
|
+
description: Type of account
|
|
1974
|
+
enum: &ref_27
|
|
1975
|
+
- BANK_ACCOUNT
|
|
1976
|
+
- WALLET
|
|
1977
|
+
- SAVINGS_ACCOUNT
|
|
1978
|
+
- INVESTMENT_ACCOUNT
|
|
1979
|
+
- OTHER
|
|
1980
|
+
example: BANK_ACCOUNT
|
|
1981
|
+
initialBalance:
|
|
1982
|
+
type: number
|
|
1983
|
+
description: Initial balance for the account
|
|
1984
|
+
example: 1000
|
|
1985
|
+
required:
|
|
1986
|
+
- name
|
|
1987
|
+
- type
|
|
1988
|
+
AccountResponseDto:
|
|
1989
|
+
type: object
|
|
1990
|
+
properties:
|
|
1991
|
+
id:
|
|
1992
|
+
type: string
|
|
1993
|
+
description: Unique identifier for the account
|
|
1994
|
+
example: uuid-string
|
|
1995
|
+
name:
|
|
1996
|
+
type: string
|
|
1997
|
+
description: Name of the account
|
|
1998
|
+
example: Itaú Checking Account
|
|
1999
|
+
type:
|
|
2000
|
+
type: string
|
|
2001
|
+
description: Type of account
|
|
2002
|
+
enum:
|
|
2003
|
+
- BANK_ACCOUNT
|
|
2004
|
+
- WALLET
|
|
2005
|
+
- SAVINGS_ACCOUNT
|
|
2006
|
+
- INVESTMENT_ACCOUNT
|
|
2007
|
+
- OTHER
|
|
2008
|
+
example: BANK_ACCOUNT
|
|
2009
|
+
initialBalance:
|
|
2010
|
+
type: number
|
|
2011
|
+
description: Initial balance when the account was created
|
|
2012
|
+
example: 1000
|
|
2013
|
+
currentBalance:
|
|
2014
|
+
type: number
|
|
2015
|
+
description: Current balance of the account
|
|
2016
|
+
example: 850
|
|
2017
|
+
createdAt:
|
|
2018
|
+
format: date-time
|
|
2019
|
+
type: string
|
|
2020
|
+
description: Timestamp when the account was created
|
|
2021
|
+
example: '2026-02-11T12:00:00Z'
|
|
2022
|
+
updatedAt:
|
|
2023
|
+
format: date-time
|
|
2024
|
+
type: string
|
|
2025
|
+
description: Timestamp when the account was last updated
|
|
2026
|
+
example: '2026-02-11T15:30:00Z'
|
|
2027
|
+
required:
|
|
2028
|
+
- id
|
|
2029
|
+
- name
|
|
2030
|
+
- type
|
|
2031
|
+
- initialBalance
|
|
2032
|
+
- currentBalance
|
|
2033
|
+
- createdAt
|
|
2034
|
+
- updatedAt
|
|
2035
|
+
UpdateAccountDto:
|
|
2036
|
+
type: object
|
|
2037
|
+
properties:
|
|
2038
|
+
name:
|
|
2039
|
+
type: string
|
|
2040
|
+
description: Name of the account
|
|
2041
|
+
example: Itaú Checking Account
|
|
2042
|
+
type:
|
|
2043
|
+
type: string
|
|
2044
|
+
description: Type of account
|
|
2045
|
+
enum: *ref_27
|
|
2046
|
+
example: BANK_ACCOUNT
|
|
2047
|
+
initialBalance:
|
|
2048
|
+
type: number
|
|
2049
|
+
description: Initial balance for the account
|
|
2050
|
+
example: 1000
|
|
2051
|
+
SettingsResponseDto:
|
|
2052
|
+
type: object
|
|
2053
|
+
properties:
|
|
2054
|
+
language:
|
|
2055
|
+
type: string
|
|
2056
|
+
description: Preferred language
|
|
2057
|
+
example: pt-BR
|
|
2058
|
+
enum:
|
|
2059
|
+
- pt-BR
|
|
2060
|
+
- en-US
|
|
2061
|
+
currency:
|
|
2062
|
+
type: string
|
|
2063
|
+
description: Default currency
|
|
2064
|
+
example: BRL
|
|
2065
|
+
enum:
|
|
2066
|
+
- BRL
|
|
2067
|
+
- USD
|
|
2068
|
+
- EUR
|
|
2069
|
+
- GBP
|
|
2070
|
+
- JPY
|
|
2071
|
+
- CAD
|
|
2072
|
+
- AUD
|
|
2073
|
+
- CHF
|
|
2074
|
+
createdAt:
|
|
2075
|
+
type: string
|
|
2076
|
+
description: Settings creation date
|
|
2077
|
+
example: '2024-01-15T10:30:00.000Z'
|
|
2078
|
+
updatedAt:
|
|
2079
|
+
type: string
|
|
2080
|
+
description: Settings last update date
|
|
2081
|
+
example: '2024-01-15T10:30:00.000Z'
|
|
2082
|
+
required:
|
|
2083
|
+
- language
|
|
2084
|
+
- currency
|
|
2085
|
+
- createdAt
|
|
2086
|
+
- updatedAt
|
|
2087
|
+
UpdateSettingsDto:
|
|
2088
|
+
type: object
|
|
2089
|
+
properties:
|
|
2090
|
+
userName:
|
|
2091
|
+
type: string
|
|
2092
|
+
description: User name
|
|
2093
|
+
example: John Doe
|
|
2094
|
+
language:
|
|
2095
|
+
type: string
|
|
2096
|
+
description: Preferred language
|
|
2097
|
+
example: pt-BR
|
|
2098
|
+
enum:
|
|
2099
|
+
- pt-BR
|
|
2100
|
+
- en-US
|
|
2101
|
+
currency:
|
|
2102
|
+
type: string
|
|
2103
|
+
description: Default currency
|
|
2104
|
+
example: BRL
|
|
2105
|
+
enum:
|
|
2106
|
+
- BRL
|
|
2107
|
+
- USD
|
|
2108
|
+
- EUR
|
|
2109
|
+
- GBP
|
|
2110
|
+
- JPY
|
|
2111
|
+
- CAD
|
|
2112
|
+
- AUD
|
|
2113
|
+
- CHF
|
|
2114
|
+
ImportDataDto:
|
|
2115
|
+
type: object
|
|
2116
|
+
properties: {}
|
|
2117
|
+
CreateTransferDto:
|
|
2118
|
+
type: object
|
|
2119
|
+
properties:
|
|
2120
|
+
sourceAccountId:
|
|
2121
|
+
type: string
|
|
2122
|
+
description: ID of the source account
|
|
2123
|
+
destinationAccountId:
|
|
2124
|
+
type: string
|
|
2125
|
+
description: ID of the destination account
|
|
2126
|
+
amount:
|
|
2127
|
+
type: number
|
|
2128
|
+
description: Amount to transfer
|
|
2129
|
+
minimum: 0.01
|
|
2130
|
+
date:
|
|
2131
|
+
type: string
|
|
2132
|
+
description: Date of the transfer (YYYY-MM-DD)
|
|
2133
|
+
example: '2026-02-17'
|
|
2134
|
+
required:
|
|
2135
|
+
- sourceAccountId
|
|
2136
|
+
- destinationAccountId
|
|
2137
|
+
- amount
|
|
2138
|
+
- date
|
|
2139
|
+
TransferResponseDto:
|
|
2140
|
+
type: object
|
|
2141
|
+
properties:
|
|
2142
|
+
id:
|
|
2143
|
+
type: string
|
|
2144
|
+
sourceAccountId:
|
|
2145
|
+
type: string
|
|
2146
|
+
destinationAccountId:
|
|
2147
|
+
type: string
|
|
2148
|
+
amount:
|
|
2149
|
+
type: number
|
|
2150
|
+
date:
|
|
2151
|
+
type: string
|
|
2152
|
+
description: Date of the transfer (YYYY-MM-DD)
|
|
2153
|
+
createdAt:
|
|
2154
|
+
format: date-time
|
|
2155
|
+
type: string
|
|
2156
|
+
updatedAt:
|
|
2157
|
+
format: date-time
|
|
2158
|
+
type: string
|
|
2159
|
+
required:
|
|
2160
|
+
- id
|
|
2161
|
+
- sourceAccountId
|
|
2162
|
+
- destinationAccountId
|
|
2163
|
+
- amount
|
|
2164
|
+
- date
|
|
2165
|
+
- createdAt
|
|
2166
|
+
- updatedAt
|
|
2167
|
+
UpdateTransferDto:
|
|
2168
|
+
type: object
|
|
2169
|
+
properties:
|
|
2170
|
+
sourceAccountId:
|
|
2171
|
+
type: string
|
|
2172
|
+
description: ID of the source account
|
|
2173
|
+
destinationAccountId:
|
|
2174
|
+
type: string
|
|
2175
|
+
description: ID of the destination account
|
|
2176
|
+
amount:
|
|
2177
|
+
type: number
|
|
2178
|
+
description: Amount to transfer
|
|
2179
|
+
minimum: 0.01
|
|
2180
|
+
date:
|
|
2181
|
+
type: string
|
|
2182
|
+
description: Date of the transfer (YYYY-MM-DD)
|
|
2183
|
+
example: '2026-02-17'
|
|
2184
|
+
CreateSubscriptionDto:
|
|
2185
|
+
type: object
|
|
2186
|
+
properties:
|
|
2187
|
+
name:
|
|
2188
|
+
type: string
|
|
2189
|
+
description: Name of the subscription (e.g., Netflix, Spotify)
|
|
2190
|
+
example: Netflix
|
|
2191
|
+
amount:
|
|
2192
|
+
type: number
|
|
2193
|
+
description: Monthly amount charged
|
|
2194
|
+
example: 55.9
|
|
2195
|
+
minimum: 0.01
|
|
2196
|
+
billingDay:
|
|
2197
|
+
type: number
|
|
2198
|
+
description: Day of the month when the subscription is charged (1-31)
|
|
2199
|
+
example: 15
|
|
2200
|
+
minimum: 1
|
|
2201
|
+
maximum: 31
|
|
2202
|
+
creditCardId:
|
|
2203
|
+
type: string
|
|
2204
|
+
description: ID of the credit card used for this subscription
|
|
2205
|
+
example: cc_123456789
|
|
2206
|
+
categoryId:
|
|
2207
|
+
type: string
|
|
2208
|
+
description: ID of the expense category
|
|
2209
|
+
example: cat_123456789
|
|
2210
|
+
required:
|
|
2211
|
+
- name
|
|
2212
|
+
- amount
|
|
2213
|
+
- billingDay
|
|
2214
|
+
- creditCardId
|
|
2215
|
+
UpdateSubscriptionDto:
|
|
2216
|
+
type: object
|
|
2217
|
+
properties:
|
|
2218
|
+
name:
|
|
2219
|
+
type: string
|
|
2220
|
+
description: Name of the subscription
|
|
2221
|
+
example: Netflix Premium
|
|
2222
|
+
amount:
|
|
2223
|
+
type: number
|
|
2224
|
+
description: Monthly amount charged
|
|
2225
|
+
example: 79.9
|
|
2226
|
+
minimum: 0.01
|
|
2227
|
+
billingDay:
|
|
2228
|
+
type: number
|
|
2229
|
+
description: Day of the month when the subscription is charged (1-31)
|
|
2230
|
+
example: 10
|
|
2231
|
+
minimum: 1
|
|
2232
|
+
maximum: 31
|
|
2233
|
+
creditCardId:
|
|
2234
|
+
type: string
|
|
2235
|
+
description: ID of the credit card used for this subscription
|
|
2236
|
+
example: cc_987654321
|
|
2237
|
+
categoryId:
|
|
2238
|
+
type: string
|
|
2239
|
+
description: ID of the expense category
|
|
2240
|
+
example: cat_123456789
|
|
2241
|
+
active:
|
|
2242
|
+
type: boolean
|
|
2243
|
+
description: Whether the subscription is active
|
|
2244
|
+
example: true
|
|
2245
|
+
CreateApiKeyDto:
|
|
2246
|
+
type: object
|
|
2247
|
+
properties:
|
|
2248
|
+
name:
|
|
2249
|
+
type: string
|
|
2250
|
+
example: My MCP Server
|
|
2251
|
+
required:
|
|
2252
|
+
- name
|
|
2253
|
+
ApiKeyResponseDto:
|
|
2254
|
+
type: object
|
|
2255
|
+
properties:
|
|
2256
|
+
id:
|
|
2257
|
+
type: string
|
|
2258
|
+
name:
|
|
2259
|
+
type: string
|
|
2260
|
+
keyPrefix:
|
|
2261
|
+
type: string
|
|
2262
|
+
secret:
|
|
2263
|
+
type: string
|
|
2264
|
+
isActive:
|
|
2265
|
+
type: boolean
|
|
2266
|
+
lastUsedAt:
|
|
2267
|
+
format: date-time
|
|
2268
|
+
type: string
|
|
2269
|
+
createdAt:
|
|
2270
|
+
format: date-time
|
|
2271
|
+
type: string
|
|
2272
|
+
required:
|
|
2273
|
+
- id
|
|
2274
|
+
- name
|
|
2275
|
+
- keyPrefix
|
|
2276
|
+
- isActive
|
|
2277
|
+
- createdAt
|
|
2278
|
+
security:
|
|
2279
|
+
- bearer: []
|