@lunch-money/developer-docs 2.11.0 → 2.11.1-docs.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/docs/README.md +1 -0
- package/docs/STYLE_GUIDE.md +88 -0
- package/docs/amounts-and-balances.md +5 -5
- package/docs/beta-introduction.md +5 -5
- package/docs/branding-your-app.md +59 -0
- package/docs/currencies.md +8 -9
- package/docs/getting-started.md +14 -14
- package/docs/introduction.md +5 -5
- package/docs/locales.md +124 -0
- package/docs/pagination.md +43 -44
- package/docs/rate-limiting.md +45 -45
- package/docs/using-with-ai.md +2 -2
- package/manifest.json +19 -1
- package/package.json +1 -1
- package/v1/_user.md +2 -2
- package/v2/docs/intro-to-v2.md +12 -12
- package/v2/docs/migration-guide.md +2 -2
- package/v2/docs/version-history.md +8 -0
- package/v2/images/powered-by-lunch-money-badge.png +0 -0
- package/v2/spec/lunch-money-api-v2.yaml +797 -11
package/v2/docs/intro-to-v2.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# v2 API
|
|
1
|
+
# v2 API overview
|
|
2
2
|
|
|
3
3
|
Welcome to the Lunch Money v2 API. This page covers the core concepts you need to work with the API effectively — authentication, response shapes, naming conventions, error handling, and more. If you're migrating from v1, see the [Migration Guide](./migration-guide.md).
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ All API requests require a Bearer token in the `Authorization` header:
|
|
|
10
10
|
Authorization: Bearer YOUR_ACCESS_TOKEN
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Get your access token from the <a href="https://my.lunchmoney.app/developers" target="_blank" rel="noopener noreferrer">Lunch Money
|
|
13
|
+
Get your access token from the <a href="https://my.lunchmoney.app/developers" target="_blank" rel="noopener noreferrer">Lunch Money Developers page</a>. See the [Getting started guide](/getting-started) for a step-by-step walkthrough including how to create a test budget.
|
|
14
14
|
|
|
15
15
|
## Base URL
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ Get your access token from the <a href="https://my.lunchmoney.app/developers" ta
|
|
|
18
18
|
https://api.lunchmoney.dev/v2
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
## Response
|
|
21
|
+
## Response shapes
|
|
22
22
|
|
|
23
23
|
The v2 API uses consistent HTTP status codes and response bodies across all endpoints.
|
|
24
24
|
|
|
@@ -39,7 +39,7 @@ All errors return an appropriate 4XX status code — the v2 API never returns an
|
|
|
39
39
|
| `401` | Unauthorized — missing or invalid Bearer token |
|
|
40
40
|
| `404` | Not Found — the requested object does not exist |
|
|
41
41
|
| `422` | Unprocessable Content — request is valid but cannot be fulfilled (e.g., deleting a category with dependents) |
|
|
42
|
-
| `429` | Too Many Requests — rate limit exceeded; response includes a `Retry-After` header. See the [Rate
|
|
42
|
+
| `429` | Too Many Requests — rate limit exceeded; response includes a `Retry-After` header. See the [Rate limiting guide](/rate-limits). |
|
|
43
43
|
|
|
44
44
|
All error responses share a consistent body format:
|
|
45
45
|
|
|
@@ -52,7 +52,7 @@ All error responses share a consistent body format:
|
|
|
52
52
|
}
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
> [!NOTE] Atomic
|
|
55
|
+
> [!NOTE] Atomic operations
|
|
56
56
|
> When a request fails, no part of it is applied to your data. For example, if one transaction in a bulk insert has a validation error, none of the transactions in that request are inserted. Fix the errors and retry — you don't need to worry about partial duplicates.
|
|
57
57
|
>
|
|
58
58
|
> If a request has multiple validation errors, the response will attempt to list as many as possible, but it is not guaranteed to catch all errors in a single response.
|
|
@@ -61,7 +61,7 @@ All error responses share a consistent body format:
|
|
|
61
61
|
|
|
62
62
|
The v2 API validates all requests strictly. A `400` is returned if the request includes unexpected parameters, missing required fields, fields with invalid values, or unexpected properties in the request body. This makes it easier to catch mistakes during development.
|
|
63
63
|
|
|
64
|
-
## Naming
|
|
64
|
+
## Naming conventions
|
|
65
65
|
|
|
66
66
|
Object properties follow consistent rules across the entire API:
|
|
67
67
|
|
|
@@ -72,11 +72,11 @@ Object properties follow consistent rules across the entire API:
|
|
|
72
72
|
- Child objects of the same type are always in a `children` property
|
|
73
73
|
- All `id` fields are `integer` type (not `number`)
|
|
74
74
|
|
|
75
|
-
## Amounts,
|
|
75
|
+
## Amounts, balances & sign convention
|
|
76
76
|
|
|
77
|
-
The v2 API uses a consistent set of properties — `amount`, `balance`, `currency`, and `to_base` — across all objects that deal with money. See the [Amounts &
|
|
77
|
+
The v2 API uses a consistent set of properties — `amount`, `balance`, `currency`, and `to_base` — across all objects that deal with money. See the [Amounts & balances guide](/amounts-and-balances) for a full explanation of how these properties work, including the sign convention and multi-currency support.
|
|
78
78
|
|
|
79
|
-
## Hydrated vs.
|
|
79
|
+
## Hydrated vs. non-hydrated responses
|
|
80
80
|
|
|
81
81
|
In v1, some endpoints returned "hydrated" objects — related object details were embedded directly in the response alongside their IDs. For example, a transaction included `category_name`, `asset_name`, and an array of full tag objects.
|
|
82
82
|
|
|
@@ -93,17 +93,17 @@ In v2, responses are **non-hydrated**: related objects are returned as IDs only.
|
|
|
93
93
|
|
|
94
94
|
This improves response times and keeps the API consistent. For apps that need related object details frequently, maintaining a local cache of categories, accounts, and tags is the recommended pattern.
|
|
95
95
|
|
|
96
|
-
## Updating
|
|
96
|
+
## Updating objects (PUT)
|
|
97
97
|
|
|
98
98
|
Most objects in the v2 API are updatable via `PUT /endpoint/{id}`. The rules are consistent:
|
|
99
99
|
|
|
100
100
|
- Request bodies may contain any mix of **user-definable** properties (will be updated) and **system-defined** properties like `id` or `created_at` (accepted but ignored).
|
|
101
101
|
- Any unexpected property that is neither user-definable nor system-defined will fail validation and return `400`.
|
|
102
102
|
|
|
103
|
-
> [!WARNING] Overwrite
|
|
103
|
+
> [!WARNING] Overwrite behavior
|
|
104
104
|
> Complex properties — objects and arrays — are **replaced entirely** by whatever is in the request body. To add a tag to a transaction without removing existing tags, first fetch the transaction, add the new tag ID to the existing `tag_ids` array, then PUT the full updated array.
|
|
105
105
|
|
|
106
|
-
> [!TIP] Recommended
|
|
106
|
+
> [!TIP] Recommended pattern
|
|
107
107
|
> Because system-defined properties are tolerated in PUT requests, you can safely GET an object, modify the properties you want to change, and PUT the whole thing back without stripping system fields first.
|
|
108
108
|
|
|
109
109
|
## Versioning
|
|
@@ -99,7 +99,7 @@ One change worth noting: all `id` fields are now explicitly `integer` type (not
|
|
|
99
99
|
|
|
100
100
|
#### New Properties
|
|
101
101
|
|
|
102
|
-
- `debits_as_negative`: A user preference shown in the Lunch Money app. This no longer changes how transaction amounts are represented in the v2 API, but apps may use this setting to display amounts and balances in the way the user prefers. See the [Amounts &
|
|
102
|
+
- `debits_as_negative`: A user preference shown in the Lunch Money app. This no longer changes how transaction amounts are represented in the v2 API, but apps may use this setting to display amounts and balances in the way the user prefers. See the [Amounts & balances guide](/amounts-and-balances) for details.
|
|
103
103
|
|
|
104
104
|
<a href="./changelog-visual#user-object-row" target="_blank" rel="noopener noreferrer">View v1/v2 differences</a>
|
|
105
105
|
|
|
@@ -386,7 +386,7 @@ GET /v2/transactions
|
|
|
386
386
|
> [!WARNING] Behavior Change
|
|
387
387
|
> In the v1 API the optional `debit_as_negative` query parameter could change how transaction amounts were represented. In the v2 API, transaction amount signs are fixed: positive values are debits and negative values are credits. Existing applications that assume positive values are credits need to be updated.
|
|
388
388
|
|
|
389
|
-
See the [Amounts &
|
|
389
|
+
See the [Amounts & balances guide](/amounts-and-balances) for the full sign convention and how `to_base` works for multi-currency accounts.
|
|
390
390
|
|
|
391
391
|
|
|
392
392
|
> [!TIP] Migration Tip
|
|
@@ -5,6 +5,14 @@ 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 - Sep 28, 2026
|
|
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
|
+
- Add `GET /me/user/account/settings` and `PUT /me/user/account/settings` for settings specific to a user and budget account
|
|
12
|
+
- Add `include_pending_in_totals` to `GET /me/account/settings` and `PUT /me/account/settings`
|
|
13
|
+
- Add `default_manual_account_id` to `GET /me/user/account/settings` and `PUT /me/user/account/settings`
|
|
14
|
+
- Document `GET /budgets/settings` response schema publicly; change `budget_period_quantity` to integer
|
|
15
|
+
|
|
8
16
|
## v2.11.0 - Jul 31, 2026
|
|
9
17
|
- Add `/balance_history` endpoints:
|
|
10
18
|
- `GET /balance_history`
|
|
Binary file
|