-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
firefly-iii-6.1.24-v2.yaml
783 lines (769 loc) · 25.9 KB
/
firefly-iii-6.1.24-v2.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
openapi: 3.0.0
servers:
- description: Firefly III demo site
url: https://demo.firefly-iii.org/api
info:
title: Firefly III API v6.1.24
description: |
This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the "Authorize" button to try the API below. This file was last generated on 2024-11-24T14:46:15+00:00
Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
The v2 version of the API is not yet complete. My apologies for any laps or inconsistencies. Please report any issues you find.
version: "6.1.24"
contact:
name: James Cole
email: [email protected]
url: https://firefly-iii.org
license:
name: AGPLv3
url: 'https://www.gnu.org/licenses/agpl-3.0.en.html'
tags:
- name: accounts
description: Endpoints that deliver all of the user's asset, expense and other accounts
(and the metadata) together with related transactions, piggy banks and other objects.
Also delivers endpoints for CRUD operations for accounts.
- name: budgets
description: Endpoints to manage a user's budgets and get info on the related objects,
like limits.
- name: charts
description: The "charts" endpoints deliver optimised data for charts and graphs.
- name: net-worth
description: Shows you the net worth of the current user.
- name: preferences
description: These endpoints can be used to manage the user's preferences, including
some hidden ones.
- name: transactions-sum
description: Endpoints to sum transactions based on various properties.
paths:
/v2/autocomplete/accounts:
get:
tags:
- autocomplete
operationId: getAccountsAC
parameters:
- name: X-Trace-Id
in: header
description: Unique identifier associated with this request.
required: false
schema:
type: string
format: uuid
- in: query
name: user_group_id
description: Optional value of the financial administration you want to perform this operation on. The user must have access to this particular administration. Which access rights exactly are necessary, is different per endpoint.
required: false
schema:
type: integer
format: int32
example: 1
- in: query
name: query
description: The autocomplete search query. Will be exploded on spaces, and each word will be searched for in the autocomplete results. Will also accept comma separated values for the same effect.
required: false
schema:
type: string
format: string
example: "search query"
- in: query
name: date
description: Todays date or any other date. If you supply this value, the accounts autocomplete array will include the account balances for the found accounts.
required: false
schema:
type: string
format: date
example: "2018-09-17"
- in: query
name: size
description: The size of the autocomplete result list. This is the number of items returned.
required: false
schema:
type: integer
format: int32
example: 15
- in: query
name: page
description: The page number of the autocomplete result list.
required: false
schema:
type: integer
format: int32
example: 1
summary: Returns all accounts of the user returned in a basic auto-complete array.
responses:
"401":
description: Unauthenticated
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthenticatedResponse'
"404":
description: Page not found
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
"400":
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
"500":
description: Internal exception
content:
application/json:
schema:
$ref: '#/components/schemas/InternalExceptionResponse'
"200":
description: A list of accounts with basic account information.
content:
application/json:
schema:
$ref: '#/components/schemas/AutocompleteObjectArray'
/v2/chart/balance/balance:
get:
tags:
- charts
summary: A chart that contains spent/earned amounts
description: |
The chart contains spent/earned amounts for the given date range, grouped by the given period, and collected for the given accounts.
operationId: getBalanceChart
parameters:
- name: X-Trace-Id
in: header
description: Unique identifier associated with this request.
required: false
schema:
type: string
format: uuid
- in: query
name: start
description: |
A date formatted YYYY-MM-DD.
required: true
schema:
type: string
format: date
- in: query
name: end
description: |
A date formatted YYYY-MM-DD.
required: true
schema:
type: string
format: date
- in: query
name: accounts[]
allowReserved: true
description: |
An array of accounts that should be included. Example: accounts[]=1&accounts[]=2.
required: true
style: form
explode: true
schema:
type: array
items:
type: integer
format: int32
- in: query
name: period
description: The period by which the results must be grouped.
required: true
schema:
$ref: '#/components/schemas/PeriodProperty'
- in: query
name: preselected
description: The accounts Firefly III must include in this chart. If you do not select any accounts in the accounts[] parameter, this parameter is used. This parameter overrules the accounts[] parameter.
required: false
schema:
$ref: '#/components/schemas/PreselectedAccountProperty'
responses:
"401":
description: Unauthenticated
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthenticatedResponse'
"404":
description: Page not found
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
"400":
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
"500":
description: Internal exception
content:
application/json:
schema:
$ref: '#/components/schemas/InternalExceptionResponse'
200:
description: Chart information. Check out the model for more details. Each main entry is a set of data.
content:
application/json:
schema:
$ref: '#/components/schemas/ChartLine'
components:
schemas:
AutocompleteFilter:
type: object
properties:
query:
type: string
items:
type: string
format: string
example: "autocomplete query here"
description: The search query to filter the autocomplete on. Multiple words can be submitted, but this is not required. An autocomplete box generally only submits one query.
account_types:
type: array
items:
$ref: '#/components/schemas/AccountTypeFilter'
type: string
example: "Asset account"
description: Used only in the 'accounts' autocomplete endpoint, this filters the results by account type.
AutocompleteObject:
type: object
required:
- id
- title
- meta
properties:
id:
type: string
format: string
example: "2"
readOnly: true
description: The ID of the object as a string.
title:
type: string
format: string
example: "Some object"
description: The autocomplete value that your dropdown can use. This could be an account or category name.
readOnly: true
value:
type: string
format: string
nullable: true
example: "2"
readOnly: true
description: Optional. The ID of the object as a string. This is only used in the tags autocomplete endpoint because the JS library I use doesn't support "id" as the value field.
label:
type: string
format: string
example: "Some object"
description: The autocomplete value that your dropdown can use. This is only used in the tags autocomplete endpoint because the JS library I use doesn't support "title" as the value field.
readOnly: true
meta:
type: object
description: Array with optional meta-information. Fields will be different for each autocomplete entry.
properties:
type:
type: string
format: string
example: "Asset account"
readOnly: true
description: Account type of the account found by the auto-complete search for accounts.
transaction_group_id:
type: string
format: string
nullable: true
example: "2"
readOnly: true
description: The ID of the associated transaction. Only used in the transaction description autocomplete endpoint.
currency_id:
type: string
format: string
example: "12"
readOnly: true
description: ID for the currency used by this account. Only used in the account autocomplete endpoint.
currency_name:
type: string
format: string
example: "Euro"
readOnly: true
description: Currency name for the currency used by this account. Only used in the account autocomplete endpoint.
currency_code:
type: string
format: string
example: "EUR"
readOnly: true
description: Currency code for the currency used by this account. Only used in the account autocomplete endpoint.
currency_symbol:
type: string
format: string
example: "$"
readOnly: true
description: Currency symbol for the currency used by this account. Only used in the account autocomplete endpoint.
currency_decimal_places:
type: integer
format: int32
example: 2
readOnly: true
description: Number of decimal places for the currency used by this account. Only used in the account autocomplete endpoint.
account_balances:
type: array
readOnly: true
description: The latest account balance(s) of the account. Only used in the account autocomplete endpoint.
items:
type: object
properties:
native_amount:
type: string
format: amount
example: "123.45"
description: The account balance in the user's default currency.
amount:
type: string
format: amount
example: "123.45"
description: The account balance.
currency_id:
type: string
format: string
example: "12"
readOnly: true
description: ID for the currency of the amount.
currency_name:
type: string
format: string
example: "Euro"
readOnly: true
description: Currency name for the currency of the amount.
currency_code:
type: string
format: string
example: "EUR"
readOnly: true
description: Currency code for the currency of the amount.
currency_symbol:
type: string
format: string
example: "$"
readOnly: true
description: Currency symbol for the currency of the amount.
currency_decimal_places:
type: integer
format: int32
example: 2
readOnly: true
description: Number of decimal places for the currency of the amount.
native_currency_id:
type: string
format: string
example: "12"
readOnly: true
description: ID for the native currency of the user, so the currency of the native amount field.
native_currency_name:
type: string
format: string
example: "Euro"
readOnly: true
description: Currency name for the native currency of the user, so the currency of the native amount field.
native_currency_code:
type: string
format: string
example: "EUR"
readOnly: true
description: Currency code for the native currency of the user, so the currency of the native amount field.
native_currency_symbol:
type: string
format: string
example: "$"
readOnly: true
description: Currency symbol for the native currency of the user, so the currency of the native amount field.
native_currency_decimal_places:
type: integer
format: int32
example: 2
readOnly: true
description: Number of decimal places for for the native currency of the user, so the currency of the native amount field.
AutocompleteObjectArray:
type: array
items:
$ref: '#/components/schemas/AutocompleteObject'
ChartDataPoint:
type: object
properties:
key:
type: string
format: string
example: "value"
description: "The key is the label of the value, so for example: '2024-10-01T00:00:00+02:00' => 13 or 'Groceries' => -123. For date-related charts, this is always a Atom date."
ChartDataSet:
type: object
properties:
label:
type: string
format: string
example: "earned"
description: "This is the label of the current data-set. It can refer to an object by name, or a collected set of data."
currency_id:
type: string
format: string
example: "5"
description: "The currency ID of the currency associated to the data in the entries."
currency_code:
type: string
format: string
example: "EUR"
currency_symbol:
type: string
format: string
example: "$"
currency_decimal_places:
type: integer
format: int32
example: 2
description: "Number of decimals for the currency associated to the data in the entries."
native_currency_id:
type: string
format: string
example: "5"
description: "The currency ID of the user's native (default) currency."
native_currency_code:
type: string
format: string
example: "EUR"
description: "The currency code of the user's native (default) currency."
native_currency_symbol:
type: string
format: string
example: "$"
description: "The currency symbol of the user's native (default) currency."
native_currency_decimal_places:
type: integer
format: int32
example: 2
description: "Number of decimals for the native (default) currency of the user."
start:
type: string
format: date-time
example: "2018-09-17T12:46:47+01:00"
description: "Holds the date and time of start of the range of data collected. It could be there was no data for this point in time, but this is the start of the requested range."
end:
type: string
format: date-time
example: "2018-09-17T12:46:47+01:00"
description: "Holds the date and time of END of the range of data collected. It could be there was no data for this point in time, but this is the end of the requested range."
period:
$ref: '#/components/schemas/PeriodProperty'
entries:
type: object
description: "The actual entries for this data set. They 'key' value is the label for the data point. The value is the actual (numerical) value."
items:
$ref: '#/components/schemas/ChartDataPoint'
native_entries:
type: object
description: "The entries for this data set converted to the user's native (default) currency. They 'key' value is the label for the data point. The value is the actual (numerical) value."
items:
$ref: '#/components/schemas/ChartDataPoint'
ChartLine:
type: array
items:
$ref: '#/components/schemas/ChartDataSet'
PeriodProperty:
type: string
format: string
example: "1M"
description: "This field denotes the period in which the chart data is split up. If the period is not relevant, because the chart is not time-based, it will be NULL."
nullable: true
enum:
- 1D
- 1W
- 1M
- 3M
- 6M
- 1Y
PreselectedAccountProperty:
type: string
enum:
- all
- assets
- liabilities
AccountTypeFilter:
type: string
enum:
- all
- asset
- cash
- expense
- revenue
- special
- hidden
- liability
- liabilities
- Default account
- Cash account
- Asset account
- Expense account
- Revenue account
- Initial balance account
- Beneficiary account
- Import account
- Reconciliation account
- Loan
- Debt
- Mortgage
TransactionTypeFilter:
type: string
enum:
- all
- withdrawal
- withdrawals
- expense
- deposit
- deposits
- income
- transfer
- transfers
- opening_balance
- reconciliation
- special
- specials
- default
Meta:
type: object
properties:
pagination:
type: object
properties:
total:
type: integer
example: 3
count:
type: integer
example: 20
per_page:
type: integer
example: 100
current_page:
type: integer
example: 1
total_pages:
type: integer
example: 1
AccountRoleProperty:
type: string
format: string
example: "defaultAsset"
description: "Is only mandatory when the type is asset."
nullable: true
enum:
- defaultAsset
- sharedAsset
- savingAsset
- ccAsset
- cashWalletAsset
- null
AccountTypeProperty:
type: string
format: string
example: "Asset account"
readOnly: true
enum:
- Default account
- Cash account
- Asset account
- Expense account
- Revenue account
- Initial balance account
- Beneficiary account
- Import account
- Reconciliation account
- Loan
- Debt
- Mortgage
CreditCardTypeProperty:
type: string
format: string
example: monthlyFull
description: "Mandatory when the account_role is ccAsset. Can only be monthlyFull or null."
nullable: true
enum:
- monthlyFull
- null
InterestPeriodProperty:
type: string
format: string
example: monthly
description: "Mandatory when type is liability. Period over which the interest is calculated."
nullable: true
enum:
- weekly
- monthly
- quarterly
- half-year
- yearly
- null
LiabilityDirectionProperty:
type: string
format: string
example: credit
description: "'credit' indicates somebody owes you the liability. 'debit' Indicates you owe this debt yourself. Works only for liabiltiies."
nullable: true
enum:
- credit
- debit
- null
LiabilityTypeProperty:
type: string
format: string
example: "loan"
description: "Mandatory when type is liability. Specifies the exact type."
nullable: true
enum:
- loan
- debt
- mortgage
- null
ShortAccountTypeProperty:
type: string
format: string
example: "asset"
description: "Can only be one one these account types. import, initial-balance and reconciliation cannot be set manually."
enum:
- asset
- expense
- import
- revenue
- cash
- liability
- liabilities
- "initial-balance"
- reconciliation
TransactionTypeProperty:
type: string
format: string
example: "withdrawal"
enum:
- withdrawal
- deposit
- transfer
- reconciliation
- opening balance
BadRequestResponse:
type: object
properties:
message:
type: string
format: string
example: "Bad Request"
exception:
type: string
format: string
example: "BadRequestHttpException"
InternalExceptionResponse:
type: object
properties:
message:
type: string
format: string
example: "Internal Exception"
exception:
type: string
format: string
example: "InternalException"
NotFoundResponse:
type: object
properties:
message:
type: string
format: string
example: "Resource not found"
exception:
type: string
format: string
example: "NotFoundHttpException"
UnauthenticatedResponse:
type: object
properties:
message:
type: string
format: string
example: "Unauthenticated"
exception:
type: string
format: string
example: "AuthenticationException"
ValidationErrorResponse:
type: object
properties:
message:
type: string
format: string
example: "The given data was invalid."
errors:
type: object
properties:
email:
type: array
items:
type: string
format: string
blocked:
type: array
items:
type: string
format: string
role:
type: array
items:
type: string
format: string
blocked_code:
type: array
items:
type: string
format: string
name:
type: array
items:
type: string
format: string
type:
type: array
items:
type: string
format: string
iban:
type: array
items:
type: string
format: string
start:
type: array
items:
type: string
format: string
end:
type: array
items:
type: string
format: string
date:
type: array
items:
type: string
format: string
securitySchemes:
firefly_iii_auth:
type: oauth2
description: Default OAuth2 flow
flows:
authorizationCode:
authorizationUrl: https://demo.firefly-iii.org/oauth/authorize
tokenUrl: https://demo.firefly-iii.org/oauth/token
refreshUrl: https://demo.firefly-iii.org/oauth/token
scopes: {}
local_bearer_auth:
description: Optional Bearer token flow
type: http
scheme: bearer
security:
- firefly_iii_auth: []
- local_bearer_auth: []