@lunch-money/developer-docs 2.11.0-preview.9 → 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 +9 -0
- 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 -9
- 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/AGENTS.md +48 -0
- package/v2/docs/intro-to-v2.md +12 -12
- package/v2/docs/migration-guide.md +2 -2
- package/v2/docs/version-history.md +28 -19
- package/v2/images/powered-by-lunch-money-badge.png +0 -0
- package/v2/spec/AGENTS.md +75 -0
- package/v2/spec/lunch-money-api-v2.yaml +1260 -359
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# V2 documentation instructions
|
|
2
|
+
|
|
3
|
+
Follow these rules when editing files under `v2/docs` or documenting changes to `v2/spec/lunch-money-api-v2.yaml`.
|
|
4
|
+
|
|
5
|
+
## Version history
|
|
6
|
+
|
|
7
|
+
For every consumer-visible spec change, update `v2/docs/version-history.md` under the version being prepared.
|
|
8
|
+
|
|
9
|
+
Keep entries brief and high level. The version history records what changed; the OpenAPI endpoint documentation describes how to use it.
|
|
10
|
+
|
|
11
|
+
Include:
|
|
12
|
+
|
|
13
|
+
- New, renamed, deprecated, or removed endpoints
|
|
14
|
+
- Changes to path or query parameters
|
|
15
|
+
- Changes to request-body properties
|
|
16
|
+
- Changes to response-body properties or shapes
|
|
17
|
+
- Changed status codes, accepted values, defaults, limits, or validation behavior
|
|
18
|
+
- Breaking changes
|
|
19
|
+
|
|
20
|
+
Do not include:
|
|
21
|
+
|
|
22
|
+
- Product or implementation rationale
|
|
23
|
+
- Internal implementation details
|
|
24
|
+
- Detailed usage instructions or examples
|
|
25
|
+
- Full schema descriptions
|
|
26
|
+
- Testing, rollout, or cross-repository implementation details
|
|
27
|
+
- Editorial changes that do not alter the documented API contract
|
|
28
|
+
|
|
29
|
+
### Style
|
|
30
|
+
|
|
31
|
+
- Name endpoints using the HTTP method and path, such as `GET /balance_history`.
|
|
32
|
+
- Format endpoints, parameter names, property names, schema names, and literal values with backticks.
|
|
33
|
+
- Start bullets with a present-tense verb such as `Add`, `Change`, `Remove`, `Rename`, or `Deprecate`.
|
|
34
|
+
- Prefer one concise bullet for each logical change.
|
|
35
|
+
- Use nested bullets only to list endpoints or closely related property changes.
|
|
36
|
+
- Do not explain why the change was made or provide instructions for adapting to it.
|
|
37
|
+
- Keep unreleased versions marked `TBD`; do not assign a release date without confirmation.
|
|
38
|
+
- Clearly label breaking changes.
|
|
39
|
+
|
|
40
|
+
## Other documentation
|
|
41
|
+
|
|
42
|
+
- Do not routinely update `v2/docs/migration-guide.md` or `v2/docs/intro-to-v2.md` for individual spec changes.
|
|
43
|
+
- Determine whether a spec change makes an existing guide factually incorrect, including guides in the shared `docs` directory.
|
|
44
|
+
- Correct an existing guide when it would otherwise contradict the spec.
|
|
45
|
+
- Consider broader documentation only for a reusable cross-endpoint concept that cannot be documented adequately on the affected endpoints.
|
|
46
|
+
- If broader documentation might be useful but is not required for correctness, identify the candidate page and ask the user before expanding it or adding a page.
|
|
47
|
+
- Prefer endpoint descriptions over general guides for endpoint-specific behavior.
|
|
48
|
+
- Do not add detail to the migration guide merely because V2 differs from V1.
|
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,25 +5,34 @@ 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.
|
|
9
|
-
- Add `GET /
|
|
10
|
-
- Add `GET /
|
|
11
|
-
- Add `GET /
|
|
12
|
-
- Add `PUT /
|
|
13
|
-
- Add `PUT /
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
- Add `
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
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
|
+
|
|
16
|
+
## v2.11.0 - Jul 31, 2026
|
|
17
|
+
- Add `/balance_history` endpoints:
|
|
18
|
+
- `GET /balance_history`
|
|
19
|
+
- `GET /balance_history/{account_type}/{account_id}`
|
|
20
|
+
- `GET /balance_history/crypto_synced/{account_id}/{symbol}`
|
|
21
|
+
- `PUT /balance_history/{account_type}/{account_id}`
|
|
22
|
+
- `PUT /balance_history/crypto_synced/{account_id}/{symbol}`
|
|
23
|
+
- `DELETE /balance_history/entries/{id}`
|
|
24
|
+
- `DELETE /balance_history/{account_type}/{account_id}`
|
|
25
|
+
- `DELETE /balance_history/crypto_synced/{account_id}/{symbol}`
|
|
26
|
+
- `PUT /balance_history/deleted/{account_id}/details`
|
|
27
|
+
- Remove `rollover_pool` from category objects in the `GET /summary` response
|
|
28
|
+
- Allow setting `external_id` on Plaid-account transactions
|
|
29
|
+
- Allow `null` for `category_id` and `notes` on split children to clear those values instead of inheriting from the parent
|
|
30
|
+
|
|
31
|
+
## v2.10.0 - Jul 31, 2026
|
|
32
|
+
- Add crypto endpoints:
|
|
33
|
+
- `GET /cryptocurrencies`
|
|
34
|
+
- `GET /crypto/manual`, `POST /crypto/manual`, `GET /crypto/manual/{id}`, `PUT /crypto/manual/{id}`, `DELETE /crypto/manual/{id}`
|
|
35
|
+
- `GET /crypto/synced`, `GET /crypto/synced/{id}`, `GET /crypto/synced/{id}/{symbol}`, `POST /crypto/synced/{id}/refresh`
|
|
27
36
|
|
|
28
37
|
## v2.9.4 - May 23, 2026
|
|
29
38
|
- Increase allowable length for transaction `notes`.
|
|
Binary file
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Repository instructions
|
|
2
|
+
|
|
3
|
+
## V2 OpenAPI conventions
|
|
4
|
+
|
|
5
|
+
Follow these rules whenever editing `v2/spec/lunch-money-api-v2.yaml`:
|
|
6
|
+
|
|
7
|
+
### Component schemas
|
|
8
|
+
|
|
9
|
+
- Define request and response object payloads as named schemas under `components.schemas`.
|
|
10
|
+
- Reference those component schemas from path operations with `$ref`; do not define object payload schemas inline under `paths`.
|
|
11
|
+
- Give every property in a referenced component schema a description, including wrapper properties, nested objects, array properties, and properties whose shape is supplied by `$ref`.
|
|
12
|
+
- Use a property's description to explain its role in the containing object; do not assume the referenced schema's description provides that context.
|
|
13
|
+
- Give every schema displayed in Scalar's Models section a top-level description.
|
|
14
|
+
- A schema hidden from the Models section does not require a top-level description when its purpose is already clear at every reference site. Add one when it defines reusable semantics or constraints not explained by the referencing property, request body, or response.
|
|
15
|
+
- Remove unreferenced component schemas unless they are intentionally retained for a documented reason.
|
|
16
|
+
|
|
17
|
+
### Scalar model visibility
|
|
18
|
+
|
|
19
|
+
`x-internal: true` hides a component schema from Scalar's Models section. It does not mean the endpoint, payload, or data is private.
|
|
20
|
+
|
|
21
|
+
- Keep primary response-body schemas public by omitting `x-internal` or setting it to `false`.
|
|
22
|
+
- Set `x-internal: true` on request-only schemas and supporting schemas that are not useful as independently browsable models.
|
|
23
|
+
- Keep a shared schema public when it is a useful response model, even if requests or other schemas also reference it.
|
|
24
|
+
- Decide visibility from how the schema is used, not from its name.
|
|
25
|
+
|
|
26
|
+
### Endpoint documentation
|
|
27
|
+
|
|
28
|
+
- Give every operation a concise `summary` and a `description`.
|
|
29
|
+
- Give every path, query, and header parameter a description.
|
|
30
|
+
- Give every response entry a meaningful description.
|
|
31
|
+
- Document endpoint-specific behavior, defaults, side effects, and request or response semantics on the operation or relevant field rather than in a general guide.
|
|
32
|
+
|
|
33
|
+
### Description style
|
|
34
|
+
|
|
35
|
+
- Use direct, neutral, present-tense language from the API consumer's perspective.
|
|
36
|
+
- Use a sentence fragment for a short label or noun phrase, without a terminal period.
|
|
37
|
+
- Use complete sentences for behavior or semantics, with terminal punctuation.
|
|
38
|
+
- When a description contains multiple sentences, punctuate every sentence.
|
|
39
|
+
- Use backticks for property names, parameter names, enum values, and literal values such as `true`, `false`, and `null`.
|
|
40
|
+
- Do not repeat type information unless it clarifies a format, unit, constraint, or semantic detail.
|
|
41
|
+
- Add links when they materially help consumers discover a related endpoint or relevant guide.
|
|
42
|
+
- Do not add links that merely restate obvious navigation.
|
|
43
|
+
|
|
44
|
+
### Examples
|
|
45
|
+
|
|
46
|
+
Examples are selective documentation aids, not a required artifact for every spec change.
|
|
47
|
+
|
|
48
|
+
- Audit affected examples whenever an endpoint, schema, or behavior changes, but edit them only when they become invalid, inaccurate, or misleading.
|
|
49
|
+
- Add an example when it illustrates a new endpoint, a materially different payload shape, or behavior not already clear from the schema and descriptions.
|
|
50
|
+
- Do not add examples mechanically for changes that widen accepted values, such as allowing an optional property to be `null`, when existing examples remain valid and the schema and description explain the behavior.
|
|
51
|
+
- Changes to a type, format, enum, requiredness, default, or representation require examining every affected example. Edit only examples that use or imply the old contract.
|
|
52
|
+
- A new endpoint should normally include a minimal valid request example when it accepts a JSON body and a representative success example when it returns a JSON body. Ask the user before omitting examples when the reason is unclear.
|
|
53
|
+
- When uncertain whether a change benefits from a new example, ask the user rather than adding one speculatively.
|
|
54
|
+
- Put request examples under the request media type, response examples under the applicable status code and media type, and parameter examples on the parameter.
|
|
55
|
+
- Use schema-property examples sparingly for unusual formats or values that are difficult to infer.
|
|
56
|
+
- Use `example` for one representative scenario and `examples` for materially different scenarios.
|
|
57
|
+
- Keep examples concise, fictional, internally consistent, and valid against the applicable schema.
|
|
58
|
+
- Include required properties. Include optional properties only when they help explain the scenario.
|
|
59
|
+
- Give named examples concise, accurate scenario keys. Add a `summary` or `description` only when it contributes information beyond the key and payload.
|
|
60
|
+
- Add endpoint-specific error examples only when the error shape or behavior differs meaningfully from shared standard errors.
|
|
61
|
+
|
|
62
|
+
#### Paired request and response examples
|
|
63
|
+
|
|
64
|
+
Pair request and response examples when seeing the result helps explain a synchronous create or update operation.
|
|
65
|
+
|
|
66
|
+
- Use the same scenario key under the request and corresponding response.
|
|
67
|
+
- Carry submitted values through consistently; use the response to show generated IDs, timestamps, defaults, conversions, inherited values, or other returned fields.
|
|
68
|
+
- Pair invalid request examples with the applicable error response using the same scenario key.
|
|
69
|
+
- Do not pair every request scenario. Add a pair only when the response teaches something useful.
|
|
70
|
+
- Treat singular request and response `example` blocks as an implicit pair and keep shared values consistent.
|
|
71
|
+
- Do not pair examples when the response has no body, processing is asynchronous, or the result does not directly correspond to the submitted payload.
|
|
72
|
+
|
|
73
|
+
When planning or reviewing a spec change, identify the affected schemas, verify their Scalar visibility and descriptions, and audit related request, response, parameter, and error examples. Record example changes only when existing examples become inaccurate or a new scenario materially improves the documentation. When in doubt, ask the user.
|
|
74
|
+
|
|
75
|
+
Before finishing a consumer-visible spec change, follow `../docs/AGENTS.md` to add a concise version-history entry and check whether an existing guide has become factually incorrect.
|