@lunch-money/v2-api-spec 2.11.0-preview.8 → 2.11.1-preview.1
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/README.md +6 -7
- package/lunch-money-api-v2.yaml +565 -19
- package/package.json +10 -3
- package/version-history.md +5 -0
- package/README.md.backup +0 -217
package/README.md
CHANGED
|
@@ -21,12 +21,8 @@ After installation, the package provides:
|
|
|
21
21
|
|
|
22
22
|
```javascript
|
|
23
23
|
const fs = require('fs');
|
|
24
|
-
const path = require('path');
|
|
25
24
|
|
|
26
|
-
const specPath =
|
|
27
|
-
__dirname,
|
|
28
|
-
'node_modules/@lunch-money/v2-api-spec/lunch-money-api-v2.yaml'
|
|
29
|
-
);
|
|
25
|
+
const specPath = require.resolve('@lunch-money/v2-api-spec/lunch-money-api-v2.yaml');
|
|
30
26
|
const spec = fs.readFileSync(specPath, 'utf8');
|
|
31
27
|
```
|
|
32
28
|
|
|
@@ -123,14 +119,17 @@ For example, version `2.8.2` means:
|
|
|
123
119
|
- 8 main endpoint groups
|
|
124
120
|
- 2 updates since the 8th endpoint was added
|
|
125
121
|
|
|
122
|
+
## Related Packages
|
|
123
|
+
|
|
124
|
+
This package is the canonical v2 OpenAPI specification artifact. The `@lunch-money/developer-docs` package ships the public documentation content and may include a convenience copy of the spec under `v2/spec/`, but API tooling should consume the YAML from `@lunch-money/v2-api-spec`.
|
|
125
|
+
|
|
126
126
|
## Resources
|
|
127
127
|
|
|
128
128
|
- [Lunch Money Website](https://lunchmoney.app)
|
|
129
129
|
- [Interactive API Documentation](https://alpha.lunchmoney.dev/v2/docs)
|
|
130
|
-
- [GitHub Repository](https://github.com/lunch-money/
|
|
130
|
+
- [GitHub Repository](https://github.com/lunch-money/developer-docs)
|
|
131
131
|
- [API Status](https://status.lunchmoney.app)
|
|
132
132
|
|
|
133
133
|
## License
|
|
134
134
|
|
|
135
135
|
ISC
|
|
136
|
-
|
package/lunch-money-api-v2.yaml
CHANGED
|
@@ -2,7 +2,7 @@ openapi: 3.0.2
|
|
|
2
2
|
info:
|
|
3
3
|
title: Lunch Money API - v2
|
|
4
4
|
description: |-
|
|
5
|
-
Welcome to the Lunch Money v2 API reference. This is the **v2.11.
|
|
5
|
+
Welcome to the Lunch Money v2 API reference. This is the **v2.11.1** spec. It includes previews of the proposed `/crypto` and `/balance_history` endpoints. Only the mock service works with these endpoints.<br><br>
|
|
6
6
|
The most recent stable version of the API is v2.9.4 and is available at:
|
|
7
7
|
`https://api.lunchmoney.dev/v2`
|
|
8
8
|
|
|
@@ -39,7 +39,7 @@ info:
|
|
|
39
39
|
license:
|
|
40
40
|
name: Apache 2.0
|
|
41
41
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
|
42
|
-
version: 2.11.
|
|
42
|
+
version: 2.11.1
|
|
43
43
|
|
|
44
44
|
servers:
|
|
45
45
|
- url: https://api.lunchmoney.dev/v2
|
|
@@ -50,7 +50,10 @@ servers:
|
|
|
50
50
|
|
|
51
51
|
tags:
|
|
52
52
|
- name: me
|
|
53
|
-
description: View details and settings for the current user and account
|
|
53
|
+
description: View details and settings for the current user and account.<p>
|
|
54
|
+
Use [/me/account/settings](#tag/me/GET/me/account/settings) and
|
|
55
|
+
[/me/user/settings](#tag/me/GET/me/user/settings) for account- and
|
|
56
|
+
user-level preferences.
|
|
54
57
|
- name: categories
|
|
55
58
|
description: Work with categories
|
|
56
59
|
externalDocs:
|
|
@@ -113,8 +116,10 @@ tags:
|
|
|
113
116
|
description: Learn more about transactions
|
|
114
117
|
url: https://support.lunchmoney.app/finances/transactions
|
|
115
118
|
- name: budgets
|
|
116
|
-
description: View settings and modify budget amounts.<p> Use
|
|
117
|
-
[/
|
|
119
|
+
description: View settings and modify budget amounts.<p> Use
|
|
120
|
+
[/budgets/settings](#tag/budgets/GET/budgets/settings) to view budget
|
|
121
|
+
period settings.<p> Use the [/summary](#tag/summary) endpoint to view
|
|
122
|
+
the budget details performance.
|
|
118
123
|
externalDocs:
|
|
119
124
|
description: Learn more about budgets
|
|
120
125
|
url: https://support.lunchmoney.app/finances/budgets
|
|
@@ -142,12 +147,18 @@ components:
|
|
|
142
147
|
account_id:
|
|
143
148
|
type: integer
|
|
144
149
|
format: int64
|
|
145
|
-
description: Unique ID for the
|
|
150
|
+
description: Unique ID for the current budgeting account
|
|
146
151
|
budget_name:
|
|
147
152
|
type: string
|
|
148
|
-
description: Name of the
|
|
153
|
+
description: Name of the current budgeting account.<p> Also available
|
|
154
|
+
as `display_name` on
|
|
155
|
+
[/me/account/settings](#tag/me/GET/me/account/settings), which is
|
|
156
|
+
the preferred endpoint for reading and updating account settings.
|
|
149
157
|
primary_currency:
|
|
150
|
-
description: Primary currency
|
|
158
|
+
description: Primary currency for the current budgeting account.<p>
|
|
159
|
+
Also available on [/me/account/settings](#tag/me/GET/me/account/settings),
|
|
160
|
+
which is the preferred endpoint for reading and updating account
|
|
161
|
+
settings.
|
|
151
162
|
allOf:
|
|
152
163
|
- $ref: "#/components/schemas/currencyEnum"
|
|
153
164
|
api_key_label:
|
|
@@ -3612,10 +3623,11 @@ components:
|
|
|
3612
3623
|
|
|
3613
3624
|
# Response body for GET /budgets/settings (200)
|
|
3614
3625
|
budgetSettingsResponseObject:
|
|
3615
|
-
x-internal: true
|
|
3616
3626
|
type: object
|
|
3627
|
+
title: budget settings object
|
|
3617
3628
|
additionalProperties: false
|
|
3618
|
-
description: Budget period and display settings
|
|
3629
|
+
description: Budget period and display settings for the current budgeting
|
|
3630
|
+
account.
|
|
3619
3631
|
properties:
|
|
3620
3632
|
budget_period_granularity:
|
|
3621
3633
|
type: string
|
|
@@ -3627,8 +3639,8 @@ components:
|
|
|
3627
3639
|
- twice a month
|
|
3628
3640
|
description: Budget period granularity
|
|
3629
3641
|
budget_period_quantity:
|
|
3630
|
-
type:
|
|
3631
|
-
format:
|
|
3642
|
+
type: integer
|
|
3643
|
+
format: int32
|
|
3632
3644
|
description: The number of `granularity` units that make up a single
|
|
3633
3645
|
budgeting period.
|
|
3634
3646
|
budget_period_anchor_date:
|
|
@@ -3670,6 +3682,371 @@ components:
|
|
|
3670
3682
|
- budget_income_option
|
|
3671
3683
|
- budget_rollover_left_to_budget
|
|
3672
3684
|
|
|
3685
|
+
weekStartsOnEnum:
|
|
3686
|
+
type: string
|
|
3687
|
+
title: week starts on enum
|
|
3688
|
+
enum:
|
|
3689
|
+
- sunday
|
|
3690
|
+
- monday
|
|
3691
|
+
description: The day on which a calendar week begins.
|
|
3692
|
+
|
|
3693
|
+
monthYearFormatEnum:
|
|
3694
|
+
type: string
|
|
3695
|
+
title: month and year format enum
|
|
3696
|
+
description: Format string for displaying month and year values
|
|
3697
|
+
in the Lunch Money app.
|
|
3698
|
+
enum:
|
|
3699
|
+
- "MMMM YYYY"
|
|
3700
|
+
- "MMM YYYY"
|
|
3701
|
+
- "YYYY MMM"
|
|
3702
|
+
- "MM YYYY"
|
|
3703
|
+
- "MM-YYYY"
|
|
3704
|
+
- "MM.YYYY"
|
|
3705
|
+
- "MM/YYYY"
|
|
3706
|
+
- "M YYYY"
|
|
3707
|
+
- "M-YYYY"
|
|
3708
|
+
- "M.YYYY"
|
|
3709
|
+
- "M/YYYY"
|
|
3710
|
+
- "YYYY M"
|
|
3711
|
+
- "YYYY-M"
|
|
3712
|
+
- "YYYY.M"
|
|
3713
|
+
- "YYYY/M"
|
|
3714
|
+
- "YYYY MM"
|
|
3715
|
+
- "YYYY-MM"
|
|
3716
|
+
- "YYYY.MM"
|
|
3717
|
+
- "YYYY/MM"
|
|
3718
|
+
|
|
3719
|
+
monthDayYearFormatEnum:
|
|
3720
|
+
type: string
|
|
3721
|
+
title: month, day and year format enum
|
|
3722
|
+
description: Format string for displaying full dates in the
|
|
3723
|
+
Lunch Money app.
|
|
3724
|
+
enum:
|
|
3725
|
+
- "MMM D, YYYY"
|
|
3726
|
+
- "D MMM YYYY"
|
|
3727
|
+
- "YYYY MM DD"
|
|
3728
|
+
- "YYYY-MM-DD"
|
|
3729
|
+
- "YYYY.MM.DD"
|
|
3730
|
+
- "YYYY/MM/DD"
|
|
3731
|
+
- "YYYY M DD"
|
|
3732
|
+
- "YYYY-M-DD"
|
|
3733
|
+
- "YYYY.M.DD"
|
|
3734
|
+
- "YYYY/M/DD"
|
|
3735
|
+
- "YYYY MM D"
|
|
3736
|
+
- "YYYY-MM-D"
|
|
3737
|
+
- "YYYY.MM.D"
|
|
3738
|
+
- "YYYY/MM/D"
|
|
3739
|
+
- "YYYY M D"
|
|
3740
|
+
- "YYYY-M-D"
|
|
3741
|
+
- "YYYY.M.D"
|
|
3742
|
+
- "YYYY/M/D"
|
|
3743
|
+
- "DD MM YYYY"
|
|
3744
|
+
- "DD-MM-YYYY"
|
|
3745
|
+
- "DD.MM.YYYY"
|
|
3746
|
+
- "DD/MM/YYYY"
|
|
3747
|
+
- "DD M YYYY"
|
|
3748
|
+
- "DD-M-YYYY"
|
|
3749
|
+
- "DD.M.YYYY"
|
|
3750
|
+
- "DD/M/YYYY"
|
|
3751
|
+
- "D MM YYYY"
|
|
3752
|
+
- "D-MM-YYYY"
|
|
3753
|
+
- "D.MM.YYYY"
|
|
3754
|
+
- "D/MM/YYYY"
|
|
3755
|
+
- "D M YYYY"
|
|
3756
|
+
- "D-M-YYYY"
|
|
3757
|
+
- "D.M.YYYY"
|
|
3758
|
+
- "D/M/YYYY"
|
|
3759
|
+
- "M D YYYY"
|
|
3760
|
+
- "M-D-YYYY"
|
|
3761
|
+
- "M.D.YYYY"
|
|
3762
|
+
- "M/D/YYYY"
|
|
3763
|
+
- "MM D YYYY"
|
|
3764
|
+
- "MM-D-YYYY"
|
|
3765
|
+
- "MM.D.YYYY"
|
|
3766
|
+
- "MM/D/YYYY"
|
|
3767
|
+
- "MM DD YYYY"
|
|
3768
|
+
- "MM-DD-YYYY"
|
|
3769
|
+
- "MM.DD.YYYY"
|
|
3770
|
+
- "MM/DD/YYYY"
|
|
3771
|
+
- "M DD YYYY"
|
|
3772
|
+
- "M-DD-YYYY"
|
|
3773
|
+
- "M.DD.YYYY"
|
|
3774
|
+
- "M/DD/YYYY"
|
|
3775
|
+
|
|
3776
|
+
monthDayFormatEnum:
|
|
3777
|
+
type: string
|
|
3778
|
+
title: month and day format enum
|
|
3779
|
+
description: Format string for displaying month and day values
|
|
3780
|
+
without a year.
|
|
3781
|
+
enum:
|
|
3782
|
+
- "MMM D"
|
|
3783
|
+
- "MMM DD"
|
|
3784
|
+
- "D MMM"
|
|
3785
|
+
- "DD MMM"
|
|
3786
|
+
- "MM D"
|
|
3787
|
+
- "MM-D"
|
|
3788
|
+
- "MM.D"
|
|
3789
|
+
- "MM/D"
|
|
3790
|
+
- "MM DD"
|
|
3791
|
+
- "MM-DD"
|
|
3792
|
+
- "MM.DD"
|
|
3793
|
+
- "MM/DD"
|
|
3794
|
+
- "M D"
|
|
3795
|
+
- "M-D"
|
|
3796
|
+
- "M.D"
|
|
3797
|
+
- "M/D"
|
|
3798
|
+
- "M DD"
|
|
3799
|
+
- "M-DD"
|
|
3800
|
+
- "M.DD"
|
|
3801
|
+
- "M/DD"
|
|
3802
|
+
- "D MM"
|
|
3803
|
+
- "D-MM"
|
|
3804
|
+
- "D.MM"
|
|
3805
|
+
- "D/MM"
|
|
3806
|
+
- "DD MM"
|
|
3807
|
+
- "DD-MM"
|
|
3808
|
+
- "DD.MM"
|
|
3809
|
+
- "DD/MM"
|
|
3810
|
+
- "D M"
|
|
3811
|
+
- "D-M"
|
|
3812
|
+
- "D.M"
|
|
3813
|
+
- "D/M"
|
|
3814
|
+
- "DD M"
|
|
3815
|
+
- "DD-M"
|
|
3816
|
+
- "DD.M"
|
|
3817
|
+
- "DD/M"
|
|
3818
|
+
|
|
3819
|
+
accountSettingsObject:
|
|
3820
|
+
type: object
|
|
3821
|
+
title: account settings object
|
|
3822
|
+
additionalProperties: false
|
|
3823
|
+
description: Account-level settings for the budgeting account
|
|
3824
|
+
associated with the authorized API token.
|
|
3825
|
+
properties:
|
|
3826
|
+
primary_currency:
|
|
3827
|
+
description: Primary currency for the account.
|
|
3828
|
+
allOf:
|
|
3829
|
+
- $ref: "#/components/schemas/currencyEnum"
|
|
3830
|
+
supported_currencies:
|
|
3831
|
+
type: array
|
|
3832
|
+
items:
|
|
3833
|
+
$ref: "#/components/schemas/currencyEnum"
|
|
3834
|
+
description: Currencies available when creating or editing transactions,
|
|
3835
|
+
balances, and other amounts in the Lunch Money app.
|
|
3836
|
+
display_name:
|
|
3837
|
+
type: string
|
|
3838
|
+
nullable: true
|
|
3839
|
+
description: Display name of the budgeting account in the Lunch Money
|
|
3840
|
+
app.
|
|
3841
|
+
locale:
|
|
3842
|
+
type: string
|
|
3843
|
+
description: Locale used for formatting dates and numbers in the
|
|
3844
|
+
Lunch Money app (for example, `en-US`). When no locale is explicitly
|
|
3845
|
+
stored for the account, the effective locale is derived from the
|
|
3846
|
+
`default_locale` associated with `primary_currency` in the
|
|
3847
|
+
currencies table (for example, `usd` → `en-US`, `cad` → `en-CA`,
|
|
3848
|
+
`gbp` → `en-GB`).
|
|
3849
|
+
auto_create_category_rules:
|
|
3850
|
+
type: boolean
|
|
3851
|
+
default: true
|
|
3852
|
+
description: If `true`, category rules are created automatically when
|
|
3853
|
+
categorizing transactions.
|
|
3854
|
+
auto_create_suggested_transaction_rules:
|
|
3855
|
+
type: boolean
|
|
3856
|
+
default: true
|
|
3857
|
+
description: If `true`, suggested transaction rules are created
|
|
3858
|
+
automatically.
|
|
3859
|
+
auto_review_transaction_on_update:
|
|
3860
|
+
type: boolean
|
|
3861
|
+
default: true
|
|
3862
|
+
description: If `true`, transactions are marked as reviewed when
|
|
3863
|
+
updated.
|
|
3864
|
+
auto_review_transaction_on_creation:
|
|
3865
|
+
type: boolean
|
|
3866
|
+
default: true
|
|
3867
|
+
description: If `true`, transactions are marked as reviewed when
|
|
3868
|
+
created.
|
|
3869
|
+
required:
|
|
3870
|
+
- primary_currency
|
|
3871
|
+
- supported_currencies
|
|
3872
|
+
- display_name
|
|
3873
|
+
- locale
|
|
3874
|
+
- auto_create_category_rules
|
|
3875
|
+
- auto_create_suggested_transaction_rules
|
|
3876
|
+
- auto_review_transaction_on_update
|
|
3877
|
+
- auto_review_transaction_on_creation
|
|
3878
|
+
|
|
3879
|
+
updateAccountSettingsRequestObject:
|
|
3880
|
+
x-internal: true
|
|
3881
|
+
type: object
|
|
3882
|
+
additionalProperties: false
|
|
3883
|
+
description: Request body for updating account settings. Include at least
|
|
3884
|
+
one property to update.
|
|
3885
|
+
properties:
|
|
3886
|
+
primary_currency:
|
|
3887
|
+
allOf:
|
|
3888
|
+
- $ref: "#/components/schemas/currencyEnum"
|
|
3889
|
+
description: If set, updates the account's primary currency.
|
|
3890
|
+
x-updatable: true
|
|
3891
|
+
supported_currencies:
|
|
3892
|
+
type: array
|
|
3893
|
+
items:
|
|
3894
|
+
$ref: "#/components/schemas/currencyEnum"
|
|
3895
|
+
description: If set, replaces the list of supported currencies for the
|
|
3896
|
+
account.
|
|
3897
|
+
x-updatable: true
|
|
3898
|
+
display_name:
|
|
3899
|
+
type: string
|
|
3900
|
+
nullable: true
|
|
3901
|
+
description: If set, updates the display name of the budgeting account.
|
|
3902
|
+
x-updatable: true
|
|
3903
|
+
locale:
|
|
3904
|
+
type: string
|
|
3905
|
+
description: If set, updates the locale used for formatting dates and
|
|
3906
|
+
numbers in the Lunch Money app.
|
|
3907
|
+
x-updatable: true
|
|
3908
|
+
auto_create_category_rules:
|
|
3909
|
+
type: boolean
|
|
3910
|
+
description: If set, updates whether category rules are created
|
|
3911
|
+
automatically.
|
|
3912
|
+
x-updatable: true
|
|
3913
|
+
auto_create_suggested_transaction_rules:
|
|
3914
|
+
type: boolean
|
|
3915
|
+
description: If set, updates whether suggested transaction rules are
|
|
3916
|
+
created automatically.
|
|
3917
|
+
x-updatable: true
|
|
3918
|
+
auto_review_transaction_on_update:
|
|
3919
|
+
type: boolean
|
|
3920
|
+
description: If set, updates whether transactions are marked as reviewed
|
|
3921
|
+
when updated.
|
|
3922
|
+
x-updatable: true
|
|
3923
|
+
auto_review_transaction_on_creation:
|
|
3924
|
+
type: boolean
|
|
3925
|
+
description: If set, updates whether transactions are marked as reviewed
|
|
3926
|
+
when created.
|
|
3927
|
+
x-updatable: true
|
|
3928
|
+
|
|
3929
|
+
userSettingsObject:
|
|
3930
|
+
type: object
|
|
3931
|
+
title: user settings object
|
|
3932
|
+
additionalProperties: false
|
|
3933
|
+
description: User-level display and formatting preferences for the user
|
|
3934
|
+
associated with the authorized API token.
|
|
3935
|
+
properties:
|
|
3936
|
+
show_debits_as_negative:
|
|
3937
|
+
type: boolean
|
|
3938
|
+
default: true
|
|
3939
|
+
description: Display preference for how amounts are shown in the Lunch
|
|
3940
|
+
Money app. When `true`, debits are shown as negative values and
|
|
3941
|
+
credits as positive values.<p> This setting does **not** change
|
|
3942
|
+
amount sign conventions in API responses. Amount fields such as
|
|
3943
|
+
`amount` and `to_base` on transaction objects always use positive
|
|
3944
|
+
values for debits and negative values for credits.
|
|
3945
|
+
auto_suggest_payee:
|
|
3946
|
+
type: boolean
|
|
3947
|
+
default: true
|
|
3948
|
+
description: If `true`, payee suggestions are shown when entering
|
|
3949
|
+
transactions in the Lunch Money app.
|
|
3950
|
+
month_year_format:
|
|
3951
|
+
allOf:
|
|
3952
|
+
- $ref: "#/components/schemas/monthYearFormatEnum"
|
|
3953
|
+
default: "MMM YYYY"
|
|
3954
|
+
description: Format string used when displaying month and year values.
|
|
3955
|
+
month_day_year_format:
|
|
3956
|
+
allOf:
|
|
3957
|
+
- $ref: "#/components/schemas/monthDayYearFormatEnum"
|
|
3958
|
+
default: "MMM D, YYYY"
|
|
3959
|
+
description: Format string used when displaying full dates (month, day,
|
|
3960
|
+
and year).
|
|
3961
|
+
month_day_format:
|
|
3962
|
+
allOf:
|
|
3963
|
+
- $ref: "#/components/schemas/monthDayFormatEnum"
|
|
3964
|
+
default: "MMM D"
|
|
3965
|
+
description: Format string used when displaying month and day values
|
|
3966
|
+
without a year.
|
|
3967
|
+
show_am_pm:
|
|
3968
|
+
type: boolean
|
|
3969
|
+
default: true
|
|
3970
|
+
description: If `true`, times are displayed using a 12-hour clock with
|
|
3971
|
+
AM/PM. If `false`, times are displayed using a 24-hour clock.
|
|
3972
|
+
week_starts_on:
|
|
3973
|
+
allOf:
|
|
3974
|
+
- $ref: "#/components/schemas/weekStartsOnEnum"
|
|
3975
|
+
default: sunday
|
|
3976
|
+
description: The day on which a calendar week begins.
|
|
3977
|
+
always_display_year:
|
|
3978
|
+
type: boolean
|
|
3979
|
+
default: false
|
|
3980
|
+
description: If `true`, dates always include the year and
|
|
3981
|
+
`month_day_format` is not used.
|
|
3982
|
+
always_display_weekday:
|
|
3983
|
+
type: boolean
|
|
3984
|
+
default: true
|
|
3985
|
+
description: If `true`, weekday names are included when displaying
|
|
3986
|
+
dates.
|
|
3987
|
+
required:
|
|
3988
|
+
- show_debits_as_negative
|
|
3989
|
+
- auto_suggest_payee
|
|
3990
|
+
- month_year_format
|
|
3991
|
+
- month_day_year_format
|
|
3992
|
+
- month_day_format
|
|
3993
|
+
- show_am_pm
|
|
3994
|
+
- week_starts_on
|
|
3995
|
+
- always_display_year
|
|
3996
|
+
- always_display_weekday
|
|
3997
|
+
|
|
3998
|
+
updateUserSettingsRequestObject:
|
|
3999
|
+
x-internal: true
|
|
4000
|
+
type: object
|
|
4001
|
+
additionalProperties: false
|
|
4002
|
+
description: Request body for updating user settings. Include at least one
|
|
4003
|
+
property to update.
|
|
4004
|
+
properties:
|
|
4005
|
+
show_debits_as_negative:
|
|
4006
|
+
type: boolean
|
|
4007
|
+
description: If set, updates the display preference for amount signs in
|
|
4008
|
+
the Lunch Money app. Does not affect amount sign conventions in API
|
|
4009
|
+
responses.
|
|
4010
|
+
x-updatable: true
|
|
4011
|
+
auto_suggest_payee:
|
|
4012
|
+
type: boolean
|
|
4013
|
+
description: If set, updates whether payee suggestions are shown.
|
|
4014
|
+
x-updatable: true
|
|
4015
|
+
month_year_format:
|
|
4016
|
+
allOf:
|
|
4017
|
+
- $ref: "#/components/schemas/monthYearFormatEnum"
|
|
4018
|
+
description: If set, updates the month and year display format.
|
|
4019
|
+
x-updatable: true
|
|
4020
|
+
month_day_year_format:
|
|
4021
|
+
allOf:
|
|
4022
|
+
- $ref: "#/components/schemas/monthDayYearFormatEnum"
|
|
4023
|
+
description: If set, updates the full date display format.
|
|
4024
|
+
x-updatable: true
|
|
4025
|
+
month_day_format:
|
|
4026
|
+
allOf:
|
|
4027
|
+
- $ref: "#/components/schemas/monthDayFormatEnum"
|
|
4028
|
+
description: If set, updates the month and day display format.
|
|
4029
|
+
x-updatable: true
|
|
4030
|
+
show_am_pm:
|
|
4031
|
+
type: boolean
|
|
4032
|
+
description: If set, updates whether times use a 12-hour (AM/PM) or
|
|
4033
|
+
24-hour clock.
|
|
4034
|
+
x-updatable: true
|
|
4035
|
+
week_starts_on:
|
|
4036
|
+
allOf:
|
|
4037
|
+
- $ref: "#/components/schemas/weekStartsOnEnum"
|
|
4038
|
+
description: If set, updates the day on which a calendar week begins.
|
|
4039
|
+
x-updatable: true
|
|
4040
|
+
always_display_year:
|
|
4041
|
+
type: boolean
|
|
4042
|
+
description: If set, updates whether dates always include the year.
|
|
4043
|
+
x-updatable: true
|
|
4044
|
+
always_display_weekday:
|
|
4045
|
+
type: boolean
|
|
4046
|
+
description: If set, updates whether weekday names are shown when
|
|
4047
|
+
displaying dates.
|
|
4048
|
+
x-updatable: true
|
|
4049
|
+
|
|
3673
4050
|
# Summary endpoint response schemas
|
|
3674
4051
|
summaryResponseObject:
|
|
3675
4052
|
type: object
|
|
@@ -4468,8 +4845,13 @@ paths:
|
|
|
4468
4845
|
tags:
|
|
4469
4846
|
- me
|
|
4470
4847
|
summary: Get current user
|
|
4471
|
-
description:
|
|
4472
|
-
authorization
|
|
4848
|
+
description: |-
|
|
4849
|
+
Get details about the user associated with the supplied authorization
|
|
4850
|
+
token.<p> For account- and user-level preferences, prefer
|
|
4851
|
+
[/me/account/settings](#tag/me/GET/me/account/settings) and
|
|
4852
|
+
[/me/user/settings](#tag/me/GET/me/user/settings). Properties such as
|
|
4853
|
+
`primary_currency` and `budget_name` remain on this response for
|
|
4854
|
+
backwards compatibility.
|
|
4473
4855
|
operationId: getMe
|
|
4474
4856
|
parameters: []
|
|
4475
4857
|
responses:
|
|
@@ -4493,6 +4875,165 @@ paths:
|
|
|
4493
4875
|
$ref: "#/components/responses/rateLimited"
|
|
4494
4876
|
"500":
|
|
4495
4877
|
$ref: "#/components/responses/serverError"
|
|
4878
|
+
/me/account/settings:
|
|
4879
|
+
get:
|
|
4880
|
+
tags:
|
|
4881
|
+
- me
|
|
4882
|
+
summary: Get account settings
|
|
4883
|
+
description: Returns account-level settings for the budgeting
|
|
4884
|
+
account associated with the authorized API token.
|
|
4885
|
+
operationId: getAccountSettings
|
|
4886
|
+
responses:
|
|
4887
|
+
"200":
|
|
4888
|
+
description: Account settings for the current budgeting account
|
|
4889
|
+
content:
|
|
4890
|
+
application/json:
|
|
4891
|
+
schema:
|
|
4892
|
+
$ref: "#/components/schemas/accountSettingsObject"
|
|
4893
|
+
example:
|
|
4894
|
+
primary_currency: usd
|
|
4895
|
+
supported_currencies:
|
|
4896
|
+
- usd
|
|
4897
|
+
- cad
|
|
4898
|
+
- jpy
|
|
4899
|
+
display_name: "\U0001F3E0 Family budget"
|
|
4900
|
+
locale: en-US
|
|
4901
|
+
auto_create_category_rules: true
|
|
4902
|
+
auto_create_suggested_transaction_rules: true
|
|
4903
|
+
auto_review_transaction_on_update: true
|
|
4904
|
+
auto_review_transaction_on_creation: true
|
|
4905
|
+
"401":
|
|
4906
|
+
$ref: "#/components/responses/unauthorizedToken"
|
|
4907
|
+
"429":
|
|
4908
|
+
$ref: "#/components/responses/rateLimited"
|
|
4909
|
+
"500":
|
|
4910
|
+
$ref: "#/components/responses/serverError"
|
|
4911
|
+
put:
|
|
4912
|
+
tags:
|
|
4913
|
+
- me
|
|
4914
|
+
summary: Update account settings
|
|
4915
|
+
description: |-
|
|
4916
|
+
Updates account-level settings for the budgeting account
|
|
4917
|
+
associated with the authorized API token.<p> You may submit the response from a
|
|
4918
|
+
`GET /me/account/settings` as the request body; however, only certain
|
|
4919
|
+
properties can be updated.<p> It is also possible to provide only the
|
|
4920
|
+
properties to be updated in the request body, as long as the request
|
|
4921
|
+
includes at least one updatable property.
|
|
4922
|
+
operationId: updateAccountSettings
|
|
4923
|
+
requestBody:
|
|
4924
|
+
required: true
|
|
4925
|
+
content:
|
|
4926
|
+
application/json:
|
|
4927
|
+
schema:
|
|
4928
|
+
$ref: "#/components/schemas/updateAccountSettingsRequestObject"
|
|
4929
|
+
examples:
|
|
4930
|
+
Update display name:
|
|
4931
|
+
value:
|
|
4932
|
+
display_name: "Travel budget"
|
|
4933
|
+
Update automation preferences:
|
|
4934
|
+
value:
|
|
4935
|
+
auto_create_category_rules: false
|
|
4936
|
+
auto_review_transaction_on_creation: false
|
|
4937
|
+
responses:
|
|
4938
|
+
"200":
|
|
4939
|
+
description: Account settings updated successfully
|
|
4940
|
+
content:
|
|
4941
|
+
application/json:
|
|
4942
|
+
schema:
|
|
4943
|
+
$ref: "#/components/schemas/accountSettingsObject"
|
|
4944
|
+
"400":
|
|
4945
|
+
description: Invalid request body
|
|
4946
|
+
content:
|
|
4947
|
+
application/json:
|
|
4948
|
+
schema:
|
|
4949
|
+
$ref: "#/components/schemas/errorResponseObject"
|
|
4950
|
+
"401":
|
|
4951
|
+
$ref: "#/components/responses/unauthorizedToken"
|
|
4952
|
+
"429":
|
|
4953
|
+
$ref: "#/components/responses/rateLimited"
|
|
4954
|
+
"500":
|
|
4955
|
+
$ref: "#/components/responses/serverError"
|
|
4956
|
+
/me/user/settings:
|
|
4957
|
+
get:
|
|
4958
|
+
tags:
|
|
4959
|
+
- me
|
|
4960
|
+
summary: Get user settings
|
|
4961
|
+
description: Returns user-level display and formatting preferences for the
|
|
4962
|
+
user associated with the authorized API token.
|
|
4963
|
+
operationId: getUserSettings
|
|
4964
|
+
responses:
|
|
4965
|
+
"200":
|
|
4966
|
+
description: User settings for the authorized user
|
|
4967
|
+
content:
|
|
4968
|
+
application/json:
|
|
4969
|
+
schema:
|
|
4970
|
+
$ref: "#/components/schemas/userSettingsObject"
|
|
4971
|
+
example:
|
|
4972
|
+
show_debits_as_negative: true
|
|
4973
|
+
auto_suggest_payee: true
|
|
4974
|
+
month_year_format: "MMM YYYY"
|
|
4975
|
+
month_day_year_format: "MMM D, YYYY"
|
|
4976
|
+
month_day_format: "MMM D"
|
|
4977
|
+
show_am_pm: true
|
|
4978
|
+
week_starts_on: sunday
|
|
4979
|
+
always_display_year: false
|
|
4980
|
+
always_display_weekday: true
|
|
4981
|
+
"401":
|
|
4982
|
+
$ref: "#/components/responses/unauthorizedToken"
|
|
4983
|
+
"429":
|
|
4984
|
+
$ref: "#/components/responses/rateLimited"
|
|
4985
|
+
"500":
|
|
4986
|
+
$ref: "#/components/responses/serverError"
|
|
4987
|
+
put:
|
|
4988
|
+
tags:
|
|
4989
|
+
- me
|
|
4990
|
+
summary: Update user settings
|
|
4991
|
+
description: |-
|
|
4992
|
+
Updates user-level display and formatting preferences for the user
|
|
4993
|
+
associated with the authorized API token.<p> You may submit the response
|
|
4994
|
+
from a `GET /me/user/settings` as the request body; however, only
|
|
4995
|
+
certain properties can be updated.<p> It is also possible to provide
|
|
4996
|
+
only the properties to be updated in the request body, as long as the
|
|
4997
|
+
request includes at least one updatable property.<p> Updating
|
|
4998
|
+
`show_debits_as_negative` affects display in the Lunch Money app only.
|
|
4999
|
+
Amount fields in API responses always use positive values for debits and
|
|
5000
|
+
negative values for credits.
|
|
5001
|
+
operationId: updateUserSettings
|
|
5002
|
+
requestBody:
|
|
5003
|
+
required: true
|
|
5004
|
+
content:
|
|
5005
|
+
application/json:
|
|
5006
|
+
schema:
|
|
5007
|
+
$ref: "#/components/schemas/updateUserSettingsRequestObject"
|
|
5008
|
+
examples:
|
|
5009
|
+
Update date formats:
|
|
5010
|
+
value:
|
|
5011
|
+
month_year_format: "YYYY-MM"
|
|
5012
|
+
month_day_year_format: "YYYY-MM-DD"
|
|
5013
|
+
month_day_format: "MM-DD"
|
|
5014
|
+
Use 24-hour time and Monday week start:
|
|
5015
|
+
value:
|
|
5016
|
+
show_am_pm: false
|
|
5017
|
+
week_starts_on: monday
|
|
5018
|
+
responses:
|
|
5019
|
+
"200":
|
|
5020
|
+
description: User settings updated successfully
|
|
5021
|
+
content:
|
|
5022
|
+
application/json:
|
|
5023
|
+
schema:
|
|
5024
|
+
$ref: "#/components/schemas/userSettingsObject"
|
|
5025
|
+
"400":
|
|
5026
|
+
description: Invalid request body
|
|
5027
|
+
content:
|
|
5028
|
+
application/json:
|
|
5029
|
+
schema:
|
|
5030
|
+
$ref: "#/components/schemas/errorResponseObject"
|
|
5031
|
+
"401":
|
|
5032
|
+
$ref: "#/components/responses/unauthorizedToken"
|
|
5033
|
+
"429":
|
|
5034
|
+
$ref: "#/components/responses/rateLimited"
|
|
5035
|
+
"500":
|
|
5036
|
+
$ref: "#/components/responses/serverError"
|
|
4496
5037
|
/summary:
|
|
4497
5038
|
get:
|
|
4498
5039
|
tags:
|
|
@@ -11617,12 +12158,17 @@ paths:
|
|
|
11617
12158
|
get:
|
|
11618
12159
|
tags:
|
|
11619
12160
|
- budgets
|
|
11620
|
-
summary: Get budget settings
|
|
11621
|
-
description:
|
|
12161
|
+
summary: Get budget period settings
|
|
12162
|
+
description: |-
|
|
12163
|
+
Returns budget period and display settings for the budget
|
|
12164
|
+
associated with this API token.<p> These control how budget **periods** are calculated
|
|
12165
|
+
(granularity, anchor date, rollover, and related options). For general
|
|
12166
|
+
budget preferences such as currency and locale, see
|
|
12167
|
+
[/me/account/settings](#tag/me/GET/me/account/settings).
|
|
11622
12168
|
operationId: getBudgetSettings
|
|
11623
12169
|
responses:
|
|
11624
12170
|
"200":
|
|
11625
|
-
description: Budget settings for the
|
|
12171
|
+
description: Budget period settings for the current budget
|
|
11626
12172
|
content:
|
|
11627
12173
|
application/json:
|
|
11628
12174
|
schema:
|
|
@@ -11645,7 +12191,7 @@ paths:
|
|
|
11645
12191
|
Note that `start_date` **must** be a valid budget period start for the account (based on the account's
|
|
11646
12192
|
budget period settings). If an invalid `start_date` is provided, the request will fail with an error that indicates what the previous and next valid start dates are.<p>
|
|
11647
12193
|
|
|
11648
|
-
Use the [budgets/settings](#tag/budgets/GET/budgets/settings) endpoint to view the
|
|
12194
|
+
Use the [/budgets/settings](#tag/budgets/GET/budgets/settings) endpoint to view the budget period settings for the account.<br>
|
|
11649
12195
|
To view details for existing budgets, use the [summary](#tag/summary) endpoint.
|
|
11650
12196
|
operationId: upsertBudget
|
|
11651
12197
|
requestBody:
|
|
@@ -11716,7 +12262,7 @@ paths:
|
|
|
11716
12262
|
period settings). If an invalid `start_date` is provided, the request
|
|
11717
12263
|
will fail with an error that indicates what the previous and next valid
|
|
11718
12264
|
start dates are.<p> Use the
|
|
11719
|
-
[budgets/settings](#tag/budgets/GET/budgets/settings) endpoint to view
|
|
12265
|
+
[/budgets/settings](#tag/budgets/GET/budgets/settings) endpoint to view
|
|
11720
12266
|
the account's budget settings.<br> To view details for existing budgets,
|
|
11721
12267
|
use the [summary](#tag/summary) endpoint.
|
|
11722
12268
|
operationId: deleteBudget
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunch-money/v2-api-spec",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.1-preview.1",
|
|
4
4
|
"description": "OpenAPI specification and version history for the Lunch Money v2 API",
|
|
5
5
|
"main": "lunch-money-api-v2.yaml",
|
|
6
6
|
"files": [
|
|
@@ -12,7 +12,15 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"prepare": "husky install",
|
|
14
14
|
"prepublishOnly": "node scripts/prep-for-publish.js",
|
|
15
|
-
"postpublish": "node scripts/restore-readme.js"
|
|
15
|
+
"postpublish": "node scripts/restore-readme.js",
|
|
16
|
+
"publish:docs": "npm --prefix packages/developer-docs publish --tag preview",
|
|
17
|
+
"publish:spec": "npm publish --tag preview",
|
|
18
|
+
"publish:all": "npm run publish:docs && npm run publish:spec",
|
|
19
|
+
"publish:docs:latest": "npm --prefix packages/developer-docs publish",
|
|
20
|
+
"publish:spec:latest": "npm publish",
|
|
21
|
+
"publish:all:latest": "npm run publish:docs:latest && npm run publish:spec:latest",
|
|
22
|
+
"pack:docs": "node scripts/pack-docs.js",
|
|
23
|
+
"pack:spec": "node scripts/pack-spec.js"
|
|
16
24
|
},
|
|
17
25
|
"keywords": [
|
|
18
26
|
"lunchmoney",
|
|
@@ -26,4 +34,3 @@
|
|
|
26
34
|
"husky": "^8.0.3"
|
|
27
35
|
}
|
|
28
36
|
}
|
|
29
|
-
|
package/version-history.md
CHANGED
|
@@ -5,6 +5,11 @@ The Lunch Money API spec uses a modified version of SEMVER for its versioning me
|
|
|
5
5
|
- The minor version represents the number of main endpoints the current version of the spec supports. For example, a version of the API that supports the /me, /categories, and /transactions endpoints would have a minor version of 3.
|
|
6
6
|
- The revision number represents the number of updates since the last endpoint was added. For example, each time changes are made to one of the existing three APIs as described above, the revision number will be bumped.
|
|
7
7
|
|
|
8
|
+
## v2.11.1 - TBD
|
|
9
|
+
- Add `GET /me/account/settings` and `PUT /me/account/settings` for account-level settings
|
|
10
|
+
- Add `GET /me/user/settings` and `PUT /me/user/settings` for user-level display and formatting preferences
|
|
11
|
+
- Document `GET /budgets/settings` response schema publicly; change `budget_period_quantity` to integer
|
|
12
|
+
|
|
8
13
|
## v2.11.0 - TBD
|
|
9
14
|
- Add `GET /balance_history`
|
|
10
15
|
- Add `GET /balance_history/{account_type}/{account_id}`
|
package/README.md.backup
DELETED
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
# Lunch Money API Specifications and Documentation
|
|
2
|
-
|
|
3
|
-
This repository contains the official API specifications and documentation for the [Lunch Money](https://lunchmoney.app) API. Lunch Money is a delightfully simple personal finance and budgeting tool with a comprehensive developer API.
|
|
4
|
-
|
|
5
|
-
## Repository Structure
|
|
6
|
-
|
|
7
|
-
This repository is organized in a multi-version structure to support current and future API versions:
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
.
|
|
11
|
-
├── v2/ # Version 2 API specific content
|
|
12
|
-
│ ├── spec/ # OpenAPI specification (YAML)
|
|
13
|
-
│ ├── docs/ # Version-specific documentation guides
|
|
14
|
-
│ └── images/ # Images used in documentation
|
|
15
|
-
├── docs/ # Version-independent documentation
|
|
16
|
-
├── scripts/ # Build and publishing scripts
|
|
17
|
-
└── spec/ # Generated directory (created during npm publish)
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### Directory Details
|
|
21
|
-
|
|
22
|
-
#### `v2/spec/` - OpenAPI Specification
|
|
23
|
-
The OpenAPI 3.0 specification file (`lunch-money-api-v2.yaml`) defines the complete API contract:
|
|
24
|
-
- All available endpoints
|
|
25
|
-
- Request/response schemas
|
|
26
|
-
- Authentication requirements
|
|
27
|
-
- Error responses
|
|
28
|
-
- Example requests and responses
|
|
29
|
-
|
|
30
|
-
**This is the source of truth for the API.** Changes to the specification automatically update the interactive API documentation.
|
|
31
|
-
|
|
32
|
-
#### `v2/docs/` - Version-Specific Documentation Guides
|
|
33
|
-
Markdown files containing detailed guides and reference material specific to v2:
|
|
34
|
-
- `intro-to-v2.md` - Overview of the v2 API and key features
|
|
35
|
-
- `migration-guide.md` - Guide for migrating from v1 to v2
|
|
36
|
-
- `version-history.md` - Changelog of all API versions
|
|
37
|
-
|
|
38
|
-
These guides are written in Markdown and support custom rendering features (see below).
|
|
39
|
-
|
|
40
|
-
#### `v2/images/` - Documentation Assets
|
|
41
|
-
Images and screenshots used in the documentation guides.
|
|
42
|
-
|
|
43
|
-
#### `docs/` - Version-Independent Documentation
|
|
44
|
-
Shared documentation that applies across all API versions:
|
|
45
|
-
- `getting-started.md` - Quick start guide for new developers (applies to all API versions)
|
|
46
|
-
- `rate-limiting.md` - Rate limiting policies and best practices (applies to all API versions)
|
|
47
|
-
- Additional version-independent guides (e.g., pagination guidelines, general API concepts)
|
|
48
|
-
|
|
49
|
-
## OpenAPI Specification vs Documentation Guides
|
|
50
|
-
|
|
51
|
-
There are two types of content in this repository, each serving a different purpose:
|
|
52
|
-
|
|
53
|
-
### OpenAPI Specification (`v2/spec/lunch-money-api-v2.yaml`)
|
|
54
|
-
- **Purpose**: Machine-readable API contract
|
|
55
|
-
- **Format**: YAML (OpenAPI 3.0)
|
|
56
|
-
- **Used for**:
|
|
57
|
-
- Generating interactive API documentation
|
|
58
|
-
- Code generation for SDKs and client libraries
|
|
59
|
-
- API validation and testing
|
|
60
|
-
- IDE autocomplete and type checking
|
|
61
|
-
- **Editable**: Yes - changes here automatically update the docs
|
|
62
|
-
|
|
63
|
-
The OpenAPI spec is the authoritative source for:
|
|
64
|
-
- Endpoint definitions (paths, methods, parameters)
|
|
65
|
-
- Request/response schemas
|
|
66
|
-
- Authentication requirements
|
|
67
|
-
- Status codes and error formats
|
|
68
|
-
|
|
69
|
-
### Documentation Guides (`v2/docs/*.md`)
|
|
70
|
-
- **Purpose**: Human-readable guides and tutorials
|
|
71
|
-
- **Format**: Markdown with custom extensions
|
|
72
|
-
- **Used for**:
|
|
73
|
-
- Developer onboarding and tutorials
|
|
74
|
-
- Best practices and patterns
|
|
75
|
-
- Migration guides and changelogs
|
|
76
|
-
- Conceptual explanations
|
|
77
|
-
- **Editable**: Yes - written in Markdown with support for custom features
|
|
78
|
-
|
|
79
|
-
The guides provide context, examples, and explanations that complement the technical specification.
|
|
80
|
-
|
|
81
|
-
## Custom Markdown Features
|
|
82
|
-
|
|
83
|
-
The documentation system supports custom rendering features that enhance Markdown files. These features are processed when the documentation is served and can be used in any Markdown file in the `v2/docs/` directory.
|
|
84
|
-
|
|
85
|
-
### Callouts
|
|
86
|
-
|
|
87
|
-
Callouts are styled information boxes for highlighting important information, warnings, or tips.
|
|
88
|
-
|
|
89
|
-
**Syntax:**
|
|
90
|
-
```markdown
|
|
91
|
-
> [!TYPE]
|
|
92
|
-
> Title (optional)
|
|
93
|
-
>
|
|
94
|
-
> Content goes here. This can span multiple lines
|
|
95
|
-
> and include **markdown formatting**.
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
**Supported Types:**
|
|
99
|
-
- `[!NOTE]` - General information or notes (blue styling)
|
|
100
|
-
- `[!TIP]` - Helpful tips or best practices (green styling)
|
|
101
|
-
- `[!WARNING]` - Warnings or important cautions (yellow/orange styling)
|
|
102
|
-
|
|
103
|
-
**Example:**
|
|
104
|
-
```markdown
|
|
105
|
-
> [!NOTE]
|
|
106
|
-
> API Rate Limits
|
|
107
|
-
>
|
|
108
|
-
> The API has a rate limit of 1000 requests per 5 minutes per IP address.
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Tabs
|
|
112
|
-
|
|
113
|
-
Tabs organize content into multiple tabbed sections, useful for showing different code examples, API versions, or alternative approaches.
|
|
114
|
-
|
|
115
|
-
**Syntax:**
|
|
116
|
-
```markdown
|
|
117
|
-
:::tabs
|
|
118
|
-
@tab Tab Label 1
|
|
119
|
-
Content for the first tab. This can include **markdown** and code blocks.
|
|
120
|
-
|
|
121
|
-
@tab Tab Label 2
|
|
122
|
-
Content for the second tab. You can have as many tabs as needed.
|
|
123
|
-
:::
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
**Example: Code Examples in Multiple Languages**
|
|
127
|
-
```markdown
|
|
128
|
-
:::tabs
|
|
129
|
-
@tab cURL
|
|
130
|
-
```bash
|
|
131
|
-
curl -X GET "https://api.lunchmoney.app/v2/transactions" \
|
|
132
|
-
-H "Authorization: Bearer YOUR_API_TOKEN"
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
@tab JavaScript
|
|
136
|
-
```javascript
|
|
137
|
-
const response = await fetch('https://api.lunchmoney.app/v2/transactions', {
|
|
138
|
-
headers: {
|
|
139
|
-
'Authorization': 'Bearer YOUR_API_TOKEN'
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
```
|
|
143
|
-
:::
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
**Usage Notes:**
|
|
147
|
-
- Each tab must start with `@tab` followed by the tab label
|
|
148
|
-
- The first tab is active by default when the page loads
|
|
149
|
-
- Tab content can include any markdown, including code blocks, lists, callouts, tables, and links
|
|
150
|
-
- You can combine callouts and tabs in various ways
|
|
151
|
-
|
|
152
|
-
## Versioning
|
|
153
|
-
|
|
154
|
-
The Lunch Money API uses a modified version of SEMVER:
|
|
155
|
-
|
|
156
|
-
- **Major version**: The API version (currently 2)
|
|
157
|
-
- **Minor version**: The number of main endpoints (OpenAPI tags) the spec supports
|
|
158
|
-
- **Revision number**: The number of updates since the last endpoint was added
|
|
159
|
-
|
|
160
|
-
For example, version `2.8.2` means:
|
|
161
|
-
- API version 2
|
|
162
|
-
- 8 main endpoint groups
|
|
163
|
-
- 2 updates since the 8th endpoint was added
|
|
164
|
-
|
|
165
|
-
Details of each version can be found in [`v2/docs/version-history.md`](./v2/docs/version-history.md).
|
|
166
|
-
|
|
167
|
-
### Branch Naming Convention
|
|
168
|
-
|
|
169
|
-
Each API version is maintained on a branch named after the version number (e.g., `v2.8.2`). The `main` branch typically tracks the most recent version.
|
|
170
|
-
|
|
171
|
-
## Using This Repository
|
|
172
|
-
|
|
173
|
-
### As an npm Package
|
|
174
|
-
|
|
175
|
-
This repository is published as `@lunchmoney/v2-api-spec` on npm for lightweight consumption:
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
npm install @lunchmoney/v2-api-spec
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
After installation, you can access:
|
|
182
|
-
- OpenAPI spec: `node_modules/@lunchmoney/v2-api-spec/spec/lunch-money-api-v2.yaml`
|
|
183
|
-
- Version history: `node_modules/@lunchmoney/v2-api-spec/spec/version-history.md`
|
|
184
|
-
|
|
185
|
-
### As a Git Repository
|
|
186
|
-
|
|
187
|
-
You can clone this repository directly:
|
|
188
|
-
|
|
189
|
-
```bash
|
|
190
|
-
git clone https://github.com/lunch-money/api-specs.git
|
|
191
|
-
cd api-specs
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
Or add it as a submodule to your project:
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
git submodule add https://github.com/lunch-money/api-specs.git specs/v2
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
## Contributing
|
|
201
|
-
|
|
202
|
-
We welcome contributions to improve the API documentation! When contributing:
|
|
203
|
-
|
|
204
|
-
1. **For API reference changes**: Update the OpenAPI specification in `v2/spec/lunch-money-api-v2.yaml`
|
|
205
|
-
2. **For documentation**: Update the relevant Markdown files in `v2/docs/`
|
|
206
|
-
3. **Version updates**: Update `v2/docs/version-history.md` with your changes
|
|
207
|
-
4. Create a pull request with a clear description of your changes
|
|
208
|
-
|
|
209
|
-
Please ensure that:
|
|
210
|
-
- OpenAPI spec changes are valid YAML and conform to OpenAPI 3.0
|
|
211
|
-
- Documentation follows the existing style and uses the custom Markdown features appropriately
|
|
212
|
-
|
|
213
|
-
## Resources
|
|
214
|
-
|
|
215
|
-
- [Lunch Money Website](https://lunchmoney.app)
|
|
216
|
-
- [Interactive API Documentation](https://alpha.lunchmoney.dev/v2/docs)
|
|
217
|
-
- [API Status](https://status.lunchmoney.app)
|