{"openapi":"3.1.0","info":{"title":"Guilders API Reference","description":"\n**Guilders API Reference**\n\nAPI Documentation for Guilders, a personal finance platform that aggregates manual and synced financial data into a single platform, and exposes a developer-friendly API with MCP support so external tools and AI agents can read and write financial data on the user's behalf.\n\n> [!WARNING]\n> The API is currently in beta and may be subject to changes.\n","version":"0.1.0"},"tags":[{"name":"Accounts","description":"\nAccounts are the core entity in Guilders: each account represents an asset or liability (e.g. bank, investment, property, loan, credit card) belonging to a user.\n\nAccounts can be either \"manual\" (user-created, updated by hand) or \"synced\" (managed by a linked financial provider). Every account has a type (`asset` or `liability`), subtype (e.g. `depository`, `brokerage`, `property`, `creditcard`, `loan`), value, and currency.\n\nAccounts can be nested, allowing for complex asset/liability hierarchies, like an account representing a retirement account, which contains sub-accounts for different investments (e.g. stocks, bonds, mutual funds). The child accounts are represented by the `parent` attribute. Manual accounts cannot be nested currently. The parent account's value is the sum of the child account values, so it's important to exclude child accounts when calculating net worth.\n\n> [!NOTE]\n> Synced accounts are currently only supported in the dashboard, not in the API.\n"},{"name":"Transactions","description":"\nTransactions are the other core entity in Guilders: each transaction represents a financial event (e.g. deposit, withdrawal, purchase, sale, transfer) belonging to an account. Transactions have an amount, currency, date, description, and category.\n\nTransactions can be nested, allowing for complex financial event hierarchies, like a transaction representing a deposit to a retirement account, which contains sub-transactions for different investments (e.g. stocks, bonds, mutual funds). The child transactions are represented by the `parent` attribute. Manual transactions cannot be nested currently. The parent transaction's amount is the sum of the child transaction amounts, so it's important to exclude child transactions when calculating net worth.\n\n> [!NOTE]\n> Synced transactions are currently only supported in the dashboard, not in the API.\n"},{"name":"Categories","description":"\nCategories are used to group transactions into income and expense categories. Each category has a **name**, **color**, **icon**, and **classification** (`expense` or `income`).\n\n- **Color** is a hex string (e.g. `#64748b`). It is used in the UI to show a tinted badge for the category.\n- **Icon** is a Lucide icon name in kebab-case (e.g. `circle-dot`, `shopping-cart`, `utensils`). The API validates that the icon is a valid Lucide icon name. If omitted or null, the dashboard uses a default icon.\n\nCategories can be nested via `parent_id`, allowing hierarchies (e.g. a \"Food\" category with children \"Restaurant\", \"Groceries\"). The API returns a flat list; each category has `parent_id` (null for roots). Build a tree client-side if needed. New users receive default categories with preset names, colors, and icons.\n"},{"name":"Connections","description":"Provider connection flow: create, reconnect, refresh, sync."},{"name":"Providers","description":"Financial data providers (e.g. open banking, brokerages)."},{"name":"Institutions","description":"Banks and institutions available through providers."},{"name":"Provider Connections","description":"User's connections to providers."},{"name":"Institution Connections","description":"Per-institution connection state and accounts."},{"name":"Balance History","description":"Net worth and per-account balance over time."},{"name":"Conversations","description":"Chat conversation list and metadata."},{"name":"Currencies","description":"\nCurrencies are the reference list of supported ISO 4217 codes (e.g. `USD`, `EUR`, `GBP`). Guilders uses them in several places: every **account** has a currency for its balance and value; every **transaction** has a currency for its amount; and the dashboard uses this list for selects when creating or editing accounts and transactions. Net worth and aggregates that span multiple currencies rely on **Rates** for conversion.\n"},{"name":"Rates","description":"\nRates are daily exchange rates used to convert between currencies. They power net-worth and balance views when accounts or transactions use different currencies (e.g. converting GBP and USD into a single base for display). Rates are stored per day; the default base currency is EUR.\n"},{"name":"Countries","description":"\nCountries are a reference list with ISO 3166 codes and names. They are used for addresses, region or locale selection, and provider or institution metadata (e.g. which country a bank or connection belongs to).\n"},{"name":"Documents","description":"Document upload, metadata, and download."},{"name":"Webhook","description":"Webhook endpoints and event delivery config."}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/api/account":{"get":{"operationId":"getApiAccount","tags":["Accounts"],"summary":"Get all accounts","description":"Retrieve all accounts for the authenticated user","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"cost":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string","maxLength":3},"documents":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":255}},{"type":"null"}]},"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"image":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"institution_connection_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"investable":{"type":"string","enum":["non_investable","investable_easy_convert","investable_cash"]},"locked_attributes":{"anyOf":[{"type":["string","number","boolean","null"]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"name":{"type":"string","maxLength":100},"notes":{"type":"string"},"parent":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"provider_account_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"subtype":{"type":"string","enum":["depository","brokerage","crypto","property","vehicle","creditcard","loan","stock"]},"tax_rate":{"type":["string","null"]},"taxability":{"type":"string","enum":["taxable","tax_free","tax_deferred"]},"ticker":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"type":{"type":"string","enum":["asset","liability"]},"units":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":"string","maxLength":255},"value":{"type":"string"}},"required":["cost","created_at","currency","documents","id","image","institution_connection_id","investable","locked_attributes","name","notes","parent","provider_account_id","subtype","tax_rate","taxability","ticker","type","units","updated_at","user_id","value"]}}}}}}},"post":{"operationId":"postApiAccount","tags":["Accounts"],"summary":"Create account","description":"Create a new account with auto-calculated type from subtype","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"cost":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string","maxLength":3},"documents":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":255}},{"type":"null"}]},"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"image":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"institution_connection_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"investable":{"type":"string","enum":["non_investable","investable_easy_convert","investable_cash"]},"locked_attributes":{"anyOf":[{"type":["string","number","boolean","null"]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"name":{"type":"string","maxLength":100},"notes":{"type":"string"},"parent":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"provider_account_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"subtype":{"type":"string","enum":["depository","brokerage","crypto","property","vehicle","creditcard","loan","stock"]},"tax_rate":{"type":["string","null"]},"taxability":{"type":"string","enum":["taxable","tax_free","tax_deferred"]},"ticker":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"type":{"type":"string","enum":["asset","liability"]},"units":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":"string","maxLength":255},"value":{"type":"string"}},"required":["cost","created_at","currency","documents","id","image","institution_connection_id","investable","locked_attributes","name","notes","parent","provider_account_id","subtype","tax_rate","taxability","ticker","type","units","updated_at","user_id","value"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cost":{"type":["string","null"]},"currency":{"type":"string","maxLength":3},"documents":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":255}},{"type":"null"}]},"image":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"institution_connection_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"investable":{"type":"string","enum":["non_investable","investable_easy_convert","investable_cash"]},"name":{"type":"string","maxLength":100},"notes":{"type":"string"},"parent":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"provider_account_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"subtype":{"type":"string","enum":["depository","brokerage","crypto","property","vehicle","creditcard","loan","stock"]},"tax_rate":{"type":["string","null"]},"taxability":{"type":"string","enum":["taxable","tax_free","tax_deferred"]},"ticker":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"type":{"type":"string","enum":["asset","liability"]},"units":{"type":["string","null"]},"value":{"type":"string"}},"required":["currency","name","subtype","type","value"]}}}}}},"/api/account/{id}/balance-history":{"get":{"operationId":"getApiAccountByIdBalanceHistory","tags":["Balance History"],"summary":"Get account balance history","description":"Returns daily balance snapshots for a single account","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"snapshots":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"balance":{"type":"string"},"currency":{"type":"string"}},"required":["date","balance","currency"]}}},"required":["snapshots"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true},{"in":"query","name":"from","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"in":"query","name":"to","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}]}},"/api/account/{id}":{"get":{"operationId":"getApiAccountById","tags":["Accounts"],"summary":"Get account by ID","description":"Retrieve a specific account with its children","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"object","properties":{"cost":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string","maxLength":3},"documents":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":255}},{"type":"null"}]},"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"image":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"institution_connection_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"investable":{"type":"string","enum":["non_investable","investable_easy_convert","investable_cash"]},"locked_attributes":{"anyOf":[{"type":["string","number","boolean","null"]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"name":{"type":"string","maxLength":100},"notes":{"type":"string"},"parent":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"provider_account_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"subtype":{"type":"string","enum":["depository","brokerage","crypto","property","vehicle","creditcard","loan","stock"]},"tax_rate":{"type":["string","null"]},"taxability":{"type":"string","enum":["taxable","tax_free","tax_deferred"]},"ticker":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"type":{"type":"string","enum":["asset","liability"]},"units":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":"string","maxLength":255},"value":{"type":"string"}},"required":["cost","created_at","currency","documents","id","image","institution_connection_id","investable","locked_attributes","name","notes","parent","provider_account_id","subtype","tax_rate","taxability","ticker","type","units","updated_at","user_id","value"]},"children":{"type":"array","items":{"type":"object","properties":{"cost":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string","maxLength":3},"documents":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":255}},{"type":"null"}]},"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"image":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"institution_connection_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"investable":{"type":"string","enum":["non_investable","investable_easy_convert","investable_cash"]},"locked_attributes":{"anyOf":[{"type":["string","number","boolean","null"]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"name":{"type":"string","maxLength":100},"notes":{"type":"string"},"parent":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"provider_account_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"subtype":{"type":"string","enum":["depository","brokerage","crypto","property","vehicle","creditcard","loan","stock"]},"tax_rate":{"type":["string","null"]},"taxability":{"type":"string","enum":["taxable","tax_free","tax_deferred"]},"ticker":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"type":{"type":"string","enum":["asset","liability"]},"units":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":"string","maxLength":255},"value":{"type":"string"}},"required":["cost","created_at","currency","documents","id","image","institution_connection_id","investable","locked_attributes","name","notes","parent","provider_account_id","subtype","tax_rate","taxability","ticker","type","units","updated_at","user_id","value"]}}},"required":["account","children"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}]},"put":{"operationId":"putApiAccountById","tags":["Accounts"],"summary":"Update account","description":"Update an account with automatic type recalculation if subtype changed","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"cost":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string","maxLength":3},"documents":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":255}},{"type":"null"}]},"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"image":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"institution_connection_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"investable":{"type":"string","enum":["non_investable","investable_easy_convert","investable_cash"]},"locked_attributes":{"anyOf":[{"type":["string","number","boolean","null"]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"name":{"type":"string","maxLength":100},"notes":{"type":"string"},"parent":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"provider_account_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"subtype":{"type":"string","enum":["depository","brokerage","crypto","property","vehicle","creditcard","loan","stock"]},"tax_rate":{"type":["string","null"]},"taxability":{"type":"string","enum":["taxable","tax_free","tax_deferred"]},"ticker":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"type":{"type":"string","enum":["asset","liability"]},"units":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":"string","maxLength":255},"value":{"type":"string"}},"required":["cost","created_at","currency","documents","id","image","institution_connection_id","investable","locked_attributes","name","notes","parent","provider_account_id","subtype","tax_rate","taxability","ticker","type","units","updated_at","user_id","value"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cost":{"type":["string","null"]},"currency":{"type":"string","maxLength":3},"documents":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":255}},{"type":"null"}]},"image":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"institution_connection_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"investable":{"type":"string","enum":["non_investable","investable_easy_convert","investable_cash"]},"name":{"type":"string","maxLength":100},"notes":{"type":"string"},"parent":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"provider_account_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"subtype":{"type":"string","enum":["depository","brokerage","crypto","property","vehicle","creditcard","loan","stock"]},"tax_rate":{"type":["string","null"]},"taxability":{"type":"string","enum":["taxable","tax_free","tax_deferred"]},"ticker":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"type":{"type":"string","enum":["asset","liability"]},"units":{"type":["string","null"]},"value":{"type":"string"}}}}}}},"delete":{"operationId":"deleteApiAccountById","tags":["Accounts"],"summary":"Delete account","description":"Delete an account and all its children","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}]}},"/api/balance-history":{"get":{"operationId":"getApiBalanceHistory","tags":["Balance History"],"summary":"Get net worth history","description":"Returns aggregated net worth over time across all accounts, converted to user currency","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"snapshots":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"balance":{"type":"string"}},"required":["date","balance"]}}},"required":["snapshots"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"parameters":[{"in":"query","name":"from","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"in":"query","name":"to","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}]}},"/api/category":{"get":{"operationId":"getApiCategory","tags":["Categories"],"summary":"Get categories","description":"Retrieve all categories for the authenticated user. Build a tree client-side using parent_id if needed.","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"user_id":{"type":"string","maxLength":255},"name":{"type":"string","maxLength":100},"parent_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}]},"icon":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"classification":{"type":"string","maxLength":20},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","user_id","name","parent_id","color","icon","classification","created_at","updated_at"]}}}}}}},"post":{"operationId":"postApiCategory","tags":["Categories"],"summary":"Create category","description":"Create a new category for the authenticated user","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"user_id":{"type":"string","maxLength":255},"name":{"type":"string","maxLength":100},"parent_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}]},"icon":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"classification":{"type":"string","maxLength":20},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","user_id","name","parent_id","color","icon","classification","created_at","updated_at"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"parent_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"color":{"type":"string","minLength":4,"maxLength":7},"icon":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"classification":{"type":"string","enum":["income","expense"]}},"required":["name"]}}}}}},"/api/category/{id}":{"put":{"operationId":"putApiCategoryById","tags":["Categories"],"summary":"Update category","description":"Update a category for the authenticated user","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"user_id":{"type":"string","maxLength":255},"name":{"type":"string","maxLength":100},"parent_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}]},"icon":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"classification":{"type":"string","maxLength":20},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","user_id","name","parent_id","color","icon","classification","created_at","updated_at"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"parent_id":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"color":{"type":"string","minLength":4,"maxLength":7},"icon":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"classification":{"type":"string","enum":["income","expense"]}},"required":["name"]}}}}},"delete":{"operationId":"deleteApiCategoryById","tags":["Categories"],"summary":"Delete category","description":"Delete a category for the authenticated user","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}]}},"/api/connections":{"post":{"operationId":"postApiConnections","tags":["Connections"],"summary":"Create provider connection","description":"Start provider connection flow for an institution","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"redirectURI":{"type":"string"},"type":{"type":"string","enum":["redirect","popup"]}},"required":["redirectURI","type"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider_id":{"type":"string"},"institution_id":{"type":"string"}},"required":["provider_id","institution_id"]}}}}}},"/api/connections/reconnect":{"post":{"operationId":"postApiConnectionsReconnect","tags":["Connections"],"summary":"Reconnect provider connection","description":"Start provider reconnect flow for an existing account","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"redirectURI":{"type":"string"},"type":{"type":"string","enum":["redirect","popup"]}},"required":["redirectURI","type"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider_id":{"type":"string"},"institution_id":{"type":"string"},"account_id":{"type":"string"}},"required":["provider_id","institution_id","account_id"]}}}}}},"/api/connections/refresh":{"post":{"operationId":"postApiConnectionsRefresh","tags":["Connections"],"summary":"Refresh provider connection","description":"Trigger provider-side auth refresh. May return a redirectURI for re-authentication.","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"redirectURI":{"type":"string"},"type":{"type":"string","enum":["redirect","popup"]}},"required":["success"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider_id":{"type":"string"},"connection_id":{"type":"string"}},"required":["provider_id","connection_id"]}}}}}},"/api/connections/register":{"post":{"operationId":"postApiConnectionsRegister","tags":["Connections"],"summary":"Register provider user","description":"Create or update provider user secret for the current user","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"}},"required":["secret"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider_id":{"type":"string"}},"required":["provider_id"]}}}}}},"/api/connections/deregister":{"post":{"operationId":"postApiConnectionsDeregister","tags":["Connections"],"summary":"Deregister provider user","description":"Remove provider user and local connection records","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider_id":{"type":"string"}},"required":["provider_id"]}}}}}},"/api/connections/sync":{"post":{"operationId":"postApiConnectionsSync","tags":["Connections"],"summary":"Sync account data","description":"Pull latest balance and transactions for a single account","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string"}},"required":["account_id"]}}}}}},"/api/conversation":{"get":{"operationId":"getApiConversation","tags":["Conversations"],"summary":"List conversations","description":"List the authenticated user's conversations, most recent first.","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","title","created_at","updated_at"]}}}}}}},"post":{"operationId":"postApiConversation","tags":["Conversations"],"summary":"Create conversation","description":"Create a new empty conversation.","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/conversation/last":{"get":{"operationId":"getApiConversationLast","tags":["Conversations"],"summary":"Get last conversation","description":"Get the most recently updated conversation for the authenticated user.","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"messages":{"type":"array","items":{}},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","title","messages","created_at","updated_at"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/conversation/{id}":{"get":{"operationId":"getApiConversationById","tags":["Conversations"],"summary":"Get conversation","description":"Get a single conversation by ID.","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"messages":{"type":"array","items":{}},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","title","messages","created_at","updated_at"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]},"patch":{"operationId":"patchApiConversationById","tags":["Conversations"],"summary":"Rename conversation","description":"Update the title of a conversation.","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","title","updated_at"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200}},"required":["title"]}}}}},"delete":{"operationId":"deleteApiConversationById","tags":["Conversations"],"summary":"Delete conversation","description":"Delete a conversation.","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}},"/api/country":{"get":{"operationId":"getApiCountry","tags":["Countries"],"summary":"Get all countries","description":"Retrieve a list of all countries with their ISO codes and names","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":2},"name":{"type":"string","maxLength":100},"currency_code":{"type":"string","maxLength":3}},"required":["code","name","currency_code"]}}}}}}}},"/api/country/{code}":{"get":{"operationId":"getApiCountryByCode","tags":["Countries"],"summary":"Get country by code","description":"Retrieve a specific country by its ISO code","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","maxLength":2},"name":{"type":"string","maxLength":100},"currency_code":{"type":"string","maxLength":3}},"required":["code","name","currency_code"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"code","schema":{"type":"string","minLength":2,"maxLength":2},"required":true}]}},"/api/currency":{"get":{"operationId":"getApiCurrency","tags":["Currencies"],"summary":"Get all currencies","description":"Retrieve a list of all supported currencies","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":3},"name":{"type":"string","maxLength":100}},"required":["code","name"]}}}}}}}},"/api/currency/{code}":{"get":{"operationId":"getApiCurrencyByCode","tags":["Currencies"],"summary":"Get currency by code","description":"Retrieve a specific currency by its ISO code","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","maxLength":3},"name":{"type":"string","maxLength":100}},"required":["code","name"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"code","schema":{"type":"string","minLength":3,"maxLength":3},"required":true}]}},"/api/document":{"get":{"operationId":"getApiDocument","tags":["Documents"],"summary":"List documents","description":"List documents for the authenticated user, optionally filtered by entity type and ID","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"entity_id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"entity_type":{"type":"string","enum":["account","transaction","merchant"]},"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"name":{"type":"string","maxLength":255},"path":{"type":"string","maxLength":500},"size":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"type":{"type":"string","maxLength":100},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":"string","maxLength":255}},"required":["created_at","entity_id","entity_type","id","name","path","size","type","updated_at","user_id"]}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"parameters":[{"in":"query","name":"entity_type","schema":{"type":"string","enum":["account","transaction","merchant"]}},{"in":"query","name":"entity_id","schema":{"type":"number"}}]},"post":{"operationId":"postApiDocument","tags":["Documents"],"summary":"Upload document","description":"Upload a file (JPEG, PNG, WebP, HEIC, PDF; max 10MB) and attach it to an account, transaction, or merchant","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"entity_id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"entity_type":{"type":"string","enum":["account","transaction","merchant"]},"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"name":{"type":"string","maxLength":255},"path":{"type":"string","maxLength":500},"size":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"type":{"type":"string","maxLength":100},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":"string","maxLength":255}},"required":["created_at","entity_id","entity_type","id","name","path","size","type","updated_at","user_id"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{},"entity_type":{"type":"string","enum":["account","transaction","merchant"]},"entity_id":{"type":"number"}},"required":["file","entity_type","entity_id"]}}}}}},"/api/document/{id}/file":{"get":{"operationId":"getApiDocumentByIdFile","tags":["Documents"],"summary":"Download document file","description":"Stream the document file content from storage","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}]}},"/api/document/{id}":{"get":{"operationId":"getApiDocumentById","tags":["Documents"],"summary":"Get document metadata","description":"Retrieve metadata for a specific document","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"entity_id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"entity_type":{"type":"string","enum":["account","transaction","merchant"]},"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"name":{"type":"string","maxLength":255},"path":{"type":"string","maxLength":500},"size":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"type":{"type":"string","maxLength":100},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":"string","maxLength":255}},"required":["created_at","entity_id","entity_type","id","name","path","size","type","updated_at","user_id"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}]},"delete":{"operationId":"deleteApiDocumentById","tags":["Documents"],"summary":"Delete document","description":"Delete a document from storage and the database","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}]}},"/api/merchant":{"get":{"operationId":"getApiMerchant","tags":["Merchants"],"summary":"Get merchants","description":"Retrieve all merchants for the authenticated user.","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"user_id":{"type":"string"},"name":{"type":"string","maxLength":255},"logo_url":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"website_url":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","user_id","name","logo_url","website_url","created_at","updated_at"]}}}}}}},"post":{"operationId":"postApiMerchant","tags":["Merchants"],"summary":"Create merchant","description":"Create a new merchant for the authenticated user","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"user_id":{"type":"string"},"name":{"type":"string","maxLength":255},"logo_url":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"website_url":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","user_id","name","logo_url","website_url","created_at","updated_at"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"logo_url":{"type":["string","null"]},"website_url":{"type":["string","null"]}},"required":["name"]}}}}}},"/api/merchant/{id}":{"put":{"operationId":"putApiMerchantById","tags":["Merchants"],"summary":"Update merchant","description":"Update a merchant for the authenticated user","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"user_id":{"type":"string"},"name":{"type":"string","maxLength":255},"logo_url":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"website_url":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","user_id","name","logo_url","website_url","created_at","updated_at"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"logo_url":{"type":["string","null"]},"website_url":{"type":["string","null"]}},"required":["name"]}}}}},"delete":{"operationId":"deleteApiMerchantById","tags":["Merchants"],"summary":"Delete merchant","description":"Delete a merchant for the authenticated user","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}]}},"/api/rate":{"get":{"operationId":"getApiRate","tags":["Rates"],"summary":"Get all exchange rates","description":"Retrieve exchange rates for a given date (defaults to latest available) with optional base currency conversion","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"currency_code":{"type":"string","maxLength":3},"date":{"type":"string"},"rate":{"type":"string"}},"required":["currency_code","date","rate"]}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"query","name":"base","schema":{"type":"string","minLength":3,"maxLength":3}},{"in":"query","name":"date","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}]}},"/api/rate/{code}":{"get":{"operationId":"getApiRateByCode","tags":["Rates"],"summary":"Get rate by currency code","description":"Retrieve exchange rate for a specific currency on a given date (defaults to latest) with optional base conversion","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"currency_code":{"type":"string","maxLength":3},"date":{"type":"string"},"rate":{"type":"string"}},"required":["currency_code","date","rate"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"code","schema":{"type":"string","minLength":3,"maxLength":3},"required":true},{"in":"query","name":"base","schema":{"type":"string","minLength":3,"maxLength":3}},{"in":"query","name":"date","schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}]}},"/api/provider":{"get":{"operationId":"getApiProvider","tags":["Providers"],"summary":"Get all providers","description":"Retrieve a list of all financial data providers","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"logo_url":{"type":"string","maxLength":255},"name":{"type":"string","maxLength":100}},"required":["id","logo_url","name"]}}}}}}}},"/api/provider/{id}":{"get":{"operationId":"getApiProviderById","tags":["Providers"],"summary":"Get provider by ID","description":"Retrieve a specific provider by its ID","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"logo_url":{"type":"string","maxLength":255},"name":{"type":"string","maxLength":100}},"required":["id","logo_url","name"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}]}},"/api/institution":{"get":{"operationId":"getApiInstitution","tags":["Institutions"],"summary":"Get all institutions","description":"Retrieve a list of all enabled financial institutions","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}]},"enabled":{"type":"boolean"},"logo_url":{"type":"string","maxLength":255},"name":{"type":"string","maxLength":100},"provider_id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"provider_institution_id":{"type":"string","maxLength":255}},"required":["id","country","enabled","logo_url","name","provider_id","provider_institution_id"]}}}}}}}},"/api/institution/{id}":{"get":{"operationId":"getApiInstitutionById","tags":["Institutions"],"summary":"Get institution by ID","description":"Retrieve a specific institution by its ID","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}]},"enabled":{"type":"boolean"},"logo_url":{"type":"string","maxLength":255},"name":{"type":"string","maxLength":100},"provider_id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"provider_institution_id":{"type":"string","maxLength":255}},"required":["id","country","enabled","logo_url","name","provider_id","provider_institution_id"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}]}},"/api/provider-connection":{"get":{"operationId":"getApiProviderConnection","tags":["Provider Connections"],"summary":"Get all provider connections","description":"Retrieve all provider connections for the authenticated user","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"created_at":{"type":"string","format":"date-time"},"provider_id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"secret":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":"string","maxLength":255}},"required":["id","created_at","provider_id","secret","updated_at","user_id"]}}}}}}}},"/api/provider-connection/{id}":{"get":{"operationId":"getApiProviderConnectionById","tags":["Provider Connections"],"summary":"Get provider connection by ID","description":"Retrieve a specific provider connection by its ID","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"created_at":{"type":"string","format":"date-time"},"provider_id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"secret":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":"string","maxLength":255}},"required":["id","created_at","provider_id","secret","updated_at","user_id"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}]}},"/api/institution-connection":{"get":{"operationId":"getApiInstitutionConnection","tags":["Institution Connections"],"summary":"Get all institution connections","description":"Retrieve all institution connections for the authenticated user with institution and provider details","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"institution_id":{"type":"number"},"provider_connection_id":{"type":"number"},"connection_id":{"type":["string","null"]},"broken":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"institution":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"logo_url":{"type":"string"},"country":{"type":["string","null"]},"enabled":{"type":"boolean"}},"required":["id","name","logo_url","country","enabled"]},"provider_connection":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"provider_id":{"type":"number"},"user_id":{"type":"string"}},"required":["id","provider_id","user_id"]},{"type":"null"}]}},"required":["id","institution_id","provider_connection_id","connection_id","broken","created_at","institution","provider_connection"]}}}}}}}},"/api/institution-connection/{id}":{"get":{"operationId":"getApiInstitutionConnectionById","tags":["Institution Connections"],"summary":"Get institution connection by ID","description":"Retrieve a specific institution connection by its ID with details","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"institution_id":{"type":"number"},"provider_connection_id":{"type":"number"},"connection_id":{"type":["string","null"]},"broken":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"institution":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"logo_url":{"type":"string"},"country":{"type":["string","null"]},"enabled":{"type":"boolean"}},"required":["id","name","logo_url","country","enabled"]},"provider_connection":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"provider_id":{"type":"number"},"user_id":{"type":"string"}},"required":["id","provider_id","user_id"]},{"type":"null"}]}},"required":["id","institution_id","provider_connection_id","connection_id","broken","created_at","institution","provider_connection"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}]}},"/api/transaction":{"get":{"operationId":"getApiTransaction","tags":["Transactions"],"summary":"Get all transactions","description":"Retrieve all transactions for the authenticated user, optionally filtered by account","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"amount":{"type":"string"},"category_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"merchant_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string","maxLength":3},"description":{"type":"string"},"documents":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":255}},{"type":"null"}]},"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"locked_attributes":{"anyOf":[{"type":["string","number","boolean","null"]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"provider_transaction_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"timestamp":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["account_id","amount","category_id","merchant_id","created_at","currency","description","documents","id","locked_attributes","provider_transaction_id","timestamp","updated_at"]}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}}},"parameters":[{"in":"query","name":"accountId","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}]},"post":{"operationId":"postApiTransaction","tags":["Transactions"],"summary":"Create transaction","description":"Create a new transaction and update the associated account balance","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"amount":{"type":"string"},"category_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"merchant_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string","maxLength":3},"description":{"type":"string"},"documents":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":255}},{"type":"null"}]},"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"locked_attributes":{"anyOf":[{"type":["string","number","boolean","null"]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"provider_transaction_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"timestamp":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["account_id","amount","category_id","merchant_id","created_at","currency","description","documents","id","locked_attributes","provider_transaction_id","timestamp","updated_at"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"amount":{"type":"string"},"category_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"merchant_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"currency":{"type":"string","maxLength":3},"description":{"type":"string"},"documents":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":255}},{"type":"null"}]},"provider_transaction_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["account_id","amount","currency","description","timestamp"]}}}}}},"/api/transaction/{id}":{"get":{"operationId":"getApiTransactionById","tags":["Transactions"],"summary":"Get transaction by ID","description":"Retrieve a specific transaction by its ID","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"amount":{"type":"string"},"category_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"merchant_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string","maxLength":3},"description":{"type":"string"},"documents":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":255}},{"type":"null"}]},"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"locked_attributes":{"anyOf":[{"type":["string","number","boolean","null"]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"provider_transaction_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"timestamp":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["account_id","amount","category_id","merchant_id","created_at","currency","description","documents","id","locked_attributes","provider_transaction_id","timestamp","updated_at"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}]},"put":{"operationId":"putApiTransactionById","tags":["Transactions"],"summary":"Update transaction","description":"Update a transaction and adjust the associated account balance","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"amount":{"type":"string"},"category_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"merchant_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string","maxLength":3},"description":{"type":"string"},"documents":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":255}},{"type":"null"}]},"id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"locked_attributes":{"anyOf":[{"type":["string","number","boolean","null"]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"provider_transaction_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"timestamp":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["account_id","amount","category_id","merchant_id","created_at","currency","description","documents","id","locked_attributes","provider_transaction_id","timestamp","updated_at"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"integer","minimum":-2147483648,"maximum":2147483647},"amount":{"type":"string"},"category_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"merchant_id":{"anyOf":[{"type":"integer","minimum":-2147483648,"maximum":2147483647},{"type":"null"}]},"currency":{"type":"string","maxLength":3},"description":{"type":"string"},"documents":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":255}},{"type":"null"}]},"provider_transaction_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"timestamp":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["account_id","amount","currency","description","timestamp"]}}}}},"delete":{"operationId":"deleteApiTransactionById","tags":["Transactions"],"summary":"Delete transaction","description":"Delete a transaction and revert the associated account balance","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"required":true}]}},"/api/webhook":{"get":{"operationId":"getApiWebhook","tags":["Webhook"],"summary":"List webhooks","description":"List all webhooks for the authenticated user.","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"enabled":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","url","enabled","created_at","updated_at"]}}}}}}},"post":{"operationId":"postApiWebhook","tags":["Webhook"],"summary":"Create webhook","description":"Create a webhook. The secret is returned only once; store it securely to verify signatures.","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"enabled":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"secret":{"type":"string"}},"required":["id","url","enabled","created_at","updated_at","secret"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1}},"required":["url"]}}}}}},"/api/webhook/{id}":{"patch":{"operationId":"patchApiWebhookById","tags":["Webhook"],"summary":"Update webhook","description":"Update a webhook's URL or enabled state.","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"enabled":{"type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","url","enabled","created_at","updated_at"]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1},"enabled":{"type":"boolean"}}}}}}},"delete":{"operationId":"deleteApiWebhookById","tags":["Webhook"],"summary":"Delete webhook","description":"Delete a webhook.","security":[{"apiKeyAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true}]}}}}