@lunch-money/v2-api-spec 2.8.2
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 +136 -0
- package/README.md.backup +217 -0
- package/lunch-money-api-v2.yaml +8231 -0
- package/package.json +29 -0
- package/update-urls.sh +155 -0
- package/version-history.md +310 -0
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lunch-money/v2-api-spec",
|
|
3
|
+
"version": "2.8.2",
|
|
4
|
+
"description": "OpenAPI specification and version history for the Lunch Money v2 API",
|
|
5
|
+
"main": "lunch-money-api-v2.yaml",
|
|
6
|
+
"files": [
|
|
7
|
+
"lunch-money-api-v2.yaml",
|
|
8
|
+
"version-history.md",
|
|
9
|
+
"README.md",
|
|
10
|
+
"update-urls.sh"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"prepare": "husky install",
|
|
14
|
+
"prepublishOnly": "node scripts/prep-for-publish.js",
|
|
15
|
+
"postpublish": "node scripts/restore-readme.js"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"lunchmoney",
|
|
19
|
+
"api",
|
|
20
|
+
"openapi",
|
|
21
|
+
"specification"
|
|
22
|
+
],
|
|
23
|
+
"author": "",
|
|
24
|
+
"license": "ISC",
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"husky": "^8.0.3"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
package/update-urls.sh
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Script to update URLs in the OpenAPI specification file
|
|
4
|
+
# This is useful for switching between local development and production URLs
|
|
5
|
+
#
|
|
6
|
+
# Usage:
|
|
7
|
+
# # In git repo:
|
|
8
|
+
# ./scripts/update-urls.sh --local|--production
|
|
9
|
+
#
|
|
10
|
+
# # In npm package:
|
|
11
|
+
# ./update-urls.sh --local|--production
|
|
12
|
+
#
|
|
13
|
+
# Flags:
|
|
14
|
+
# --local Switch URLs to local development (http://localhost:3000/v2)
|
|
15
|
+
# --production Switch URLs to production deployment URLs
|
|
16
|
+
#
|
|
17
|
+
# Environment variables (optional, with defaults):
|
|
18
|
+
# LOCAL_URL - Local development URL (default: http://localhost:3000/v2)
|
|
19
|
+
# API_DEPLOY_URL - API deployment URL (default: https://api.lunchmoney.app/v2)
|
|
20
|
+
# DOCS_DEPLOY_URL - Docs/mock deployment URL (default: https://alpha.lunchmoney.app/v2)
|
|
21
|
+
#
|
|
22
|
+
# Examples:
|
|
23
|
+
# # Switch to production URLs (using defaults)
|
|
24
|
+
# ./update-urls.sh --production
|
|
25
|
+
#
|
|
26
|
+
# # Switch to production URLs (with custom URLs)
|
|
27
|
+
# API_DEPLOY_URL=https://api.lunchmoney.app/v2 DOCS_DEPLOY_URL=https://alpha.lunchmoney.app/v2 ./update-urls.sh --production
|
|
28
|
+
#
|
|
29
|
+
# # Switch to local URLs
|
|
30
|
+
# ./update-urls.sh --local
|
|
31
|
+
#
|
|
32
|
+
# # Switch to local URLs (with custom local URL)
|
|
33
|
+
# LOCAL_URL=http://localhost:4000/v2 ./update-urls.sh --local
|
|
34
|
+
|
|
35
|
+
set -e
|
|
36
|
+
|
|
37
|
+
# Get the directory where the script is located
|
|
38
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
39
|
+
|
|
40
|
+
# Determine if we're in the git repo or npm package
|
|
41
|
+
# In git repo: script is in scripts/ subdirectory, spec is in v2/spec/
|
|
42
|
+
# In npm package: script is at root, spec is at root
|
|
43
|
+
if [ -f "$SCRIPT_DIR/v2/spec/lunch-money-api-v2.yaml" ]; then
|
|
44
|
+
# In the git repo (script is in scripts/ subdirectory)
|
|
45
|
+
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
46
|
+
SPEC_FILE="$REPO_ROOT/v2/spec/lunch-money-api-v2.yaml"
|
|
47
|
+
elif [ -f "$SCRIPT_DIR/lunch-money-api-v2.yaml" ]; then
|
|
48
|
+
# In the npm package (script is at root, spec is in same directory)
|
|
49
|
+
REPO_ROOT="$SCRIPT_DIR"
|
|
50
|
+
SPEC_FILE="$REPO_ROOT/lunch-money-api-v2.yaml"
|
|
51
|
+
else
|
|
52
|
+
echo "Error: Could not find lunch-money-api-v2.yaml"
|
|
53
|
+
echo " Looked in: $SCRIPT_DIR/v2/spec/"
|
|
54
|
+
echo " Looked in: $SCRIPT_DIR/"
|
|
55
|
+
exit 1
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# Load environment variables from .env file if it exists and variables are not already set
|
|
59
|
+
if [ -f "$REPO_ROOT/.env" ]; then
|
|
60
|
+
export $(grep -v '^#' "$REPO_ROOT/.env" | xargs)
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
# Set default values for the URLs if not provided
|
|
64
|
+
LOCAL_URL=${LOCAL_URL:-"http://localhost:3000/v2"}
|
|
65
|
+
API_DEPLOY_URL=${API_DEPLOY_URL:-"https://api.lunchmoney.app/v2"}
|
|
66
|
+
DOCS_DEPLOY_URL=${DOCS_DEPLOY_URL:-"https://alpha.lunchmoney.app/v2"}
|
|
67
|
+
|
|
68
|
+
# Function to show help and exit
|
|
69
|
+
show_help() {
|
|
70
|
+
echo "Usage: $0 --local|--production"
|
|
71
|
+
echo ""
|
|
72
|
+
echo "Flags (required):"
|
|
73
|
+
echo " --local Switch URLs to local development"
|
|
74
|
+
echo " --production Switch URLs to production deployment"
|
|
75
|
+
echo ""
|
|
76
|
+
echo "Environment variables (optional, with defaults):"
|
|
77
|
+
echo " LOCAL_URL Local development URL (default: http://localhost:3000/v2)"
|
|
78
|
+
echo " API_DEPLOY_URL API deployment URL (default: https://api.lunchmoney.app/v2)"
|
|
79
|
+
echo " DOCS_DEPLOY_URL Docs/mock deployment URL (default: https://alpha.lunchmoney.app/v2)"
|
|
80
|
+
echo ""
|
|
81
|
+
echo "Examples:"
|
|
82
|
+
echo " # Switch to production URLs (using defaults)"
|
|
83
|
+
echo " $0 --production"
|
|
84
|
+
echo ""
|
|
85
|
+
echo " # Switch to production URLs (with custom URLs)"
|
|
86
|
+
echo " API_DEPLOY_URL=https://api.lunchmoney.app/v2 DOCS_DEPLOY_URL=https://alpha.lunchmoney.app/v2 $0 --production"
|
|
87
|
+
echo ""
|
|
88
|
+
echo " # Switch to local URLs"
|
|
89
|
+
echo " $0 --local"
|
|
90
|
+
echo ""
|
|
91
|
+
echo " # Switch to local URLs (with custom local URL)"
|
|
92
|
+
echo " LOCAL_URL=http://localhost:4000/v2 $0 --local"
|
|
93
|
+
echo ""
|
|
94
|
+
echo "Note: Environment variables can also be set in a .env file in the repository root."
|
|
95
|
+
exit 1
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
# Function to replace URLs in the spec file
|
|
99
|
+
replace_urls() {
|
|
100
|
+
local from_url=$1
|
|
101
|
+
local to_url_1=$2
|
|
102
|
+
local to_url_2=$3
|
|
103
|
+
|
|
104
|
+
if [ ! -f "$SPEC_FILE" ]; then
|
|
105
|
+
echo "Error: Spec file not found at $SPEC_FILE"
|
|
106
|
+
exit 1
|
|
107
|
+
fi
|
|
108
|
+
|
|
109
|
+
echo "Updating URLs in $SPEC_FILE..."
|
|
110
|
+
echo " From: $from_url"
|
|
111
|
+
echo " To (server 1): $to_url_1"
|
|
112
|
+
echo " To (server 2): $to_url_2"
|
|
113
|
+
|
|
114
|
+
# Special handling for lunch-money-api-v2.yaml
|
|
115
|
+
awk -v from_url="$from_url" -v to_url_1="$to_url_1" -v to_url_2="$to_url_2" '
|
|
116
|
+
BEGIN { server_count = 0 }
|
|
117
|
+
{
|
|
118
|
+
if ($0 ~ "servers:") {
|
|
119
|
+
in_servers = 1
|
|
120
|
+
}
|
|
121
|
+
if (in_servers && $0 ~ "url:") {
|
|
122
|
+
server_count++
|
|
123
|
+
if (server_count == 1) {
|
|
124
|
+
sub(from_url, to_url_1)
|
|
125
|
+
} else if (server_count == 2) {
|
|
126
|
+
sub(from_url, to_url_2)
|
|
127
|
+
} else {
|
|
128
|
+
sub(from_url, to_url_1)
|
|
129
|
+
}
|
|
130
|
+
} else {
|
|
131
|
+
sub(from_url, to_url_2)
|
|
132
|
+
}
|
|
133
|
+
print
|
|
134
|
+
}' "$SPEC_FILE" > "$SPEC_FILE.tmp" && mv "$SPEC_FILE.tmp" "$SPEC_FILE"
|
|
135
|
+
|
|
136
|
+
echo "✓ URLs updated successfully"
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
# Check for required flag
|
|
140
|
+
if [ "$1" == "--local" ]; then
|
|
141
|
+
echo "Switching URLs to local development..."
|
|
142
|
+
echo " Using LOCAL_URL: $LOCAL_URL"
|
|
143
|
+
replace_urls "$API_DEPLOY_URL" "$LOCAL_URL" "$LOCAL_URL"
|
|
144
|
+
replace_urls "$DOCS_DEPLOY_URL" "$LOCAL_URL" "$LOCAL_URL"
|
|
145
|
+
elif [ "$1" == "--production" ]; then
|
|
146
|
+
echo "Switching URLs to production..."
|
|
147
|
+
echo " Using API_DEPLOY_URL: $API_DEPLOY_URL"
|
|
148
|
+
echo " Using DOCS_DEPLOY_URL: $DOCS_DEPLOY_URL"
|
|
149
|
+
replace_urls "$LOCAL_URL" "$API_DEPLOY_URL" "$DOCS_DEPLOY_URL"
|
|
150
|
+
else
|
|
151
|
+
echo "Error: A flag is required (--local or --production)"
|
|
152
|
+
echo ""
|
|
153
|
+
show_help
|
|
154
|
+
fi
|
|
155
|
+
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# Version History
|
|
2
|
+
|
|
3
|
+
The Lunch Money API spec uses a modified version of SEMVER for its versioning methodology as follows.
|
|
4
|
+
- The major version is the API version. This will always be 2 for the v2 version of the API.
|
|
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
|
+
- 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
|
+
|
|
8
|
+
## v2.8.2 - [Nov 26, 2025]
|
|
9
|
+
- The category object now includes both an `order` and `collapsed` property. These properties are used by GUIs that display a list of categories.
|
|
10
|
+
- The DELETE /manual_accounts endpoint now supports two optional query parameters:
|
|
11
|
+
- `delete_items` (boolean, default: false): When set to true, also deletes transactions, rules, and recurring items associated with the account
|
|
12
|
+
- `delete_balance_history` (boolean, default: false): When set to true, deletes balance history associated with the account
|
|
13
|
+
|
|
14
|
+
## v2.8.1 - November 14, 2025
|
|
15
|
+
- Removed `debits_as_negative` from the userObject
|
|
16
|
+
- For api users, positive values always indicate a debit transaction, and negative values indicate a credit transaction.
|
|
17
|
+
- Added `background_color` and `text_color` to the tagObject
|
|
18
|
+
- Added `to_base` to the `recurring_item.transaction_criteria` object
|
|
19
|
+
- POST /transactions/{transaction_id}/attachments now returns 201 Created instead of 200 OK
|
|
20
|
+
- Updated example responses to align with the current implementation
|
|
21
|
+
- Error response formats, metadata field names, and error messages have been standardized across all endpoints
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## v2.8.0
|
|
25
|
+
- A new v2/summary endpoint has been added. This replaces the v1/budgets endpoint, which no longer works with the new budgeting feature.
|
|
26
|
+
- The 'pending' value for `status` in the transactions object has been deprecated. This was redundant with the `is_pending` boolean property.
|
|
27
|
+
- A new `is_pending` query parameter has been added to the GET /transactions endpoint.
|
|
28
|
+
- POST /transactions/split/{id} and POST /transactions/group now return a single transaction with children and not an array of transactions.
|
|
29
|
+
- A `custom_metadata` property has been added to the Manual Account object.
|
|
30
|
+
- The maximum length of the Manual Account's `subtype` property has increased from 75 to 100 characters.
|
|
31
|
+
- An empty `description` string may now be passed in the request body for the POST and PUT /categories endpoint
|
|
32
|
+
|
|
33
|
+
## v2.7.11
|
|
34
|
+
- Added new endpoints for managing transaction file attachments:
|
|
35
|
+
- POST /transactions/{transaction_id}/attachments - Upload a file to be attached to a transaction
|
|
36
|
+
- GET /transactions/attachments/{file_id} - Get a signed URL to download the file attachment
|
|
37
|
+
- DELETE /transactions/attachments/{file_id} - Remove a file attachment from a transaction
|
|
38
|
+
- Added support for file attachments in transaction objects:
|
|
39
|
+
- The `files` property is now included in transaction objects when `include_files` is set to true
|
|
40
|
+
- The `files` property contains an array of `transactionAttachmentObject` objects
|
|
41
|
+
- File metadata (type and name) is properly returned when downloading files
|
|
42
|
+
- The v2 /recurring endpoint has been renamed back to /recurring_items.
|
|
43
|
+
- The `overrides` property has been removed from the transaction object. This ws meant to provide the original info that was overridden by a recurring rule, but turned out to be un-implementable.
|
|
44
|
+
- The bulk PUT /transactions API has been completely redesigned. It now is similar to the POST /transactions API, taking an array of transactions which must include an id along with any other properties to do be updated.
|
|
45
|
+
- The payee/date/amount transaction duplication logic that is triggered by the `skip_duplicates` request body property on a POST /transactions request will now be applied to plaid accounts as well as manual accounts.
|
|
46
|
+
- Improved readability of Request validation errors. The example responses in the spec and those returned by the mock server have been updated to match those that will be returned by the actual implementation of the v2 API.
|
|
47
|
+
- The v2 proxy using v1 service has been removed from the spec.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## v2.7.10
|
|
52
|
+
- Add a transactionAttachments type that captures details about files attached to a transaction.
|
|
53
|
+
- Modified the behavior of the GET /transactions endpoint:
|
|
54
|
+
- For performance reasons, transactions returned by this endpoint will, by default, not include `plaid_metadata`, `custom_metadata`, `children`, or `files` properties. These properties ARE provided by default in the GET /transactions/:id endpoint.
|
|
55
|
+
- A new `include_children` query parameter has been added. If set to `true`, transaction groups will include a `children` property with an array of transactions that make up the group.
|
|
56
|
+
- A new `include_metadata` query parameter has been added. If set to `true`, transactions returned will include the properties `plaid_metadata` and `custom_metadata`, which will be `null` when metadata is not associated with the transaction.
|
|
57
|
+
- An `include_files` query parameter is added. When set to `true`, a `files` property is returned with an array of objects that describe any attachments to the transaction.
|
|
58
|
+
- For completeness, an `include_split_parents` query parameter is added. Will override default behavior and return transactions that were split when set. The split transactions are also returned. When used in conjunction with the `include_children` parameter, split parents will have a `children` property that also includes the split transactions.
|
|
59
|
+
- Documented that `include_pending` query param is ignored if `status` query param is also set.
|
|
60
|
+
- Modified the behavior of the GET /transactions/:id endpoint:
|
|
61
|
+
- A successful response will always include all available transaction details, including `plaid_metadata`, `custom_metadata`, and `files` properties.
|
|
62
|
+
- When `is_group` or `is_parent` is true in the response, it will also include a `children` property.
|
|
63
|
+
- Modified the response body returned from a successful POST /transactions request:
|
|
64
|
+
- A `skipped_duplicates` array property will always be returned along with the `transactions` array.
|
|
65
|
+
- This will include details on any requested transactions that were not inserted due to duplicate detection.
|
|
66
|
+
- Duplicates will always be flagged if the `manual_account_id` and `external_id` of a requested transaction match existing transactions.
|
|
67
|
+
- Duplicates may also be flagged if the `skip_duplicates` request body property was set to `true`, and the requested transaction has the same `manual_account_id`, `payee`, `date`, and `amount` of an existing transaction.
|
|
68
|
+
- The insertTransactionResponseObject is now included in the models section of the documentation.
|
|
69
|
+
- Updated the examples for the PUT /transactions (bulk) endpoint
|
|
70
|
+
- Increased the max length of the `subtype` string that can be set on a manual account object to 75 characters
|
|
71
|
+
|
|
72
|
+
## v2.7.9
|
|
73
|
+
- Updated several type definitions in the spec to use the type `integer` instead of `number` for properties such as ids, orders, and indexes which are always an integer. Amounts, balances and limits still use type `number`.
|
|
74
|
+
|
|
75
|
+
## v2.7.8
|
|
76
|
+
- The request body for a PUT /tags request will now accept, and ignore, system set tag object properties such as `id` and `created_at`.
|
|
77
|
+
- Response codes for the POST /plaid_accounts/fetch endpoint have changed:
|
|
78
|
+
- A successful fetch request will return a 202 ACCEPTED status with no response body.
|
|
79
|
+
- A fetch request made within one minute of a previous fetch request will return a 425 TOO EARLY response.
|
|
80
|
+
- Setting the query param `category_id` to 0 on a GET /transactions request will now return un-categorized transactions.
|
|
81
|
+
- The `to_base` property of the `transaction_criteria` object in the recurringObject returned by the `GET /recurring` API has been removed. This property as this is not used to match transactions to a recurring item.
|
|
82
|
+
|
|
83
|
+
## v2.7.7
|
|
84
|
+
- The ability to set the `order` property of a category via the API has been removed.
|
|
85
|
+
- Setting `order` in the body of a POST /categories request will result in a validation error.
|
|
86
|
+
- The value of `order` in the body of PUT /categories request is treated as a "system defined" property and is ignored.
|
|
87
|
+
- This release makes some non-functional changes to the spec to make it behave better with programmatic consumers (ie: type and sdk generators).
|
|
88
|
+
- The transactionObject's `children` array now has a defined `items` type.
|
|
89
|
+
- There is no default value for the `children` property in the request body schema for a POST or PUT /categories request. If this property is not explicitly set it is treated as if it does not exist.
|
|
90
|
+
- The GET /categories optional `is_group` query parameter is now defined a boolean instead of an enum of true and false
|
|
91
|
+
- The Models section of the documentation has been slightly changed as follows
|
|
92
|
+
- We are now consistently showing only the primary Object for each endpoint. Schemas for request bodies are not shown in this section but remain in the individual endpoint's documentation.
|
|
93
|
+
- Renamed the `AccountTypeEnum` to `accountTypeEnum` to maintain consistency in schema naming style
|
|
94
|
+
|
|
95
|
+
## v2.7.6
|
|
96
|
+
- This release adds the `to_base` property to the Manual and Plaid Account objects to align with a recent change in the v1 API.
|
|
97
|
+
|
|
98
|
+
## v2.7.5
|
|
99
|
+
- This release adds the following new transactions endpoints:
|
|
100
|
+
- PUT /transactions/:id
|
|
101
|
+
- This works similarly to the same endpoint in v1.
|
|
102
|
+
- PUT /transactions
|
|
103
|
+
- This new endpoint enables updating multiple existing transactions with a common update object.
|
|
104
|
+
- This release modifies the following endpoint behavior
|
|
105
|
+
- POST/PUT /categories
|
|
106
|
+
- It is now permissible to specify the ids of categories that belong to another category group in the `children` property of a request. The categories will be moved to the group being created or updated without error.
|
|
107
|
+
- It is also now permissible to include strings in the `children` property. These will be used as the names of new child categories that will be created.
|
|
108
|
+
- This release also updates the following schemas:
|
|
109
|
+
- Correctly specifies that all properties of the manualAccountObject are required
|
|
110
|
+
- Updates the updateManualAccountRequestObject and updatePlaidManualAccountRequest object to allow the `balance` property to be either a string or a number.
|
|
111
|
+
- Updates the userObject to include the `debits_as_negative` property. The documentation for Transaction Objects returned by GET requests have been updated to reflect how/if this setting affects the `amount` property of the transaction.
|
|
112
|
+
- Updates the childCategoryObject to restore the `exclude_from_budget`, `exclude_from_totals` and `is_income` properties. These properties are inherited from the Category Group and not settable but are provided for convenience.
|
|
113
|
+
|
|
114
|
+
## v2.7.4
|
|
115
|
+
- This release adds the following new transactions endpoints:
|
|
116
|
+
- POST /transactions/group/
|
|
117
|
+
- This works similarly to the same endpoint in v1. Use this endpoint to group a set of transactions into a single transaction.
|
|
118
|
+
- DELETE /transactions/group/{id}
|
|
119
|
+
- This endpoint replaces the v1 /transactions/ungroup endpoint.
|
|
120
|
+
- Use this endpoint to delete a transaction group and restore, the grouped transactions to their "normal" transaction state.
|
|
121
|
+
- DELETE /transactions/split
|
|
122
|
+
- This endpoint replaces the v1 /transactions/unsplit endpoint and the v2 version that was introduced in the previous release.
|
|
123
|
+
- Use this endpoint to delete the split transaction and restore the parent transaction to the "normal" transaction state.
|
|
124
|
+
- The documentation for the various /transactions endpoints has been reorganized:
|
|
125
|
+
- The `transactions` section covers endpoints that impact a single transaction.
|
|
126
|
+
- The `transactions (bulk)` section covers endpoints that impact multiple transactions.
|
|
127
|
+
- The `transactions (group)` section covers endpoints related to grouping and ungrouping transactions.
|
|
128
|
+
- The `transactions (split)` section covers endpoints related to splitting and unsplitting transactions.
|
|
129
|
+
|
|
130
|
+
## v2.7.3
|
|
131
|
+
- This release adds the following new transactions endpoints:
|
|
132
|
+
- POST /transactions/split/{id}
|
|
133
|
+
- This is a new endpoint in v2. Use this endpoint to a split a transaction into multiple child transactions. The POST /transactions endpoint will no longer support splits
|
|
134
|
+
- POST /transactions/unsplit
|
|
135
|
+
- This has only minor changes from the existing v1 version of this API
|
|
136
|
+
- DELETE /transactions/{id}
|
|
137
|
+
- This new endpoint will delete a single transaction by ID
|
|
138
|
+
- DELETE /transactions
|
|
139
|
+
- This new endpoint will bulk delete all the transactions who's IDs were submitted in the `ids` property in the request body.
|
|
140
|
+
- Both DELETE endpoints will generate errors if the IDs submitted belong to group or split transactions or do not exist.
|
|
141
|
+
- Changes to existing endpoints:
|
|
142
|
+
- It is now permissible to set a `plaid_account_id` on a transaction passed in to POST /transactions.
|
|
143
|
+
- The following objects have been modified:
|
|
144
|
+
- The Plaid Account Object
|
|
145
|
+
- A new boolean `allow_transaction_modifications` property has been added. This represents the state of the "Allow Modifications To Transactions" toggle which is enabled by default. When this property is false, attempts to add transactions to this account will fail.
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
## v2.7.2
|
|
149
|
+
- The following objects have been modified:
|
|
150
|
+
- The Transactions Object
|
|
151
|
+
- An optional `custom_metadata` object has been added. This can be set or modified via the API.
|
|
152
|
+
- This release adds the following to the /transactions endpoint
|
|
153
|
+
- POST /transactions
|
|
154
|
+
- Properties in the transaction object passed in the request have been updated to new v2 naming standards
|
|
155
|
+
- A new `custom_metadata` may be included as a property on the new transaction objects. This can be any valid JSON object.
|
|
156
|
+
- The `debit_as_negative` property on the request body is no longer supported
|
|
157
|
+
- Requests that contain transactions with `external_ids` behave differently
|
|
158
|
+
- Duplicate `external_ids` within the request body are treated as an error
|
|
159
|
+
- Requested transactions with an `external_id` that already exists in the database are now skipped. Any remaining transactions in the request are inserted.
|
|
160
|
+
- The following endpoints have been modified:
|
|
161
|
+
- GET /transactions/{id}
|
|
162
|
+
- The `include_plaid_metadata` parameter name has changed back to `include_metadata` and will now return both plaid and custom metadata.
|
|
163
|
+
- Tests
|
|
164
|
+
- Tests now require Portman version 1.30.7 or later.
|
|
165
|
+
- A new script `check-for-duplicates.sh` was added to the tests/scripts directory. When the newman output is redirected to a file, this script can identify tests that were skipped.
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
## v2.7.1
|
|
169
|
+
- This release updates the sample responses for the /recurring endpoints
|
|
170
|
+
|
|
171
|
+
## v2.7.0
|
|
172
|
+
- This release adds the initial version of the /plaid_accounts endpoint
|
|
173
|
+
- Updated changelog to mention the renamed /manual_accounts endpoints
|
|
174
|
+
- Minor update to the Manual Account Object Schema
|
|
175
|
+
- A new `external_id` property was added which can be set via the POST and PUT /manual_transactions endpoints
|
|
176
|
+
- Minor update to the `GET /categories` endpoint
|
|
177
|
+
- A new query optional parameter `is_group` can be set to `false` in order to get the API to return only a set of assignable categories.
|
|
178
|
+
|
|
179
|
+
## v2.6.0
|
|
180
|
+
- This release adds the initial version of the /manual_accounts endpoint
|
|
181
|
+
|
|
182
|
+
## v2.5.0
|
|
183
|
+
- This release adds the initial version of the /recurring endpoint
|
|
184
|
+
- A minor update was made to the response body of a DELETE /categories requests
|
|
185
|
+
- The `category_name` property has been removed from the `dependents` object and is now returned as a top-level property in the response body.
|
|
186
|
+
- Made the static mock server the default server
|
|
187
|
+
- v1 proxy is still available in the servers drop down.
|
|
188
|
+
- The links in the changelogs work with Stoplight but not Scalar, so having this as the default makes it more likely that users will be able to navigate the changelogs.
|
|
189
|
+
|
|
190
|
+
## v2.4.1
|
|
191
|
+
- This release makes minor changes to the existing categories and tags endpoints
|
|
192
|
+
- Tags Object
|
|
193
|
+
- The properties `created_at`, `updated_at`, and `archived_at` have been added
|
|
194
|
+
- DELETE /tags endpoint
|
|
195
|
+
- Will now return a 422 with a dependents object if the tag is used in rules or transactions
|
|
196
|
+
- Will now support a `force` query param
|
|
197
|
+
|
|
198
|
+
## v2.4.0
|
|
199
|
+
- This release adds the initial version of the /tags endpoint
|
|
200
|
+
|
|
201
|
+
## v2.3.7
|
|
202
|
+
- This release makes minor changes to the existing categories and transactions endpoints
|
|
203
|
+
- Categories Object
|
|
204
|
+
- The `group_name` property has been removed
|
|
205
|
+
- Transactions Object
|
|
206
|
+
- Restores the property name `plaid_metadata`. This anticipates a new `user_metatdata` property in a future release.
|
|
207
|
+
- GET /categories endpoint
|
|
208
|
+
The `is_group` query parameter has been removed
|
|
209
|
+
- GET /transactions/{id} endpoint
|
|
210
|
+
- Renamed `include_metadata` to `include_plaid_metadata`
|
|
211
|
+
- Added `split` as a new value for the `source` enum. It's set for split transactions.
|
|
212
|
+
- It also corrects typos in the names of the servers listed in the spec
|
|
213
|
+
- The tests in this release require a version of Portman at or above 1.30.2
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
## v2.3.6
|
|
218
|
+
- This release restores the hydration of children for category and transaction objects
|
|
219
|
+
- Categories Object
|
|
220
|
+
- The `child_ids` property of the category object is renamed `children` and is populated by fully hydrated category objects
|
|
221
|
+
- The `children` property will always be present for a category group.
|
|
222
|
+
- If the group has no child categories, `children` will be an empty list.
|
|
223
|
+
- Objects in the `children` list property are Child Category Objects that are similar to Category Objects, but with some differences:
|
|
224
|
+
- `is_income`, `exclude_from_budget`, and `exclude_from_totals` are not included since these are inherited from the category group and are no longer properties of the child categories.
|
|
225
|
+
- `group_id` is never `null`, `group_name` is always present, and `children` will never be present.
|
|
226
|
+
- GET /categories endpoint
|
|
227
|
+
- When `format` is set to `flattened` all categories and category groups are returned in the top level list
|
|
228
|
+
- Category groups will still have their `children` property
|
|
229
|
+
- This is done to conform to a policy that objects should have the same properties consistently across requests
|
|
230
|
+
- Since categories that belong to category groups are represented in the `children` property of their category group and also in the top level these categories can be found twice in the `flattened` response.
|
|
231
|
+
- Top-level categories that happen to belong to a category group are still full Category Objects and not Child Category Objects.
|
|
232
|
+
- This means they will have the `is_income`, `exclude_from_budget` and `exclude_from_totals`, properties.
|
|
233
|
+
- The `format` query param now has a default value of `nested`, which means that a nested list of category objects is returned by default.
|
|
234
|
+
- This approach is preferred since the flattened list has redundant info with each grouped category represented once in the `children` attribute of its category croup and then once in its own spot in the top-level list
|
|
235
|
+
- An `is_group` query parameter has been added to the `GET /categories` method.
|
|
236
|
+
- This can be set to `false` to return a list of assignable categories. No Category Groups are returned.
|
|
237
|
+
- Setting it to `true` will return a list of Category Groups, with fully hydrated `children` objects. No ungrouped categories are returned.
|
|
238
|
+
- When this query param is set, the value of the `format` query param is ignored if also set.
|
|
239
|
+
- POST and PUT /categories endpoints
|
|
240
|
+
- The request body for the `POST` and `PUT /categories` may now include a `children` property.
|
|
241
|
+
- This property is a list which may contain category objects, child category objects, or simply ids.
|
|
242
|
+
- Mixing the types of allowed elements in the `children` property of the request body is permitted.
|
|
243
|
+
- A successful response body will always include the fully hydrated Child Category Objects in the `children` property.
|
|
244
|
+
|
|
245
|
+
## v2.3.5
|
|
246
|
+
- This branch adds a second demonstration server to the spec. The first server is a traditional "mock data" server that uses static canned data. The new server implements the V2 API on top of the V1 API and can be used to manipulate actual data in Lunch Money. This initial version supports only the /categories endpoint. Requests to other endpoints continue to use canned data
|
|
247
|
+
- Spec Updates
|
|
248
|
+
- The spec now includes two servers in the servers section
|
|
249
|
+
- The `synced_metadata` property of the transaction object was renamed `metadata` in anticipation of metadata availability in imported transactions associated with manual accounts.
|
|
250
|
+
- Test Updates
|
|
251
|
+
- A large number of new tests were added in the tests/configs/variations/category-variations.yaml. With a real backend, we can do more testing of the POST, PUT, and DELETE endpoints. Many of these tests are skipped if the postman variable isMockServer is set to true. (See [Test README](./tests/README.md))
|
|
252
|
+
- Tests work with Portman version 1.30.0. This release addresses reported bugs and supports tests that set form encoded query params like the `ids` param on the `GET /categories` endpoint.
|
|
253
|
+
- Commit Hook Updates
|
|
254
|
+
- The commit hook that toggles URLs in index.html and the spec between the local and deploy URLs was updated to support two separate URLs
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
## v2.3.4
|
|
258
|
+
- This branch removes hydration options from the /categories and /transaction endpoints and objects.
|
|
259
|
+
- Renamed the `children` property of the category object to `children` to match the new agreed upon standard for naming types and id lists.
|
|
260
|
+
- Eliminated the two types of category objects, opting instead for a simpler single category object. This eliminates some of the automatic request body validation that we had but I think simplifies the docs. Additional tests were added to ensure that
|
|
261
|
+
- Category Groups have a `child_id` and no `group_name` property and `group_id` is null
|
|
262
|
+
- Categories that are part of a group have no `child_id` property, have a non null `group_id` property and have a `group_name` property.
|
|
263
|
+
- Ungrouped categories have a `group_id` with a value of `null` and do no have a `children` or `group_name` property
|
|
264
|
+
- Renamed transaction status values "cleared" and "uncleared" to "reviewed" and "unreviewed"
|
|
265
|
+
- Created a visual representation of the changes to the objects in changelog-visual.html
|
|
266
|
+
- Continued iteration on the recurring_items object.
|
|
267
|
+
- This version include an updated schema for the recurringItems object
|
|
268
|
+
- It also proposes an alternateRecurringItems object
|
|
269
|
+
|
|
270
|
+
## v2.3.3
|
|
271
|
+
|
|
272
|
+
- This branch introduces the `GET /transactions/{id}` endpoint. As of this release this is the only endpoint that supports hydration of the category, account, recurring items and tags. Hydration is enabled via query parameter. There is also a query parameter to request synced (plaid) metadata for the transaction.
|
|
273
|
+
|
|
274
|
+
- The branch also introduces changes to the transaction object:
|
|
275
|
+
- A new `overrides` object property is added to the transaction object. This object is populated when a recurring rule has overridden one or more properties of the transaction as displayed in the transactions page on the GUI.
|
|
276
|
+
- The `payee`, `category_id`, and `notes` properties will now have values that match the transactions page in the GUI. The `display_*` properties of the transaction object have been removed. The original values can now be found in the new `overrides` object.
|
|
277
|
+
- The order of the properties in the transaction object schema is changed to introduce the new `overrides` property before any properties that may have been overridden. The ordering should now more closely match the transaction page on the GUI.
|
|
278
|
+
- The `children` property that exists in a transaction that has been split has been renamed `children`
|
|
279
|
+
- The transaction object now supports the optional properties: `synced_metadata`, `hydrated_recurring`, `hydrated_category`, `hydrated_account`, and `hydrated_tags`
|
|
280
|
+
- A set of required properties has been added to the transaction object's schema definition
|
|
281
|
+
|
|
282
|
+
- Schema definitions have been added for the `manualAccountObject`, `syncedAccountObject` and `recurringItemObject` in order to support hydration
|
|
283
|
+
|
|
284
|
+
- Tests were added
|
|
285
|
+
- Filter transactions by category group
|
|
286
|
+
- GET /transactions/{id} tests
|
|
287
|
+
- Updates to /categories tests
|
|
288
|
+
- Tests work with Portman version 1.28.0. A known bug with this version of portman requires that one of the /me variation tests is commented out
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
## v2.3.2
|
|
292
|
+
This branch updates the tests to take advantage of bug fixes and features added to Portman 1.28.0
|
|
293
|
+
- Projects that implement the Lunch Money API server should update to this version of Portman
|
|
294
|
+
- The portman config now sets a global directive `variableCasing` to snakeCase. Use of this directive in prior versions caused some tests to fail
|
|
295
|
+
- The tests now have a global dynamic pre-request script that is run prior to any requests that take an ID as a path parameter. This script will "reset" the variable that the ID is set to when `PORTMAN_IS_MOCK_SERVICE=true` is set in the .env-portman file. Implementers of a Mock API server should see further details on how to define the "canned" IDs to use in the [./tests/README.md](./tests/README.md#testing-against-a-mock-service-with-immutable-data-vs-a-real-service)
|
|
296
|
+
- Tests added as part of this release
|
|
297
|
+
- /me
|
|
298
|
+
- Validate proper error response when no Authorization header is sent
|
|
299
|
+
- /transactions
|
|
300
|
+
- validate setting `manual_account_ids` to zero will filter out all manual account transactions
|
|
301
|
+
- validate setting `plaid_account_ids` to zero will filter out all synced account transactions
|
|
302
|
+
- validate setting both to zero will return on "cash transactions"
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
## v2.3.1
|
|
306
|
+
This is the initial branch using the versioning described above
|
|
307
|
+
- It is the v2 version of the API - hence the major version 2.
|
|
308
|
+
- The API Spec currently supports 3 endpoints /me, /categories, and /transactions. hence the minor version 3.
|
|
309
|
+
- This version of the spec contains minor modifications to the previously published spec and therefore has a revision number 1
|
|
310
|
+
|