The Lunch Money API spec uses a modified version of SEMVER for its versioning methodology as follows.
/balance_history endpoints:GET /balance_historyGET /balance_history/{account_type}/{account_id}GET /balance_history/crypto_synced/{account_id}/{symbol}PUT /balance_history/{account_type}/{account_id}PUT /balance_history/crypto_synced/{account_id}/{symbol}DELETE /balance_history/entries/{id}DELETE /balance_history/{account_type}/{account_id}DELETE /balance_history/crypto_synced/{account_id}/{symbol}PUT /balance_history/deleted/{account_id}/detailsrollover_pool from category objects in the GET /summary responseexternal_id on Plaid-account transactionsnull for category_id and notes on split children to clear those values instead of inheriting from the parentGET /cryptocurrenciesGET /crypto/manual, POST /crypto/manual, GET /crypto/manual/{id}, PUT /crypto/manual/{id}, DELETE /crypto/manual/{id}GET /crypto/synced, GET /crypto/synced/{id}, GET /crypto/synced/{id}/{symbol}, POST /crypto/synced/{id}/refreshnotes.clf, eth, and ves to the supported currency codes.xag and xau to the supported currency codes.payee.archived_at when modifying a category or tag via the PUT /categories or PUT /tags endpoints./budgets endpoint support:GET /budgets/settings for account budget settingsPUT /budgets to create or update budget amountsDELETE /budgets to remove budget amounts/summary endpoint to return an occurrences array for both aligned and non-aligned summary responses when include_occurrences=true. start_date and end_date of occurrences in a non-aligned response for use in subsequent requests to get an aligned response, which will include complete budget information.tag_ids on child transactions in POST /transactions/split/{id}.plaid_item_id and linked_by_name properties to the Plaid Account Objectstatus enum to include closed, revoked, and deactivatedoriginal_name property to the v2 Transaction Objectcollapsed property on the childCategoryObject is no longer nullable and is always set to false.status and created_by_name properties to the Manual Account Objectclosed_on property in a PUT or POST request. Now status must also be set to closed.created_since and updated_since query parameters to the GET /transactions endpoint.include_group_children query parameter to the GET /transactions endpoint.include_rollover_pool and include_past_budget_dates query params to the GET /summary endpoint.to_base to the allowed properties in the updateManualAccountObject. This is tolerated but ignored (matches behavior in updateTransactionObject)x-updatable attributes have been added to the properties of the update objects to more clearly describe which system defined properties are tolerated but ignored.is_parent -> is_split_parentparent_id -> split_parent_idis_group -> is_group_parentgroup_id -> group_parent_idis_group -> is_group_parentcurrent -> in_rangelimit has been changed from 100 to 1000. The max for this parameter is now 2000.order and collapsed property. These properties are used by GUIs that display a list of categories.delete_items (boolean, default: false): When set to true, also deletes transactions, rules, and recurring items associated with the accountdelete_balance_history (boolean, default: false): When set to true, deletes balance history associated with the accountdebits_as_negative from the userObjectbackground_color and text_color to the tagObjectto_base to the recurring_item.transaction_criteria objectstatus in the transactions object has been deprecated. This was redundant with the is_pending boolean property.is_pending query parameter has been added to the GET /transactions endpoint.custom_metadata property has been added to the Manual Account object.subtype property has increased from 75 to 100 characters.description string may now be passed in the request body for the POST and PUT /categories endpointfiles property is now included in transaction objects when include_files is set to truefiles property contains an array of transactionAttachmentObject objectsoverrides 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.skip_duplicates request body property on a POST /transactions request will now be applied to plaid accounts as well as manual accounts.plaid_metadata, custom_metadata, children, or files properties. These properties ARE provided by default in the GET /transactions/:id endpoint.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.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.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.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.include_pending query param is ignored if status query param is also set.plaid_metadata, custom_metadata, and files properties.is_group or is_parent is true in the response, it will also include a children property.skipped_duplicates array property will always be returned along with the transactions array.manual_account_id and external_id of a requested transaction match existing transactions.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.subtype string that can be set on a manual account object to 75 charactersinteger instead of number for properties such as ids, orders, and indexes which are always an integer. Amounts, balances and limits still use type number.id and created_at.category_id to 0 on a GET /transactions request will now return un-categorized transactions.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.order property of a category via the API has been removed.order in the body of a POST /categories request will result in a validation error.order in the body of PUT /categories request is treated as a "system defined" property and is ignored.children array now has a defined items type.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.is_group query parameter is now defined a boolean instead of an enum of true and falseAccountTypeEnum to accountTypeEnum to maintain consistency in schema naming styleto_base property to the Manual and Plaid Account objects to align with a recent change in the v1 API.children property of a request. The categories will be moved to the group being created or updated without error.children property. These will be used as the names of new child categories that will be created.balance property to be either a string or a number.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.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.transactions section covers endpoints that impact a single transaction.transactions (bulk) section covers endpoints that impact multiple transactions.transactions (group) section covers endpoints related to grouping and ungrouping transactions.transactions (split) section covers endpoints related to splitting and unsplitting transactions.ids property in the request body.plaid_account_id on a transaction passed in to POST /transactions.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.custom_metadata object has been added. This can be set or modified via the API.custom_metadata may be included as a property on the new transaction objects. This can be any valid JSON object.debit_as_negative property on the request body is no longer supportedexternal_ids behave differentlyexternal_ids within the request body are treated as an errorexternal_id that already exists in the database are now skipped. Any remaining transactions in the request are inserted.include_plaid_metadata parameter name has changed back to include_metadata and will now return both plaid and custom metadata.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.external_id property was added which can be set via the POST and PUT /manual_transactions endpointsGET /categories endpointis_group can be set to false in order to get the API to return only a set of assignable categories.category_name property has been removed from the dependents object and is now returned as a top-level property in the response body.created_at, updated_at, and archived_at have been addedforce query paramgroup_name property has been removedplaid_metadata. This anticipates a new user_metatdata property in a future release.is_group query parameter has been removedinclude_metadata to include_plaid_metadatasplit as a new value for the source enum. It's set for split transactions.child_ids property of the category object is renamed children and is populated by fully hydrated category objectschildren property will always be present for a category group.children will be an empty list.children list property are Child Category Objects that are similar to Category Objects, but with some differences: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.group_id is never null, group_name is always present, and children will never be present.format is set to flattened all categories and category groups are returned in the top level listchildren propertychildren property of their category group and also in the top level these categories can be found twice in the flattened response.is_income, exclude_from_budget and exclude_from_totals, properties.format query param now has a default value of nested, which means that a nested list of category objects is returned by default.children attribute of its category croup and then once in its own spot in the top-level listis_group query parameter has been added to the GET /categories method. false to return a list of assignable categories. No Category Groups are returned.true will return a list of Category Groups, with fully hydrated children objects. No ungrouped categories are returned.format query param is ignored if also set.POST and PUT /categories may now include a children property.children property of the request body is permitted.children property.synced_metadata property of the transaction object was renamed metadata in anticipation of metadata availability in imported transactions associated with manual accounts.ids param on the GET /categories endpoint.children property of the category object to children to match the new agreed upon standard for naming types and id lists.child_id and no group_name property and group_id is nullchild_id property, have a non null group_id property and have a group_name property.group_id with a value of null and do no have a children or group_name propertyThis 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.
The branch also introduces changes to the transaction object:
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.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.overrides property before any properties that may have been overridden. The ordering should now more closely match the transaction page on the GUI.children property that exists in a transaction that has been split has been renamed childrensynced_metadata, hydrated_recurring, hydrated_category, hydrated_account, and hydrated_tagsSchema definitions have been added for the manualAccountObject, syncedAccountObject and recurringItemObject in order to support hydration
Tests were added
This branch updates the tests to take advantage of bug fixes and features added to Portman 1.28.0
variableCasing to snakeCase. Use of this directive in prior versions caused some tests to failPORTMAN_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.mdmanual_account_ids to zero will filter out all manual account transactionsplaid_account_ids to zero will filter out all synced account transactionsThis is the initial branch using the versioning described above