{ "openapi": "3.1.0", "info": { "title": "Actual HTTP Api", "summary": "Basic Actual Budget API exposed through HTTP endpoints", "description": "This HTTP api is a wrapper of the Actual Budget api for NodeJS, see its\n documentation [here](https://actualbudget.org/docs/api/reference)

\n Amount/currency values:
In the context of this api, \n a currency amount is an integer representing the value without any decimal places.\n
Usually it’s value * 100, but it depends on your currency. For example, \n a USD amount of $120.30 would be 12030.", "license": { "name": "MIT", "url": "http://opensource.org/licenses/MIT" }, "version": "25.8.0" }, "components": { "securitySchemes": { "apiKey": { "type": "apiKey", "name": "x-api-key", "in": "header", "scheme": "http" } }, "parameters": { "accountId": { "name": "accountId", "in": "path", "schema": { "type": "string" }, "required": true, "description": "Account id" }, "month": { "name": "month", "in": "path", "schema": { "type": "string" }, "required": true, "description": "Budget month. Example 2023-08" }, "categoryId": { "name": "categoryId", "in": "path", "schema": { "type": "string" }, "required": true, "description": "Category id" }, "categoryGroupId": { "name": "categoryGroupId", "in": "path", "schema": { "type": "string" }, "required": true, "description": "Category group id" }, "budgetSyncId": { "name": "budgetSyncId", "in": "path", "schema": { "type": "string" }, "required": true, "description": "This is the Synchronization ID from Actual Budget β†’ Settings β†’ Show advanced settings β†’ Sync ID" }, "budgetEncryptionPassword": { "name": "budget-encryption-password", "in": "header", "schema": { "type": "string" }, "required": false, "description": "Optional encryption password for end-to-end encrypted budgets. Only needed in the first interaction with the encrypted budget, subsequent requests don't need to provide this value" }, "payeeId": { "name": "payeeId", "in": "path", "schema": { "type": "string" }, "required": true, "description": "Payee id" }, "ruleId": { "name": "ruleId", "in": "path", "schema": { "type": "string" }, "required": true, "description": "Rule id" }, "page": { "name": "page", "in": "query", "schema": { "type": "number" }, "required": false, "description": "Page number. When limit is set, this parameter is required. Example 2" }, "limit": { "name": "limit", "in": "query", "schema": { "type": "number" }, "required": false, "description": "Number of transactions to return. When page is set, this parameter is required. Example 50" }, "transactionId": { "name": "transactionId", "in": "path", "schema": { "type": "string" }, "required": true, "description": "Transaction id" }, "sinceDate": { "name": "since_date", "in": "query", "schema": { "type": "string" }, "required": true, "description": "Starting date. Example 2023-08-01" }, "untilDate": { "name": "until_date", "in": "query", "schema": { "type": "string" }, "required": false, "description": "End date. Example 2023-08-31" } }, "schemas": { "Account": { "required": [ "id", "name", "offbudget", "closed" ], "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "offbudget": { "type": "boolean" }, "closed": { "type": "boolean" } } }, "Amount": { "type": "integer" }, "BudgetMonth": { "required": [ "month", "incomeAvailable", "lastMonthOverspent", "forNextMonth", "totalBudgeted", "toBudget", "fromLastMonth", "totalIncome", "totalSpent", "totalBalance", "categoryGroups" ], "type": "object", "properties": { "month": { "type": "string" }, "incomeAvailable": { "type": "integer" }, "lastMonthOverspent": { "type": "integer" }, "forNextMonth": { "type": "integer" }, "totalBudgeted": { "type": "integer" }, "toBudget": { "type": "integer" }, "fromLastMonth": { "type": "integer" }, "totalIncome": { "type": "integer" }, "totalSpent": { "type": "integer" }, "totalBalance": { "type": "integer" }, "categoryGroups": { "type": "array", "items": { "$ref": "#/components/schemas/BudgetMonthCategoryGroup" } } } }, "BudgetMonthCategoryGroup": { "required": [ "id", "name", "is_income", "categories", "budgeted", "spent", "balance" ], "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "integer" }, "is_income": { "type": "boolean" }, "hidden": { "type": "boolean" }, "categories": { "type": "array", "items": { "$ref": "#/components/schemas/BudgetMonthCategory" } }, "budgeted": { "type": "integer" }, "spent": { "type": "integer" }, "balance": { "type": "integer" } } }, "BudgetMonthCategory": { "required": [ "id", "name", "is_income", "group_id", "budgeted", "spent", "balance", "carryover" ], "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "integer" }, "is_income": { "type": "boolean" }, "hidden": { "type": "boolean" }, "group_id": { "type": "string" }, "budgeted": { "type": "integer" }, "spent": { "type": "integer" }, "balance": { "type": "integer" }, "carryover": { "type": "boolean" } } }, "CategoryGroup": { "required": [ "name" ], "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "integer" }, "is_income": { "type": "boolean" }, "hidden": { "type": "boolean" }, "categories": { "type": "array", "items": { "$ref": "#/components/schemas/Category", "description": "An array of categories in this group. Not valid when creating or updating a category group. Only available in a get." } } } }, "Category": { "required": [ "name", "group_id" ], "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "integer" }, "is_income": { "type": "boolean" }, "hidden": { "type": "boolean" }, "group_id": { "type": "string" } } }, "GeneralError": { "type": "object", "properties": { "error": { "type": "string" } } }, "GeneralResponseMessage": { "type": "object", "properties": { "message": { "type": "string" } } }, "Payee": { "required": [ "name" ], "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "category": { "type": "string" }, "transfer_acct": { "type": "string" } } }, "ConditionOrAction": { "required": [ "field", "op", "value" ], "type": "object", "properties": { "field": { "type": "string" }, "op": { "type": "string" }, "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ], "type": "string" }, "type": { "type": "string" } } }, "Rule": { "required": [ "stage" ], "type": "object", "properties": { "id": { "type": "string" }, "stage": { "type": "string", "description": "Must be one of \"pre\", \"default\", or \"post\"" }, "conditionsOp": { "type": "string", "description": "Must be one of \"and\" or \"or\"" }, "conditions": { "type": "array", "items": { "$ref": "#/components/schemas/ConditionOrAction", "description": "Array of conditions" } }, "actions": { "type": "array", "items": { "$ref": "#/components/schemas/ConditionOrAction", "description": "Array of actions" } } } }, "Transaction": { "required": [ "account", "date" ], "type": "object", "properties": { "id": { "type": "string" }, "account": { "type": "string" }, "date": { "type": "string" }, "amount": { "type": "integer" }, "payee": { "type": "string" }, "payee_name": { "type": "string", "description": "Only available in a create request" }, "imported_payee": { "type": "string" }, "category": { "type": "string" }, "notes": { "type": "string" }, "imported_id": { "type": "string" }, "transfer_id": { "type": "string" }, "cleared": { "type": "string" }, "subtransactions": { "type": "array", "description": "Only available in a get or create request", "items": { "$ref": "#/components/schemas/Transaction" } } } } }, "responses": { "400": { "description": "Invalid input", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralError", "examples": [ { "error": "Invalid month format, use YYYY-MM: 2019-999" } ] } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralError", "examples": [ { "error": "No budget exists for month: 2019-01" } ] } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralError", "examples": [ { "error": "Error accessing Actual Server, check Actual Server url" } ] } } } } } }, "servers": [ { "url": "http://localhost:5007/v1" }, { "url": "{protocol}://{host}:{port}/{basePath}", "variables": { "protocol": { "default": "https" }, "host": { "default": "localhost" }, "port": { "default": "443" }, "basePath": { "default": "v1" } } } ], "paths": { "/budgets/{budgetSyncId}/accounts": { "get": { "summary": "Returns list of accounts for the budget associated with the sync id specified", "tags": [ "Accounts" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "The list of accounts for the specified budget", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Account" } } }, "examples": [ { "data": [ { "id": "671b669d-b616-4bf1-8a04-c82d73f87d5b", "name": "Checking", "offbudget": false, "closed": false } ] } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "post": { "summary": "Creates an account", "tags": [ "Accounts" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "account" ], "type": "object", "properties": { "account": { "required": [ "name", "offbudget" ], "type": "object", "properties": { "name": { "type": "string" }, "offbudget": { "type": "boolean" } } } }, "examples": [ { "account": { "name": "Checking", "offbudget": false } } ] } } } }, "responses": { "200": { "description": "Account created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Account created" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/accounts/{accountId}": { "get": { "summary": "Returns account information", "tags": [ "Accounts" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/accountId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Account information", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Account" } }, "examples": [ { "data": { "id": "671b669d-b616-4bf1-8a04-c82d73f87d5b", "name": "Checking", "offbudget": false, "closed": false } } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "patch": { "summary": "Updates an account", "tags": [ "Accounts" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/accountId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "account" ], "type": "object", "properties": { "account": { "required": [ "name", "offbudget" ], "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "offbudget": { "type": "boolean" } } } }, "examples": [ { "account": { "name": "Checking new name" } } ] } } } }, "responses": { "200": { "description": "Account updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Account updated" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "delete": { "summary": "Deletes an account", "tags": [ "Accounts" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/accountId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Account deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Account deleted" } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/accounts/{accountId}/balance": { "get": { "summary": "Returns account balance", "tags": [ "Accounts" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/accountId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Account balance", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Amount" } }, "examples": [ { "data": 2000 } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/accounts/{accountId}/close": { "put": { "summary": "Closes an account", "description": "transferAccountId and transferCategoryId are optional if the balance of the account is 0, otherwise if the account has a non-zero balance, you need to specify an account with transferAccountId to transfer the money into.
If you are transferring from an on-budget account to an off-budget account, you can optionally specify a category with transferCategoryId to categorize the transfer transaction.", "tags": [ "Accounts" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/accountId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "transfer": { "type": "object", "properties": { "transferAccountId": { "type": "string" }, "transferCategoryId": { "type": "string" } } } }, "examples": [ { "transfer": { "transferAccountId": "671b669d-b616-4bf1-8a04-c82d73f87d5b", "transferCategoryId": "3c1699a5-522a-435e-86dc-93d900a14f0e" } } ] } } } }, "responses": { "200": { "description": "Account closed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Account closed" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/accounts/{accountId}/reopen": { "put": { "summary": "Reopens a closed account", "tags": [ "Accounts" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/accountId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Account reopened", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Account reopened" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/accounts/{accountId}/banksync": { "post": { "summary": "Triggers a bank sync for a specific account", "tags": [ "Accounts" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/accountId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Bank sync started", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Bank sync started" } ] } } } }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/accounts/banksync": { "post": { "summary": "Triggers a bank sync", "tags": [ "Accounts" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Bank sync started", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Bank sync started" } ] } } } }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/months": { "get": { "summary": "Returns list of months for the budget associated with the sync id specified", "tags": [ "Budget Months" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "The list of months for the specified budget", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "type": "array", "items": { "type": "string", "description": "Budget month. Example 2023-08" } } }, "examples": [ { "data": [ "2023-05", "2023-06", "2023-07", "2023-08", "2023-09" ] } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/months/{month}": { "get": { "summary": "Returns the budget information for the month specified", "tags": [ "Budget Months" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/month" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Budget month information", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "$ref": "#/components/schemas/BudgetMonth" } }, "examples": [ { "data": { "month": "2023-08", "incomeAvailable": 13041, "lastMonthOverspent": 0, "forNextMonth": 0, "totalBudgeted": -13041, "toBudget": 0, "fromLastMonth": 1667, "totalIncome": 11374, "totalSpent": -661485, "totalBalance": 1648273, "categoryGroups": [ { "id": "d4394761-0427-4ad4-bde7-9a83e118541a", "name": "Frequent", "is_income": false, "hidden": false, "budgeted": 287610, "spent": -294337, "balance": 3273, "categories": [ { "id": "106963b3-ab82-4734-ad70-1d7dc2a52ff4", "name": "For Spending", "is_income": false, "hidden": false, "group_id": "d4394761-0427-4ad4-bde7-9a83e118541a", "budgeted": 0, "spent": 0, "balance": 0, "carryover": false } ] } ] } } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/months/{month}/categories": { "get": { "summary": "Returns the list of categories for the month specified", "tags": [ "Budget Months" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/month" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "List of categories for the month specified", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/BudgetMonthCategory" } } }, "examples": [ { "data": [ { "id": "106963b3-ab82-4734-ad70-1d7dc2a52ff4", "name": "For Spending", "is_income": false, "hidden": false, "group_id": "d4394761-0427-4ad4-bde7-9a83e118541a", "budgeted": 0, "spent": 0, "balance": 0, "carryover": false } ] } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/months/{month}/categories/{categoryId}": { "get": { "summary": "Returns the category information for the month specified", "tags": [ "Budget Months" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/month" }, { "$ref": "#/components/parameters/categoryId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Category information for the month specified", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "$ref": "#/components/schemas/BudgetMonthCategory" } }, "examples": [ { "data": { "id": "106963b3-ab82-4734-ad70-1d7dc2a52ff4", "name": "For Spending", "is_income": false, "hidden": false, "group_id": "d4394761-0427-4ad4-bde7-9a83e118541a", "budgeted": 0, "spent": 0, "balance": 0, "carryover": false } } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "patch": { "summary": "Updates the category information for the month specified", "tags": [ "Budget Months" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/month" }, { "$ref": "#/components/parameters/categoryId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "category" ], "type": "object", "properties": { "category": { "type": "object", "properties": { "budgeted": { "type": "integer" }, "carryover": { "type": "boolean" } } } }, "examples": [ { "category": { "budgeted": 1000, "carryover": false } } ] } } } }, "responses": { "200": { "description": "Category information updated for the month specified", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Category updated" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/months/{month}/categorygroups": { "get": { "summary": "Returns the list of category groups for the month specified", "tags": [ "Budget Months" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/month" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "List of category groups for the month specified", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/BudgetMonthCategoryGroup" } } }, "examples": [ { "data": [ { "id": "d4394761-0427-4ad4-bde7-9a83e118541a", "name": "Frequent", "is_income": false, "hidden": false, "budgeted": 287610, "spent": -294337, "balance": 3273, "categories": [ { "id": "106963b3-ab82-4734-ad70-1d7dc2a52ff4", "name": "For Spending", "is_income": false, "hidden": false, "group_id": "d4394761-0427-4ad4-bde7-9a83e118541a", "budgeted": 0, "spent": 0, "balance": 0, "carryover": false } ] } ] } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/months/{month}/categorygroups/{categoryGroupId}": { "get": { "summary": "Returns the category group information for the month specified", "tags": [ "Budget Months" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/month" }, { "$ref": "#/components/parameters/categoryGroupId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Category group information for the month specified", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "$ref": "#/components/schemas/BudgetMonthCategoryGroup" } }, "examples": [ { "data": { "id": "d4394761-0427-4ad4-bde7-9a83e118541a", "name": "Frequent", "is_income": false, "hidden": false, "budgeted": 287610, "spent": -294337, "balance": 3273, "categories": [ { "id": "106963b3-ab82-4734-ad70-1d7dc2a52ff4", "name": "For Spending", "is_income": false, "hidden": false, "group_id": "d4394761-0427-4ad4-bde7-9a83e118541a", "budgeted": 0, "spent": 0, "balance": 0, "carryover": false } ] } } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/months/{month}/categorytransfers": { "post": { "summary": "Creates a category transfer", "description": "Moves money from one category to another for one specific month.
If the source category is not specified the money will come from available to budget.
If the destination is not specified the money will go to available to budget.", "tags": [ "Budget Months" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/month" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "categorytransfer" ], "type": "object", "properties": { "categorytransfer": { "type": "object", "properties": { "fromCategoryId": { "type": "string" }, "toCategoryId": { "type": "string" }, "amount": { "type": "integer" } } } }, "examples": [ { "categorytransfer": { "fromCategoryId": "106963b3-ab82-4734-ad70-1d7dc2a52ff4", "toCategoryId": "1affe7a5-a87a-45d2-9888-32225f8f5fd2", "amount": 10000 } } ] } } } }, "responses": { "200": { "description": "Category transfer created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Category transfer created" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/months/{month}/nextmonthbudgethold": { "post": { "summary": "Put a budget amount on hold for next month", "description": "Put a budget amount on hold for next month", "tags": [ "Budget Months" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/month" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "amount" ], "type": "object", "properties": { "amount": { "type": "integer" } }, "examples": [ { "amount": 10000 } ] } } } }, "responses": { "200": { "description": "Budget amount was put on hold for next month", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Budget amount 10000 was put on hold for next month" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "delete": { "summary": "Reset budget hold", "tags": [ "Budget Months" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/month" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Budget hold reset", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Budget hold reset" } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/categories": { "get": { "summary": "Returns list of categories", "tags": [ "Categories" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "The list of categories", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Category" } } }, "examples": [ { "data": [ { "id": "106963b3-ab82-4734-ad70-1d7dc2a52ff4", "name": "For Spending", "is_income": false, "hidden": false, "group_id": "d4394761-0427-4ad4-bde7-9a83e118541a" } ] } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "post": { "summary": "Creates a category", "tags": [ "Categories" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "category" ], "type": "object", "properties": { "category": { "$ref": "#/components/schemas/Category" } }, "examples": [ { "category": { "name": "For Spending", "is_income": false, "hidden": false, "group_id": "d4394761-0427-4ad4-bde7-9a83e118541a" } } ] } } } }, "responses": { "201": { "description": "Category id", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "type": "string", "description": "Category id" } }, "examples": [ { "data": "106963b3-ab82-4734-ad70-1d7dc2a52ff4" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/categories/{categoryId}": { "get": { "summary": "Returns a category information", "tags": [ "Categories" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/categoryId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Category information", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Category" } }, "examples": [ { "data": { "id": "106963b3-ab82-4734-ad70-1d7dc2a52ff4", "name": "For Spending", "is_income": false, "hidden": false, "group_id": "d4394761-0427-4ad4-bde7-9a83e118541a" } } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "patch": { "summary": "Updates a category", "tags": [ "Categories" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/categoryId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "category" ], "type": "object", "properties": { "category": { "$ref": "#/components/schemas/Category" } }, "examples": [ { "category": { "name": "For Spending", "is_income": false, "hidden": false, "group_id": "d4394761-0427-4ad4-bde7-9a83e118541a" } } ] } } } }, "responses": { "200": { "description": "Category updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Category updated" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "delete": { "summary": "Deletes a category", "tags": [ "Categories" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/categoryId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" }, { "name": "transfer_category_id", "in": "query", "schema": { "type": "string", "description": "Destination category id", "examples": [ "106963b3-ab82-4734-ad70-1d7dc2a52ff4" ] } } ], "responses": { "200": { "description": "Category deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Category deleted" } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/categorygroups": { "get": { "summary": "Returns list of category groups", "tags": [ "Categories" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "The list of category groups", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/CategoryGroup" } } }, "examples": [ { "data": [ { "id": "d4394761-0427-4ad4-bde7-9a83e118541a4", "name": "Misc", "is_income": false, "hidden": false, "categories": [ { "id": "106963b3-ab82-4734-ad70-1d7dc2a52ff4", "name": "For Spending", "is_income": false, "hidden": false } ] } ] } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "post": { "summary": "Creates a category group", "tags": [ "Categories" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "category_group" ], "type": "object", "properties": { "category_group": { "$ref": "#/components/schemas/CategoryGroup" } }, "examples": [ { "category_group": { "name": "Bills", "is_income": false, "hidden": false } } ] } } } }, "responses": { "201": { "description": "Category group id", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "type": "string", "description": "Category group id" } }, "examples": [ { "data": "2E1F5BDB-209B-43F9-AF2C-3CE28E380C00" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/categorygroups/{categoryGroupId}": { "patch": { "summary": "Updates a category group", "tags": [ "Categories" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/categoryGroupId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "category_group" ], "type": "object", "properties": { "category_group": { "$ref": "#/components/schemas/Category" } }, "examples": [ { "category_group": { "name": "Bills", "is_income": false, "hidden": false } } ] } } } }, "responses": { "200": { "description": "Category group updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Category group updated" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "delete": { "summary": "Deletes a category group", "tags": [ "Categories" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/categoryGroupId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" }, { "name": "transfer_category_id", "in": "query", "schema": { "type": "string", "description": "Destination category id", "examples": [ "106963b3-ab82-4734-ad70-1d7dc2a52ff4" ] } } ], "responses": { "200": { "description": "Category group deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Category group deleted" } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/payees": { "get": { "summary": "Returns list of payees", "tags": [ "Payees" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "The list of payees", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Payee" } } }, "examples": [ { "data": [ { "id": "f733399d-4ccb-4758-b208-7422b27f650a", "name": "Fidelity", "category": null, "transfer_acct": "729cb492-4eab-468b-9522-75d455cded22" } ] } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "post": { "summary": "Creates a payee", "tags": [ "Payees" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "payee" ], "type": "object", "properties": { "payee": { "$ref": "#/components/schemas/Payee" } }, "examples": [ { "payee": { "name": "Fidelity" } } ] } } } }, "responses": { "200": { "description": "Payee id", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "type": "string", "description": "Payee id" } }, "examples": [ { "data": "f733399d-4ccb-4758-b208-7422b27f650a" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/payees/{payeeId}": { "get": { "summary": "Returns a payee", "tags": [ "Payees" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/payeeId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Payee", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Payee" } }, "examples": [ { "data": { "id": "9de084a4-dc96-4015-ac81-ba57ee340acd", "name": "Fidelity", "category": null, "transfer_acct": "729cb492-4eab-468b-9522-75d455cded22" } } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "patch": { "summary": "Updates a payee", "tags": [ "Payees" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/payeeId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "payee" ], "type": "object", "properties": { "payee": { "$ref": "#/components/schemas/Payee" } }, "examples": [ { "payee": { "name": "Fidelity" } } ] } } } }, "responses": { "200": { "description": "Payee updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Payee updated" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "delete": { "summary": "Deletes a payee", "tags": [ "Payees" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/payeeId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Payee deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Payee deleted" } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/payees/{payeeId}/rules": { "get": { "summary": "Returns list of rules for a payee", "tags": [ "Payees" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/payeeId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "The list of rules for a payee", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Rule" } } }, "examples": [ { "data": [ { "id": "3ac44ad6-339a-459f-8eb6-fcff4cb87c34", "stage": "pre", "conditionsOp": "and", "conditions": [ { "op": "is", "field": "payee", "value": "6740d5c1-5a89-4fa0-a35c-910e6da86e8r", "type": "id" } ], "actions": [ { "op": "set", "field": "category", "value": "9787f2b1-d145-4afc-95b5-8f39ac68f8h5", "type": "id" } ] } ] } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/rules": { "get": { "summary": "Returns list of rules for the budget associated with the sync id specified", "tags": [ "Rules" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" }, { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/limit" } ], "responses": { "200": { "description": "The list of rules for the specified budget", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Rule" } } }, "examples": [ { "data": [ { "id": "3ac44ad6-339a-459f-8eb6-fcff4cb87c34", "stage": "pre", "conditionsOp": "and", "conditions": [ { "op": "is", "field": "payee", "value": "6740d5c1-5a89-4fa0-a35c-910e6da86e8r", "type": "id" } ], "actions": [ { "op": "set", "field": "category", "value": "9787f2b1-d145-4afc-95b5-8f39ac68f8h5", "type": "id" } ] } ] } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "post": { "summary": "Creates a rule", "tags": [ "Rules" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "rule" ], "type": "object", "properties": { "rule": { "required": [ "stage" ], "type": "object", "properties": { "stage": { "type": "string", "description": "Must be one of \"pre\", \"default\", or \"post\"" }, "conditionsOp": { "type": "string", "description": "Must be one of \"and\" or \"or\"" }, "conditions": { "type": "array", "items": { "$ref": "#/components/schemas/ConditionOrAction", "description": "Array of conditions" } }, "actions": { "type": "array", "items": { "$ref": "#/components/schemas/ConditionOrAction", "description": "Array of actions" } } } } }, "examples": [ { "rule": { "stage": "pre", "conditionsOp": "and", "conditions": [ { "op": "is", "field": "payee", "value": "6740d5c1-5a89-4fa0-a35c-910e6da86e8r", "type": "id" } ], "actions": [ { "op": "set", "field": "category", "value": "9787f2b1-d145-4afc-95b5-8f39ac68f8h5", "type": "id" } ] } } ] } } } }, "responses": { "200": { "description": "Rule created", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Rule" } }, "examples": [ { "data": { "id": "3ac44ad6-339a-459f-8eb6-fcff4cb87c34", "stage": "pre", "conditionsOp": "and", "conditions": [ { "op": "is", "field": "payee", "value": "6740d5c1-5a89-4fa0-a35c-910e6da86e8r", "type": "id" } ], "actions": [ { "op": "set", "field": "category", "value": "9787f2b1-d145-4afc-95b5-8f39ac68f8h5", "type": "id" } ] } } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/rules/{ruleId}": { "get": { "summary": "Returns a rule", "tags": [ "Rules" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/ruleId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Rule", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Rule" } }, "examples": [ { "data": { "id": "3ac44ad6-339a-459f-8eb6-fcff4cb87c34", "stage": "pre", "conditionsOp": "and", "conditions": [ { "op": "is", "field": "payee", "value": "6740d5c1-5a89-4fa0-a35c-910e6da86e8r", "type": "id" } ], "actions": [ { "op": "set", "field": "category", "value": "9787f2b1-d145-4afc-95b5-8f39ac68f8h5", "type": "id" } ] } } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "patch": { "summary": "Updates a rule", "tags": [ "Rules" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/ruleId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "rule" ], "type": "object", "properties": { "rule": { "$ref": "#/components/schemas/Rule" } }, "examples": [ { "rule": { "id": "3ac44ad6-339a-459f-8eb6-fcff4cb87c34", "stage": "pre", "conditionsOp": "and", "conditions": [ { "op": "is", "field": "payee", "value": "6740d5c1-5a89-4fa0-a35c-910e6da86e8r", "type": "id" } ], "actions": [ { "op": "set", "field": "category", "value": "9787f2b1-d145-4afc-95b5-8f39ac68f8h5", "type": "id" } ] } } ] } } } }, "responses": { "200": { "description": "Rule updated", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Rule" } }, "examples": [ { "data": { "id": "3ac44ad6-339a-459f-8eb6-fcff4cb87c34", "stage": "pre", "conditionsOp": "and", "conditions": [ { "op": "is", "field": "payee", "value": "6740d5c1-5a89-4fa0-a35c-910e6da86e8r", "type": "id" } ], "actions": [ { "op": "set", "field": "category", "value": "9787f2b1-d145-4afc-95b5-8f39ac68f8h5", "type": "id" } ] } } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "delete": { "summary": "Deletes a rule", "tags": [ "Rules" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/ruleId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Rule deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Rule deleted" } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/accounts/{accountId}/transactions": { "get": { "summary": "Returns list of transactions for an account", "tags": [ "Transactions" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/accountId" }, { "$ref": "#/components/parameters/sinceDate" }, { "$ref": "#/components/parameters/untilDate" }, { "$ref": "#/components/parameters/page" }, { "$ref": "#/components/parameters/limit" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "The list of transactions for an account", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Transaction" } } }, "examples": [ { "data": [ { "id": "4d194727-2ab2-4b50-a1aa-d506f2790e68", "is_parent": false, "is_child": false, "parent_id": null, "account": "729cb492-4eab-468b-9522-75d455cded22", "category": "9fa2550c-c3ff-498b-8df6-e0fbe2a62e0e", "amount": -7374, "payee": "c5647552-a5b1-4fea-a2bd-4aa2e4d03938", "notes": null, "date": "2023-06-23", "imported_id": null, "error": null, "imported_payee": "Remitly", "starting_balance_flag": false, "transfer_id": null, "sort_order": 1693171043936, "cleared": true, "tombstone": false, "schedule": null, "subtransactions": [] } ] } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "post": { "summary": "Creates a transaction", "description": "Actual Budget api says the addTransactions functionality returns a list of ids for the transactions created, but that is not the case, it simply returns the string message 'ok'", "tags": [ "Transactions" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/accountId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "transaction" ], "type": "object", "properties": { "learnCategories": { "type": "boolean" }, "runTransfers": { "type": "boolean" }, "transaction": { "$ref": "#/components/schemas/Transaction" } }, "examples": [ { "learnCategories": false, "runTransfers": false, "transaction": { "account": "729cb492-4eab-468b-9522-75d455cded22", "category": "9fa2550c-c3ff-498b-8df6-e0fbe2a62e0e", "amount": -7374, "payee_name": "Remitly", "date": "2023-06-23", "cleared": false } } ] } } } }, "responses": { "200": { "description": "ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "ok" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/accounts/{accountId}/transactions/batch": { "post": { "summary": "Creates a list of transactions", "description": "Actual Budget api says the addTransactions functionality returns a list of ids for the transactions created, but that is not the case, it simply returns the string message 'ok'", "tags": [ "Transactions" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/accountId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "transactions" ], "type": "object", "properties": { "learnCategories": { "type": "boolean" }, "runTransfers": { "type": "boolean" }, "transactions": { "type": "array", "items": { "$ref": "#/components/schemas/Transaction" } } }, "examples": [ { "learnCategories": false, "runTransfers": false, "transactions": [ { "account": "729cb492-4eab-468b-9522-75d455cded22", "category": "9fa2550c-c3ff-498b-8df6-e0fbe2a62e0e", "amount": -7374, "payee_name": "Remitly", "date": "2023-06-23", "cleared": false } ] } ] } } } }, "responses": { "200": { "description": "ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "ok" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/accounts/{accountId}/transactions/import": { "post": { "summary": "Imports a list of transactions", "tags": [ "Transactions" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/accountId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "transactions" ], "type": "object", "properties": { "transactions": { "type": "array", "items": { "$ref": "#/components/schemas/Transaction" } } }, "examples": [ { "transactions": [ { "account": "729cb492-4eab-468b-9522-75d455cded22", "category": "9fa2550c-c3ff-498b-8df6-e0fbe2a62e0e", "amount": -7374, "payee_name": "Remitly", "date": "2023-06-23", "cleared": false } ] } ] } } } }, "responses": { "201": { "description": "Ids of transactions add and updated", "content": { "application/json": { "schema": { "required": [ "data" ], "type": "object", "properties": { "data": { "required": [ "added", "updated" ], "type": "object", "properties": { "added": { "type": "array", "items": { "type": "string", "description": "Id of transaction added", "examples": [ "1a152a80-af05-4efa-ba4a-95f814a9d1d1" ] } }, "updated": { "type": "array", "items": { "type": "string", "description": "Id of transaction updated", "examples": [ "1fbd4467-004d-4163-8569-6f83f8db6eca" ] } } } } }, "examples": [ { "data": null, "added": [ "1a152a80-af05-4efa-ba4a-95f814a9d1d1", "f64fd861-ba21-481b-ac88-2c30c6660240" ], "updated": [ "1fbd4467-004d-4163-8569-6f83f8db6eca", "34339ba3-7b38-4b3a-b90d-4a895781ea9e" ] } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } }, "/budgets/{budgetSyncId}/transactions/{transactionId}": { "patch": { "summary": "Updates a transaction", "tags": [ "Transactions" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/transactionId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ "transaction" ], "type": "object", "properties": { "transaction": { "required": [ "account", "date" ], "type": "object", "properties": { "id": { "type": "string" }, "account": { "type": "string" }, "date": { "type": "string" }, "amount": { "type": "integer" }, "payee": { "type": "string" }, "imported_payee": { "type": "string" }, "category": { "type": "string" }, "notes": { "type": "string" }, "imported_id": { "type": "string" }, "transfer_id": { "type": "string" }, "cleared": { "type": "string" } } } }, "examples": [ { "transaction": { "account": "729cb492-4eab-468b-9522-75d455cded22", "category": "9fa2550c-c3ff-498b-8df6-e0fbe2a62e0e", "amount": -7374, "date": "2023-06-23", "cleared": true } } ] } } } }, "responses": { "200": { "description": "Transaction updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Transaction updated" } ] } } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } }, "delete": { "summary": "Deletes a transaction", "tags": [ "Transactions" ], "security": [ { "apiKey": [] } ], "parameters": [ { "$ref": "#/components/parameters/budgetSyncId" }, { "$ref": "#/components/parameters/transactionId" }, { "$ref": "#/components/parameters/budgetEncryptionPassword" } ], "responses": { "200": { "description": "Transaction deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneralResponseMessage", "examples": [ { "message": "Transaction deleted" } ] } } } }, "404": { "$ref": "#/components/responses/404" }, "500": { "$ref": "#/components/responses/500" } } } } }, "tags": [ { "name": "Accounts", "description": "Endpoints for managing accounts. See [Accounts official documentation](https://actualbudget.org/docs/api/reference#accounts)" }, { "name": "Budget Months", "description": "Endpoints for managing the budget information for specific months. See [Budgets official documentation](https://actualbudget.org/docs/api/reference#budgets)" }, { "name": "Categories", "description": "Endpoints for managing categories. See [Categories official documentation](https://actualbudget.org/docs/api/reference#categories)" }, { "name": "Payees", "description": "Endpoints for managing payees. See [Payees official documentation](https://actualbudget.org/docs/api/reference#payees)" }, { "name": "Rules", "description": "Endpoints for managing rules. See [Rules official documentation](https://actualbudget.org/docs/api/reference#rules)" }, { "name": "Transactions", "description": "Endpoints for managing transactions. See [Transactions official documentation](https://actualbudget.org/docs/api/reference#transactions)" } ] }