{"components":{"schemas":{"AboutSource":{"properties":{"title":{"title":"Title","type":"string"},"url":{"title":"Url","type":"string"}},"required":["url","title"],"title":"AboutSource","type":"object"},"AcceptResult":{"properties":{"moved":{"description":"How many transactions were re-filed as transfers.","title":"Moved","type":"integer"}},"required":["moved"],"title":"AcceptResult","type":"object"},"Account":{"description":"One account in the ledger's chart of accounts: a bank account, a\ncard, a loan, or a category such as Groceries (an expense account).","properties":{"balance":{"$ref":"#/components/schemas/Money","description":"The account's balance, positive on its normal side: what an asset holds, what a liability owes, what an expense category has spent in total."},"code":{"description":"Chart-of-accounts code, unique in the ledger (`1010`, `5190`).","title":"Code","type":"string"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"excluded_from_totals":{"description":"Left out of net worth and other totals.","title":"Excluded From Totals","type":"boolean"},"hidden":{"description":"Hidden from lists in the app.","title":"Hidden","type":"boolean"},"id":{"description":"The account id. Transactions and journal lines name it as `account_id`.","title":"Id","type":"integer"},"institution_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The bank or provider the account belongs to.","title":"Institution Id"},"is_active":{"description":"False once the account is closed. Its history stays in the ledger.","title":"Is Active","type":"boolean"},"is_placeholder":{"description":"A grouping account that holds no postings of its own.","title":"Is Placeholder","type":"boolean"},"low_balance_alert":{"anyOf":[{"$ref":"#/components/schemas/LowBalanceAlert"},{"type":"null"}],"description":"The member is told when this account's balance drops below a threshold, and has a to-do until it is back above; null when nobody set one. Only an open asset account can carry one. Set it with `accounts.update`."},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The last digits of the account number, as the bank shows them.","title":"Mask"},"name":{"title":"Name","type":"string"},"normal_balance":{"description":"`debit` or `credit`: the side that increases the account.","title":"Normal Balance","type":"string"},"overdraft_ahead":{"anyOf":[{"$ref":"#/components/schemas/LowBalanceShortfall"},{"type":"null"}],"description":"With no `low_balance_alert` set: the recurring bills and paychecks expected on this open asset account over the next month, and the payments of the credit cards it pays, take its balance below zero; `needed` is what to move in to stay at or above zero. The member sees it on their to-do list and the account's page but is never notified of it unasked: setting a `low_balance_alert` is how they ask. Null when the bills ahead do not, when the balance is already below zero, and whenever an alert is set (its `shortfall` says it then)."},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The parent account, for sub-accounts and subcategories.","title":"Parent Id"},"purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`business` if its transactions count as business by default; null for personal.","title":"Purpose"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the account is for, when known (`checking`, `credit_card`, `mortgage`, …).","title":"Role"},"type":{"description":"`asset`, `liability`, `equity`, `income` or `expense`.","title":"Type","type":"string"},"unshared_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"When the bank stopped sharing this account on its connection (deselected, closed or revoked at the bank) while the connection itself keeps syncing, or null while it is shared. Its `balance` is frozen at the last number the bank sent. A person fixes it in the app by sharing the account again, or closes it with `accounts.close`.","title":"Unshared At"}},"required":["id","code","name","type","normal_balance","role","balance","parent_id","institution_id","mask","is_active","is_placeholder","hidden","excluded_from_totals","purpose","unshared_at","low_balance_alert","overdraft_ahead","created_at"],"title":"Account","type":"object"},"AccountCreate":{"description":"An account in the chart of accounts, numbered by you. For a bank\naccount or card typed in by hand, `institutions.create_account` picks the\ncode and the kind for you; for a category, `categories.create`.","properties":{"code":{"description":"Chart-of-accounts code, unique in the ledger. Must start with the type's prefix (see `account_types.list`): `1` asset, `2` liability, `3` equity, `4` income, `5` or `6` expense.","examples":["1090"],"maxLength":20,"minLength":1,"title":"Code","type":"string"},"institution_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"File it at this bank (see `institutions.list`).","title":"Institution Id"},"is_placeholder":{"default":false,"description":"A grouping account that holds no postings of its own.","title":"Is Placeholder","type":"boolean"},"name":{"maxLength":200,"minLength":1,"title":"Name","type":"string"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Nest it under this account: a group (`is_placeholder`) of the same type, or, for an income or expense category, a top-level category of its type.","title":"Parent Id"},"type":{"description":"`asset`, `liability`, `equity`, `income` or `expense`.","pattern":"^(asset|liability|equity|income|expense)$","title":"Type","type":"string"}},"required":["code","name","type"],"title":"AccountCreate","type":"object"},"AccountHoldings":{"description":"What one account holds, valued in the account's own currency and\nweighted within the account.","properties":{"account_id":{"title":"Account Id","type":"integer"},"as_of":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"The latest date the institution priced a holding.","title":"As Of"},"currency":{"description":"The account's currency; every amount is in it.","title":"Currency","type":"string"},"day_return":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"positions":{"description":"Largest first.","items":{"$ref":"#/components/schemas/Position"},"title":"Positions","type":"array"},"total_cost_basis":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Null when no position carries a cost basis."},"total_value":{"$ref":"#/components/schemas/Money"},"unrealized_gain":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]}},"required":["account_id","currency","as_of","total_value","total_cost_basis","unrealized_gain","day_return","positions"],"title":"AccountHoldings","type":"object"},"AccountList":{"description":"A page of accounts, in id order.","properties":{"data":{"items":{"$ref":"#/components/schemas/Account"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"AccountList","type":"object"},"AccountType":{"description":"A kind of account: which side of the books it sits on, and which side\nincreases it.","properties":{"code_prefixes":{"description":"What an account code of this type must start with (`accounts.create`).","items":{"type":"string"},"title":"Code Prefixes","type":"array"},"id":{"title":"Id","type":"integer"},"name":{"description":"`asset`, `liability`, `equity`, `income` or `expense`. Accounts name their type by this, as `type`.","title":"Name","type":"string"},"normal_balance":{"description":"`debit` or `credit`: the side that increases it.","title":"Normal Balance","type":"string"}},"required":["id","name","normal_balance","code_prefixes"],"title":"AccountType","type":"object"},"AccountTypeList":{"description":"A page of account types, in id order.","properties":{"data":{"items":{"$ref":"#/components/schemas/AccountType"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"AccountTypeList","type":"object"},"AccountUpdate":{"description":"Only the fields sent are changed.","properties":{"code":{"anyOf":[{"maxLength":20,"minLength":1,"type":"string"},{"type":"null"}],"title":"Code"},"excluded_from_totals":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Leave its balance out of net worth and other totals.","title":"Excluded From Totals"},"hidden":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Hide it from lists in the app.","title":"Hidden"},"institution_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"File it at this bank; null takes it out of its bank. Refused for an account a bank connection feeds, whose bank comes from the connection.","title":"Institution Id"},"is_placeholder":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Placeholder"},"low_balance_alert":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"description":"Tell the member when the balance drops below this amount, in the account's currency (`\"200.00\"`); null stops it. Only an open asset account (a checking or savings account, a wallet) can carry one.","examples":["200.00"],"title":"Low Balance Alert"},"name":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"title":"Name"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Null takes it out of its parent.","title":"Parent Id"},"purpose":{"anyOf":[{"pattern":"^(personal|business)$","type":"string"},{"type":"null"}],"description":"`business` files its transactions as business by default; `personal` or null returns it to the default.","title":"Purpose"},"type":{"anyOf":[{"pattern":"^(asset|liability|equity|income|expense)$","type":"string"},{"type":"null"}],"title":"Type"}},"title":"AccountUpdate","type":"object"},"Affordability":{"description":"What the ledger says about the household's capacity to carry a home.","properties":{"cash_available":{"$ref":"#/components/schemas/Money","description":"Cash and savings, towards a down payment."},"current_housing_cost":{"$ref":"#/components/schemas/Money","description":"Rent, or the running cost of the current home."},"defaults":{"$ref":"#/components/schemas/AffordabilityDefaults"},"free_cash_flow":{"$ref":"#/components/schemas/Money","description":"Income minus spending minus debt payments."},"guidelines":{"$ref":"#/components/schemas/AffordabilityGuidelines"},"income_months":{"description":"How many months `monthly_income` averages.","title":"Income Months","type":"integer"},"monthly_debt_payments":{"$ref":"#/components/schemas/Money","description":"Existing loan payments, per month."},"monthly_income":{"$ref":"#/components/schemas/Money","description":"Averaged over the completed months of the lookback; zero with no income yet."},"monthly_spending":{"$ref":"#/components/schemas/Money","description":"Real monthly spending, excluding the housing a purchase would replace and debt interest (carried in `monthly_debt_payments`)."}},"required":["monthly_income","monthly_spending","current_housing_cost","monthly_debt_payments","free_cash_flow","cash_available","income_months","defaults","guidelines"],"title":"Affordability","type":"object"},"AffordabilityDefaults":{"description":"Opening values for a mortgage calculator. Percentages are decimal strings.","properties":{"annual_rate_pct":{"title":"Annual Rate Pct","type":"string"},"down_payment_pct":{"title":"Down Payment Pct","type":"string"},"insurance_rate_pct":{"description":"Annual home insurance, percent of the price.","title":"Insurance Rate Pct","type":"string"},"property_tax_rate_pct":{"description":"Annual property tax, percent of the price.","title":"Property Tax Rate Pct","type":"string"},"term_year_options":{"items":{"type":"integer"},"title":"Term Year Options","type":"array"},"term_years":{"title":"Term Years","type":"integer"}},"required":["annual_rate_pct","term_years","term_year_options","down_payment_pct","property_tax_rate_pct","insurance_rate_pct"],"title":"AffordabilityDefaults","type":"object"},"AffordabilityGuidelines":{"description":"What a housing payment is measured against. The first three are the\nlender's debt-to-income conventions; the cash-flow limits and reserve\ntarget are LumaLedger's.","properties":{"back_end_limit_pct":{"description":"All debt payments as a share of gross income.","title":"Back End Limit Pct","type":"string"},"back_end_max_pct":{"description":"The most a lender will usually go to.","title":"Back End Max Pct","type":"string"},"cash_flow_limit_pct":{"description":"Housing as a share of what is genuinely spare each month.","title":"Cash Flow Limit Pct","type":"string"},"cash_flow_max_pct":{"title":"Cash Flow Max Pct","type":"string"},"closing_cost_pct":{"title":"Closing Cost Pct","type":"string"},"front_end_limit_pct":{"description":"Housing payment as a share of gross income.","title":"Front End Limit Pct","type":"string"},"pmi_annual_rate_pct":{"title":"Pmi Annual Rate Pct","type":"string"},"pmi_ltv_threshold_pct":{"description":"Loan-to-value above which mortgage insurance applies.","title":"Pmi Ltv Threshold Pct","type":"string"},"reserve_months_target":{"description":"Months of payments to keep in cash after closing.","title":"Reserve Months Target","type":"integer"}},"required":["front_end_limit_pct","back_end_limit_pct","back_end_max_pct","cash_flow_limit_pct","cash_flow_max_pct","reserve_months_target","pmi_ltv_threshold_pct","pmi_annual_rate_pct","closing_cost_pct"],"title":"AffordabilityGuidelines","type":"object"},"AnnualReview":{"description":"One year, or the year so far: month by month, where the money went\nbeside the year before, net worth, the biggest expenses and the goals.\nWhile the year is running, the year before is compared over the same\nmonths.","properties":{"categories":{"description":"Biggest first.","items":{"$ref":"#/components/schemas/YearCategory"},"title":"Categories","type":"array"},"currency":{"description":"The ledger's base currency; every amount is in it.","title":"Currency","type":"string"},"expenses":{"$ref":"#/components/schemas/Money"},"goals":{"items":{"$ref":"#/components/schemas/GoalProgress"},"title":"Goals","type":"array"},"highlights":{"$ref":"#/components/schemas/YearHighlights"},"income":{"$ref":"#/components/schemas/Money"},"income_sources":{"items":{"$ref":"#/components/schemas/IncomeSource"},"title":"Income Sources","type":"array"},"is_current":{"title":"Is Current","type":"boolean"},"largest_expenses":{"items":{"$ref":"#/components/schemas/LargestExpense"},"title":"Largest Expenses","type":"array"},"months":{"description":"Twelve, January to December.","items":{"$ref":"#/components/schemas/YearMonth"},"title":"Months","type":"array"},"months_elapsed":{"description":"How many of the year's months have begun.","title":"Months Elapsed","type":"integer"},"net":{"$ref":"#/components/schemas/Money"},"net_worth":{"$ref":"#/components/schemas/NetWorthChange"},"previous_expenses":{"$ref":"#/components/schemas/Money"},"previous_income":{"$ref":"#/components/schemas/Money"},"previous_net":{"$ref":"#/components/schemas/Money"},"previous_year":{"title":"Previous Year","type":"integer"},"savings_rate":{"anyOf":[{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},{"type":"null"}],"description":"`net` / `income`.","title":"Savings Rate"},"year":{"title":"Year","type":"integer"}},"required":["year","previous_year","currency","is_current","months_elapsed","income","expenses","net","savings_rate","previous_income","previous_expenses","previous_net","months","categories","income_sources","net_worth","largest_expenses","goals","highlights"],"title":"AnnualReview","type":"object"},"AttachRequest":{"properties":{"transaction_id":{"description":"The transaction the receipt paid for (see `transactions.list`). It must be an imported one: a bank or card charge.","title":"Transaction Id","type":"integer"}},"required":["transaction_id"],"title":"AttachRequest","type":"object"},"BalanceSet":{"properties":{"balance":{"description":"What the account holds (asset) or owes (liability) today, in its own terms: a card with $300 on it is `\"300.00\"`.","examples":["1250.00"],"pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","title":"Balance","type":"string"}},"required":["balance"],"title":"BalanceSet","type":"object"},"BalanceSheet":{"description":"Assets, liabilities and equity at each month-end. It balances by\nconstruction: assets = liabilities + equity in every column.","properties":{"assets":{"$ref":"#/components/schemas/BalanceSheetSection"},"currency":{"description":"The ledger's base currency.","title":"Currency","type":"string"},"dates":{"description":"Month-ends, oldest first; the last is today.","items":{"format":"date","type":"string"},"title":"Dates","type":"array"},"equity":{"$ref":"#/components/schemas/BalanceSheetSection"},"liabilities":{"$ref":"#/components/schemas/BalanceSheetSection"},"unconverted_currencies":{"description":"Currencies with no stored exchange rate, shown 1:1.","items":{"type":"string"},"title":"Unconverted Currencies","type":"array"}},"required":["currency","dates","assets","liabilities","equity","unconverted_currencies"],"title":"BalanceSheet","type":"object"},"BalanceSheetRow":{"properties":{"account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Null for a derived equity row (retained earnings, currency translation adjustment), which no account carries.","title":"Account Id"},"code":{"title":"Code","type":"string"},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mask"},"name":{"title":"Name","type":"string"},"native_latest":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The latest balance in the account's own currency; null for a derived row."},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"values":{"description":"One per date in `dates`, in the base currency.","items":{"$ref":"#/components/schemas/Money"},"title":"Values","type":"array"}},"required":["account_id","code","name","mask","role","values","native_latest"],"title":"BalanceSheetRow","type":"object"},"BalanceSheetSection":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/BalanceSheetRow"},"title":"Rows","type":"array"},"totals":{"description":"One per date.","items":{"$ref":"#/components/schemas/Money"},"title":"Totals","type":"array"}},"required":["rows","totals"],"title":"BalanceSheetSection","type":"object"},"BillForecast":{"description":"The recurring charges and income projected over the coming months.","properties":{"biggest":{"description":"The largest expected bills, each once, on the day it lands next.","items":{"$ref":"#/components/schemas/ForecastOccurrence"},"title":"Biggest","type":"array"},"charges":{"description":"Bills first, costliest first, then income.","items":{"$ref":"#/components/schemas/ForecastCharge"},"title":"Charges","type":"array"},"end":{"format":"date","title":"End","type":"string"},"expected_in":{"$ref":"#/components/schemas/Money"},"expected_out":{"$ref":"#/components/schemas/Money"},"horizon":{"description":"`quarter` or `year`.","title":"Horizon","type":"string"},"monthly_out":{"$ref":"#/components/schemas/Money","description":"`expected_out` per month over the horizon."},"months":{"items":{"$ref":"#/components/schemas/ForecastMonth"},"title":"Months","type":"array"},"net":{"$ref":"#/components/schemas/Money"},"start":{"format":"date","title":"Start","type":"string"},"today":{"format":"date","title":"Today","type":"string"}},"required":["horizon","start","end","today","expected_in","expected_out","net","monthly_out","months","charges","biggest"],"title":"BillForecast","type":"object"},"BreakdownAccount":{"properties":{"account_id":{"title":"Account Id","type":"integer"},"balance":{"$ref":"#/components/schemas/Money","description":"In the ledger's base currency, positive on the account's normal side."},"linked_asset":{"anyOf":[{"$ref":"#/components/schemas/LinkedAsset"},{"type":"null"}],"description":"For a mortgage or auto loan: the property or vehicle it finances."},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mask"},"name":{"title":"Name","type":"string"},"native_balance":{"$ref":"#/components/schemas/Money","description":"In the account's own currency."},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"share":{"description":"Share of its side (assets or liabilities), 0–1.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Share","type":"string"}},"required":["account_id","name","mask","role","balance","native_balance","share","linked_asset"],"title":"BreakdownAccount","type":"object"},"BreakdownBand":{"properties":{"amount":{"$ref":"#/components/schemas/Money"},"group":{"title":"Group","type":"string"},"rows":{"items":{"$ref":"#/components/schemas/BreakdownRow"},"title":"Rows","type":"array"}},"required":["group","amount","rows"],"title":"BreakdownBand","type":"object"},"BreakdownGroup":{"properties":{"accounts":{"description":"Largest first.","items":{"$ref":"#/components/schemas/BreakdownAccount"},"title":"Accounts","type":"array"},"key":{"description":"The class: `cash`, `investments`, `retirement`, `tax_advantaged`, `alternatives`, `real_estate`, `vehicles`, `other_assets`; or `credit_cards`, `loans`, `other_liabilities`.","title":"Key","type":"string"},"share":{"description":"Share of its side, 0–1.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Share","type":"string"},"total":{"$ref":"#/components/schemas/Money"}},"required":["key","total","share","accounts"],"title":"BreakdownGroup","type":"object"},"BreakdownMonth":{"properties":{"deductions":{"$ref":"#/components/schemas/Money"},"gross":{"$ref":"#/components/schemas/Money"},"month":{"description":"1–12.","title":"Month","type":"integer"},"net":{"$ref":"#/components/schemas/Money"},"taxes":{"$ref":"#/components/schemas/Money"}},"required":["month","gross","net","taxes","deductions"],"title":"BreakdownMonth","type":"object"},"BreakdownRow":{"properties":{"amount":{"$ref":"#/components/schemas/Money"},"key":{"description":"The concept key, or `?<printed wording>` for a row that was not recognized.","title":"Key","type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The employer's wording, when there is no concept key.","title":"Label"}},"required":["key","label","amount"],"title":"BreakdownRow","type":"object"},"BreakdownSide":{"properties":{"groups":{"description":"Largest first.","items":{"$ref":"#/components/schemas/BreakdownGroup"},"title":"Groups","type":"array"},"total":{"$ref":"#/components/schemas/Money"}},"required":["total","groups"],"title":"BreakdownSide","type":"object"},"BudgetCategory":{"description":"One expense category in one period: its budget, if any, beside what\nthe ledger says was spent. Categories without a budget are listed too,\nwith what they usually cost, which is what the app suggests when setting\none.","properties":{"account_id":{"description":"The expense category's account id.","title":"Account Id","type":"integer"},"available":{"$ref":"#/components/schemas/Money"},"average":{"$ref":"#/components/schemas/Money","description":"Mean spend per period over the last three complete periods."},"budget_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Its budget (see `budgets.get`), or null.","title":"Budget Id"},"budgeted":{"$ref":"#/components/schemas/Money","description":"What the budget allows over the span measured; zero with no budget."},"carried":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Rolled in from earlier periods; null unless the budget rolls over."},"code":{"title":"Code","type":"string"},"name":{"title":"Name","type":"string"},"parent_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The category this is a subcategory of. A budget on the parent covers its subcategories.","title":"Parent Account Id"},"period_spent":{"$ref":"#/components/schemas/Money","description":"Spent in this period alone."},"remaining":{"$ref":"#/components/schemas/Money"},"spent":{"$ref":"#/components/schemas/Money","description":"Spent over the span `budgeted` covers, subcategories included."}},"required":["account_id","code","name","parent_account_id","budget_id","budgeted","carried","available","spent","period_spent","remaining","average"],"title":"BudgetCategory","type":"object"},"BudgetCategoryList":{"description":"A page of expense categories, by account id.","properties":{"data":{"items":{"$ref":"#/components/schemas/BudgetCategory"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"BudgetCategoryList","type":"object"},"BudgetCreate":{"description":"A new budget on a category, or an extra-payment plan on a loan.","properties":{"account_id":{"description":"An expense category (`accounts.list?type=expense`) or, with `kind: paydown`, a confirmed loan's liability account.","title":"Account Id","type":"integer"},"amount":{"description":"Decimal string, at most two decimal places. Per period, or per calendar year when `frequency` is `annual`.","examples":["450.00"],"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","title":"Amount","type":"string"},"frequency":{"default":"monthly","description":"`monthly` (per budget period) or `annual` (per calendar year; spend only).","pattern":"^(monthly|annual)$","title":"Frequency","type":"string"},"kind":{"default":"spend","description":"`spend` or `paydown`.","pattern":"^(spend|paydown)$","title":"Kind","type":"string"},"rollover":{"default":false,"description":"Carry what is left (or owed) into the next period. Monthly only.","title":"Rollover","type":"boolean"},"start_period":{"anyOf":[{"pattern":"^\\d{4}-\\d{2}(-\\d{2})?$","type":"string"},{"type":"null"}],"description":"The period the plan starts in; the current one if omitted. A budget period key: `YYYY-MM` while the ledger budgets by calendar month, otherwise the ISO date (`YYYY-MM-DD`) of the period's first day. As input either form is accepted, and any day names the period it falls in.","title":"Start Period"}},"required":["account_id","amount"],"title":"BudgetCreate","type":"object"},"BudgetCycle":{"description":"The periods every budget is measured over.","properties":{"anchor_date":{"description":"For `monthly` and `semi_monthly`, the day of the month a period starts on. For `biweekly` and `weekly`, a payday the periods count from.","format":"date","title":"Anchor Date","type":"string"},"cadence":{"description":"`monthly`, `semi_monthly` (twice a month, 15 days apart), `biweekly` (every other week) or `weekly`.","title":"Cadence","type":"string"},"is_calendar_month":{"description":"The plain calendar month (monthly from the 1st). Period keys are then `YYYY-MM`; otherwise they are the period's first day.","title":"Is Calendar Month","type":"boolean"}},"required":["cadence","anchor_date","is_calendar_month"],"title":"BudgetCycle","type":"object"},"BudgetCycleUpdate":{"properties":{"anchor_date":{"description":"See `BudgetCycle.anchor_date`.","format":"date","title":"Anchor Date","type":"string"},"cadence":{"description":"See `BudgetCycle.cadence`.","pattern":"^(monthly|semi_monthly|biweekly|weekly)$","title":"Cadence","type":"string"}},"required":["cadence","anchor_date"],"title":"BudgetCycleUpdate","type":"object"},"BudgetFill":{"description":"Fill several budgets in one step.","properties":{"dry_run":{"default":false,"description":"List what would be written and write nothing.","title":"Dry Run","type":"boolean"},"only_unbudgeted":{"default":true,"description":"`usual` only: leave categories that already have a budget alone.","title":"Only Unbudgeted","type":"boolean"},"period":{"anyOf":[{"pattern":"^\\d{4}-\\d{2}(-\\d{2})?$","type":"string"},{"type":"null"}],"description":"The period to fill; the current one if omitted. A budget period key: `YYYY-MM` while the ledger budgets by calendar month, otherwise the ISO date (`YYYY-MM-DD`) of the period's first day. As input either form is accepted, and any day names the period it falls in.","title":"Period"},"source":{"default":"usual","description":"`usual`: budget every top-level category at what it usually costs (its three-period average, whole units). `last_period`: give every monthly budget this period the amount last period allowed, where they differ.","pattern":"^(usual|last_period)$","title":"Source","type":"string"}},"title":"BudgetFill","type":"object"},"BudgetFillItem":{"properties":{"account_id":{"description":"The expense category.","title":"Account Id","type":"integer"},"amount":{"$ref":"#/components/schemas/Money","description":"What the fill writes for the period."},"current":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"What the period allowed before; null with no budget."},"name":{"title":"Name","type":"string"}},"required":["account_id","name","amount","current"],"title":"BudgetFillItem","type":"object"},"BudgetFillResult":{"properties":{"applied":{"description":"False on a dry run.","title":"Applied","type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/BudgetFillItem"},"title":"Items","type":"array"},"period":{"description":"The period filled.","title":"Period","type":"string"},"source":{"title":"Source","type":"string"}},"required":["source","period","items","applied"],"title":"BudgetFillResult","type":"object"},"BudgetList":{"description":"A page of budgets, by id.","properties":{"data":{"items":{"$ref":"#/components/schemas/BudgetOut"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"BudgetList","type":"object"},"BudgetOut":{"description":"A budget: the plan for one category (or, for `paydown`, extra\nprincipal on one loan), and how it stands in the period asked about.","properties":{"account_id":{"description":"The expense category (see `accounts.list?type=expense`) or, for a `paydown` budget, the loan's liability account.","title":"Account Id","type":"integer"},"amount":{"$ref":"#/components/schemas/Money","description":"The default amount per period, or per year when `annual`."},"created_at":{"format":"date-time","title":"Created At","type":"string"},"frequency":{"description":"`monthly`: `amount` is per budget period. `annual`: `amount` is per calendar year.","title":"Frequency","type":"string"},"id":{"description":"The budget id.","title":"Id","type":"integer"},"kind":{"description":"`spend` (a spending plan) or `paydown` (extra principal on a loan).","title":"Kind","type":"string"},"paydown":{"anyOf":[{"$ref":"#/components/schemas/PaydownStatus"},{"type":"null"}],"description":"For a `paydown` budget whose loan is still confirmed; null otherwise."},"period":{"description":"The period `spending` or `paydown` is measured over.","title":"Period","type":"string"},"period_amounts":{"description":"Periods that have their own amount instead of the default.","items":{"$ref":"#/components/schemas/BudgetPeriodAmount"},"title":"Period Amounts","type":"array"},"rollover":{"description":"What is not spent carries into the next period, and an overspend is owed by it.","title":"Rollover","type":"boolean"},"spending":{"anyOf":[{"$ref":"#/components/schemas/SpendingStatus"},{"type":"null"}],"description":"For a `spend` budget; null otherwise."},"start_period":{"description":"The period the plan starts in. A budget period key: `YYYY-MM` while the ledger budgets by calendar month, otherwise the ISO date (`YYYY-MM-DD`) of the period's first day. As input either form is accepted, and any day names the period it falls in.","title":"Start Period","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"}},"required":["id","account_id","kind","frequency","amount","rollover","start_period","period_amounts","period","spending","paydown","created_at","updated_at"],"title":"BudgetOut","type":"object"},"BudgetPeriod":{"properties":{"end":{"description":"Inclusive.","format":"date","title":"End","type":"string"},"key":{"description":"A budget period key: `YYYY-MM` while the ledger budgets by calendar month, otherwise the ISO date (`YYYY-MM-DD`) of the period's first day. As input either form is accepted, and any day names the period it falls in.","title":"Key","type":"string"},"start":{"format":"date","title":"Start","type":"string"}},"required":["key","start","end"],"title":"BudgetPeriod","type":"object"},"BudgetPeriodAmount":{"properties":{"amount":{"$ref":"#/components/schemas/Money"},"period":{"description":"A budget period key: `YYYY-MM` while the ledger budgets by calendar month, otherwise the ISO date (`YYYY-MM-DD`) of the period's first day. As input either form is accepted, and any day names the period it falls in.","title":"Period","type":"string"}},"required":["period","amount"],"title":"BudgetPeriodAmount","type":"object"},"BudgetSummary":{"description":"One period of the ledger's budgets, in total.","properties":{"cycle":{"$ref":"#/components/schemas/BudgetCycle"},"is_future":{"description":"The period has not started: nothing is spent yet, and `carried` counts only the periods that have finished.","title":"Is Future","type":"boolean"},"next_period":{"description":"The next period's key.","title":"Next Period","type":"string"},"period":{"$ref":"#/components/schemas/BudgetPeriod"},"previous_period":{"description":"The previous period's key.","title":"Previous Period","type":"string"},"totals":{"$ref":"#/components/schemas/BudgetTotals"},"unbudgeted_spent":{"$ref":"#/components/schemas/Money","description":"Spent this period in categories with no budget."}},"required":["period","previous_period","next_period","cycle","is_future","totals","unbudgeted_spent"],"title":"BudgetSummary","type":"object"},"BudgetTotals":{"description":"Over the per-period (`monthly`) spending budgets only: an annual\namount is not one period's money.","properties":{"available":{"$ref":"#/components/schemas/Money","description":"`budgeted` + `carried`."},"budgeted":{"$ref":"#/components/schemas/Money"},"carried":{"$ref":"#/components/schemas/Money","description":"Rolled in from earlier periods; negative is an overspend being repaid."},"remaining":{"$ref":"#/components/schemas/Money","description":"`available` − `spent`. Negative is over budget."},"spent":{"$ref":"#/components/schemas/Money"}},"required":["budgeted","carried","available","spent","remaining"],"title":"BudgetTotals","type":"object"},"BudgetUpdate":{"description":"Only the fields sent change.","properties":{"amount":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"description":"See `BudgetCreate.amount`.","title":"Amount"},"frequency":{"anyOf":[{"pattern":"^(monthly|annual)$","type":"string"},{"type":"null"}],"title":"Frequency"},"rollover":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rollover"},"start_period":{"anyOf":[{"pattern":"^\\d{4}-\\d{2}(-\\d{2})?$","type":"string"},{"type":"null"}],"description":"A budget period key: `YYYY-MM` while the ledger budgets by calendar month, otherwise the ISO date (`YYYY-MM-DD`) of the period's first day. As input either form is accepted, and any day names the period it falls in.","title":"Start Period"}},"title":"BudgetUpdate","type":"object"},"CalendarCharge":{"description":"The recurring charge a calendar item belongs to.","properties":{"cadence":{"title":"Cadence","type":"string"},"expected_amount":{"$ref":"#/components/schemas/Money"},"last_date":{"format":"date","title":"Last Date","type":"string"},"merchant_key":{"title":"Merchant Key","type":"string"},"occurrences":{"title":"Occurrences","type":"integer"},"status":{"description":"The household's verdict, as in `recurring.list`.","title":"Status","type":"string"}},"required":["merchant_key","cadence","expected_amount","status","last_date","occurrences"],"title":"CalendarCharge","type":"object"},"CalendarItem":{"properties":{"account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Account Id"},"account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Name"},"amount":{"$ref":"#/components/schemas/Money","description":"Always positive; `flow` says which way it moved."},"date":{"format":"date","title":"Date","type":"string"},"flow":{"description":"`in` or `out`.","title":"Flow","type":"string"},"name":{"title":"Name","type":"string"},"overdue":{"description":"Expected on a day already gone, and not yet arrived.","title":"Overdue","type":"boolean"},"projected":{"description":"Expected on this day rather than seen.","title":"Projected","type":"boolean"},"recurring":{"anyOf":[{"$ref":"#/components/schemas/CalendarCharge"},{"type":"null"}],"description":"The recurring charge it belongs to. Null for a one-off transaction."},"transaction_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The transaction behind a seen item (see `transactions.get`). Null when projected.","title":"Transaction Id"}},"required":["date","name","amount","flow","projected","overdue","recurring","transaction_id","account_id","account_name"],"title":"CalendarItem","type":"object"},"CalendarTotals":{"properties":{"actual_in":{"$ref":"#/components/schemas/Money"},"actual_out":{"$ref":"#/components/schemas/Money"},"projected_in":{"$ref":"#/components/schemas/Money"},"projected_out":{"$ref":"#/components/schemas/Money"}},"required":["actual_in","actual_out","projected_in","projected_out"],"title":"CalendarTotals","type":"object"},"CancelGuide":{"description":"Where and how to cancel this merchant, from LumaLedger's curated list.","properties":{"id":{"title":"Id","type":"string"},"method":{"description":"How it is cancelled: `web`, `phone`, `store_apple`, `store_google`, `store_amazon`, `in_person`.","title":"Method","type":"string"},"name":{"title":"Name","type":"string"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"steps":{"description":"Step keys, in order. They name steps; they are not sentences.","items":{"type":"string"},"title":"Steps","type":"array"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"required":["id","name","method","url","phone","steps"],"title":"CancelGuide","type":"object"},"Card":{"description":"An open credit card, with what its bank says about the statement.","properties":{"available":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Available credit, as the bank last reported it."},"balance":{"$ref":"#/components/schemas/Money","description":"What is owed on the card, positive; negative when the issuer owes you. From the ledger, so it includes pending charges the bank's balance leaves out."},"bank_due_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"The due date the bank last gave.","title":"Bank Due Date"},"details_frozen_since":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Since when the statement fields above have not been updated (the bank's card details keep failing, or its connection stopped syncing; `plaid_items.list` says which). Null while they are current.","title":"Details Frozen Since"},"due_date_source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`bank` when the bank gave `next_payment_due_date`; `projected` when the bank's last date (`bank_due_date`) has passed with no newer one, so this is the same day of the month carried forward (card payments fall on the same day every month).","title":"Due Date Source"},"id":{"description":"The card's account id, as `accounts.list` reports it.","title":"Id","type":"integer"},"institution_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The issuer, as the ledger names it.","title":"Institution Name"},"is_overdue":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"The bank's own overdue flag.","title":"Is Overdue"},"last_payment":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The last payment the bank recorded."},"last_payment_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Last Payment Date"},"limit":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The credit limit, when the bank reports one."},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The last digits of the card number (`4721`).","title":"Mask"},"minimum_payment":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The minimum the latest statement asked for, due on `bank_due_date`."},"name":{"title":"Name","type":"string"},"next_payment_due_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"The next day a payment is due. The bank's own date stays for a day after it passes (it is still that day somewhere), then the next one is projected. Null when the bank expects no payment.","title":"Next Payment Due Date"},"purchase_apr":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The purchase APR in percent, as a decimal string (`\"23.24\"`).","title":"Purchase Apr"},"statement_balance":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The latest statement's balance: the cycle due on `bank_due_date`."},"statement_issued_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"The day the latest statement closed.","title":"Statement Issued On"},"statement_paid":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Payments and credits posted to the card since the statement closed, through its due date."},"statement_remaining":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"What is left of `statement_balance`: pay this by `bank_due_date` to avoid interest. Zero once it is paid in full."},"statement_status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How much of the latest statement is paid, from the payments and credits the ledger holds since it closed (through `bank_due_date` and a day's grace): `paid_in_full` (no interest on it), `unpaid` (some still owed, its due date ahead) or `carried` (its due date passed with some unpaid, so the issuer charges interest). Null when there is nothing to judge: no balance owed, no closing date from the bank, or a due date more than a month gone.","title":"Statement Status"}},"required":["id","name","mask","institution_name","balance","limit","available","purchase_apr","statement_balance","minimum_payment","next_payment_due_date","due_date_source","bank_due_date","statement_status","statement_issued_on","statement_paid","statement_remaining","is_overdue","last_payment","details_frozen_since"],"title":"Card","type":"object"},"CardList":{"description":"A page of credit cards, in chart-of-accounts order.","properties":{"data":{"items":{"$ref":"#/components/schemas/Card"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"CardList","type":"object"},"CashFlow":{"description":"What went in and out of each real account (bank, card, brokerage,\nloan) by month. Opening balances and valuation marks are position, not\nflow, and are left out.","properties":{"accounts":{"items":{"$ref":"#/components/schemas/CashFlowAccount"},"title":"Accounts","type":"array"},"currency":{"title":"Currency","type":"string"},"months":{"description":"`YYYY-MM`, oldest first.","items":{"type":"string"},"title":"Months","type":"array"},"totals":{"description":"One per month.","items":{"$ref":"#/components/schemas/Flow"},"title":"Totals","type":"array"},"unconverted_currencies":{"items":{"type":"string"},"title":"Unconverted Currencies","type":"array"}},"required":["currency","months","accounts","totals","unconverted_currencies"],"title":"CashFlow","type":"object"},"CashFlowAccount":{"properties":{"account_id":{"title":"Account Id","type":"integer"},"code":{"title":"Code","type":"string"},"is_liability":{"title":"Is Liability","type":"boolean"},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mask"},"name":{"title":"Name","type":"string"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"series":{"description":"One per month in `months`.","items":{"$ref":"#/components/schemas/Flow"},"title":"Series","type":"array"}},"required":["account_id","code","name","mask","role","is_liability","series"],"title":"CashFlowAccount","type":"object"},"CashRealValue":{"description":"What holding each cash account was really worth over the window:\ninterest earned against inflation, with deposits and withdrawals\nstripped out. An account whose currency has no published index is left\nout rather than guessed at.","properties":{"accounts":{"items":{"$ref":"#/components/schemas/CashRealValueAccount"},"title":"Accounts","type":"array"},"range":{"title":"Range","type":"string"}},"required":["range","accounts"],"title":"CashRealValue","type":"object"},"CashRealValueAccount":{"properties":{"account_id":{"title":"Account Id","type":"integer"},"currency":{"title":"Currency","type":"string"},"end":{"format":"date","title":"End","type":"string"},"index":{"description":"A time-weighted real-return index based at 100 on `start`, thinned to at most 60 evenly spaced points ending at `end`. Below 100 means inflation outran the interest the money earned.","items":{"type":"string"},"title":"Index","type":"array"},"index_code":{"description":"The consumer price index it is measured against.","title":"Index Code","type":"string"},"inflation_percent":{"pattern":"^-?\\d+(\\.\\d+)?$","title":"Inflation Percent","type":"string"},"interest_earned":{"$ref":"#/components/schemas/Money"},"provisional":{"description":"The tail is held flat: no published index covers it yet.","title":"Provisional","type":"boolean"},"purchasing_power_change":{"$ref":"#/components/schemas/Money","description":"What the money actually held gained or lost in purchasing power."},"real_return_percent":{"pattern":"^-?\\d+(\\.\\d+)?$","title":"Real Return Percent","type":"string"},"start":{"format":"date","title":"Start","type":"string"}},"required":["account_id","currency","index_code","start","end","index","real_return_percent","inflation_percent","interest_earned","purchasing_power_change","provisional"],"title":"CashRealValueAccount","type":"object"},"CategorizationRun":{"properties":{"drain":{"default":false,"description":"Work through the whole backlog of events waiting for the model, then post what was categorized. Without it, one batch is categorized and nothing is posted.","title":"Drain","type":"boolean"}},"title":"CategorizationRun","type":"object"},"CategorizeRequest":{"properties":{"category_id":{"description":"The income or expense account to file them under.","title":"Category Id","type":"integer"},"transaction_ids":{"items":{"type":"integer"},"maxItems":200,"minItems":1,"title":"Transaction Ids","type":"array"}},"required":["transaction_ids","category_id"],"title":"CategorizeRequest","type":"object"},"CategorizeResult":{"properties":{"moved":{"items":{"$ref":"#/components/schemas/MovedTransaction"},"title":"Moved","type":"array"},"skipped":{"items":{"type":"integer"},"title":"Skipped","type":"array"},"updated":{"title":"Updated","type":"integer"}},"required":["updated","skipped","moved"],"title":"CategorizeResult","type":"object"},"CategoryCreate":{"properties":{"name":{"maxLength":60,"minLength":1,"title":"Name","type":"string"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Make it a subcategory of this top-level category of the same type (an account id from `accounts.list?type=expense`). Omitted, it is a top-level category.","title":"Parent Id"},"type":{"description":"`expense` for spending, `income` for money coming in.","pattern":"^(expense|income)$","title":"Type","type":"string"}},"required":["name","type"],"title":"CategoryCreate","type":"object"},"CategoryMute":{"properties":{"key":{"description":"One of `bills`, `subscriptions`, `budgets`, `goals`, `large_transactions`, `accounts`, `investments`, `discoveries`, `receipts`, `automations`.","pattern":"^(bills|subscriptions|budgets|goals|large_transactions|accounts|investments|discoveries|receipts|automations)$","title":"Key","type":"string"},"muted":{"title":"Muted","type":"boolean"}},"required":["key","muted"],"title":"CategoryMute","type":"object"},"Change":{"description":"Something that happened in the ledger. The feed's items and the body\nof every webhook delivery are this same object.","properties":{"created_at":{"format":"date-time","title":"Created At","type":"string"},"data":{"additionalProperties":true,"description":"The ids the change concerns, and a few facts. By `type`: `transaction.*` → `transaction_id` (and `previous_transaction_id` when a refile re-posted it under a new id); `account.balance_updated` → `account_id`, `balance` (Money, as the bank reported it), `as_of`; `budget.exceeded` → `category_id`, `period`, `spent` and `available` (Money); `import.completed` → `account_id`, `row_count`, `new_count`, `duplicate_count`; `job.completed` → `job_id`, `kind`, `status`. Fetch the resource for the rest.","title":"Data","type":"object"},"id":{"description":"Increases with every change. Deliveries are at least once: dedupe on it.","title":"Id","type":"integer"},"type":{"description":"What happened: `transaction.created`, `transaction.updated`, `transaction.deleted`, `account.balance_updated`, `budget.exceeded`, `import.completed`, `job.completed`. More may be added.","title":"Type","type":"string"}},"required":["id","type","created_at","data"],"title":"Change","type":"object"},"ChangeList":{"description":"A page of changes, oldest first. Unlike other lists, `next_cursor` is\nset on the last page too: keep it, and pass it next time to get only what\nhappened since.","properties":{"data":{"items":{"$ref":"#/components/schemas/Change"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"ChangeList","type":"object"},"ClosedAccount":{"properties":{"account":{"$ref":"#/components/schemas/Account"},"connection_removed":{"description":"It was the last account behind a bank connection, so the connection was removed too.","title":"Connection Removed","type":"boolean"}},"required":["account","connection_removed"],"title":"ClosedAccount","type":"object"},"Connection":{"description":"One bank login (a Plaid item) feeding accounts at this bank.","properties":{"bank_refreshed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"When the data provider last reached the bank itself, new data or not (transactions and holdings alike). Same meaning as on `plaid_items.list`.","title":"Bank Refreshed At"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why it is not syncing, as a stable code.","title":"Error Code"},"item_id":{"description":"The connection's id.","title":"Item Id","type":"string"},"last_synced_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Last Synced At"},"new_accounts_available_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"When the bank said it has accounts this connection does not share yet, or null. Same meaning as on `plaid_items.list`.","title":"New Accounts Available At"},"stale":{"description":"True when it should be syncing but has delivered no fresh data for over two days.","title":"Stale","type":"boolean"},"stale_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`sync_failing` (our syncs fail; sync again), `holdings_failing` (syncs succeed but the investment positions could not be fetched; sync again), `investment_transactions_failing` (the same for the investment activity), `liabilities_failing` (the same for cards' and loans' due dates and rates) or `bank_silent` (syncs succeed but the bank has not answered since `bank_refreshed_at`); null when not stale. Same meaning as on `plaid_items.list`.","title":"Stale Reason"},"status":{"description":"`active`, `error`, `login_required` or `revoked`.","title":"Status","type":"string"}},"required":["item_id","status","error_code","last_synced_at","bank_refreshed_at","stale","stale_reason","new_accounts_available_at","created_at"],"title":"Connection","type":"object"},"Counterparty":{"description":"A merchant, employer, person or bank the ledger has transactions\nwith, and how its transactions are filed.","properties":{"about_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One line on who it is, when it has been identified.","title":"About Summary"},"average_amount":{"$ref":"#/components/schemas/Money","description":"The average transaction, as a positive amount."},"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The category its transactions are filed under, when there is one.","title":"Category Id"},"confidence":{"description":"How sure the ledger is about where its transactions are filed, 0 to 1, as a decimal string.","pattern":"^[01]\\.\\d{4}$","title":"Confidence","type":"string"},"confidence_band":{"description":"`sure`, `unsure` or `unfiled`.","title":"Confidence Band","type":"string"},"counterparty_type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`merchant`, `financial_institution`, `income_source`, `payment_app`, `marketplace`, … Null when unknown.","title":"Counterparty Type"},"customized":{"description":"The user renamed it or gave it a logo.","title":"Customized","type":"boolean"},"direction":{"description":"`out` (you pay it), `in` (it pays you) or `both`.","title":"Direction","type":"string"},"first_date":{"format":"date","title":"First Date","type":"string"},"has_rule":{"description":"A standing rule, not a guess, decides where its transactions go.","title":"Has Rule","type":"boolean"},"key":{"description":"The counterparty key: its id. See the resource description.","title":"Key","type":"string"},"last_date":{"format":"date","title":"Last Date","type":"string"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"merchant_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The bank data provider's id for the merchant, when it has one.","title":"Merchant Entity Id"},"mixed":{"description":"Its past transactions sit in more than one category.","title":"Mixed","type":"boolean"},"name":{"description":"What to call it: the user's name for it, else the one derived from the bank's descriptions.","title":"Name","type":"string"},"pattern":{"description":"The description text a rule for it matches on.","title":"Pattern","type":"string"},"rule_count":{"title":"Rule Count","type":"integer"},"seller_unknown":{"description":"Every transaction names only an intermediary (a marketplace, a wallet).","title":"Seller Unknown","type":"boolean"},"suggests_transfer":{"description":"Looks like money between the user's own accounts, and nothing is decided yet.","title":"Suggests Transfer","type":"boolean"},"total_paid":{"$ref":"#/components/schemas/Money","description":"Paid to it, as a positive amount."},"total_received":{"$ref":"#/components/schemas/Money","description":"Received from it, as a positive amount."},"transaction_count":{"title":"Transaction Count","type":"integer"},"transfer_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Set instead of `category_id` when its transactions are transfers to one of the ledger's own accounts (a card payment, a savings sweep).","title":"Transfer Account Id"}},"required":["key","name","pattern","transaction_count","total_paid","total_received","average_amount","direction","first_date","last_date","category_id","transfer_account_id","has_rule","rule_count","mixed","customized","logo_url","merchant_entity_id","counterparty_type","suggests_transfer","seller_unknown","confidence","confidence_band","about_summary"],"title":"Counterparty","type":"object"},"CounterpartyAbout":{"description":"Who a counterparty is, as looked up on the web.","properties":{"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"looked_up_at":{"format":"date-time","title":"Looked Up At","type":"string"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"sources":{"items":{"$ref":"#/components/schemas/AboutSource"},"title":"Sources","type":"array"},"status":{"description":"`found`, or `unknown` when the lookup could not tell.","title":"Status","type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"}},"required":["status","summary","description","website","phone","address","sources","looked_up_at"],"title":"CounterpartyAbout","type":"object"},"CounterpartyAboutEdits":{"description":"The user's corrections to the About card, field by field. Null shows\nwhat the lookup found; an empty string shows nothing.","properties":{"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"}},"required":["summary","description","website","phone","address"],"title":"CounterpartyAboutEdits","type":"object"},"CounterpartyAboutResult":{"properties":{"about":{"anyOf":[{"$ref":"#/components/schemas/CounterpartyAbout"},{"type":"null"}]},"pending":{"description":"A lookup is running; poll `counterparties.get_about` until this is false.","title":"Pending","type":"boolean"}},"required":["about","pending"],"title":"CounterpartyAboutResult","type":"object"},"CounterpartyCategoryInput":{"description":"Where the counterparty's transactions go. Send `category_id` or\n`transfer_account_id`, or neither to drop its standing rule.","properties":{"backfill":{"default":true,"description":"Also refile the transactions already in the ledger.","title":"Backfill","type":"boolean"},"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"An income or expense account (see `accounts.list`).","title":"Category Id"},"transfer_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"One of the ledger's own accounts: its transactions become transfers there.","title":"Transfer Account Id"}},"title":"CounterpartyCategoryInput","type":"object"},"CounterpartyCategoryResult":{"properties":{"cleared":{"description":"A standing rule was dropped (neither target was sent).","title":"Cleared","type":"boolean"},"moved":{"description":"Past transactions refiled.","title":"Moved","type":"integer"}},"required":["moved","cleared"],"title":"CounterpartyCategoryResult","type":"object"},"CounterpartyDetails":{"description":"A counterparty in full, over all time (the list is windowed).","properties":{"about":{"anyOf":[{"$ref":"#/components/schemas/CounterpartyAbout"},{"type":"null"}],"description":"The lookup's answer; null when never looked up."},"about_edits":{"anyOf":[{"$ref":"#/components/schemas/CounterpartyAboutEdits"},{"type":"null"}]},"about_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One line on who it is, when it has been identified.","title":"About Summary"},"average_amount":{"$ref":"#/components/schemas/Money","description":"The average transaction, as a positive amount."},"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The category its transactions are filed under, when there is one.","title":"Category Id"},"confidence":{"description":"How sure the ledger is about where its transactions are filed, 0 to 1, as a decimal string.","pattern":"^[01]\\.\\d{4}$","title":"Confidence","type":"string"},"confidence_band":{"description":"`sure`, `unsure` or `unfiled`.","title":"Confidence Band","type":"string"},"counterparty_type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`merchant`, `financial_institution`, `income_source`, `payment_app`, `marketplace`, … Null when unknown.","title":"Counterparty Type"},"customized":{"description":"The user renamed it or gave it a logo.","title":"Customized","type":"boolean"},"derived_name":{"description":"The name before any rename.","title":"Derived Name","type":"string"},"descriptions":{"description":"Distinct descriptions the bank has used for it (at most 12).","items":{"type":"string"},"title":"Descriptions","type":"array"},"direction":{"description":"`out` (you pay it), `in` (it pays you) or `both`.","title":"Direction","type":"string"},"first_date":{"format":"date","title":"First Date","type":"string"},"has_rule":{"description":"A standing rule, not a guess, decides where its transactions go.","title":"Has Rule","type":"boolean"},"key":{"description":"The counterparty key: its id. See the resource description.","title":"Key","type":"string"},"last_date":{"format":"date","title":"Last Date","type":"string"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"merchant_entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The bank data provider's id for the merchant, when it has one.","title":"Merchant Entity Id"},"merged_from":{"description":"Counterparties merged into this one (`counterparties.merge`), oldest merge first.","items":{"$ref":"#/components/schemas/MergedCounterparty"},"title":"Merged From","type":"array"},"mixed":{"description":"Its past transactions sit in more than one category.","title":"Mixed","type":"boolean"},"monthly":{"description":"Paid and received per month, oldest first.","items":{"$ref":"#/components/schemas/CounterpartyMonth"},"title":"Monthly","type":"array"},"name":{"description":"What to call it: the user's name for it, else the one derived from the bank's descriptions.","title":"Name","type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"pattern":{"description":"The description text a rule for it matches on.","title":"Pattern","type":"string"},"recent_transactions":{"description":"Its latest 50 transactions, newest first.","items":{"$ref":"#/components/schemas/CounterpartyTransaction"},"title":"Recent Transactions","type":"array"},"rule_count":{"title":"Rule Count","type":"integer"},"rules":{"items":{"$ref":"#/components/schemas/CounterpartyRule"},"title":"Rules","type":"array"},"seller_unknown":{"description":"Every transaction names only an intermediary (a marketplace, a wallet).","title":"Seller Unknown","type":"boolean"},"suggested_pattern":{"description":"The pattern a new rule would match on by default.","title":"Suggested Pattern","type":"string"},"suggests_transfer":{"description":"Looks like money between the user's own accounts, and nothing is decided yet.","title":"Suggests Transfer","type":"boolean"},"total_moved":{"$ref":"#/components/schemas/Money","description":"Moved to or from the ledger's own accounts in its transactions filed as transfers (`recent_transactions[].transfer_account_id`), as a positive amount. Never part of `total_paid` or `total_received`."},"total_paid":{"$ref":"#/components/schemas/Money","description":"Paid to it, as a positive amount."},"total_received":{"$ref":"#/components/schemas/Money","description":"Received from it, as a positive amount."},"transaction_count":{"title":"Transaction Count","type":"integer"},"transfer_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Set instead of `category_id` when its transactions are transfers to one of the ledger's own accounts (a card payment, a savings sweep).","title":"Transfer Account Id"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"}},"required":["key","name","pattern","transaction_count","total_paid","total_received","average_amount","direction","first_date","last_date","category_id","transfer_account_id","has_rule","rule_count","mixed","customized","logo_url","merchant_entity_id","counterparty_type","suggests_transfer","seller_unknown","confidence","confidence_band","about_summary","total_moved","derived_name","suggested_pattern","website","notes","about","about_edits","descriptions","rules","monthly","recent_transactions","merged_from"],"title":"CounterpartyDetails","type":"object"},"CounterpartyList":{"description":"A page of counterparties, in key order.","properties":{"data":{"items":{"$ref":"#/components/schemas/Counterparty"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"CounterpartyList","type":"object"},"CounterpartyMergeInput":{"properties":{"target_key":{"description":"The counterparty to fold this one into — a `key` from `counterparties.list`.","minLength":1,"title":"Target Key","type":"string"}},"required":["target_key"],"title":"CounterpartyMergeInput","type":"object"},"CounterpartyMonth":{"properties":{"month":{"description":"`YYYY-MM`.","title":"Month","type":"string"},"paid":{"$ref":"#/components/schemas/Money"},"received":{"$ref":"#/components/schemas/Money"}},"required":["month","paid","received"],"title":"CounterpartyMonth","type":"object"},"CounterpartyRule":{"description":"A standing rule that files a counterparty's transactions.","properties":{"amount_max":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Only transactions of at most this much."},"amount_min":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Only transactions of at least this much."},"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Category Id"},"id":{"description":"The rule id (`counterparty_rule_id`).","title":"Id","type":"integer"},"matches_entity":{"description":"Also matches on the provider's merchant id, exactly.","title":"Matches Entity","type":"boolean"},"pattern":{"description":"Description text the rule matches (uppercase).","title":"Pattern","type":"string"},"source":{"description":"`manual` (someone wrote it) or `learned`.","title":"Source","type":"string"},"transfer_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transfer Account Id"}},"required":["id","pattern","matches_entity","amount_min","amount_max","category_id","transfer_account_id","source"],"title":"CounterpartyRule","type":"object"},"CounterpartyRuleInput":{"description":"A rule narrower than the counterparty's default: a pattern, an\namount band, or both. Writing one with the same pattern and band as an\nexisting rule replaces that rule's category.","properties":{"amount_max":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"description":"Positive decimal string.","title":"Amount Max"},"amount_min":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"description":"Positive decimal string.","title":"Amount Min"},"backfill":{"default":true,"description":"Also refile matching transactions already in the ledger.","title":"Backfill","type":"boolean"},"category_id":{"description":"The income or expense account to file matching transactions under.","title":"Category Id","type":"integer"},"match_entity":{"default":true,"description":"Also match on the provider's merchant id.","title":"Match Entity","type":"boolean"},"pattern":{"anyOf":[{"maxLength":200,"minLength":3,"type":"string"},{"type":"null"}],"description":"Description text to match; defaults to the counterparty's own pattern.","title":"Pattern"}},"required":["category_id"],"title":"CounterpartyRuleInput","type":"object"},"CounterpartyRuleResult":{"properties":{"moved":{"description":"Past transactions refiled.","title":"Moved","type":"integer"},"rule":{"$ref":"#/components/schemas/CounterpartyRule"}},"required":["rule","moved"],"title":"CounterpartyRuleResult","type":"object"},"CounterpartyTransaction":{"properties":{"amount":{"$ref":"#/components/schemas/Money","description":"Always positive; `direction` says which way it moved."},"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Category Id"},"date":{"format":"date","title":"Date","type":"string"},"description":{"title":"Description","type":"string"},"direction":{"description":"`out` or `in`.","title":"Direction","type":"string"},"transaction_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The transaction id for `transactions.get`; null while it has not posted to the ledger.","title":"Transaction Id"},"transfer_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Set instead of `category_id` when the transaction was filed, by hand or by a rule, as a transfer to or from one of the ledger's own accounts.","title":"Transfer Account Id"}},"required":["transaction_id","date","description","amount","direction","category_id","transfer_account_id"],"title":"CounterpartyTransaction","type":"object"},"CounterpartyUpdate":{"description":"Only the fields sent change. `null` goes back to what was derived\n(for `display_name`, `logo_url`, `notes`) or found by the lookup (for the\nAbout fields); an empty About field hides it. URLs must be http(s).","properties":{"about_description":{"anyOf":[{"maxLength":600,"type":"string"},{"type":"null"}],"title":"About Description"},"about_summary":{"anyOf":[{"maxLength":120,"type":"string"},{"type":"null"}],"title":"About Summary"},"address":{"anyOf":[{"maxLength":240,"type":"string"},{"type":"null"}],"title":"Address"},"display_name":{"anyOf":[{"maxLength":120,"type":"string"},{"type":"null"}],"title":"Display Name"},"logo_url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}],"title":"Logo Url"},"notes":{"anyOf":[{"maxLength":2000,"type":"string"},{"type":"null"}],"title":"Notes"},"phone":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"title":"Phone"},"website":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}],"title":"Website"}},"title":"CounterpartyUpdate","type":"object"},"Diversification":{"properties":{"effective_holdings":{"description":"1 / `hhi`: how many equal positions it behaves like.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Effective Holdings","type":"string"},"hhi":{"description":"Herfindahl–Hirschman index of the position weights, 0–1: higher is more concentrated.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Hhi","type":"string"},"positions":{"title":"Positions","type":"integer"},"top5_share":{"description":"The five largest positions' weight, 0–1.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Top5 Share","type":"string"},"top_share":{"description":"The largest position's weight, 0–1.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Top Share","type":"string"}},"required":["positions","top_share","top5_share","hhi","effective_holdings"],"title":"Diversification","type":"object"},"Document":{"description":"A file in the vault.","properties":{"account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The account a statement is for (see `accounts.get`).","title":"Account Id"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"doc_type":{"description":"One of `other`, `statement`, `tax`.","title":"Doc Type","type":"string"},"id":{"title":"Id","type":"integer"},"institution_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The bank a statement came from.","title":"Institution Name"},"mime_type":{"title":"Mime Type","type":"string"},"name":{"title":"Name","type":"string"},"period_end":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"A statement's last day.","title":"Period End"},"period_start":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"A statement's first day.","title":"Period Start"},"size_bytes":{"title":"Size Bytes","type":"integer"},"source":{"description":"`plaid` (a statement pulled from the bank) or `upload`.","title":"Source","type":"string"},"tax_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Year"}},"required":["id","source","doc_type","name","institution_name","account_id","period_start","period_end","tax_year","mime_type","size_bytes","created_at"],"title":"Document","type":"object"},"DocumentList":{"description":"A page of documents, latest statement period first; undated ones last.","properties":{"data":{"items":{"$ref":"#/components/schemas/Document"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"DocumentList","type":"object"},"Download":{"description":"Where to fetch a file. Fetch it promptly: the URL stops working at\n`expires_at`, and asking again gives a fresh one.","properties":{"expires_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"When a signed `url` stops working. Null for a `data:` URL.","title":"Expires At"},"url":{"description":"A signed HTTPS URL for the file, or a `data:` URL carrying the file itself when it is stored inline. Needs no credential.","title":"Url","type":"string"}},"required":["url","expires_at"],"title":"Download","type":"object"},"EquityGrant":{"description":"A grant, what has vested, and the schedule for the rest.","properties":{"account_id":{"description":"The investment account vested shares land in (see `accounts.list`).","title":"Account Id","type":"integer"},"account_name":{"title":"Account Name","type":"string"},"cliff_months":{"title":"Cliff Months","type":"integer"},"duration_months":{"title":"Duration Months","type":"integer"},"frequency_months":{"title":"Frequency Months","type":"integer"},"grant_date":{"format":"date","title":"Grant Date","type":"string"},"grant_type":{"description":"`rsu`.","title":"Grant Type","type":"string"},"id":{"title":"Id","type":"integer"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"next_vest":{"anyOf":[{"$ref":"#/components/schemas/Vest"},{"type":"null"}]},"schedule":{"items":{"$ref":"#/components/schemas/Vest"},"title":"Schedule","type":"array"},"symbol":{"title":"Symbol","type":"string"},"total_shares":{"pattern":"^-?\\d+(\\.\\d+)?$","title":"Total Shares","type":"string"},"unvested_shares":{"description":"Not the holder's yet: never part of net worth.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Unvested Shares","type":"string"},"unvested_value":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"`unvested_shares` at the latest close."},"vest_start":{"format":"date","title":"Vest Start","type":"string"},"vested_income":{"$ref":"#/components/schemas/Money","description":"Wages the vested tranches paid, at their vest-day closes."},"vested_shares":{"pattern":"^-?\\d+(\\.\\d+)?$","title":"Vested Shares","type":"string"},"withholding_rate":{"description":"Share of each vest withheld for tax, 0–1.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Withholding Rate","type":"string"}},"required":["id","grant_type","account_id","account_name","symbol","label","grant_date","total_shares","vest_start","duration_months","frequency_months","cliff_months","withholding_rate","vested_shares","unvested_shares","vested_income","unvested_value","next_vest","schedule"],"title":"EquityGrant","type":"object"},"EquityGrantCreate":{"properties":{"account_id":{"description":"The investment account vested shares land in.","title":"Account Id","type":"integer"},"cliff_months":{"default":0,"examples":[12],"maximum":240,"minimum":0,"title":"Cliff Months","type":"integer"},"duration_months":{"examples":[48],"maximum":240,"minimum":1,"title":"Duration Months","type":"integer"},"frequency_months":{"examples":[3],"maximum":120,"minimum":1,"title":"Frequency Months","type":"integer"},"grant_date":{"format":"date","title":"Grant Date","type":"string"},"grant_type":{"default":"rsu","pattern":"^rsu$","title":"Grant Type","type":"string"},"label":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"title":"Label"},"symbol":{"maxLength":12,"minLength":1,"title":"Symbol","type":"string"},"total_shares":{"examples":["4000"],"pattern":"^\\d+(\\.\\d+)?$","title":"Total Shares","type":"string"},"vest_start":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"Omitted: the grant date.","title":"Vest Start"},"withholding_rate":{"anyOf":[{"pattern":"^(0(\\.\\d+)?|1(\\.0+)?)$","type":"string"},{"type":"null"}],"description":"Share of each vest withheld for tax, 0–1. Omitted: 0.22.","title":"Withholding Rate"}},"required":["account_id","symbol","grant_date","total_shares","duration_months","frequency_months"],"title":"EquityGrantCreate","type":"object"},"EquityGrantList":{"description":"A page of equity grants, by id.","properties":{"data":{"items":{"$ref":"#/components/schemas/EquityGrant"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"EquityGrantList","type":"object"},"ErrorBody":{"description":"What every non-2xx ``/v1`` response carries.","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}},"required":["error"],"title":"ErrorBody","type":"object"},"ErrorDetail":{"properties":{"code":{"title":"Code","type":"string"},"message":{"title":"Message","type":"string"},"param":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Param"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"},"type":{"title":"Type","type":"string"}},"required":["type","code","message"],"title":"ErrorDetail","type":"object"},"Event":{"description":"One movement of money as its source reported it.","properties":{"account_id":{"description":"The bank, card or loan account it happened on.","title":"Account Id","type":"integer"},"amount":{"$ref":"#/components/schemas/Money","description":"Always positive; `event_type` says which way it went. In the account's currency."},"categorization_source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Who filed it: `manual`, `merchant_memory`, `pfc` (the bank's own category), `llm`, `transfer`, `user_rule:…`, `uncategorized`, …","title":"Categorization Source"},"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The income or expense account it is filed under.","title":"Category Id"},"confidence":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How sure the categorizer was, a decimal string from `0.00` to `1.00`.","title":"Confidence"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"date":{"format":"date","title":"Date","type":"string"},"description":{"description":"The source's own text for it.","title":"Description","type":"string"},"event_type":{"description":"What kind of movement: `expense`, `income`, `transfer`, `cc_payment`, `refund`, `fee` or `interest`.","title":"Event Type","type":"string"},"id":{"title":"Id","type":"integer"},"is_posted":{"title":"Is Posted","type":"boolean"},"is_superseded":{"description":"Replaced by a later version of itself (a pending charge that posted).","title":"Is Superseded","type":"boolean"},"merchant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The merchant recognized in the description.","title":"Merchant Name"},"other_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"For a transfer, the ledger's own account on the other end.","title":"Other Account Id"},"reviewed":{"description":"A person has confirmed or set the category.","title":"Reviewed","type":"boolean"},"transaction_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The transaction (journal entry) it is posted as, once posted. See `transactions.get`.","title":"Transaction Id"}},"required":["id","account_id","event_type","date","amount","description","other_account_id","transaction_id","is_posted","is_superseded","category_id","categorization_source","confidence","merchant_name","reviewed","created_at"],"title":"Event","type":"object"},"EventCategorize":{"properties":{"category_id":{"description":"The income or expense account to file it under (from `accounts.list`), on the event's side: an income account for money in, an expense account for money out.","title":"Category Id","type":"integer"},"learn_merchant":{"default":true,"description":"Also file this merchant's future events here.","title":"Learn Merchant","type":"boolean"}},"required":["category_id"],"title":"EventCategorize","type":"object"},"EventList":{"description":"A page of events, newest first.","properties":{"data":{"items":{"$ref":"#/components/schemas/Event"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"EventList","type":"object"},"ExceptionResolve":{"properties":{"action":{"default":"resolved","description":"What was done, a short word kept with the note: `resolved`, `ignored`, `merged`, …","pattern":"^[a-z_]{1,40}$","title":"Action","type":"string"},"note":{"description":"Why it is settled.","maxLength":2000,"minLength":1,"title":"Note","type":"string"}},"required":["note"],"title":"ExceptionResolve","type":"object"},"Flow":{"properties":{"inflow":{"$ref":"#/components/schemas/Money","description":"Movements that grew the balance (for a card: charges)."},"net":{"$ref":"#/components/schemas/Money"},"outflow":{"$ref":"#/components/schemas/Money","description":"Movements that shrank it (for a card: payments)."}},"required":["inflow","outflow","net"],"title":"Flow","type":"object"},"ForecastCharge":{"properties":{"amount":{"$ref":"#/components/schemas/Money","description":"One occurrence."},"cadence":{"title":"Cadence","type":"string"},"flow":{"description":"`in` or `out`.","title":"Flow","type":"string"},"merchant_key":{"title":"Merchant Key","type":"string"},"name":{"title":"Name","type":"string"},"next_date":{"format":"date","title":"Next Date","type":"string"},"occurrences":{"description":"How many times it is expected over the horizon.","title":"Occurrences","type":"integer"},"status":{"description":"`detected` or `confirmed`; dismissed and cancelled charges are left out.","title":"Status","type":"string"},"total":{"$ref":"#/components/schemas/Money","description":"`amount` times `occurrences`."}},"required":["merchant_key","name","cadence","flow","amount","occurrences","total","next_date","status"],"title":"ForecastCharge","type":"object"},"ForecastMonth":{"properties":{"expected_in":{"$ref":"#/components/schemas/Money"},"expected_out":{"$ref":"#/components/schemas/Money"},"month":{"description":"`YYYY-MM`.","title":"Month","type":"string"},"net":{"$ref":"#/components/schemas/Money"},"occurrences":{"items":{"$ref":"#/components/schemas/ForecastOccurrence"},"title":"Occurrences","type":"array"}},"required":["month","expected_in","expected_out","net","occurrences"],"title":"ForecastMonth","type":"object"},"ForecastOccurrence":{"properties":{"amount":{"$ref":"#/components/schemas/Money"},"cadence":{"title":"Cadence","type":"string"},"date":{"format":"date","title":"Date","type":"string"},"flow":{"description":"`in` or `out`.","title":"Flow","type":"string"},"merchant_key":{"title":"Merchant Key","type":"string"},"name":{"title":"Name","type":"string"}},"required":["date","merchant_key","name","amount","flow","cadence"],"title":"ForecastOccurrence","type":"object"},"GoalProgress":{"properties":{"name":{"title":"Name","type":"string"},"progress":{"description":"0–1.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Progress","type":"string"},"reached":{"title":"Reached","type":"boolean"},"saved":{"$ref":"#/components/schemas/Money"},"savings_goal_id":{"title":"Savings Goal Id","type":"integer"},"target_amount":{"$ref":"#/components/schemas/Money"}},"required":["savings_goal_id","name","saved","target_amount","progress","reached"],"title":"GoalProgress","type":"object"},"Holding":{"description":"A security held in one account.","properties":{"account_id":{"description":"The investment account holding it.","title":"Account Id","type":"integer"},"cost_basis":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"gain_percent":{"anyOf":[{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},{"type":"null"}],"description":"Unrealized gain since purchase, in percent; null without both a market value and a cost basis.","title":"Gain Percent"},"id":{"title":"Id","type":"integer"},"is_estimate":{"description":"True when `value` is the cost basis.","title":"Is Estimate","type":"boolean"},"market_value":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The institution's value; null for manual rows."},"name":{"title":"Name","type":"string"},"price":{"anyOf":[{"$ref":"#/components/schemas/UnitPrice"},{"type":"null"}],"description":"The institution's last price per share."},"price_as_of":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"When the institution priced it.","title":"Price As Of"},"quantity":{"description":"Shares or units held.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Quantity","type":"string"},"source":{"description":"`plaid`, `manual` or `seed`.","title":"Source","type":"string"},"symbol":{"description":"The ticker; `positions.get` takes it.","title":"Symbol","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"},"value":{"$ref":"#/components/schemas/Money","description":"`market_value`, or `cost_basis` standing in when there is none — for the owned (vested) units only, so unvested award units never count."},"vested_quantity":{"anyOf":[{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},{"type":"null"}],"description":"For an equity award (a stock-plan account): the units that have vested and are the holder's. Null when the institution reports no vesting split, meaning every unit is owned.","title":"Vested Quantity"}},"required":["id","account_id","symbol","name","quantity","vested_quantity","price","price_as_of","market_value","cost_basis","value","is_estimate","gain_percent","source","updated_at"],"title":"Holding","type":"object"},"HoldingList":{"description":"A page of holdings, in id order.","properties":{"data":{"items":{"$ref":"#/components/schemas/Holding"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"HoldingList","type":"object"},"Import":{"description":"One file imported into one account.","properties":{"account_id":{"description":"The account its rows were written into.","title":"Account Id","type":"integer"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"duplicate_count":{"description":"Rows skipped because they were already in the ledger.","title":"Duplicate Count","type":"integer"},"filename":{"title":"Filename","type":"string"},"id":{"title":"Id","type":"integer"},"new_count":{"description":"Rows written as new transactions.","title":"New Count","type":"integer"},"row_count":{"description":"Rows in the file.","title":"Row Count","type":"integer"},"source":{"description":"What read it: `csv`, `ofx`, `chase_checking`, `rocket_money`, …","title":"Source","type":"string"},"status":{"title":"Status","type":"string"}},"required":["id","source","filename","account_id","row_count","new_count","duplicate_count","status","created_at"],"title":"Import","type":"object"},"ImportCreate":{"properties":{"account_id":{"description":"The bank, card or loan account the rows belong to (an asset or liability from `accounts.list`).","title":"Account Id","type":"integer"},"content":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"description":"The file's text: a CSV, or an OFX / QFX statement. At most 5 MB. Send this or `file_id`.","title":"Content"},"file_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"A file uploaded with `files.create`, instead of `content`. At most 5 MB.","title":"File Id"},"filename":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"description":"Shown in the import history. Defaults to the uploaded file's name.","title":"Filename"},"mapping":{"anyOf":[{"$ref":"#/components/schemas/ImportMapping"},{"type":"null"}],"description":"How to read a CSV (from `imports.preview`). Required for a CSV, ignored for an OFX / QFX statement."}},"required":["account_id"],"title":"ImportCreate","type":"object"},"ImportList":{"description":"A page of imports, newest first.","properties":{"data":{"items":{"$ref":"#/components/schemas/Import"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"ImportList","type":"object"},"ImportMapping":{"description":"Which column is which. A CSV has either one `amount_column` or a\n`debit_column` and a `credit_column`.","properties":{"amount_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount Column"},"balance_column":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The running balance after each row.","title":"Balance Column"},"category_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category Column"},"credit_column":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Money in, when the file splits the two.","title":"Credit Column"},"date_column":{"title":"Date Column","type":"string"},"date_format":{"default":"%Y-%m-%d","description":"A strptime format, one of `date_formats` in the preview.","title":"Date Format","type":"string"},"debit_column":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Money out, when the file splits the two.","title":"Debit Column"},"decimal_comma":{"default":false,"description":"Amounts are written `1.234,56`.","title":"Decimal Comma","type":"boolean"},"description_column":{"title":"Description Column","type":"string"},"outflow_is_positive":{"default":false,"description":"With one `amount_column`: money out is written as a positive number.","title":"Outflow Is Positive","type":"boolean"}},"required":["date_column","description_column"],"title":"ImportMapping","type":"object"},"ImportPreview":{"properties":{"columns":{"description":"The file's column names, or the OFX fields a transaction has.","items":{"type":"string"},"title":"Columns","type":"array"},"date_formats":{"description":"The formats `mapping.date_format` may take.","items":{"type":"string"},"title":"Date Formats","type":"array"},"format":{"description":"`csv` or `ofx`. An OFX file needs no mapping.","title":"Format","type":"string"},"mapping":{"anyOf":[{"$ref":"#/components/schemas/ImportMapping"},{"type":"null"}],"description":"Our reading of the columns; null when nothing plausible fits."},"ofx":{"anyOf":[{"$ref":"#/components/schemas/OfxStatementInfo"},{"type":"null"}]},"rows":{"description":"The first rows, cell for cell, in `columns` order.","items":{"items":{"type":"string"},"type":"array"},"title":"Rows","type":"array"},"saved_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Saved At"},"saved_mapping":{"anyOf":[{"$ref":"#/components/schemas/ImportMapping"},{"type":"null"}],"description":"The mapping this account last used for a file with this header, when `account_id` was sent and there is one. Import with it as it is."},"total_rows":{"title":"Total Rows","type":"integer"}},"required":["format","ofx","columns","rows","total_rows","mapping","date_formats","saved_mapping","saved_at"],"title":"ImportPreview","type":"object"},"ImportPreviewRequest":{"properties":{"account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The account the file is for. Given, the preview includes the mapping this account last imported a file with the same header with.","title":"Account Id"},"content":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"description":"The file's text: a CSV, or an OFX / QFX statement. At most 5 MB. Send this or `file_id`.","title":"Content"},"file_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"A file uploaded with `files.create`, instead of `content`. At most 5 MB.","title":"File Id"}},"title":"ImportPreviewRequest","type":"object"},"IncomeSource":{"properties":{"amount":{"$ref":"#/components/schemas/Money"},"category_id":{"description":"The income account (`accounts.list?type=income`).","title":"Category Id","type":"integer"},"code":{"title":"Code","type":"string"},"name":{"title":"Name","type":"string"},"previous_amount":{"$ref":"#/components/schemas/Money","description":"The same window of the period before."}},"required":["category_id","code","name","amount","previous_amount"],"title":"IncomeSource","type":"object"},"IncomeStatement":{"description":"Income and expenses by category and month (the P&L), and the net.","properties":{"currency":{"description":"The ledger's base currency.","title":"Currency","type":"string"},"expenses":{"$ref":"#/components/schemas/IncomeStatementSection"},"income":{"$ref":"#/components/schemas/IncomeStatementSection"},"months":{"description":"`YYYY-MM`, oldest first; the last is the current month.","items":{"type":"string"},"title":"Months","type":"array"},"net_income":{"$ref":"#/components/schemas/NetIncome"}},"required":["currency","months","income","expenses","net_income"],"title":"IncomeStatement","type":"object"},"IncomeStatementBreakdown":{"description":"One category of the income statement, split by counterparty.","properties":{"currency":{"title":"Currency","type":"string"},"months":{"items":{"type":"string"},"title":"Months","type":"array"},"rows":{"description":"Largest first.","items":{"$ref":"#/components/schemas/StatementBreakdownRow"},"title":"Rows","type":"array"}},"required":["currency","months","rows"],"title":"IncomeStatementBreakdown","type":"object"},"IncomeStatementRow":{"properties":{"category_id":{"description":"The income or expense account.","title":"Category Id","type":"integer"},"code":{"title":"Code","type":"string"},"name":{"title":"Name","type":"string"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The row this one is a subcategory of.","title":"Parent Id"},"total":{"$ref":"#/components/schemas/Money"},"values":{"description":"One per month in `months`.","items":{"$ref":"#/components/schemas/Money"},"title":"Values","type":"array"}},"required":["category_id","code","name","parent_id","values","total"],"title":"IncomeStatementRow","type":"object"},"IncomeStatementSection":{"properties":{"rows":{"description":"In chart order, each subcategory after its parent.","items":{"$ref":"#/components/schemas/IncomeStatementRow"},"title":"Rows","type":"array"},"total":{"$ref":"#/components/schemas/Money"},"totals":{"description":"One per month.","items":{"$ref":"#/components/schemas/Money"},"title":"Totals","type":"array"}},"required":["rows","totals","total"],"title":"IncomeStatementSection","type":"object"},"Insight":{"description":"One observation that holds today.","properties":{"data":{"additionalProperties":true,"description":"The facts behind it, per kind (ids such as `account_id` or `goal_id`, names, dates). Amounts are decimal strings in `data.currency`; `change`, `milestone`, `share` are ratios from 0 to 1, also as decimal strings. Keys are snake_case.","title":"Data","type":"object"},"id":{"description":"Stable while the observation holds: its kind and its subject (`price_change:netflix`).","title":"Id","type":"string"},"kind":{"description":"One of `budget_over`, `budget_near`, `spending_down`, `spending_up`, `price_change`, `goal_reached`, `goal_progress`, `budget_streak`, `month_recap`; new kinds may be added.","title":"Kind","type":"string"},"tone":{"description":"One of `positive`, `attention`, `neutral`: a win, something to look at, or just a fact.","title":"Tone","type":"string"}},"required":["id","kind","tone","data"],"title":"Insight","type":"object"},"InsightList":{"description":"A page of insights, most urgent first.","properties":{"data":{"items":{"$ref":"#/components/schemas/Insight"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"InsightList","type":"object"},"Institution":{"description":"A bank, card issuer or broker the ledger's accounts are held at.","properties":{"id":{"description":"The institution id. Accounts name it as `institution_id`.","title":"Id","type":"integer"},"name":{"description":"The name to show: your rename if you gave one, else the bank's own.","title":"Name","type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text kept about the bank.","title":"Notes"},"official_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The bank's own name, present only when a rename is hiding it.","title":"Official Name"},"slug":{"description":"Stable key of the bank's name (`chase`), unique in the ledger.","title":"Slug","type":"string"},"source":{"description":"`plaid` when a connection brought it, `manual` when typed in.","title":"Source","type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"required":["id","slug","name","official_name","url","source","notes"],"title":"Institution","type":"object"},"InstitutionAbout":{"description":"Who a bank is, as looked up on the web.","properties":{"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"looked_up_at":{"format":"date-time","title":"Looked Up At","type":"string"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"sources":{"items":{"$ref":"#/components/schemas/AboutSource"},"title":"Sources","type":"array"},"status":{"description":"`found`, or `unknown` when the lookup could not tell.","title":"Status","type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"}},"required":["status","summary","description","website","phone","address","sources","looked_up_at"],"title":"InstitutionAbout","type":"object"},"InstitutionAboutEdits":{"description":"The user's corrections to the About card, field by field. Null shows\nwhat the lookup found; an empty string shows nothing.","properties":{"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"}},"required":["summary","description","website","phone","address"],"title":"InstitutionAboutEdits","type":"object"},"InstitutionAboutResult":{"properties":{"about":{"anyOf":[{"$ref":"#/components/schemas/InstitutionAbout"},{"type":"null"}]},"pending":{"description":"A lookup is running; poll `institutions.get_about` until this is false.","title":"Pending","type":"boolean"}},"required":["about","pending"],"title":"InstitutionAboutResult","type":"object"},"InstitutionCreate":{"properties":{"name":{"maxLength":200,"minLength":1,"title":"Name","type":"string"},"url":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"description":"The bank's website.","title":"Url"}},"required":["name"],"title":"InstitutionCreate","type":"object"},"InstitutionDetail":{"description":"An institution with its connections, and who it is.","properties":{"about":{"anyOf":[{"$ref":"#/components/schemas/InstitutionAbout"},{"type":"null"}],"description":"The web lookup's answer; null when never looked up (`institutions.identify`)."},"about_edits":{"anyOf":[{"$ref":"#/components/schemas/InstitutionAboutEdits"},{"type":"null"}],"description":"Your corrections to that answer; null when there are none."},"connections":{"items":{"$ref":"#/components/schemas/Connection"},"title":"Connections","type":"array"},"deletable":{"description":"True when no account (closed ones included) and no connection points at it, so `institutions.delete` would succeed.","title":"Deletable","type":"boolean"},"id":{"description":"The institution id. Accounts name it as `institution_id`.","title":"Id","type":"integer"},"name":{"description":"The name to show: your rename if you gave one, else the bank's own.","title":"Name","type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free text kept about the bank.","title":"Notes"},"official_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The bank's own name, present only when a rename is hiding it.","title":"Official Name"},"slug":{"description":"Stable key of the bank's name (`chase`), unique in the ledger.","title":"Slug","type":"string"},"source":{"description":"`plaid` when a connection brought it, `manual` when typed in.","title":"Source","type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"required":["id","slug","name","official_name","url","source","notes","connections","deletable","about","about_edits"],"title":"InstitutionDetail","type":"object"},"InstitutionList":{"description":"A page of institutions, in id order.","properties":{"data":{"items":{"$ref":"#/components/schemas/Institution"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"InstitutionList","type":"object"},"InstitutionUpdate":{"description":"Only the fields sent are changed.","properties":{"about_address":{"anyOf":[{"maxLength":240,"type":"string"},{"type":"null"}],"title":"About Address"},"about_description":{"anyOf":[{"maxLength":600,"type":"string"},{"type":"null"}],"title":"About Description"},"about_phone":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"title":"About Phone"},"about_summary":{"anyOf":[{"maxLength":120,"type":"string"},{"type":"null"}],"description":"Correct the About card's one line. Null shows what the lookup found; an empty string shows nothing.","title":"About Summary"},"about_website":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}],"description":"http(s) only.","title":"About Website"},"name":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"description":"Rename it everywhere the ledger shows it. Null puts the bank's own name back.","title":"Name"},"notes":{"anyOf":[{"maxLength":2000,"type":"string"},{"type":"null"}],"description":"Null clears them.","title":"Notes"}},"title":"InstitutionUpdate","type":"object"},"Investment":{"description":"An alternative investment: a position valued by hand.","properties":{"category":{"description":"One of `angel`, `fund`, `private_credit`, `collectible`, `crypto`, `other`.","title":"Category","type":"string"},"current_value":{"$ref":"#/components/schemas/Money","description":"What it is worth now. Zero once exited or written off."},"documents":{"items":{"$ref":"#/components/schemas/InvestmentDocumentRef"},"title":"Documents","type":"array"},"excluded_from_totals":{"description":"Left out of net worth: its value is not posted to the ledger.","title":"Excluded From Totals","type":"boolean"},"exit_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Exit Date"},"exit_proceeds":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"What came back on exit, when recorded."},"gain":{"$ref":"#/components/schemas/Money","description":"`current_value` minus `invested_amount`."},"hidden":{"description":"Hidden from the app's list; still counted.","title":"Hidden","type":"boolean"},"id":{"title":"Id","type":"integer"},"invested_amount":{"$ref":"#/components/schemas/Money","description":"What went in."},"invested_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Invested Date"},"issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The company, fund or counterparty.","title":"Issuer"},"multiple":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`current_value` ÷ `invested_amount` as a decimal string (`\"1.25\"`). Null when nothing was invested.","title":"Multiple"},"name":{"title":"Name","type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"status":{"description":"One of `active`, `exited`, `written_off`.","title":"Status","type":"string"},"terms":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Free-form deal terms (valuation cap, discount, carry, …), as recorded.","title":"Terms"},"valued_at":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"The date `current_value` was last set.","title":"Valued At"},"vehicle":{"description":"The instrument held: one of `safe`, `convertible_note`, `priced_round`, `lp_interest`, `note`, `direct`, `other`.","title":"Vehicle","type":"string"}},"required":["id","name","category","vehicle","issuer","invested_amount","invested_date","current_value","valued_at","terms","notes","status","hidden","excluded_from_totals","exit_proceeds","exit_date","gain","multiple","documents"],"title":"Investment","type":"object"},"InvestmentActivity":{"description":"A trade or cash event inside an investment account.","properties":{"account_id":{"title":"Account Id","type":"integer"},"cash":{"$ref":"#/components/schemas/Money","description":"Cash into the account (positive) or out of it (negative)."},"date":{"format":"date","title":"Date","type":"string"},"fees":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"id":{"title":"Id","type":"integer"},"name":{"title":"Name","type":"string"},"price":{"anyOf":[{"$ref":"#/components/schemas/UnitPrice"},{"type":"null"}]},"quantity":{"description":"Shares or units; 0 for a cash event.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Quantity","type":"string"},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"As the institution refines it (`dividend`, `contribution`, …).","title":"Subtype"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"},"type":{"description":"`buy`, `sell`, `cash`, `fee` or `transfer`.","title":"Type","type":"string"}},"required":["id","account_id","date","type","subtype","name","symbol","quantity","price","cash","fees"],"title":"InvestmentActivity","type":"object"},"InvestmentActivityList":{"description":"A page of investment activity, newest first.","properties":{"data":{"items":{"$ref":"#/components/schemas/InvestmentActivity"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"InvestmentActivityList","type":"object"},"InvestmentCreate":{"properties":{"category":{"description":"One of `angel`, `fund`, `private_credit`, `collectible`, `crypto`, `other`.","title":"Category","type":"string"},"currency":{"anyOf":[{"pattern":"^[A-Z]{3}$","type":"string"},{"type":"null"}],"description":"ISO 4217 code of the amounts, when not the ledger's base currency.","title":"Currency"},"current_value":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"description":"What it is worth now. Defaults to `invested_amount`. Posted to the ledger.","title":"Current Value"},"invested_amount":{"description":"What went in, as a decimal string.","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","title":"Invested Amount","type":"string"},"invested_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Invested Date"},"issuer":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"title":"Issuer"},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"notes":{"anyOf":[{"maxLength":5000,"type":"string"},{"type":"null"}],"title":"Notes"},"terms":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Free-form deal terms.","title":"Terms"},"vehicle":{"default":"other","description":"One of `safe`, `convertible_note`, `priced_round`, `lp_interest`, `note`, `direct`, `other`.","title":"Vehicle","type":"string"}},"required":["name","category","invested_amount"],"title":"InvestmentCreate","type":"object"},"InvestmentDocumentAdd":{"properties":{"file_id":{"description":"The document, uploaded with `files.create`.","title":"File Id","type":"integer"},"name":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"description":"What to call it. Defaults to the uploaded file's name.","title":"Name"}},"required":["file_id"],"title":"InvestmentDocumentAdd","type":"object"},"InvestmentDocumentRef":{"description":"A document filed against the position.","properties":{"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"title":"Id","type":"integer"},"name":{"title":"Name","type":"string"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"}},"required":["id","name","content_type","size_bytes","created_at"],"title":"InvestmentDocumentRef","type":"object"},"InvestmentList":{"description":"A page of alternative investments, in id order.","properties":{"data":{"items":{"$ref":"#/components/schemas/Investment"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"InvestmentList","type":"object"},"InvestmentUpdate":{"description":"Only the fields sent change. None of them can be cleared.","properties":{"current_value":{"description":"Revalue a live position; the change is posted to the ledger.","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","title":"Current Value","type":"string"},"excluded_from_totals":{"description":"Leave it out of net worth: its value is taken off the ledger.","title":"Excluded From Totals","type":"boolean"},"exit_date":{"description":"Sent with an exit. Defaults to today.","format":"date","title":"Exit Date","type":"string"},"exit_proceeds":{"description":"What came back, sent with an exit.","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","title":"Exit Proceeds","type":"string"},"hidden":{"title":"Hidden","type":"boolean"},"issuer":{"maxLength":200,"title":"Issuer","type":"string"},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"notes":{"maxLength":5000,"title":"Notes","type":"string"},"status":{"description":"One of `active`, `exited`, `written_off`. Exiting or writing off takes the position's value off the ledger; reactivating restores it.","title":"Status","type":"string"},"terms":{"additionalProperties":true,"title":"Terms","type":"object"}},"title":"InvestmentUpdate","type":"object"},"Job":{"description":"Work that outlives the request that started it. Poll `jobs.get`\nuntil `status` is `succeeded` or `failed`.","properties":{"created_at":{"format":"date-time","title":"Created At","type":"string"},"error":{"anyOf":[{"$ref":"#/components/schemas/JobError"},{"type":"null"}],"description":"Why it failed, once `failed`."},"finished_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Finished At"},"id":{"title":"Id","type":"integer"},"kind":{"description":"What the job does: `import`, `categorize`, `generate_journals`, `reconcile`, `run_schedules`, `plaid_sync` or `rocket_money_import`.","title":"Kind","type":"string"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"What the work produced, once `succeeded`. Its fields depend on `kind` and are listed on the operation that started it. Counts are integers.","title":"Result"},"status":{"description":"`queued`, `running`, `succeeded` or `failed`.","title":"Status","type":"string"}},"required":["id","kind","status","result","error","created_at","finished_at"],"title":"Job","type":"object"},"JobError":{"properties":{"code":{"description":"Stable error code, as in the error envelope.","title":"Code","type":"string"},"message":{"description":"For people, in the request's language. Never match on it.","title":"Message","type":"string"}},"required":["code","message"],"title":"JobError","type":"object"},"LargestExpense":{"properties":{"amount":{"$ref":"#/components/schemas/Money"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The category it was filed under (the largest line, when split).","title":"Category"},"date":{"format":"date","title":"Date","type":"string"},"description":{"title":"Description","type":"string"},"transaction_id":{"description":"What `transactions.get` takes.","title":"Transaction Id","type":"integer"}},"required":["transaction_id","date","description","amount","category"],"title":"LargestExpense","type":"object"},"LedgerLine":{"description":"One posting to the account, with the balance it left behind.","properties":{"amount":{"$ref":"#/components/schemas/Money","description":"Always positive; `direction` says which side."},"date":{"format":"date","title":"Date","type":"string"},"description":{"title":"Description","type":"string"},"direction":{"description":"`debit` or `credit`.","title":"Direction","type":"string"},"id":{"description":"The journal line id.","title":"Id","type":"integer"},"running_balance":{"$ref":"#/components/schemas/Money","description":"The account's balance after this line, positive on its normal side, counting every earlier line whatever page it is on."},"source":{"description":"Where the entry came from: `plaid`, `import`, `manual`, …","title":"Source","type":"string"},"statement_line":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The line as the bank printed it on the statement (`SQ *BLUE BOTTLE 0412 OAKLAND CA`). Null on an entry nobody imported.","title":"Statement Line"},"transaction_id":{"description":"The journal entry the line belongs to (`transactions.get` takes it).","title":"Transaction Id","type":"integer"}},"required":["id","transaction_id","date","description","statement_line","direction","amount","running_balance","source"],"title":"LedgerLine","type":"object"},"LedgerLineList":{"description":"A page of an account's journal lines, oldest first.","properties":{"data":{"items":{"$ref":"#/components/schemas/LedgerLine"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"LedgerLineList","type":"object"},"LinkedAsset":{"properties":{"kind":{"description":"`property` or `vehicle`: what this loan finances.","title":"Kind","type":"string"},"label":{"title":"Label","type":"string"}},"required":["kind","label"],"title":"LinkedAsset","type":"object"},"Loan":{"description":"A debt with terms: a mortgage, auto, student or personal loan, a\nHELOC or a card.","properties":{"accrual_mode":{"description":"`amortizing`: a level payment posts each period and splits into interest and principal. `accrue_only`: interest accrues to a payable, no payments are modelled. `statement`: the servicer reports the interest and the ledger never computes it.","title":"Accrual Mode","type":"string"},"annual_rate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Annual interest rate in percent, as a decimal string: `\"6.125\"`.","title":"Annual Rate"},"balance":{"$ref":"#/components/schemas/Money","description":"What is owed today: the liability account's balance, positive while owed."},"day_count":{"description":"How a period's interest counts days: `act365`, `act360`, `thirty360`.","title":"Day Count","type":"string"},"escrow_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The account the escrow share of a payment goes to.","title":"Escrow Account Id"},"escrow_amount":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The escrow share of each payment."},"id":{"title":"Id","type":"integer"},"interest_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The expense account interest posts to.","title":"Interest Account Id"},"kind":{"description":"One of `mortgage`, `auto`, `student`, `personal`, `heloc`, `credit_card`, `other`.","title":"Kind","type":"string"},"liability_account_id":{"description":"The liability account that holds the balance.","title":"Liability Account Id","type":"integer"},"maturity_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Maturity Date"},"name":{"title":"Name","type":"string"},"original_principal":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"origination_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Origination Date"},"payable_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The liability accrued interest posts to (`accrue_only` loans).","title":"Payable Account Id"},"payment_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The account payments leave from.","title":"Payment Account Id"},"payment_amount":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The regular payment, escrow included."},"payment_cadence":{"description":"One of `weekly`, `monthly`, `quarterly`, `annually`.","title":"Payment Cadence","type":"string"},"payment_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Day of the month payments fall on, 1–28, or -1 for the month's last day.","title":"Payment Day"},"projection":{"anyOf":[{"$ref":"#/components/schemas/LoanProjection"},{"type":"null"}],"description":"Null when the terms cannot be projected (not amortizing, or no payment or rate)."},"rate_type":{"description":"`fixed` or `variable`.","title":"Rate Type","type":"string"},"scheduled_entry_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The standing order that posts the loan's interest and payments, when it has one.","title":"Scheduled Entry Id"},"source":{"description":"`manual`, `inferred` (from the bank) or `assistant`.","title":"Source","type":"string"},"status":{"description":"`suggested` (inferred from the bank, awaiting a verdict), `confirmed`, `closed` or `dismissed`. Only confirmed loans post and count in plans.","title":"Status","type":"string"},"term_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Term Months"}},"required":["id","name","kind","accrual_mode","status","source","balance","liability_account_id","interest_account_id","payable_account_id","payment_account_id","escrow_account_id","annual_rate","rate_type","day_count","origination_date","maturity_date","term_months","original_principal","payment_amount","escrow_amount","payment_cadence","payment_day","scheduled_entry_id","projection"],"title":"Loan","type":"object"},"LoanCreate":{"description":"A loan's terms. Which fields matter depends on `accrual_mode`: an\namortizing loan needs `annual_rate` and `payment_amount`; an\naccrue-only one needs `annual_rate` and a `payable_account_id`.","properties":{"accrual_mode":{"description":"One of `accrue_only`, `amortizing`, `statement`.","title":"Accrual Mode","type":"string"},"annual_rate":{"anyOf":[{"pattern":"^\\d{1,3}(\\.\\d{1,4})?$","type":"string"},{"type":"null"}],"description":"Annual rate in percent, as a decimal string: `\"6.125\"`. 0–200.","title":"Annual Rate"},"day_count":{"default":"act365","description":"One of `act365`, `act360`, `thirty360`.","title":"Day Count","type":"string"},"escrow_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Where the escrow share goes.","title":"Escrow Account Id"},"escrow_amount":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"title":"Escrow Amount"},"interest_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Expense account for interest.","title":"Interest Account Id"},"kind":{"description":"One of `mortgage`, `auto`, `student`, `personal`, `heloc`, `credit_card`, `other`.","title":"Kind","type":"string"},"liability_account_id":{"description":"The liability account that holds the balance (see `accounts.list`). One loan per account.","title":"Liability Account Id","type":"integer"},"maturity_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Maturity Date"},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"original_principal":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"title":"Original Principal"},"origination_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Origination Date"},"payable_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Liability for accrued interest (`accrue_only`). Must not be the loan's own account.","title":"Payable Account Id"},"payment_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The account payments leave from.","title":"Payment Account Id"},"payment_amount":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"description":"The regular payment, escrow included.","title":"Payment Amount"},"payment_cadence":{"default":"monthly","description":"One of `weekly`, `monthly`, `quarterly`, `annually`.","title":"Payment Cadence","type":"string"},"payment_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"1–28, or -1 for the month's last day.","title":"Payment Day"},"rate_type":{"default":"fixed","description":"`fixed` or `variable`.","title":"Rate Type","type":"string"},"term_months":{"anyOf":[{"maximum":1200,"minimum":1,"type":"integer"},{"type":"null"}],"title":"Term Months"}},"required":["name","kind","accrual_mode","liability_account_id"],"title":"LoanCreate","type":"object"},"LoanDetail":{"description":"A loan with its full amortization table from today.","properties":{"accrual_mode":{"description":"`amortizing`: a level payment posts each period and splits into interest and principal. `accrue_only`: interest accrues to a payable, no payments are modelled. `statement`: the servicer reports the interest and the ledger never computes it.","title":"Accrual Mode","type":"string"},"annual_rate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Annual interest rate in percent, as a decimal string: `\"6.125\"`.","title":"Annual Rate"},"balance":{"$ref":"#/components/schemas/Money","description":"What is owed today: the liability account's balance, positive while owed."},"day_count":{"description":"How a period's interest counts days: `act365`, `act360`, `thirty360`.","title":"Day Count","type":"string"},"escrow_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The account the escrow share of a payment goes to.","title":"Escrow Account Id"},"escrow_amount":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The escrow share of each payment."},"id":{"title":"Id","type":"integer"},"interest_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The expense account interest posts to.","title":"Interest Account Id"},"kind":{"description":"One of `mortgage`, `auto`, `student`, `personal`, `heloc`, `credit_card`, `other`.","title":"Kind","type":"string"},"liability_account_id":{"description":"The liability account that holds the balance.","title":"Liability Account Id","type":"integer"},"maturity_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Maturity Date"},"name":{"title":"Name","type":"string"},"original_principal":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"origination_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Origination Date"},"payable_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The liability accrued interest posts to (`accrue_only` loans).","title":"Payable Account Id"},"payment_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The account payments leave from.","title":"Payment Account Id"},"payment_amount":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The regular payment, escrow included."},"payment_cadence":{"description":"One of `weekly`, `monthly`, `quarterly`, `annually`.","title":"Payment Cadence","type":"string"},"payment_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Day of the month payments fall on, 1–28, or -1 for the month's last day.","title":"Payment Day"},"projection":{"anyOf":[{"$ref":"#/components/schemas/LoanProjection"},{"type":"null"}],"description":"Null when the terms cannot be projected (not amortizing, or no payment or rate)."},"rate_type":{"description":"`fixed` or `variable`.","title":"Rate Type","type":"string"},"schedule":{"description":"Every remaining period until payoff, capped at 600. Empty when there is no projection.","items":{"$ref":"#/components/schemas/LoanPeriod"},"title":"Schedule","type":"array"},"scheduled_entry_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The standing order that posts the loan's interest and payments, when it has one.","title":"Scheduled Entry Id"},"source":{"description":"`manual`, `inferred` (from the bank) or `assistant`.","title":"Source","type":"string"},"status":{"description":"`suggested` (inferred from the bank, awaiting a verdict), `confirmed`, `closed` or `dismissed`. Only confirmed loans post and count in plans.","title":"Status","type":"string"},"term_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Term Months"}},"required":["id","name","kind","accrual_mode","status","source","balance","liability_account_id","interest_account_id","payable_account_id","payment_account_id","escrow_account_id","annual_rate","rate_type","day_count","origination_date","maturity_date","term_months","original_principal","payment_amount","escrow_amount","payment_cadence","payment_day","scheduled_entry_id","projection","schedule"],"title":"LoanDetail","type":"object"},"LoanList":{"description":"A page of loans, in id order. Dismissed loans are not listed.","properties":{"data":{"items":{"$ref":"#/components/schemas/Loan"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"LoanList","type":"object"},"LoanPeriod":{"description":"One payment period of the amortization table.","properties":{"balance_after":{"$ref":"#/components/schemas/Money"},"escrow":{"$ref":"#/components/schemas/Money"},"interest":{"$ref":"#/components/schemas/Money"},"period_end":{"format":"date","title":"Period End","type":"string"},"principal":{"$ref":"#/components/schemas/Money"}},"required":["period_end","interest","principal","escrow","balance_after"],"title":"LoanPeriod","type":"object"},"LoanProjection":{"description":"What the terms imply from today's balance. Recomputed on every read.","properties":{"never_pays_off":{"description":"The payment does not cover the interest, so the balance would grow forever.","title":"Never Pays Off","type":"boolean"},"payoff_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"The period the balance reaches zero. Null when it never does.","title":"Payoff Date"},"periods_remaining":{"title":"Periods Remaining","type":"integer"},"total_interest":{"$ref":"#/components/schemas/Money","description":"Interest still to pay from today until payoff."}},"required":["payoff_date","total_interest","periods_remaining","never_pays_off"],"title":"LoanProjection","type":"object"},"LoanStatusChange":{"description":"Confirming an inferred loan is also where the accounts the bank\ncannot know are supplied: where the payment leaves from and where\nescrow goes.","properties":{"escrow_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Escrow Account Id"},"escrow_amount":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"title":"Escrow Amount"},"payment_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Account Id"},"payment_amount":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"title":"Payment Amount"},"status":{"description":"One of `confirmed`, `dismissed`, `closed`.","title":"Status","type":"string"}},"required":["status"],"title":"LoanStatusChange","type":"object"},"LoanUpdate":{"description":"Only the fields sent change. A nullable field sent as null is cleared.","properties":{"accrual_mode":{"description":"One of `accrue_only`, `amortizing`, `statement`.","title":"Accrual Mode","type":"string"},"annual_rate":{"anyOf":[{"pattern":"^\\d{1,3}(\\.\\d{1,4})?$","type":"string"},{"type":"null"}],"title":"Annual Rate"},"day_count":{"description":"One of `act365`, `act360`, `thirty360`.","title":"Day Count","type":"string"},"escrow_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Escrow Account Id"},"escrow_amount":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"title":"Escrow Amount"},"interest_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interest Account Id"},"kind":{"description":"One of `mortgage`, `auto`, `student`, `personal`, `heloc`, `credit_card`, `other`.","title":"Kind","type":"string"},"liability_account_id":{"title":"Liability Account Id","type":"integer"},"maturity_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Maturity Date"},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"original_principal":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"title":"Original Principal"},"origination_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Origination Date"},"payable_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payable Account Id"},"payment_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Account Id"},"payment_amount":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"title":"Payment Amount"},"payment_cadence":{"description":"One of `weekly`, `monthly`, `quarterly`, `annually`.","title":"Payment Cadence","type":"string"},"payment_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Day"},"rate_type":{"description":"`fixed` or `variable`.","title":"Rate Type","type":"string"},"term_months":{"anyOf":[{"maximum":1200,"minimum":1,"type":"integer"},{"type":"null"}],"title":"Term Months"}},"title":"LoanUpdate","type":"object"},"LowBalanceAlert":{"description":"\"Tell me when this account drops below …\".","properties":{"below":{"description":"The balance is under the threshold right now.","title":"Below","type":"boolean"},"below_since":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"When the balance was seen dropping below the threshold, which is when the member was notified; null while it is at or above it.","title":"Below Since"},"shortfall":{"anyOf":[{"$ref":"#/components/schemas/LowBalanceShortfall"},{"type":"null"}],"description":"The recurring bills and paychecks expected on the account over the next month, and the payments of the credit cards it pays (bills first on a day), take the balance under the threshold; the member is notified once and has a to-do while it stands. Null when they do not, and while the balance is already below."},"threshold":{"$ref":"#/components/schemas/Money","description":"Alert when the balance drops below this."}},"required":["threshold","below","below_since","shortfall"],"title":"LowBalanceAlert","type":"object"},"LowBalanceShortfall":{"description":"The recurring bills and paychecks expected on the account over the\nnext month take its balance under the alert's threshold.","properties":{"bill_amount":{"$ref":"#/components/schemas/Money","description":"That bill's usual amount; for a card, what paying it in full takes."},"bill_kind":{"description":"`recurring`: a charge the recurring detector found. `card_payment`: a credit card this account paid last, expected to be paid in full by its due date.","title":"Bill Kind","type":"string"},"bill_name":{"description":"The expected bill that takes it under: a recurring charge's name, or the name of the credit card whose payment it is.","title":"Bill Name","type":"string"},"lowest":{"$ref":"#/components/schemas/Money","description":"The lowest the balance is projected to reach over the month."},"needed":{"$ref":"#/components/schemas/Money","description":"What to move in now to stay at or above the threshold all month."},"short_on":{"description":"The first day the balance is projected under the threshold.","format":"date","title":"Short On","type":"string"}},"required":["short_on","bill_name","bill_amount","bill_kind","lowest","needed"],"title":"LowBalanceShortfall","type":"object"},"ManualAccountCreate":{"description":"An account at this bank that no connection feeds.","properties":{"balance":{"anyOf":[{"pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"description":"What it holds (asset) or owes (liability) today, as a decimal string. Omitted, it starts at zero and holds only what transfers put there.","examples":["300.00"],"title":"Balance"},"kind":{"description":"What it is, which decides its type and role: `checking`, `savings`, `cash`, `brokerage`, `retirement`, `other_asset`, `credit_card`, `loan`, `mortgage`, `student_loan`, `other_liability`.","pattern":"^(checking|savings|cash|brokerage|retirement|other_asset|credit_card|loan|mortgage|student_loan|other_liability)$","title":"Kind","type":"string"},"mask":{"anyOf":[{"maxLength":4,"type":"string"},{"type":"null"}],"description":"The last digits the bank prints.","title":"Mask"},"name":{"maxLength":80,"minLength":1,"title":"Name","type":"string"}},"required":["name","kind"],"title":"ManualAccountCreate","type":"object"},"MarkRead":{"properties":{"all":{"default":false,"description":"Mark every unread notification read instead.","title":"All","type":"boolean"},"notification_ids":{"anyOf":[{"items":{"type":"integer"},"maxItems":200,"type":"array"},{"type":"null"}],"description":"The notifications to mark read, from `notifications.list`.","title":"Notification Ids"}},"title":"MarkRead","type":"object"},"MarkReadResult":{"properties":{"marked":{"description":"How many were unread and are now read.","title":"Marked","type":"integer"}},"required":["marked"],"title":"MarkReadResult","type":"object"},"Me":{"description":"The caller, as this ledger sees them.","properties":{"can_write":{"description":"Whether write operations will be allowed: a write-scoped credential and an `editor` role or above.","title":"Can Write","type":"boolean"},"credential":{"description":"`token` for an API token, `oauth` for an app the user connected with OAuth (an MCP client), `session` for a signed-in user.","title":"Credential","type":"string"},"organization_id":{"description":"The ledger this request acts in (a UUID): a token's own ledger, else the `X-Organization-Id` header, else the user's personal ledger.","title":"Organization Id","type":"string"},"role":{"description":"The user's role in that ledger: `owner`, `admin`, `editor` or `viewer`.","title":"Role","type":"string"},"token_scope":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`read` or `write` for a token; `read` or `propose` for an OAuth app (which never writes: with `propose` it proposes changes over MCP for the user to approve); null for a session.","title":"Token Scope"},"user_id":{"description":"The user's id (a UUID). A token acts as the user who made it.","title":"User Id","type":"string"}},"required":["user_id","organization_id","role","credential","token_scope","can_write"],"title":"Me","type":"object"},"MerchantMappingInput":{"properties":{"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The income or expense account to file its events under.","title":"Category Id"},"confidence":{"default":"0.90","description":"How sure a match is, `0` to `1`, as a decimal string.","pattern":"^(0(\\.\\d{1,2})?|1(\\.0{1,2})?)$","title":"Confidence","type":"string"},"merchant_name":{"description":"The clean name to show.","maxLength":200,"minLength":1,"title":"Merchant Name","type":"string"},"merchant_pattern":{"description":"The text a description starts with, e.g. `STARBUCKS`. Matched ignoring case.","maxLength":200,"minLength":3,"title":"Merchant Pattern","type":"string"}},"required":["merchant_pattern","merchant_name"],"title":"MerchantMappingInput","type":"object"},"MerchantMappingList":{"description":"A page of merchant mappings, in the order they were made.","properties":{"data":{"items":{"$ref":"#/components/schemas/MerchantMappingOut"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"MerchantMappingList","type":"object"},"MerchantMappingOut":{"description":"What the ledger remembers about a merchant: how to name it and where\nto file it.","properties":{"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The income or expense account its events are filed under.","title":"Category Id"},"confidence":{"description":"How sure a match is, a decimal string from `0.00` to `1.00`.","title":"Confidence","type":"string"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"title":"Id","type":"integer"},"merchant_name":{"description":"The clean name shown for it.","title":"Merchant Name","type":"string"},"merchant_pattern":{"description":"The text a description starts with, upper case.","title":"Merchant Pattern","type":"string"},"source":{"description":"`manual`, `learned` (from a person's correction), or `api`.","title":"Source","type":"string"}},"required":["id","merchant_pattern","merchant_name","category_id","confidence","source","created_at"],"title":"MerchantMappingOut","type":"object"},"MergedCounterparty":{"properties":{"key":{"description":"The key it had on its own; pass it to `counterparties.unmerge`.","title":"Key","type":"string"},"name":{"description":"What it was called when it was merged.","title":"Name","type":"string"}},"required":["key","name"],"title":"MergedCounterparty","type":"object"},"MilestoneOutcome":{"properties":{"affordability":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A home's mortgage-calculator verdict, as a rating.","title":"Affordability"},"age":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Age"},"amount":{"$ref":"#/components/schemas/Money"},"chance":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Share of market paths, `0.0000`–`1.0000`, in which it is paid for without the money running out. Null for money arriving and for a milestone switched off.","title":"Chance"},"date":{"format":"date","title":"Date","type":"string"},"is_enabled":{"title":"Is Enabled","type":"boolean"},"kind":{"title":"Kind","type":"string"},"label":{"title":"Label","type":"string"},"milestone_id":{"title":"Milestone Id","type":"integer"},"month":{"description":"Index into `points`: where on the projection it lands.","title":"Month","type":"integer"},"monthly":{"$ref":"#/components/schemas/Money","description":"What it costs (or brings in) each month after."},"net_worth":{"$ref":"#/components/schemas/Money","description":"Median net worth that month."},"rating":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`on_track`, `stretch` or `out_of_reach`.","title":"Rating"},"upfront":{"$ref":"#/components/schemas/Money","description":"What changes hands on the day."}},"required":["milestone_id","kind","label","amount","is_enabled","date","month","age","net_worth","upfront","monthly","chance","rating","affordability"],"title":"MilestoneOutcome","type":"object"},"Money":{"description":"An amount and its currency. ``amount`` is a base-10 string with two\ndecimal places and an optional leading minus sign. Parse it with a\ndecimal type, not a float.","properties":{"amount":{"examples":["1234.50"],"pattern":"^-?\\d+\\.\\d{2}$","title":"Amount","type":"string"},"currency":{"description":"ISO 4217 code.","examples":["USD"],"pattern":"^[A-Z]{3}$","title":"Currency","type":"string"}},"required":["amount","currency"],"title":"Money","type":"object"},"MonthlyReport":{"description":"One month: income and spending by category beside last month and the\nbudget, recurring charges, the biggest expenses, net worth and goals.","properties":{"budgets":{"$ref":"#/components/schemas/ReportBudgetSummary"},"categories":{"description":"Expense categories with activity this month or last, or a plan; biggest first.","items":{"$ref":"#/components/schemas/ReportCategory"},"title":"Categories","type":"array"},"currency":{"description":"The ledger's base currency; every amount is in it.","title":"Currency","type":"string"},"expenses":{"$ref":"#/components/schemas/Money"},"goals":{"items":{"$ref":"#/components/schemas/GoalProgress"},"title":"Goals","type":"array"},"income":{"$ref":"#/components/schemas/Money"},"income_sources":{"items":{"$ref":"#/components/schemas/IncomeSource"},"title":"Income Sources","type":"array"},"is_current":{"description":"The month is still running: figures are month-to-date.","title":"Is Current","type":"boolean"},"is_future":{"description":"The month has not started: everything but the plan is zero.","title":"Is Future","type":"boolean"},"largest_expenses":{"items":{"$ref":"#/components/schemas/LargestExpense"},"title":"Largest Expenses","type":"array"},"month":{"description":"`YYYY-MM`.","title":"Month","type":"string"},"net":{"$ref":"#/components/schemas/Money","description":"`income` − `expenses`."},"net_worth":{"$ref":"#/components/schemas/NetWorthChange"},"previous_expenses":{"$ref":"#/components/schemas/Money"},"previous_income":{"$ref":"#/components/schemas/Money"},"previous_month":{"title":"Previous Month","type":"string"},"previous_net":{"$ref":"#/components/schemas/Money"},"recurring":{"$ref":"#/components/schemas/RecurringSummary"},"savings_rate":{"anyOf":[{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},{"type":"null"}],"description":"`net` / `income`; null when nothing came in.","title":"Savings Rate"}},"required":["month","previous_month","currency","is_current","is_future","income","expenses","net","savings_rate","previous_income","previous_expenses","previous_net","categories","income_sources","budgets","recurring","net_worth","largest_expenses","goals"],"title":"MonthlyReport","type":"object"},"MovedTransaction":{"properties":{"from_id":{"title":"From Id","type":"integer"},"to_id":{"description":"The id the transaction has now (re-posting may replace it).","title":"To Id","type":"integer"}},"required":["from_id","to_id"],"title":"MovedTransaction","type":"object"},"NetIncome":{"properties":{"total":{"$ref":"#/components/schemas/Money"},"values":{"items":{"$ref":"#/components/schemas/Money"},"title":"Values","type":"array"}},"required":["values","total"],"title":"NetIncome","type":"object"},"NetWorth":{"description":"The ledger's net worth today.","properties":{"as_of":{"format":"date","title":"As Of","type":"string"},"assets":{"$ref":"#/components/schemas/Money","description":"Everything the ledger owns, in its base currency."},"change_30d":{"$ref":"#/components/schemas/Money","description":"How much net worth moved over the past 30 days."},"change_30d_percent":{"description":"`change_30d` as a percentage of net worth 30 days ago (`\"4.25\"` is 4.25%). `\"0\"` when there is nothing to compare with.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Change 30D Percent","type":"string"},"liabilities":{"$ref":"#/components/schemas/Money","description":"Everything it owes, positive."},"net_worth":{"$ref":"#/components/schemas/Money","description":"`assets` − `liabilities`."}},"required":["as_of","assets","liabilities","net_worth","change_30d","change_30d_percent"],"title":"NetWorth","type":"object"},"NetWorthBreakdown":{"description":"What the assets and liabilities are made of, by class and account.\nIt adds up to `net_worth.get`.","properties":{"as_of":{"format":"date","title":"As Of","type":"string"},"assets":{"$ref":"#/components/schemas/BreakdownSide"},"currency":{"description":"The ledger's base currency.","title":"Currency","type":"string"},"liabilities":{"$ref":"#/components/schemas/BreakdownSide"}},"required":["as_of","currency","assets","liabilities"],"title":"NetWorthBreakdown","type":"object"},"NetWorthChange":{"properties":{"change":{"$ref":"#/components/schemas/Money"},"end":{"$ref":"#/components/schemas/Money","description":"At the period's end, or today while it is running."},"start":{"$ref":"#/components/schemas/Money","description":"Net worth the night before the period began."}},"required":["start","end","change"],"title":"NetWorthChange","type":"object"},"NetWorthHistory":{"description":"Net worth over time: one point per day that moved it, plus a point\nat `since` carrying the balance in from before the window.","properties":{"currency":{"description":"The ledger's base currency; every amount is in it.","title":"Currency","type":"string"},"points":{"description":"Oldest first.","items":{"$ref":"#/components/schemas/NetWorthPoint"},"title":"Points","type":"array"}},"required":["currency","points"],"title":"NetWorthHistory","type":"object"},"NetWorthPoint":{"properties":{"assets":{"$ref":"#/components/schemas/Money"},"date":{"format":"date","title":"Date","type":"string"},"liabilities":{"$ref":"#/components/schemas/Money","description":"Positive: what is owed."},"value":{"$ref":"#/components/schemas/Money","description":"Net worth at the end of the day."}},"required":["date","value","assets","liabilities"],"title":"NetWorthPoint","type":"object"},"Notification":{"description":"Something the ledger wanted its member to know, once.","properties":{"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"data":{"additionalProperties":true,"description":"Facts behind it, per type (ids, names, dates); amounts are decimal strings. Keys are snake_case.","title":"Data","type":"object"},"id":{"title":"Id","type":"integer"},"read":{"title":"Read","type":"boolean"},"severity":{"description":"`info` or `warning`.","title":"Severity","type":"string"},"title":{"description":"Written in the language the ledger member reads.","title":"Title","type":"string"},"type":{"description":"What happened, e.g. `subscription_renewal`, `large_transaction`, `budget_threshold`. New types are added over time.","title":"Type","type":"string"}},"required":["id","type","severity","title","body","data","read","created_at"],"title":"Notification","type":"object"},"NotificationCategory":{"properties":{"key":{"description":"A category of notifications that can be muted.","title":"Key","type":"string"},"muted":{"title":"Muted","type":"boolean"}},"required":["key","muted"],"title":"NotificationCategory","type":"object"},"NotificationList":{"description":"A page of notifications, newest first.","properties":{"data":{"items":{"$ref":"#/components/schemas/Notification"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"NotificationList","type":"object"},"NotificationPreferences":{"description":"Which kinds of notification the caller gets. Holds in every ledger.","properties":{"alert_emails":{"description":"A low balance, a balance projected to run short and a card payment due also arrive by email, once each. On unless switched off.","title":"Alert Emails","type":"boolean"},"categories":{"description":"Every category, in the app's order. Security notices belong to none and cannot be muted.","items":{"$ref":"#/components/schemas/NotificationCategory"},"title":"Categories","type":"array"},"weekly_digest":{"description":"The Monday summary email is on.","title":"Weekly Digest","type":"boolean"}},"required":["categories","weekly_digest","alert_emails"],"title":"NotificationPreferences","type":"object"},"NotificationPreferencesUpdate":{"description":"Only the fields sent change.","properties":{"alert_emails":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Switch alert emails (a low balance, a shortfall ahead, a payment due) on or off. Muting a category stops its emails too.","title":"Alert Emails"},"categories":{"anyOf":[{"items":{"$ref":"#/components/schemas/CategoryMute"},"maxItems":10,"type":"array"},{"type":"null"}],"description":"Categories to mute or unmute. Categories not listed keep their setting.","title":"Categories"},"timezone":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"description":"With `weekly_digest`: the IANA zone whose Monday morning it is sent on (`Europe/Madrid`). UTC when unknown.","title":"Timezone"},"weekly_digest":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Switch the Monday summary email on or off. On needs the caller's login to have an email address.","title":"Weekly Digest"}},"title":"NotificationPreferencesUpdate","type":"object"},"OfxStatementInfo":{"description":"What an OFX / QFX statement says about itself: check it is the right\naccount before importing.","properties":{"account_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Last4"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The file's own word: `CHECKING`, `SAVINGS`, `CREDITLINE`, …","title":"Account Type"},"balance":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The statement's closing balance, in the statement's currency."},"balance_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Balance Date"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"from_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"From Date"},"to_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"To Date"}},"required":["account_last4","account_type","currency","balance","balance_date","from_date","to_date"],"title":"OfxStatementInfo","type":"object"},"PayBreakdown":{"description":"Where a year's gross pay went, from the stubs on file.","properties":{"bands":{"items":{"$ref":"#/components/schemas/BreakdownBand"},"title":"Bands","type":"array"},"employer_cost":{"$ref":"#/components/schemas/Money"},"employers":{"items":{"$ref":"#/components/schemas/BreakdownRow"},"title":"Employers","type":"array"},"gross":{"$ref":"#/components/schemas/Money"},"imputed":{"$ref":"#/components/schemas/Money"},"latest_pay_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Latest Pay Date"},"mixed_currency":{"description":"True when the year's stubs are in more than one currency. Nothing is converted: the totals are plain sums.","title":"Mixed Currency","type":"boolean"},"months":{"items":{"$ref":"#/components/schemas/BreakdownMonth"},"title":"Months","type":"array"},"net":{"$ref":"#/components/schemas/Money"},"post_tax":{"$ref":"#/components/schemas/Money"},"pre_tax":{"$ref":"#/components/schemas/Money"},"reimbursements":{"$ref":"#/components/schemas/Money"},"reported_ytd_gross":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The employer's own year-to-date gross from the latest stub. It counts every pay period, including ones not uploaded, so the gap to `gross` is what is missing."},"reported_ytd_net":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"stub_count":{"title":"Stub Count","type":"integer"},"taxes":{"$ref":"#/components/schemas/Money"},"year":{"title":"Year","type":"integer"}},"required":["year","mixed_currency","stub_count","gross","pre_tax","taxes","post_tax","imputed","reimbursements","net","employer_cost","bands","employers","months","reported_ytd_gross","reported_ytd_net","latest_pay_date"],"title":"PayBreakdown","type":"object"},"PaydownStatus":{"description":"An extra-payment plan on a loan, measured over one period.","properties":{"extra_paid":{"$ref":"#/components/schemas/Money","description":"`paid_down` beyond `scheduled_principal`, never below zero."},"loan_id":{"title":"Loan Id","type":"integer"},"paid_down":{"$ref":"#/components/schemas/Money","description":"Everything paid to the loan's principal in the period."},"planned":{"$ref":"#/components/schemas/Money","description":"The extra principal planned for the period."},"remaining":{"$ref":"#/components/schemas/Money","description":"`planned` − `extra_paid`."},"scheduled_principal":{"$ref":"#/components/schemas/Money","description":"What the scheduled payment alone puts to principal in a period."}},"required":["loan_id","planned","scheduled_principal","paid_down","extra_paid","remaining"],"title":"PaydownStatus","type":"object"},"PayoffBaseline":{"description":"Each debt paid at its regular payment, with nothing extra and no\nfreed-up payment rolled into the next: what happens with no plan.","properties":{"debt_free_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Debt Free Date"},"months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Months"},"total_interest":{"$ref":"#/components/schemas/Money"}},"required":["debt_free_date","months","total_interest"],"title":"PayoffBaseline","type":"object"},"PayoffDebt":{"properties":{"annual_rate":{"description":"Annual interest rate in percent, as a decimal string.","title":"Annual Rate","type":"string"},"balance":{"$ref":"#/components/schemas/Money"},"kind":{"title":"Kind","type":"string"},"loan_id":{"title":"Loan Id","type":"integer"},"monthly_payment":{"$ref":"#/components/schemas/Money","description":"What goes to this debt each month today, escrow excluded."},"name":{"title":"Name","type":"string"},"payment_estimated":{"description":"No payment is on file, so the usual card minimum was assumed.","title":"Payment Estimated","type":"boolean"}},"required":["loan_id","name","kind","balance","annual_rate","monthly_payment","payment_estimated"],"title":"PayoffDebt","type":"object"},"PayoffPlan":{"description":"Which debt to pay first and what the order is worth, across every\nconfirmed loan still owed.","properties":{"baseline":{"$ref":"#/components/schemas/PayoffBaseline"},"debts":{"items":{"$ref":"#/components/schemas/PayoffDebt"},"title":"Debts","type":"array"},"extra_monthly":{"$ref":"#/components/schemas/Money","description":"The extra put towards debt each month, as asked."},"skipped":{"items":{"$ref":"#/components/schemas/PayoffSkipped"},"title":"Skipped","type":"array"},"strategies":{"items":{"$ref":"#/components/schemas/PayoffStrategy"},"title":"Strategies","type":"array"},"total_balance":{"$ref":"#/components/schemas/Money"},"total_monthly_payment":{"$ref":"#/components/schemas/Money"}},"required":["extra_monthly","total_balance","total_monthly_payment","debts","skipped","baseline","strategies"],"title":"PayoffPlan","type":"object"},"PayoffSkipped":{"properties":{"loan_id":{"title":"Loan Id","type":"integer"},"name":{"title":"Name","type":"string"},"reason":{"description":"Why it was left out: `no_rate` (no interest rate on file).","title":"Reason","type":"string"}},"required":["loan_id","name","reason"],"title":"PayoffSkipped","type":"object"},"PayoffStep":{"properties":{"interest":{"$ref":"#/components/schemas/Money","description":"Interest paid on this debt until then."},"loan_id":{"title":"Loan Id","type":"integer"},"months":{"title":"Months","type":"integer"},"name":{"title":"Name","type":"string"},"payoff_date":{"description":"First of the month this debt reaches zero.","format":"date","title":"Payoff Date","type":"string"}},"required":["loan_id","name","payoff_date","months","interest"],"title":"PayoffStep","type":"object"},"PayoffStrategy":{"properties":{"debt_free_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"Null when the payments never clear the interest.","title":"Debt Free Date"},"interest_saved":{"$ref":"#/components/schemas/Money","description":"Against the baseline. Never negative."},"months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Months"},"months_saved":{"title":"Months Saved","type":"integer"},"steps":{"description":"The debts in the order they are paid off.","items":{"$ref":"#/components/schemas/PayoffStep"},"title":"Steps","type":"array"},"strategy":{"description":"`avalanche` (highest rate first) or `snowball` (smallest balance first).","title":"Strategy","type":"string"},"total_interest":{"$ref":"#/components/schemas/Money"}},"required":["strategy","debt_free_date","months","total_interest","interest_saved","months_saved","steps"],"title":"PayoffStrategy","type":"object"},"Paystub":{"description":"One paycheck and its gross-to-net. Amounts are in the stub's\ncurrency, or the ledger's base currency while it is unread.","properties":{"created_at":{"format":"date-time","title":"Created At","type":"string"},"currency":{"title":"Currency","type":"string"},"employee_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Name"},"employer_cost":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"What the employer paid on top (its payroll taxes and contributions), never deducted from the employee."},"employer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employer Name"},"gross_pay":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"hours":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hours paid, as a decimal string.","title":"Hours"},"id":{"title":"Id","type":"integer"},"imputed_pay":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Taxable benefits added to gross that were never cash."},"lines":{"items":{"$ref":"#/components/schemas/PaystubLine"},"title":"Lines","type":"array"},"mime_type":{"title":"Mime Type","type":"string"},"net_pay":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"original_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Name"},"parse_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the file could not be read at all.","title":"Parse Error"},"parsed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Parsed At"},"pay_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Pay Date"},"period_end":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Period End"},"period_start":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Period Start"},"post_tax_deductions":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"pre_tax_deductions":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"reconcile_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Set when the stub was read but its own totals do not add up.","title":"Reconcile Error"},"reimbursements":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"size_bytes":{"title":"Size Bytes","type":"integer"},"source":{"title":"Source","type":"string"},"status":{"description":"`pending` (being read), `parsed` or `failed` (see `parse_error`).","title":"Status","type":"string"},"taxes":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"ytd_gross_pay":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"ytd_net_pay":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]}},"required":["id","status","source","original_name","mime_type","size_bytes","employer_name","employee_name","period_start","period_end","pay_date","currency","gross_pay","pre_tax_deductions","taxes","post_tax_deductions","imputed_pay","reimbursements","net_pay","ytd_gross_pay","ytd_net_pay","hours","employer_cost","parse_error","reconcile_error","parsed_at","created_at","lines"],"title":"Paystub","type":"object"},"PaystubLine":{"description":"One row of the stub, as printed.","properties":{"account_mask":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Deposit rows: the last digits of the account paid into.","title":"Account Mask"},"amount":{"$ref":"#/components/schemas/Money"},"concept":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the row is, as a stable key (`federal_income_tax`, `regular`). Null when the wording was not recognized.","title":"Concept"},"description":{"description":"Exactly as the employer printed it.","title":"Description","type":"string"},"group":{"description":"The band of the gross-to-net breakdown it belongs to.","title":"Group","type":"string"},"hours":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Decimal string.","title":"Hours"},"id":{"title":"Id","type":"integer"},"kind":{"description":"Which block of the stub it came from: `earning`, `tax`, `deduction`, `deposit`, …","title":"Kind","type":"string"},"line_no":{"title":"Line No","type":"integer"},"rate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pay rate, as a decimal string (up to four places).","title":"Rate"},"ytd_amount":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]}},"required":["id","line_no","kind","description","concept","group","amount","ytd_amount","rate","hours","account_mask"],"title":"PaystubLine","type":"object"},"PaystubList":{"description":"A page of paystubs, newest pay date first; unreadable ones lead.","properties":{"data":{"items":{"$ref":"#/components/schemas/Paystub"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"PaystubList","type":"object"},"PaystubResult":{"properties":{"created_at":{"format":"date-time","title":"Created At","type":"string"},"currency":{"title":"Currency","type":"string"},"duplicate":{"description":"True when this turned out to be a paycheck already on file: the one already held is returned and the new copy was dropped.","title":"Duplicate","type":"boolean"},"employee_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Name"},"employer_cost":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"What the employer paid on top (its payroll taxes and contributions), never deducted from the employee."},"employer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employer Name"},"gross_pay":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"hours":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Hours paid, as a decimal string.","title":"Hours"},"id":{"title":"Id","type":"integer"},"imputed_pay":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Taxable benefits added to gross that were never cash."},"lines":{"items":{"$ref":"#/components/schemas/PaystubLine"},"title":"Lines","type":"array"},"mime_type":{"title":"Mime Type","type":"string"},"net_pay":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"original_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Name"},"parse_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the file could not be read at all.","title":"Parse Error"},"parsed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Parsed At"},"pay_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Pay Date"},"period_end":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Period End"},"period_start":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Period Start"},"post_tax_deductions":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"pre_tax_deductions":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"reconcile_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Set when the stub was read but its own totals do not add up.","title":"Reconcile Error"},"reimbursements":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"size_bytes":{"title":"Size Bytes","type":"integer"},"source":{"title":"Source","type":"string"},"status":{"description":"`pending` (being read), `parsed` or `failed` (see `parse_error`).","title":"Status","type":"string"},"taxes":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"ytd_gross_pay":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"ytd_net_pay":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]}},"required":["id","status","source","original_name","mime_type","size_bytes","employer_name","employee_name","period_start","period_end","pay_date","currency","gross_pay","pre_tax_deductions","taxes","post_tax_deductions","imputed_pay","reimbursements","net_pay","ytd_gross_pay","ytd_net_pay","hours","employer_cost","parse_error","reconcile_error","parsed_at","created_at","lines","duplicate"],"title":"PaystubResult","type":"object"},"PaystubUpload":{"description":"What one uploaded file became. A payroll export is often a year of\npaychecks in one PDF, so it may be several paystubs.","properties":{"paystubs":{"description":"Newest pay date first.","items":{"$ref":"#/components/schemas/PaystubResult"},"title":"Paystubs","type":"array"},"reading":{"description":"How many are still `pending`, being read in the background. Poll `paystubs.get` until it is 0.","title":"Reading","type":"integer"},"split":{"description":"True when the file held more than one paycheck.","title":"Split","type":"boolean"}},"required":["paystubs","reading","split"],"title":"PaystubUpload","type":"object"},"PeriodAmountUpdate":{"properties":{"amount":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"description":"That period's own amount, or null to return it to the budget's default.","examples":["600.00"],"title":"Amount"},"period":{"description":"The period to plan. A budget period key: `YYYY-MM` while the ledger budgets by calendar month, otherwise the ISO date (`YYYY-MM-DD`) of the period's first day. As input either form is accepted, and any day names the period it falls in.","pattern":"^\\d{4}-\\d{2}(-\\d{2})?$","title":"Period","type":"string"}},"required":["period","amount"],"title":"PeriodAmountUpdate","type":"object"},"PlaidItemList":{"description":"A page of bank connections, in the order they were linked.","properties":{"data":{"items":{"$ref":"#/components/schemas/PlaidItemOut"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"PlaidItemList","type":"object"},"PlaidItemOut":{"description":"One bank login, feeding one or more of the ledger's accounts.","properties":{"bank_refreshed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"When the data provider last reached the bank itself for this connection, new data or not; for a connection with investment accounts, the older of its transactions and its holdings. A sync can succeed while this stays old: the provider then hands back what it last fetched.","title":"Bank Refreshed At"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the last sync failed, a stable code.","title":"Error Code"},"holdings_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why fetching the investment positions failed, a stable code; set exactly when `holdings_failing_since` is.","title":"Holdings Error Code"},"holdings_failing_since":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"When fetching this connection's investment positions started failing while its syncs still succeed, or null while it works (or the connection has no investment account). Its positions are as of then.","title":"Holdings Failing Since"},"institution_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The ledger's institution (the bank) it belongs to.","title":"Institution Id"},"institution_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Institution Name"},"investment_transactions_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why fetching the investment activity failed, a stable code; set exactly when `investment_transactions_failing_since` is.","title":"Investment Transactions Error Code"},"investment_transactions_failing_since":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"When fetching this connection's investment activity (trades, dividends, deposits, fees) started failing while its syncs still succeed, or null while it works (or the connection has no investment account). Activity after then may be missing from the ledger.","title":"Investment Transactions Failing Since"},"last_synced_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"When our last sync succeeded.","title":"Last Synced At"},"liabilities_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why fetching the card and loan details failed, a stable code; set exactly when `liabilities_failing_since` is.","title":"Liabilities Error Code"},"liabilities_failing_since":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"When fetching this connection's card and loan details (due date, minimum payment, statement balance, rates) started failing while its syncs still succeed, or null while it works (or the connection has no card or loan). Those details are as of then.","title":"Liabilities Failing Since"},"new_accounts_available_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"When the bank said it has accounts this connection does not share yet (usually a card opened after it was linked), or null when none are waiting. Their activity is not in the ledger until a person adds them in the app, which only they can do: it happens in the bank's own sign-in window.","title":"New Accounts Available At"},"plaid_item_id":{"description":"Plaid's id for the connection. Pass it to `plaid_items.sync`.","title":"Plaid Item Id","type":"string"},"stale":{"description":"True when the connection should be syncing (`active` or `error`) but has delivered no fresh data for over two days: its balances and transactions are out of date. `stale_reason` says which fix applies.","title":"Stale","type":"boolean"},"stale_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why it is stale, or null when it is not. `sync_failing`: our syncs are not getting through; try `plaid_items.sync`, and if it keeps failing `error_code` says why. `holdings_failing`: syncs bring the activity in but fetching the investment positions has failed since `holdings_failing_since`, so their values are frozen; try `plaid_items.sync`, and `holdings_error_code` says why. `investment_transactions_failing` and `liabilities_failing` are the same for the investment activity (trades, dividends, deposits; since `investment_transactions_failing_since`) and for cards' and loans' due dates, minimum payments and rates (since `liabilities_failing_since`). `bank_silent`: syncs succeed but the bank has not answered since `bank_refreshed_at`, so another sync will not help; it usually clears by itself, and a person can reconnect the bank in the app.","title":"Stale Reason"},"status":{"description":"`active`, `error` (the last sync failed; the next one may work), `login_required` (a person must sign in again in the app) or `revoked`.","title":"Status","type":"string"}},"required":["plaid_item_id","institution_name","institution_id","status","error_code","last_synced_at","bank_refreshed_at","stale","stale_reason","holdings_failing_since","holdings_error_code","investment_transactions_failing_since","investment_transactions_error_code","liabilities_failing_since","liabilities_error_code","new_accounts_available_at","created_at"],"title":"PlaidItemOut","type":"object"},"PlaidSync":{"properties":{"full":{"default":false,"description":"Pull the whole history again instead of only what is new. Rows already in the ledger are not duplicated.","title":"Full","type":"boolean"},"plaid_item_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"description":"Sync only this connection (from `plaid_items.list`). Omitted, every one is synced.","title":"Plaid Item Id"}},"title":"PlaidSync","type":"object"},"PlanDebt":{"properties":{"account_id":{"description":"The liability account.","title":"Account Id","type":"integer"},"annual_rate_pct":{"title":"Annual Rate Pct","type":"string"},"balance":{"$ref":"#/components/schemas/Money"},"monthly_payment":{"$ref":"#/components/schemas/Money"},"name":{"title":"Name","type":"string"}},"required":["account_id","name","balance","annual_rate_pct","monthly_payment"],"title":"PlanDebt","type":"object"},"PlanMilestone":{"description":"Something the household can see coming, on the projection.","properties":{"amount":{"$ref":"#/components/schemas/Money","description":"A price or a windfall in that day's money; a monthly cost or change in earnings in today's money. Negative only for an income cut."},"ends_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"For `income_change` and `recurring_expense` only.","title":"Ends On"},"id":{"title":"Id","type":"integer"},"is_enabled":{"description":"Switched off: kept, but left out of the projection.","title":"Is Enabled","type":"boolean"},"kind":{"description":"One of: `home_purchase`, `vehicle_purchase`, `big_purchase`, `windfall`, `income_change`, `recurring_expense`, `time_off`.","title":"Kind","type":"string"},"label":{"title":"Label","type":"string"},"starts_on":{"format":"date","title":"Starts On","type":"string"},"terms":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"},{"type":"null"}]},"description":"The kind's own terms; every one is optional and has a default. `home_purchase`: `down_payment_pct`, `mortgage_rate_pct`, `term_years`, `maintenance_pct`, `hoa_monthly`, `replaces_housing` (bool), `appreciation_pct` (null: the plan's property growth). `vehicle_purchase`: `down_payment_pct`, `loan_rate_pct`, `term_years`, `depreciation_pct`. Other kinds take none. Numbers other than `term_years` are decimal strings.","title":"Terms","type":"object"}},"required":["id","kind","label","starts_on","ends_on","amount","terms","is_enabled"],"title":"PlanMilestone","type":"object"},"PlanMilestoneCreate":{"properties":{"amount":{"description":"Decimal string. Positive, except an `income_change`, which may be negative (a cut) but not zero.","examples":["650000.00"],"pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","title":"Amount","type":"string"},"ends_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"For `income_change` and `recurring_expense` only.","title":"Ends On"},"is_enabled":{"default":true,"title":"Is Enabled","type":"boolean"},"kind":{"description":"One of: `home_purchase`, `vehicle_purchase`, `big_purchase`, `windfall`, `income_change`, `recurring_expense`, `time_off`.","title":"Kind","type":"string"},"label":{"maxLength":120,"minLength":1,"title":"Label","type":"string"},"starts_on":{"description":"This month or later.","format":"date","title":"Starts On","type":"string"},"terms":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"},{"type":"null"}]},"description":"The kind's own terms; every one is optional and has a default. `home_purchase`: `down_payment_pct`, `mortgage_rate_pct`, `term_years`, `maintenance_pct`, `hoa_monthly`, `replaces_housing` (bool), `appreciation_pct` (null: the plan's property growth). `vehicle_purchase`: `down_payment_pct`, `loan_rate_pct`, `term_years`, `depreciation_pct`. Other kinds take none. Numbers other than `term_years` are decimal strings.","title":"Terms","type":"object"}},"required":["kind","label","starts_on","amount"],"title":"PlanMilestoneCreate","type":"object"},"PlanMilestoneList":{"description":"A page of milestones, by id.","properties":{"data":{"items":{"$ref":"#/components/schemas/PlanMilestone"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"PlanMilestoneList","type":"object"},"PlanMilestoneUpdate":{"description":"Only the fields sent change. `terms`, when sent, replaces them all.","properties":{"amount":{"anyOf":[{"pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"title":"Amount"},"ends_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Ends On"},"is_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Enabled"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"label":{"anyOf":[{"maxLength":120,"minLength":1,"type":"string"},{"type":"null"}],"title":"Label"},"starts_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Starts On"},"terms":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"},{"type":"null"}]},"type":"object"},{"type":"null"}],"description":"The kind's own terms; every one is optional and has a default. `home_purchase`: `down_payment_pct`, `mortgage_rate_pct`, `term_years`, `maintenance_pct`, `hoa_monthly`, `replaces_housing` (bool), `appreciation_pct` (null: the plan's property growth). `vehicle_purchase`: `down_payment_pct`, `loan_rate_pct`, `term_years`, `depreciation_pct`. Other kinds take none. Numbers other than `term_years` are decimal strings.","title":"Terms"}},"title":"PlanMilestoneUpdate","type":"object"},"PlanOut":{"description":"The plan's settings beside today's starting point. Milestones are\nlisted by `plan_milestones.list`, the forecast by `plan.projection`.","properties":{"settings":{"$ref":"#/components/schemas/PlanSettings"},"starting_point":{"$ref":"#/components/schemas/StartingPoint"}},"required":["settings","starting_point"],"title":"PlanOut","type":"object"},"PlanSettings":{"description":"The assumptions the projection runs on.","properties":{"birth_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Ages on the projection count from it. Null until set.","title":"Birth Year"},"expected_return_pct":{"description":"Mean yearly return on investments.","title":"Expected Return Pct","type":"string"},"income_growth_rate_pct":{"title":"Income Growth Rate Pct","type":"string"},"inflation_rate_pct":{"title":"Inflation Rate Pct","type":"string"},"monthly_income_override":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"After-tax income per month to plan with instead of the ledger's average."},"monthly_spending_override":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Spending per month to plan with instead of the ledger's average."},"plan_to_age":{"description":"How far the projection runs.","title":"Plan To Age","type":"integer"},"property_growth_rate_pct":{"title":"Property Growth Rate Pct","type":"string"},"retirement_age":{"title":"Retirement Age","type":"integer"},"retirement_income_monthly":{"$ref":"#/components/schemas/Money","description":"Pension or social security per month, in today's money."},"retirement_spending_pct":{"description":"Spending in retirement, as a percentage of today's.","title":"Retirement Spending Pct","type":"string"},"return_volatility_pct":{"description":"Yearly standard deviation of that return.","title":"Return Volatility Pct","type":"string"}},"required":["birth_year","retirement_age","plan_to_age","monthly_income_override","monthly_spending_override","retirement_spending_pct","retirement_income_monthly","expected_return_pct","return_volatility_pct","inflation_rate_pct","income_growth_rate_pct","property_growth_rate_pct"],"title":"PlanSettings","type":"object"},"PlanUpdate":{"description":"Only the fields sent change. `null` clears a nullable field.","properties":{"birth_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Birth Year"},"expected_return_pct":{"anyOf":[{"pattern":"^-?\\d{1,3}(\\.\\d{1,3})?$","type":"string"},{"type":"null"}],"title":"Expected Return Pct"},"income_growth_rate_pct":{"anyOf":[{"pattern":"^-?\\d{1,3}(\\.\\d{1,3})?$","type":"string"},{"type":"null"}],"title":"Income Growth Rate Pct"},"inflation_rate_pct":{"anyOf":[{"pattern":"^-?\\d{1,3}(\\.\\d{1,3})?$","type":"string"},{"type":"null"}],"title":"Inflation Rate Pct"},"monthly_income_override":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"title":"Monthly Income Override"},"monthly_spending_override":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"title":"Monthly Spending Override"},"plan_to_age":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"After `retirement_age`.","title":"Plan To Age"},"property_growth_rate_pct":{"anyOf":[{"pattern":"^-?\\d{1,3}(\\.\\d{1,3})?$","type":"string"},{"type":"null"}],"title":"Property Growth Rate Pct"},"retirement_age":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retirement Age"},"retirement_income_monthly":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"title":"Retirement Income Monthly"},"retirement_spending_pct":{"anyOf":[{"pattern":"^-?\\d{1,3}(\\.\\d{1,3})?$","type":"string"},{"type":"null"}],"title":"Retirement Spending Pct"},"return_volatility_pct":{"anyOf":[{"pattern":"^-?\\d{1,3}(\\.\\d{1,3})?$","type":"string"},{"type":"null"}],"title":"Return Volatility Pct"}},"title":"PlanUpdate","type":"object"},"Portfolio":{"description":"The investment portfolio as a whole, valued in the ledger's base\ncurrency. Positions are listed by `positions.list`.","properties":{"accounts":{"description":"The accounts holding it, largest first.","items":{"$ref":"#/components/schemas/PortfolioAccount"},"title":"Accounts","type":"array"},"allocation":{"description":"By security type (`equity`, `etf`, `mutual fund`, …); largest first.","items":{"$ref":"#/components/schemas/Slice"},"title":"Allocation","type":"array"},"alternatives_value":{"$ref":"#/components/schemas/Money","description":"Documented alternative investments (private equity, collectibles, …)."},"as_of":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"The latest date an institution priced any holding.","title":"As Of"},"asset_classes":{"description":"`stocks`, `fixed_income`, `cash`, `crypto`, `alternatives`; largest first.","items":{"$ref":"#/components/schemas/Slice"},"title":"Asset Classes","type":"array"},"combined_value":{"$ref":"#/components/schemas/Money","description":"`total_value` + `alternatives_value`."},"currency":{"description":"The ledger's base currency; every amount is in it.","title":"Currency","type":"string"},"day_return":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Today's move, summed over the positions the market feed prices. Null until the feed has a previous close for one of them."},"diversification":{"$ref":"#/components/schemas/Diversification"},"tax_treatments":{"description":"By tax treatment of the account; largest first.","items":{"$ref":"#/components/schemas/Slice"},"title":"Tax Treatments","type":"array"},"total_cost_basis":{"$ref":"#/components/schemas/Money"},"total_value":{"$ref":"#/components/schemas/Money","description":"What the securities are worth."},"unrealized_gain":{"$ref":"#/components/schemas/Money","description":"Value less cost, over the positions that carry a cost basis."},"unrealized_gain_percent":{"pattern":"^-?\\d+(\\.\\d+)?$","title":"Unrealized Gain Percent","type":"string"}},"required":["currency","as_of","total_value","total_cost_basis","unrealized_gain","unrealized_gain_percent","day_return","alternatives_value","combined_value","asset_classes","allocation","accounts","tax_treatments","diversification"],"title":"Portfolio","type":"object"},"PortfolioAccount":{"properties":{"account_id":{"title":"Account Id","type":"integer"},"name":{"title":"Name","type":"string"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`brokerage`, `ira`, `roth_ira`, `401k`, `hsa`, …","title":"Role"},"share":{"description":"Share of the holdings' value, 0–1.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Share","type":"string"},"tax_treatment":{"description":"`taxable`, `tax_deferred` or `tax_free`.","title":"Tax Treatment","type":"string"},"value":{"$ref":"#/components/schemas/Money"}},"required":["account_id","name","role","tax_treatment","value","share"],"title":"PortfolioAccount","type":"object"},"Position":{"description":"A security held, summed across the accounts that hold it.","properties":{"cost_basis":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Null when an institution did not report one."},"day_change_percent":{"anyOf":[{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},{"type":"null"}],"title":"Day Change Percent"},"day_return":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"What today's move did to the position."},"gain":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"`value` − `cost_basis`."},"gain_percent":{"anyOf":[{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},{"type":"null"}],"title":"Gain Percent"},"is_estimate":{"description":"The value is the cost basis standing in for a market value.","title":"Is Estimate","type":"boolean"},"last_price":{"anyOf":[{"$ref":"#/components/schemas/UnitPrice"},{"type":"null"}],"description":"The feed's latest daily close."},"last_price_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Last Price Date"},"name":{"title":"Name","type":"string"},"previous_close":{"anyOf":[{"$ref":"#/components/schemas/UnitPrice"},{"type":"null"}]},"quantity":{"description":"Shares or units held.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Quantity","type":"string"},"security_type":{"description":"`equity`, `etf`, `mutual fund`, `fixed income`, `cash`, `cryptocurrency`, …","title":"Security Type","type":"string"},"symbol":{"description":"The ticker, as `positions.get` takes it.","title":"Symbol","type":"string"},"value":{"$ref":"#/components/schemas/Money"},"weight":{"description":"Share of the list's total value, 0–1.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Weight","type":"string"}},"required":["symbol","name","security_type","quantity","value","cost_basis","gain","gain_percent","weight","is_estimate","last_price","last_price_date","previous_close","day_change_percent","day_return"],"title":"Position","type":"object"},"PositionAccount":{"properties":{"account_id":{"title":"Account Id","type":"integer"},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mask"},"name":{"title":"Name","type":"string"},"quantity":{"pattern":"^-?\\d+(\\.\\d+)?$","title":"Quantity","type":"string"},"share":{"description":"This account's share of the position, 0–1.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Share","type":"string"},"value":{"$ref":"#/components/schemas/Money"}},"required":["account_id","name","mask","quantity","value","share"],"title":"PositionAccount","type":"object"},"PositionDetail":{"description":"One position: what the ledger holds of it, where, and what the market\ndid to it over the past year.","properties":{"accounts":{"description":"Where it is held, largest first.","items":{"$ref":"#/components/schemas/PositionAccount"},"title":"Accounts","type":"array"},"average_cost":{"anyOf":[{"$ref":"#/components/schemas/UnitPrice"},{"type":"null"}],"description":"Cost basis per share."},"cost_basis":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"currency":{"description":"The ledger's base currency; the position's amounts are in it.","title":"Currency","type":"string"},"day_return":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"gain":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"gain_percent":{"anyOf":[{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},{"type":"null"}],"title":"Gain Percent"},"history":{"description":"A year of daily closes, oldest first.","items":{"$ref":"#/components/schemas/PricePoint"},"title":"History","type":"array"},"is_estimate":{"title":"Is Estimate","type":"boolean"},"name":{"title":"Name","type":"string"},"quantity":{"pattern":"^-?\\d+(\\.\\d+)?$","title":"Quantity","type":"string"},"quote":{"$ref":"#/components/schemas/Quote"},"security_type":{"title":"Security Type","type":"string"},"stats":{"$ref":"#/components/schemas/Stats"},"symbol":{"title":"Symbol","type":"string"},"value":{"$ref":"#/components/schemas/Money"},"weight":{"description":"Share of the whole portfolio, 0–1.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Weight","type":"string"}},"required":["symbol","name","security_type","currency","quantity","value","cost_basis","average_cost","gain","gain_percent","weight","day_return","is_estimate","accounts","quote","stats","history"],"title":"PositionDetail","type":"object"},"PositionList":{"description":"A page of positions, in symbol order.","properties":{"data":{"items":{"$ref":"#/components/schemas/Position"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"PositionList","type":"object"},"PostingRuleList":{"description":"The posting rules.","properties":{"data":{"items":{"$ref":"#/components/schemas/PostingRuleOut"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"PostingRuleList","type":"object"},"PostingRuleOut":{"description":"How an event of one type becomes a journal entry: which role is\ndebited and which credited. The same for every ledger.","properties":{"credit_account_role":{"title":"Credit Account Role","type":"string"},"debit_account_role":{"description":"`source`, `category` or `other`: the event's own account, its category, or the account on the other end.","title":"Debit Account Role","type":"string"},"event_type":{"title":"Event Type","type":"string"},"id":{"title":"Id","type":"integer"},"is_active":{"title":"Is Active","type":"boolean"},"priority":{"description":"Higher wins when two rules fit.","title":"Priority","type":"integer"},"source_account_role":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only for events on accounts with this role (`checking`, `credit_card`, …); null for any.","title":"Source Account Role"}},"required":["id","event_type","source_account_role","debit_account_role","credit_account_role","priority","is_active"],"title":"PostingRuleOut","type":"object"},"PricePoint":{"properties":{"date":{"format":"date","title":"Date","type":"string"},"value":{"$ref":"#/components/schemas/UnitPrice","description":"The day's close."}},"required":["date","value"],"title":"PricePoint","type":"object"},"ProjectBudget":{"description":"A budget for a project, measured from the transactions carrying its tag.","properties":{"amount":{"$ref":"#/components/schemas/Money","description":"The budget for the whole project."},"end_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"Null: open-ended.","title":"End Date"},"id":{"title":"Id","type":"integer"},"is_current":{"description":"Today is inside the window.","title":"Is Current","type":"boolean"},"name":{"title":"Name","type":"string"},"remaining":{"$ref":"#/components/schemas/Money","description":"`amount` − `spent`. Negative is over budget."},"spent":{"$ref":"#/components/schemas/Money","description":"Tagged expenses inside the window, refunds netted off."},"start_date":{"format":"date","title":"Start Date","type":"string"},"tag_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag Color"},"tag_id":{"description":"The tag that marks this project's transactions.","title":"Tag Id","type":"integer"},"tag_name":{"title":"Tag Name","type":"string"},"transaction_count":{"description":"How many tagged transactions count towards it.","title":"Transaction Count","type":"integer"}},"required":["id","name","tag_id","tag_name","tag_color","amount","start_date","end_date","spent","remaining","transaction_count","is_current"],"title":"ProjectBudget","type":"object"},"ProjectBudgetCreate":{"properties":{"amount":{"description":"Decimal string, at most two decimal places.","examples":["2500.00"],"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","title":"Amount","type":"string"},"end_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"Omit for an open-ended project.","title":"End Date"},"name":{"maxLength":80,"minLength":1,"title":"Name","type":"string"},"start_date":{"format":"date","title":"Start Date","type":"string"},"tag":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"description":"The name of the tag that marks the project's transactions. Created if the ledger has no tag by that name (case-insensitively). Defaults to `name`. A tag budgets one project at most.","title":"Tag"}},"required":["name","amount","start_date"],"title":"ProjectBudgetCreate","type":"object"},"ProjectBudgetList":{"description":"A page of project budgets, by id.","properties":{"data":{"items":{"$ref":"#/components/schemas/ProjectBudget"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"ProjectBudgetList","type":"object"},"ProjectBudgetUpdate":{"description":"Only the fields sent change. `end_date: null` makes it open-ended.","properties":{"amount":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"title":"Amount"},"end_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"End Date"},"name":{"anyOf":[{"maxLength":80,"minLength":1,"type":"string"},{"type":"null"}],"title":"Name"},"start_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Start Date"},"tag":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"description":"See `ProjectBudgetCreate.tag`.","title":"Tag"}},"title":"ProjectBudgetUpdate","type":"object"},"Projection":{"description":"Projected net worth, month by month, over many market paths.","properties":{"birth_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Birth Year"},"headline_age":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Headline Age"},"headline_date":{"format":"date","title":"Headline Date","type":"string"},"headline_net_worth":{"$ref":"#/components/schemas/Money","description":"Median net worth at retirement, or at the end of the plan with no retirement age to stand on."},"milestones":{"items":{"$ref":"#/components/schemas/MilestoneOutcome"},"title":"Milestones","type":"array"},"monthly_housing":{"$ref":"#/components/schemas/Money"},"monthly_income":{"$ref":"#/components/schemas/Money","description":"What the projection ran on, after the plan's overrides."},"monthly_spending":{"$ref":"#/components/schemas/Money"},"paths":{"description":"How many market paths were simulated.","title":"Paths","type":"integer"},"points":{"description":"One per month, from this month to the plan's end.","items":{"$ref":"#/components/schemas/ProjectionPoint"},"title":"Points","type":"array"},"retirement":{"anyOf":[{"$ref":"#/components/schemas/RetirementOutcome"},{"type":"null"}]},"runs_out_age":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Runs Out Age"},"runs_out_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Index into `points` where the median path runs out of money.","title":"Runs Out Month"},"underwater":{"description":"Debts whose payment never covers their interest, carried at their balance.","items":{"type":"string"},"title":"Underwater","type":"array"}},"required":["birth_year","headline_net_worth","headline_age","headline_date","points","milestones","retirement","monthly_income","monthly_spending","monthly_housing","underwater","paths","runs_out_month","runs_out_age"],"title":"Projection","type":"object"},"ProjectionPoint":{"description":"Net worth one month out: the median path and the edges of three ranges.","properties":{"age":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Age"},"assets":{"$ref":"#/components/schemas/Money","description":"Owned outside cash and investments (the same on every path)."},"date":{"format":"date","title":"Date","type":"string"},"debts":{"$ref":"#/components/schemas/Money","description":"Owed (the same on every path)."},"high_50":{"$ref":"#/components/schemas/Money","description":"The 75th percentile."},"high_80":{"$ref":"#/components/schemas/Money","description":"The 90th percentile."},"high_95":{"$ref":"#/components/schemas/Money","description":"The 97.5th percentile."},"inflation_factor":{"description":"Divide an amount by this for today's money.","title":"Inflation Factor","type":"string"},"liquid":{"$ref":"#/components/schemas/Money","description":"Median of cash plus investments."},"low_50":{"$ref":"#/components/schemas/Money","description":"The 25th percentile."},"low_80":{"$ref":"#/components/schemas/Money","description":"The 10th percentile."},"low_95":{"$ref":"#/components/schemas/Money","description":"The 2.5th percentile."},"median":{"$ref":"#/components/schemas/Money"}},"required":["date","age","median","low_50","high_50","low_80","high_80","low_95","high_95","assets","debts","liquid","inflation_factor"],"title":"ProjectionPoint","type":"object"},"Property":{"description":"A home or other real estate the household owns.","properties":{"address":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The address on one line.","title":"Address"},"address_line":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"equity":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Value minus the mortgage. Null unless both are known."},"estimated_value":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"What it is worth. Null when nobody has said."},"excluded_from_totals":{"description":"Left out of net worth, with its mortgage. Its value is not posted to the ledger.","title":"Excluded From Totals","type":"boolean"},"hidden":{"description":"Hidden from the app's lists and map; still counted.","title":"Hidden","type":"boolean"},"id":{"title":"Id","type":"integer"},"label":{"title":"Label","type":"string"},"lat":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Latitude in degrees, as a decimal string.","title":"Lat"},"lng":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Longitude in degrees, as a decimal string.","title":"Lng"},"mortgage":{"anyOf":[{"$ref":"#/components/schemas/PropertyMortgage"},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"State, province or region.","title":"Region"},"source":{"description":"`manual` or `inferred` (found from a mortgage).","title":"Source","type":"string"},"status":{"description":"`suggested` (found from a mortgage, not yet reviewed), `confirmed` or `dismissed`.","title":"Status","type":"string"},"value_age_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Days since `valued_at`.","title":"Value Age Days"},"value_is_stale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"The value is over a year old. Null when it was never dated: not fresh, unknown.","title":"Value Is Stale"},"value_source":{"description":"Where the value came from: `user`, `zillow` (a Zestimate), `mortgage_origination` (the loan's original principal, a stand-in) or `none`.","title":"Value Source","type":"string"},"valued_at":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"The date the value is true for.","title":"Valued At"},"zillow_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Zillow's page for the property. Show it beside a Zestimate, as Zillow requires.","title":"Zillow Url"}},"required":["id","label","address","address_line","city","region","postal_code","country","lat","lng","estimated_value","value_source","valued_at","value_age_days","value_is_stale","zillow_url","source","status","hidden","excluded_from_totals","mortgage","equity"],"title":"Property","type":"object"},"PropertyCreate":{"description":"A property the household owns. Its address is geocoded unless\n`lat` and `lng` are sent.","properties":{"address_line":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"title":"Address Line"},"city":{"anyOf":[{"maxLength":120,"type":"string"},{"type":"null"}],"title":"City"},"country":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"title":"Country"},"estimated_value":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"description":"What it is worth, as a decimal string. Posted to the ledger.","title":"Estimated Value"},"label":{"description":"What to call it: `Lake house`.","maxLength":200,"minLength":1,"title":"Label","type":"string"},"lat":{"anyOf":[{"pattern":"^-?\\d{1,3}(\\.\\d{1,6})?$","type":"string"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"pattern":"^-?\\d{1,3}(\\.\\d{1,6})?$","type":"string"},{"type":"null"}],"title":"Lng"},"postal_code":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"title":"Postal Code"},"region":{"anyOf":[{"maxLength":120,"type":"string"},{"type":"null"}],"title":"Region"},"valued_at":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"The date the value is from. Defaults to today when a value is sent.","title":"Valued At"}},"required":["label"],"title":"PropertyCreate","type":"object"},"PropertyList":{"description":"A page of properties, in id order.","properties":{"data":{"items":{"$ref":"#/components/schemas/Property"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"PropertyList","type":"object"},"PropertyMortgage":{"properties":{"account_id":{"description":"The mortgage's liability account (see `accounts.list`).","title":"Account Id","type":"integer"},"balance":{"$ref":"#/components/schemas/Money","description":"What is owed on it today, positive while owed."},"name":{"title":"Name","type":"string"}},"required":["account_id","name","balance"],"title":"PropertyMortgage","type":"object"},"PropertyUpdate":{"description":"Only the fields sent change. None of them can be cleared.","properties":{"address_line":{"maxLength":300,"title":"Address Line","type":"string"},"city":{"maxLength":120,"title":"City","type":"string"},"country":{"maxLength":60,"title":"Country","type":"string"},"estimated_value":{"description":"A new value. Dated today unless `valued_at` is sent with it.","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","title":"Estimated Value","type":"string"},"excluded_from_totals":{"description":"Leave it, and its mortgage, out of net worth.","title":"Excluded From Totals","type":"boolean"},"hidden":{"title":"Hidden","type":"boolean"},"label":{"maxLength":200,"minLength":1,"title":"Label","type":"string"},"postal_code":{"maxLength":20,"title":"Postal Code","type":"string"},"region":{"maxLength":120,"title":"Region","type":"string"},"status":{"description":"One of `confirmed`, `dismissed`, `suggested`.","title":"Status","type":"string"},"valued_at":{"description":"The date the value is from; sent alone, it re-dates the current one.","format":"date","title":"Valued At","type":"string"}},"title":"PropertyUpdate","type":"object"},"Pulse":{"description":"Today's money pulse. Personal money only: business accounts and\ntransactions are left out of every term. All amounts are in the\nledger's base currency.","properties":{"bill_count":{"title":"Bill Count","type":"integer"},"bills":{"description":"The soonest few of those bills, soonest first.","items":{"$ref":"#/components/schemas/PulseBill"},"title":"Bills","type":"array"},"card_balance":{"$ref":"#/components/schemas/Money","description":"Owed on personal credit cards."},"cash_left":{"$ref":"#/components/schemas/Money","description":"`checking` − `upcoming_bills` − `card_balance`."},"checking":{"$ref":"#/components/schemas/Money","description":"Cash in personal checking accounts counted in totals."},"cycle_left":{"$ref":"#/components/schemas/Money","description":"`income` − `set_aside` − `spent_this_cycle` − `upcoming_bills`."},"cycle_start":{"description":"The last payday, or the period's first day.","format":"date","title":"Cycle Start","type":"string"},"days_left":{"description":"Days the money has to last, today included; at least 1.","title":"Days Left","type":"integer"},"has_cash":{"description":"False when there is no personal checking account to measure; the other figures then mean nothing.","title":"Has Cash","type":"boolean"},"has_income":{"description":"False when there is no income to plan around; `safe_to_spend` is then not a budget and should not be shown as one.","title":"Has Income","type":"boolean"},"horizon":{"description":"`payday` or `period_end`: what the cycle runs to.","title":"Horizon","type":"string"},"horizon_date":{"description":"The next payday (exclusive), or the budget period's last day (inclusive).","format":"date","title":"Horizon Date","type":"string"},"income":{"$ref":"#/components/schemas/Money","description":"Income expected over the whole cycle."},"income_source":{"description":"`paychecks` or `average`: detected paychecks, or the typical month of the last three.","title":"Income Source","type":"string"},"limited_by":{"description":"`cash_flow` or `cash`: which of the two limits it stopped at.","title":"Limited By","type":"string"},"received_since":{"$ref":"#/components/schemas/Money"},"safe_to_spend":{"$ref":"#/components/schemas/Money","description":"The smaller of `cycle_left` and `cash_left`. Negative when the cycle is already over budget, or bills and cards claim more than is in checking."},"safe_today":{"$ref":"#/components/schemas/Money","description":"`safe_to_spend` over `days_left`, never below zero."},"save_share":{"description":"The default share of income set aside, from 0 to 1, as a decimal string.","pattern":"^\\d+(\\.\\d+)?$","title":"Save Share","type":"string"},"set_aside":{"$ref":"#/components/schemas/Money","description":"Put aside for savings this cycle."},"set_aside_source":{"description":"`share` or `goals`: a share of income, or what the savings goals need, whichever is more.","title":"Set Aside Source","type":"string"},"since":{"description":"Yesterday: where `spent_since` and `received_since` start.","format":"date","title":"Since","type":"string"},"spent_since":{"$ref":"#/components/schemas/Money"},"spent_this_cycle":{"$ref":"#/components/schemas/Money","description":"Personal spending since the cycle began."},"upcoming_bills":{"$ref":"#/components/schemas/Money","description":"Every bill expected before the horizon."}},"required":["has_cash","has_income","safe_to_spend","safe_today","limited_by","horizon","horizon_date","cycle_start","days_left","income","income_source","set_aside","set_aside_source","save_share","spent_this_cycle","cycle_left","checking","card_balance","upcoming_bills","cash_left","bill_count","bills","since","spent_since","received_since"],"title":"Pulse","type":"object"},"PulseBill":{"properties":{"amount":{"$ref":"#/components/schemas/Money","description":"The usual amount, which is what is expected next."},"date":{"description":"When it is expected.","format":"date","title":"Date","type":"string"},"late":{"description":"The date has passed and it has not arrived; still counted.","title":"Late","type":"boolean"},"merchant_key":{"description":"The recurring charge (see `recurring.list`).","title":"Merchant Key","type":"string"},"name":{"title":"Name","type":"string"}},"required":["merchant_key","name","amount","date","late"],"title":"PulseBill","type":"object"},"Purge":{"description":"What erasing takes (``dry_run``) or took.","properties":{"account_ids":{"items":{"type":"integer"},"title":"Account Ids","type":"array"},"blocker_count":{"title":"Blocker Count","type":"integer"},"blockers":{"items":{"$ref":"#/components/schemas/PurgeBlocker"},"title":"Blockers","type":"array"},"entries":{"description":"Journal entries deleted outright.","title":"Entries","type":"integer"},"erased":{"description":"False on a dry run, or when blockers refused it.","title":"Erased","type":"boolean"},"released":{"description":"Transactions on accounts that stay, unpaired from a transfer into an erased account and categorized again. Their balances do not move.","title":"Released","type":"integer"},"transactions":{"description":"Transactions of the erased accounts.","title":"Transactions","type":"integer"}},"required":["erased","account_ids","transactions","entries","released","blockers","blocker_count"],"title":"Purge","type":"object"},"PurgeBlocker":{"properties":{"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"id":{"title":"Id","type":"integer"},"kind":{"description":"`entry`: a journal entry (`id` is its transaction id) that also moves an account being kept. `child_account`: a sub-account of one being erased.","title":"Kind","type":"string"},"label":{"title":"Label","type":"string"}},"required":["kind","id","label"],"title":"PurgeBlocker","type":"object"},"Quote":{"properties":{"day_change":{"anyOf":[{"$ref":"#/components/schemas/UnitPrice"},{"type":"null"}],"description":"Per share."},"day_change_percent":{"anyOf":[{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},{"type":"null"}],"title":"Day Change Percent"},"last_price":{"anyOf":[{"$ref":"#/components/schemas/UnitPrice"},{"type":"null"}]},"last_price_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Last Price Date"},"previous_close":{"anyOf":[{"$ref":"#/components/schemas/UnitPrice"},{"type":"null"}]}},"required":["last_price","last_price_date","previous_close","day_change","day_change_percent"],"title":"Quote","type":"object"},"Recap":{"description":"The few things about a month worth being told, wins first. A month\nwith nothing to say has no moments.","properties":{"currency":{"title":"Currency","type":"string"},"is_current":{"title":"Is Current","type":"boolean"},"moments":{"items":{"$ref":"#/components/schemas/RecapMoment"},"title":"Moments","type":"array"},"month":{"description":"`YYYY-MM`.","title":"Month","type":"string"},"previous_month":{"title":"Previous Month","type":"string"}},"required":["month","previous_month","is_current","currency","moments"],"title":"Recap","type":"object"},"RecapMoment":{"properties":{"data":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}]},"description":"The moment's figures, by kind. Ratios (`change`, `rate`, `share`) are 0–1 decimal strings; amounts are decimal strings in `currency`.","title":"Data","type":"object"},"kind":{"description":"`spending_change`, `savings_rate`, `budgets_kept`, `net_worth_up`, `biggest_drop`, `top_category` or `goals`.","title":"Kind","type":"string"},"shareable":{"description":"Safe to share: it carries percentages and counts only, never an amount, a merchant or an account.","title":"Shareable","type":"boolean"},"tone":{"description":"`positive` (a win) or `neutral` (a fact worth knowing).","title":"Tone","type":"string"}},"required":["kind","tone","shareable","data"],"title":"RecapMoment","type":"object"},"Receipt":{"description":"A receipt and what was read from it. Amounts are in the currency the\nreceipt was printed in (`currency`), which may not be the currency the\ncard was charged in.","properties":{"amount_before_tip":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"What the card terminal authorized before a tip was written in."},"attached_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Attached At"},"card_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Last4"},"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The expense account the reader suggested.","title":"Category Id"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"currency":{"description":"ISO 4217. The ledger's base currency until the receipt is read.","title":"Currency","type":"string"},"duplicate_of_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"An older receipt this one appears to repeat. Clear it with `receipts.mark_not_duplicate`.","title":"Duplicate Of Id"},"email":{"anyOf":[{"$ref":"#/components/schemas/ReceiptEmail"},{"type":"null"}],"description":"Set when the row stands for a forwarded email, not a file."},"has_file":{"description":"False for a forwarded email that carried no receipt: there is nothing to download or re-read.","title":"Has File","type":"boolean"},"id":{"title":"Id","type":"integer"},"items":{"items":{"$ref":"#/components/schemas/ReceiptItem"},"title":"Items","type":"array"},"match_confidence":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How sure the matcher was of the attachment, `0.00`–`1.00`, as a decimal string.","title":"Match Confidence"},"merchant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Name"},"mime_type":{"title":"Mime Type","type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"original_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Name"},"parse_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parse Error"},"parsed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Parsed At"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"},"receipt_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Receipt Date"},"sender":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Who sent it in (an email address or phone number).","title":"Sender"},"size_bytes":{"title":"Size Bytes","type":"integer"},"source":{"description":"How it arrived: `upload`, `email`, `whatsapp` or `gmail`.","title":"Source","type":"string"},"stated_total":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The total as printed, when `total` was worked out another way."},"status":{"description":"`pending` (not read yet), `parsed` (read, not on a transaction), `attached` (on a transaction) or `failed` (could not be read; see `parse_error`).","title":"Status","type":"string"},"subtotal":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"tax":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"tip":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"total":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"total_source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Where `total` came from.","title":"Total Source"},"transaction_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The transaction it is attached to (see `transactions.get`). Null until it is attached, or while that transaction is not yet posted.","title":"Transaction Id"}},"required":["id","source","sender","status","original_name","mime_type","size_bytes","has_file","merchant_name","receipt_date","currency","total","subtotal","tax","tip","amount_before_tip","stated_total","total_source","card_last4","payment_method","category_id","notes","email","parse_error","parsed_at","transaction_id","duplicate_of_id","match_confidence","attached_at","created_at","items"],"title":"Receipt","type":"object"},"ReceiptEmail":{"description":"Why a forwarded email yielded no receipt.","properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Machine value, e.g. `no_attachment`.","title":"Reason"},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snippet"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"}},"required":["reason","subject","snippet"],"title":"ReceiptEmail","type":"object"},"ReceiptItem":{"description":"One printed line of the receipt.","properties":{"amount":{"$ref":"#/components/schemas/Money"},"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The expense account this line is filed under once the receipt is attached (see `accounts.list`).","title":"Category Id"},"description":{"description":"As printed.","title":"Description","type":"string"},"id":{"title":"Id","type":"integer"},"item_category":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A short label the reader gave the item, e.g. `Produce`.","title":"Item Category"},"line_no":{"title":"Line No","type":"integer"},"quantity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Decimal string, when printed.","title":"Quantity"},"unit_price":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]}},"required":["id","line_no","description","quantity","unit_price","amount","category_id","item_category"],"title":"ReceiptItem","type":"object"},"ReceiptList":{"description":"A page of receipts, newest first.","properties":{"data":{"items":{"$ref":"#/components/schemas/Receipt"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"ReceiptList","type":"object"},"ReceiptUpload":{"properties":{"already_here":{"description":"True when these exact bytes were already a receipt in this ledger: that receipt is returned and nothing new was made.","title":"Already Here","type":"boolean"},"amount_before_tip":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"What the card terminal authorized before a tip was written in."},"attached_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Attached At"},"card_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Last4"},"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The expense account the reader suggested.","title":"Category Id"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"currency":{"description":"ISO 4217. The ledger's base currency until the receipt is read.","title":"Currency","type":"string"},"duplicate_of_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"An older receipt this one appears to repeat. Clear it with `receipts.mark_not_duplicate`.","title":"Duplicate Of Id"},"email":{"anyOf":[{"$ref":"#/components/schemas/ReceiptEmail"},{"type":"null"}],"description":"Set when the row stands for a forwarded email, not a file."},"has_file":{"description":"False for a forwarded email that carried no receipt: there is nothing to download or re-read.","title":"Has File","type":"boolean"},"id":{"title":"Id","type":"integer"},"items":{"items":{"$ref":"#/components/schemas/ReceiptItem"},"title":"Items","type":"array"},"match_confidence":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How sure the matcher was of the attachment, `0.00`–`1.00`, as a decimal string.","title":"Match Confidence"},"merchant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merchant Name"},"mime_type":{"title":"Mime Type","type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"original_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Name"},"parse_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parse Error"},"parsed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Parsed At"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"},"receipt_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Receipt Date"},"sender":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Who sent it in (an email address or phone number).","title":"Sender"},"size_bytes":{"title":"Size Bytes","type":"integer"},"source":{"description":"How it arrived: `upload`, `email`, `whatsapp` or `gmail`.","title":"Source","type":"string"},"stated_total":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The total as printed, when `total` was worked out another way."},"status":{"description":"`pending` (not read yet), `parsed` (read, not on a transaction), `attached` (on a transaction) or `failed` (could not be read; see `parse_error`).","title":"Status","type":"string"},"subtotal":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"tax":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"tip":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"total":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"total_source":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Where `total` came from.","title":"Total Source"},"transaction_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The transaction it is attached to (see `transactions.get`). Null until it is attached, or while that transaction is not yet posted.","title":"Transaction Id"}},"required":["id","source","sender","status","original_name","mime_type","size_bytes","has_file","merchant_name","receipt_date","currency","total","subtotal","tax","tip","amount_before_tip","stated_total","total_source","card_last4","payment_method","category_id","notes","email","parse_error","parsed_at","transaction_id","duplicate_of_id","match_confidence","attached_at","created_at","items","already_here"],"title":"ReceiptUpload","type":"object"},"ReconciliationExceptionList":{"description":"A page of reconciliation exceptions, newest first.","properties":{"data":{"items":{"$ref":"#/components/schemas/ReconciliationExceptionOut"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"ReconciliationExceptionList","type":"object"},"ReconciliationExceptionOut":{"description":"Something the matchers could not settle, waiting for a person.","properties":{"created_at":{"format":"date-time","title":"Created At","type":"string"},"event_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The financial event it is about (`events.get`), if one.","title":"Event Id"},"exception_type":{"description":"`category_missing`, `suspected_duplicate` or `balance_mismatch`.","title":"Exception Type","type":"string"},"group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The reconciliation group it is about, if one.","title":"Group Id"},"id":{"title":"Id","type":"integer"},"is_resolved":{"title":"Is Resolved","type":"boolean"},"resolution_note":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`[action] note`, as it was resolved.","title":"Resolution Note"},"severity":{"description":"`info`, `warning` or `error`.","title":"Severity","type":"string"}},"required":["id","exception_type","severity","event_id","group_id","is_resolved","resolution_note","created_at"],"title":"ReconciliationExceptionOut","type":"object"},"RecurringCalendarOut":{"description":"Days `start` to `end`: what happened and what is expected.","properties":{"end":{"format":"date","title":"End","type":"string"},"items":{"description":"By day; within a day, seen before expected and income first.","items":{"$ref":"#/components/schemas/CalendarItem"},"title":"Items","type":"array"},"start":{"format":"date","title":"Start","type":"string"},"today":{"description":"The server's today, which `overdue` and `projected` are read against.","format":"date","title":"Today","type":"string"},"totals":{"$ref":"#/components/schemas/CalendarTotals"}},"required":["start","end","today","items","totals"],"title":"RecurringCalendarOut","type":"object"},"RecurringCharge":{"description":"A charge or an income that repeats, found by the recurring detector\n(or declared by the household), with the household's verdict on it.","properties":{"activity":{"description":"What the charges say: `active`, `missed` (late) or `ended`. A cancelled charge is always `ended`.","title":"Activity","type":"string"},"amount":{"$ref":"#/components/schemas/Money","description":"The usual amount of one charge. Always positive."},"cadence":{"description":"One of `weekly`, `biweekly`, `four_weekly`, `monthly`, `quarterly`, `yearly`.","title":"Cadence","type":"string"},"cancel_guide":{"anyOf":[{"$ref":"#/components/schemas/CancelGuide"},{"type":"null"}],"description":"How to cancel it, when LumaLedger knows the merchant. Expenses only."},"confidence":{"description":"`high` (seen enough times to be sure) or `likely` (a regular pattern seen fewer times).","title":"Confidence","type":"string"},"declared_cadence":{"description":"The cadence was declared by the household, not measured.","title":"Declared Cadence","type":"boolean"},"direction":{"description":"`expense` (a bill, a subscription) or `income` (a paycheck).","title":"Direction","type":"string"},"ended_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"When it stopped: the cancellation date given, else the last charge. Null while it is running.","title":"Ended On"},"first_date":{"format":"date","title":"First Date","type":"string"},"last_amount":{"$ref":"#/components/schemas/Money"},"last_date":{"format":"date","title":"Last Date","type":"string"},"merchant_key":{"description":"The charge's stable key: the merchant or payer it groups by. Pass it to `recurring.set_status`.","title":"Merchant Key","type":"string"},"monthly_cost":{"$ref":"#/components/schemas/Money","description":"What it comes to per month at its cadence."},"name":{"description":"The name the charge appears under.","title":"Name","type":"string"},"next_expected":{"format":"date","title":"Next Expected","type":"string"},"occurrences":{"description":"How many charges were seen.","title":"Occurrences","type":"integer"},"previous_amount":{"$ref":"#/components/schemas/Money","description":"The usual amount before the latest charge."},"price_changed":{"description":"The latest charge differs from the usual amount.","title":"Price Changed","type":"boolean"},"status":{"description":"The household's verdict: `detected` (none given), `confirmed`, `dismissed` (not a recurring charge) or `cancelled`.","title":"Status","type":"string"}},"required":["merchant_key","name","direction","cadence","declared_cadence","confidence","amount","monthly_cost","last_amount","previous_amount","price_changed","occurrences","first_date","last_date","next_expected","status","activity","ended_on","cancel_guide"],"title":"RecurringCharge","type":"object"},"RecurringChargeList":{"description":"A page of recurring charges and income, by `merchant_key`.","properties":{"data":{"items":{"$ref":"#/components/schemas/RecurringCharge"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"RecurringChargeList","type":"object"},"RecurringDeclaration":{"properties":{"cadence":{"description":"One of `weekly`, `biweekly`, `four_weekly`, `monthly`, `quarterly`, `yearly`.","pattern":"^(weekly|biweekly|four_weekly|monthly|quarterly|yearly)$","title":"Cadence","type":"string"},"merchant":{"description":"Who is paid (or pays), as a transaction's description names them, or a `merchant_key`. A unique part of the name is enough.","maxLength":200,"minLength":1,"title":"Merchant","type":"string"}},"required":["merchant","cadence"],"title":"RecurringDeclaration","type":"object"},"RecurringStatusUpdate":{"properties":{"ended_on":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"With `cancelled`: the day it ended. Defaults to today.","title":"Ended On"},"merchant_key":{"description":"The charge, from `recurring.list`.","minLength":1,"title":"Merchant Key","type":"string"},"status":{"description":"`confirmed`, `dismissed` (not a recurring charge), `cancelled`, or `detected` to forget the verdict.","pattern":"^(confirmed|dismissed|cancelled|detected)$","title":"Status","type":"string"}},"required":["merchant_key","status"],"title":"RecurringStatusUpdate","type":"object"},"RecurringSummary":{"properties":{"charges":{"items":{"$ref":"#/components/schemas/ReportRecurringCharge"},"title":"Charges","type":"array"},"total":{"$ref":"#/components/schemas/Money"}},"required":["total","charges"],"title":"RecurringSummary","type":"object"},"ReportBudgetSummary":{"properties":{"available":{"$ref":"#/components/schemas/Money"},"budgeted":{"$ref":"#/components/schemas/Money"},"over_count":{"description":"Plans that ended the month over.","title":"Over Count","type":"integer"},"planned":{"description":"Categories with a plan this month.","title":"Planned","type":"integer"},"remaining":{"$ref":"#/components/schemas/Money"},"spent":{"$ref":"#/components/schemas/Money"},"unbudgeted_spent":{"$ref":"#/components/schemas/Money","description":"Spending in categories with no plan."}},"required":["planned","budgeted","available","spent","remaining","over_count","unbudgeted_spent"],"title":"ReportBudgetSummary","type":"object"},"ReportCategory":{"properties":{"available":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The plan plus what rolled over; null without a plan."},"budgeted":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"What the budget allows; null without a plan."},"category_id":{"description":"The expense account (`accounts.list?type=expense`).","title":"Category Id","type":"integer"},"code":{"title":"Code","type":"string"},"name":{"title":"Name","type":"string"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The category this is a subcategory of.","title":"Parent Id"},"previous_spent":{"$ref":"#/components/schemas/Money","description":"Last month."},"remaining":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"`available` − `spent`; null without a plan."},"spent":{"$ref":"#/components/schemas/Money"}},"required":["category_id","code","name","parent_id","spent","previous_spent","budgeted","available","remaining"],"title":"ReportCategory","type":"object"},"ReportRecurringCharge":{"properties":{"amount":{"$ref":"#/components/schemas/Money","description":"What it charged this month, summed if more than once."},"cadence":{"description":"`weekly`, `monthly`, `annual`, …","title":"Cadence","type":"string"},"merchant_key":{"title":"Merchant Key","type":"string"},"name":{"title":"Name","type":"string"},"occurrences":{"title":"Occurrences","type":"integer"}},"required":["merchant_key","name","cadence","amount","occurrences"],"title":"ReportRecurringCharge","type":"object"},"RetirementOutcome":{"properties":{"age":{"title":"Age","type":"integer"},"chance":{"description":"Share of paths, `0.0000`–`1.0000`, in which the money lasts.","title":"Chance","type":"string"},"date":{"format":"date","title":"Date","type":"string"},"month":{"description":"Index into `points`.","title":"Month","type":"integer"},"net_worth":{"$ref":"#/components/schemas/Money"},"rating":{"description":"`on_track`, `stretch` or `out_of_reach`.","title":"Rating","type":"string"},"runs_out_at_age":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Runs Out At Age"}},"required":["date","month","age","net_worth","chance","rating","runs_out_at_age"],"title":"RetirementOutcome","type":"object"},"ReviewQueue":{"description":"How much is waiting for a person.","properties":{"balance_mismatches":{"description":"Open `balance_mismatch` exceptions.","title":"Balance Mismatches","type":"integer"},"duplicates":{"description":"Open `suspected_duplicate` exceptions.","title":"Duplicates","type":"integer"},"total_exceptions":{"title":"Total Exceptions","type":"integer"},"uncategorized":{"description":"Open `category_missing` exceptions.","title":"Uncategorized","type":"integer"},"unposted":{"description":"Events not yet posted to the ledger.","title":"Unposted","type":"integer"}},"required":["uncategorized","duplicates","balance_mismatches","unposted","total_exceptions"],"title":"ReviewQueue","type":"object"},"RocketMoneyAccount":{"description":"One account the export names, and what it would be imported into.","properties":{"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The file's own words for the account (`Credit Card`).","title":"Account Type"},"existing_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"An account already in the ledger that looks like this one (same name, same side of the balance sheet, same bank when it says one). Its rows go there unless `plan` says otherwise. Null: a new account is created.","title":"Existing Account Id"},"existing_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Existing Account Name"},"from_date":{"format":"date","title":"From Date","type":"string"},"institution":{"title":"Institution","type":"string"},"key":{"description":"Names this account in `plan` when importing. Opaque.","title":"Key","type":"string"},"kind":{"description":"What a new account would be made as, read off `account_type`: one of `kinds`. Overrule it in `plan`.","title":"Kind","type":"string"},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The account number's last digits, when the file has them.","title":"Mask"},"name":{"title":"Name","type":"string"},"row_count":{"description":"Transactions in the file for this account.","title":"Row Count","type":"integer"},"to_date":{"format":"date","title":"To Date","type":"string"}},"required":["key","institution","name","mask","account_type","kind","row_count","from_date","to_date","existing_account_id","existing_account_name"],"title":"RocketMoneyAccount","type":"object"},"RocketMoneyImportCreate":{"properties":{"content":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"description":"The export's text (Rocket Money's \"Export transactions\" CSV). At most 5 MB. Send this or `file_id`.","title":"Content"},"file_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"A file uploaded with `files.create`, instead of `content`. At most 5 MB.","title":"File Id"},"filename":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"description":"Shown in the import history. Defaults to the uploaded file's name.","title":"Filename"},"plan":{"description":"Changes to the preview, per account. Empty: import as previewed.","items":{"$ref":"#/components/schemas/RocketMoneyPlanStep"},"title":"Plan","type":"array"}},"title":"RocketMoneyImportCreate","type":"object"},"RocketMoneyPlanStep":{"description":"What to do with one of the export's accounts. An account left out of\nthe plan is imported as previewed.","properties":{"account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Import its rows into this ledger account (an asset or liability from `accounts.list`) instead of the previewed one.","title":"Account Id"},"key":{"description":"The account's `key` from `imports.preview_rocket_money`.","title":"Key","type":"string"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When a new account is created: what it is, one of the preview's `kinds`.","title":"Kind"},"skip":{"default":false,"description":"Leave this account's rows out.","title":"Skip","type":"boolean"}},"required":["key"],"title":"RocketMoneyPlanStep","type":"object"},"RocketMoneyPreview":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/RocketMoneyAccount"},"title":"Accounts","type":"array"},"kinds":{"description":"The kinds a new account may be given in `plan`.","items":{"type":"string"},"title":"Kinds","type":"array"},"outflow_is_positive":{"description":"The file writes money out as positive amounts (Rocket Money's way), read off its income rows. Informational: the import already accounts for it.","title":"Outflow Is Positive","type":"boolean"},"total_rows":{"title":"Total Rows","type":"integer"}},"required":["accounts","total_rows","outflow_is_positive","kinds"],"title":"RocketMoneyPreview","type":"object"},"RocketMoneyPreviewRequest":{"properties":{"content":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"description":"The export's text (Rocket Money's \"Export transactions\" CSV). At most 5 MB. Send this or `file_id`.","title":"Content"},"file_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"A file uploaded with `files.create`, instead of `content`. At most 5 MB.","title":"File Id"}},"title":"RocketMoneyPreviewRequest","type":"object"},"Rule":{"description":"A standing instruction: when a transaction matches the conditions,\nthe actions are applied to it.","properties":{"actions":{"items":{"$ref":"#/components/schemas/RuleAction"},"title":"Actions","type":"array"},"applied_count":{"description":"Transactions the rule has changed, all time.","title":"Applied Count","type":"integer"},"conditions":{"items":{"$ref":"#/components/schemas/RuleCondition"},"title":"Conditions","type":"array"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"title":"Id","type":"integer"},"is_active":{"description":"An inactive rule is kept but never applied.","title":"Is Active","type":"boolean"},"last_applied_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Last Applied At"},"match_type":{"description":"`all` or `any`: how the rule reads its condition groups.","title":"Match Type","type":"string"},"name":{"title":"Name","type":"string"},"priority":{"description":"Lower runs first. Ties run in id order.","title":"Priority","type":"integer"},"stop_processing":{"description":"When it matches, no lower-priority rule runs on that transaction.","title":"Stop Processing","type":"boolean"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"}},"required":["id","name","match_type","is_active","stop_processing","priority","applied_count","last_applied_at","created_at","updated_at","conditions","actions"],"title":"Rule","type":"object"},"RuleAction":{"properties":{"action":{"description":"An action key from `rules.get_schema` (`set_category`, `add_tags`, …).","title":"Action","type":"string"},"id":{"title":"Id","type":"integer"},"params":{"additionalProperties":{"type":"string"},"description":"Named inputs, for an action that declares `params` in the schema.","title":"Params","type":"object"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The action's one value, when it takes one (a category id, an address).","title":"Value"},"values":{"description":"The action's values, when it takes several (tag ids, split lines).","items":{"type":"string"},"title":"Values","type":"array"}},"required":["id","action","value","values","params"],"title":"RuleAction","type":"object"},"RuleActionInput":{"properties":{"action":{"description":"An action key from `rules.get_schema`.","title":"Action","type":"string"},"params":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":"Named inputs the action declares in `rules.get_schema`.","title":"Params","type":"object"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"For an action that takes one value.","title":"Value"},"values":{"description":"For an action that takes several.","items":{"type":"string"},"title":"Values","type":"array"}},"required":["action"],"title":"RuleActionInput","type":"object"},"RuleActionParamSpec":{"properties":{"key":{"title":"Key","type":"string"},"required":{"title":"Required","type":"boolean"},"value_type":{"title":"Value Type","type":"string"}},"required":["key","value_type","required"],"title":"RuleActionParamSpec","type":"object"},"RuleActionSpec":{"properties":{"app":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The connected app the action writes to, if any.","title":"App"},"conflicts_with":{"description":"Actions that cannot share a rule with this one.","items":{"type":"string"},"title":"Conflicts With","type":"array"},"key":{"title":"Key","type":"string"},"multi":{"description":"Takes `values` rather than `value`.","title":"Multi","type":"boolean"},"params":{"items":{"$ref":"#/components/schemas/RuleActionParamSpec"},"title":"Params","type":"array"},"value_type":{"title":"Value Type","type":"string"}},"required":["key","app","value_type","multi","conflicts_with","params"],"title":"RuleActionSpec","type":"object"},"RuleCondition":{"properties":{"field":{"description":"A field key from `rules.get_schema` (`description`, `amount`, …).","title":"Field","type":"string"},"group_index":{"description":"Conditions in the same group must all hold (AND); any group may match (OR).","title":"Group Index","type":"integer"},"id":{"title":"Id","type":"integer"},"operator":{"description":"One of the operators that field admits.","title":"Operator","type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value, for a one-value operator. Canonical text: decimals as `12.50`, dates ISO, ids as digits.","title":"Value"},"value_to":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The upper bound, for a range operator.","title":"Value To"},"values":{"description":"The values, for a list operator.","items":{"type":"string"},"title":"Values","type":"array"}},"required":["id","field","operator","value","value_to","values","group_index"],"title":"RuleCondition","type":"object"},"RuleConditionInput":{"properties":{"field":{"description":"A field key from `rules.get_schema`.","title":"Field","type":"string"},"group_index":{"default":0,"description":"AND within a group, OR across groups.","maximum":5,"minimum":0,"title":"Group Index","type":"integer"},"operator":{"description":"One of the operators that field admits.","title":"Operator","type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"For a one-value operator.","title":"Value"},"value_to":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The upper bound, for a range operator.","title":"Value To"},"values":{"description":"For a list operator.","items":{"type":"string"},"title":"Values","type":"array"}},"required":["field","operator"],"title":"RuleConditionInput","type":"object"},"RuleFieldSpec":{"properties":{"choices":{"description":"The only values allowed, when the field is an enumeration.","items":{"type":"string"},"title":"Choices","type":"array"},"key":{"title":"Key","type":"string"},"multi":{"description":"Takes a list operator's `values`.","title":"Multi","type":"boolean"},"operators":{"items":{"type":"string"},"title":"Operators","type":"array"},"value_type":{"description":"What a value is: `text`, `number`, `date`, `category`, `tag`, …","title":"Value Type","type":"string"}},"required":["key","value_type","operators","multi","choices"],"title":"RuleFieldSpec","type":"object"},"RuleInput":{"description":"A whole rule. At least one condition and one action; ids a rule\nnames (categories, accounts, tags) must be this ledger's.","properties":{"actions":{"items":{"$ref":"#/components/schemas/RuleActionInput"},"maxItems":8,"title":"Actions","type":"array"},"conditions":{"items":{"$ref":"#/components/schemas/RuleConditionInput"},"maxItems":24,"title":"Conditions","type":"array"},"is_active":{"default":true,"title":"Is Active","type":"boolean"},"match_type":{"default":"all","description":"`all` or `any`.","pattern":"^(all|any)$","title":"Match Type","type":"string"},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"priority":{"default":0,"description":"Lower runs first.","maximum":1000,"minimum":-1000,"title":"Priority","type":"integer"},"stop_processing":{"default":false,"title":"Stop Processing","type":"boolean"}},"required":["name"],"title":"RuleInput","type":"object"},"RuleLimits":{"properties":{"actions":{"title":"Actions","type":"integer"},"conditions":{"title":"Conditions","type":"integer"},"groups":{"title":"Groups","type":"integer"},"rules":{"title":"Rules","type":"integer"},"tags":{"title":"Tags","type":"integer"}},"required":["rules","conditions","groups","actions","tags"],"title":"RuleLimits","type":"object"},"RuleList":{"description":"A page of rules, in the order they run (priority, then id).","properties":{"data":{"items":{"$ref":"#/components/schemas/Rule"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"RuleList","type":"object"},"RuleOperatorArity":{"description":"What a condition carries, by operator. An operator in none of these\ntakes a single `value`.","properties":{"list_operators":{"description":"Operators that take `values`.","items":{"type":"string"},"title":"List Operators","type":"array"},"nullary_operators":{"description":"Operators that take no value (`is_empty`).","items":{"type":"string"},"title":"Nullary Operators","type":"array"},"range_operators":{"description":"Operators that take `value` and `value_to`.","items":{"type":"string"},"title":"Range Operators","type":"array"}},"required":["nullary_operators","list_operators","range_operators"],"title":"RuleOperatorArity","type":"object"},"RulePreview":{"properties":{"matched":{"description":"How many of those the conditions match.","title":"Matched","type":"integer"},"sample":{"description":"A few of the matches, newest first.","items":{"$ref":"#/components/schemas/RulePreviewMatch"},"title":"Sample","type":"array"},"scanned":{"description":"Recent transactions looked at (the newest 2,000).","title":"Scanned","type":"integer"}},"required":["scanned","matched","sample"],"title":"RulePreview","type":"object"},"RulePreviewInput":{"description":"The conditions of a rule that need not exist yet. Actions are\nignored: a preview only asks what would match.","properties":{"conditions":{"items":{"$ref":"#/components/schemas/RuleConditionInput"},"maxItems":24,"minItems":1,"title":"Conditions","type":"array"},"match_type":{"default":"all","description":"`all` or `any`.","pattern":"^(all|any)$","title":"Match Type","type":"string"}},"required":["conditions"],"title":"RulePreviewInput","type":"object"},"RulePreviewMatch":{"properties":{"account_id":{"description":"The real account it is on.","title":"Account Id","type":"integer"},"amount":{"$ref":"#/components/schemas/Money","description":"Always positive; `event_type` says which way it moved."},"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The category it is filed under now.","title":"Category Id"},"date":{"format":"date","title":"Date","type":"string"},"description":{"title":"Description","type":"string"},"event_type":{"description":"`expense`, `income`, `transfer`, `refund`, `fee`, …","title":"Event Type","type":"string"},"transaction_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The transaction (journal entry) id, for `transactions.get`. Null while the bank transaction has not been posted to the ledger yet.","title":"Transaction Id"}},"required":["transaction_id","date","description","amount","event_type","account_id","category_id"],"title":"RulePreviewMatch","type":"object"},"RuleRunPendingResult":{"properties":{"changed":{"title":"Changed","type":"integer"},"matched":{"title":"Matched","type":"integer"},"pending":{"description":"Transactions still waiting. Call again while this is above zero.","title":"Pending","type":"integer"},"scanned":{"title":"Scanned","type":"integer"}},"required":["scanned","matched","changed","pending"],"title":"RuleRunPendingResult","type":"object"},"RuleRunResult":{"properties":{"changed":{"description":"Transactions the rule actually changed.","title":"Changed","type":"integer"},"matched":{"title":"Matched","type":"integer"},"scanned":{"title":"Scanned","type":"integer"},"truncated":{"description":"The run hit its bound; call again to reach older history.","title":"Truncated","type":"boolean"}},"required":["scanned","matched","changed","truncated"],"title":"RuleRunResult","type":"object"},"RuleSchema":{"description":"What a rule may say: every field, operator and action there is.","properties":{"actions":{"items":{"$ref":"#/components/schemas/RuleActionSpec"},"title":"Actions","type":"array"},"fields":{"items":{"$ref":"#/components/schemas/RuleFieldSpec"},"title":"Fields","type":"array"},"limits":{"$ref":"#/components/schemas/RuleLimits"},"operators":{"$ref":"#/components/schemas/RuleOperatorArity"},"tag_colors":{"description":"The colors `tags.create` accepts.","items":{"type":"string"},"title":"Tag Colors","type":"array"}},"required":["fields","actions","operators","tag_colors","limits"],"title":"RuleSchema","type":"object"},"SavingsGoal":{"description":"A savings goal and how far along it is today.","properties":{"account_balance":{"$ref":"#/components/schemas/Money","description":"The account's balance right now."},"account_id":{"description":"The asset account the money sits in (see `accounts.list`).","title":"Account Id","type":"integer"},"account_name":{"title":"Account Name","type":"string"},"baseline_amount":{"$ref":"#/components/schemas/Money","description":"The account balance the goal counts from."},"id":{"title":"Id","type":"integer"},"monthly_needed":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"What has to go in each month to make the date. Null with no date, or once the goal is reached or overdue."},"name":{"title":"Name","type":"string"},"overdue":{"description":"The date has passed and the goal was not reached.","title":"Overdue","type":"boolean"},"progress":{"description":"`saved` / `target_amount`, a decimal string from `0.0000` to `1.0000`.","examples":["0.4250"],"pattern":"^\\d\\.\\d{4}$","title":"Progress","type":"string"},"reached":{"title":"Reached","type":"boolean"},"remaining":{"$ref":"#/components/schemas/Money"},"saved":{"$ref":"#/components/schemas/Money","description":"`account_balance` − `baseline_amount`, between zero and the target."},"target_amount":{"$ref":"#/components/schemas/Money"},"target_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Target Date"}},"required":["id","name","account_id","account_name","target_amount","baseline_amount","target_date","account_balance","saved","remaining","progress","reached","monthly_needed","overdue"],"title":"SavingsGoal","type":"object"},"SavingsGoalCreate":{"properties":{"account_id":{"description":"An active asset account in this ledger (see `accounts.list?type=asset`).","title":"Account Id","type":"integer"},"baseline_amount":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"description":"The balance the goal counts from. Omitted: the account's balance today, so only what is saved from now on counts. `\"0\"` counts the whole balance.","title":"Baseline Amount"},"name":{"maxLength":80,"minLength":1,"title":"Name","type":"string"},"target_amount":{"description":"More than zero; decimal string, at most two decimal places.","examples":["6000.00"],"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","title":"Target Amount","type":"string"},"target_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Target Date"}},"required":["name","account_id","target_amount"],"title":"SavingsGoalCreate","type":"object"},"SavingsGoalList":{"description":"A page of savings goals, by id.","properties":{"data":{"items":{"$ref":"#/components/schemas/SavingsGoal"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"SavingsGoalList","type":"object"},"SavingsGoalUpdate":{"description":"Only the fields sent change. `target_date: null` removes the date.","properties":{"account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Move the goal to another asset account.","title":"Account Id"},"baseline_amount":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"title":"Baseline Amount"},"name":{"anyOf":[{"maxLength":80,"minLength":1,"type":"string"},{"type":"null"}],"title":"Name"},"target_amount":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"title":"Target Amount"},"target_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Target Date"}},"title":"SavingsGoalUpdate","type":"object"},"Schedule":{"description":"A standing order: an entry the ledger posts every period.","properties":{"amount":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The fixed amount, or the loan payment for `amortized`."},"anchor_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The day of the month a period ends on (1–28, or -1 for the last day); null follows the start date.","title":"Anchor Day"},"annual_rate":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The annual interest rate, in percent, as a decimal string.","title":"Annual Rate"},"cadence":{"description":"`daily`, `weekly`, `monthly`, `quarterly`, `annually`.","title":"Cadence","type":"string"},"computation":{"description":"How each period's amount is found: `fixed`, `simple_interest`, `amortized`.","title":"Computation","type":"string"},"day_count":{"description":"How interest counts days: `act365`, `act360`, `thirty360`.","title":"Day Count","type":"string"},"end_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"End Date"},"escrow_amount":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The part of an `amortized` payment that goes to escrow."},"id":{"title":"Id","type":"integer"},"last_run":{"anyOf":[{"$ref":"#/components/schemas/ScheduleRun"},{"type":"null"}]},"legs":{"additionalProperties":{"type":"integer"},"description":"The accounts it posts to, by role (`debit`, `credit`, `interest_expense`, `interest_payable`, `payment_source`, `principal`, `escrow`) → account id.","title":"Legs","type":"object"},"name":{"title":"Name","type":"string"},"next_run_on":{"description":"When the next period ends and posts.","format":"date","title":"Next Run On","type":"string"},"principal_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The balance interest is computed on.","title":"Principal Account Id"},"start_date":{"format":"date","title":"Start Date","type":"string"},"status":{"description":"`active`, `paused`.","title":"Status","type":"string"}},"required":["id","name","computation","cadence","anchor_day","start_date","end_date","next_run_on","amount","escrow_amount","legs","principal_account_id","annual_rate","day_count","status","last_run"],"title":"Schedule","type":"object"},"ScheduleChange":{"description":"Only the fields sent are changed.","properties":{"name":{"anyOf":[{"maxLength":120,"minLength":1,"type":"string"},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"pattern":"^(active|paused)$","type":"string"},{"type":"null"}],"description":"`paused` stops it; `active` resumes it from the next period after today (missed periods are not posted).","title":"Status"}},"title":"ScheduleChange","type":"object"},"ScheduleInput":{"description":"A new standing order. Which `legs` it needs depends on\n`computation`: `fixed` takes `debit` and `credit`; `simple_interest`\ntakes `interest_expense` and `interest_payable`; `amortized` takes\n`payment_source`, `principal` and `interest_expense`, plus `escrow`\nwhen there is an `escrow_amount`.","properties":{"amount":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"description":"The amount for `fixed`, or the payment for `amortized`. Decimal string.","title":"Amount"},"anchor_day":{"anyOf":[{"maximum":28,"minimum":-1,"type":"integer"},{"type":"null"}],"description":"The day of the month a period ends on, 1–28, or -1 for the last day.","title":"Anchor Day"},"annual_rate":{"anyOf":[{"pattern":"^\\d{1,3}(\\.\\d{1,4})?$","type":"string"},{"type":"null"}],"description":"For interest: the annual rate in percent, as a decimal string (`\"6.5\"`).","title":"Annual Rate"},"cadence":{"description":"`daily`, `weekly`, `monthly`, `quarterly`, `annually`.","pattern":"^(daily|weekly|monthly|quarterly|annually)$","title":"Cadence","type":"string"},"computation":{"description":"`fixed`, `simple_interest`, `amortized`.","pattern":"^(fixed|simple_interest|amortized)$","title":"Computation","type":"string"},"day_count":{"default":"act365","description":"`act365`, `act360`, `thirty360`.","pattern":"^(act365|act360|thirty360)$","title":"Day Count","type":"string"},"end_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"End Date"},"escrow_amount":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"description":"Decimal string.","title":"Escrow Amount"},"legs":{"additionalProperties":{"type":"integer"},"description":"Role → account id (see `accounts.list`).","title":"Legs","type":"object"},"name":{"maxLength":120,"minLength":1,"title":"Name","type":"string"},"principal_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"For interest: the balance it is computed on.","title":"Principal Account Id"},"start_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"Defaults to today.","title":"Start Date"}},"required":["name","computation","cadence","legs"],"title":"ScheduleInput","type":"object"},"ScheduleList":{"description":"A page of schedules, newest first.","properties":{"data":{"items":{"$ref":"#/components/schemas/Schedule"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"ScheduleList","type":"object"},"ScheduleRun":{"description":"One period of a schedule, and what it posted.","properties":{"amount":{"$ref":"#/components/schemas/Money"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why it failed, when it did.","title":"Error"},"period_end":{"format":"date","title":"Period End","type":"string"},"period_start":{"format":"date","title":"Period Start","type":"string"},"status":{"description":"`posted`, `skipped` or `failed`.","title":"Status","type":"string"},"transaction_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The transaction (journal entry) it posted. Null when skipped or failed, or when the entry was deleted since.","title":"Transaction Id"}},"required":["period_start","period_end","amount","status","error","transaction_id"],"title":"ScheduleRun","type":"object"},"ScheduleRunList":{"description":"A page of one schedule's runs, latest period first.","properties":{"data":{"items":{"$ref":"#/components/schemas/ScheduleRun"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"ScheduleRunList","type":"object"},"Slice":{"description":"One slice of the portfolio's value.","properties":{"key":{"title":"Key","type":"string"},"share":{"description":"Share of the whole, 0–1.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Share","type":"string"},"value":{"$ref":"#/components/schemas/Money"}},"required":["key","value","share"],"title":"Slice","type":"object"},"SpendingStatus":{"description":"A spending budget measured over one period.","properties":{"available":{"$ref":"#/components/schemas/Money","description":"`budgeted` + `carried`."},"average":{"$ref":"#/components/schemas/Money","description":"Mean spend per period over the last three complete periods."},"budgeted":{"$ref":"#/components/schemas/Money","description":"What the plan allows over the span measured: the period, or the calendar year for an `annual` budget."},"carried":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Rolled in from earlier periods (negative: an overspend being repaid). Null unless the budget rolls over."},"period_spent":{"$ref":"#/components/schemas/Money","description":"Spent in this period alone."},"remaining":{"$ref":"#/components/schemas/Money","description":"`available` − `spent`. Negative is over budget."},"spent":{"$ref":"#/components/schemas/Money","description":"Spent over the same span as `budgeted`, subcategories included."}},"required":["budgeted","carried","available","spent","period_spent","remaining","average"],"title":"SpendingStatus","type":"object"},"Split":{"description":"One part of an event filed under its own category: a line of an\nitemized receipt, the groceries in a supermarket run that also bought\na lamp.","properties":{"amount":{"$ref":"#/components/schemas/Money","description":"Positive, in the event's account's currency."},"category_id":{"description":"The income or expense account this part is filed under.","title":"Category Id","type":"integer"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The line's id or SKU in its source.","title":"External Ref"},"id":{"title":"Id","type":"integer"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name"},"quantity":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A decimal string, up to four places.","title":"Quantity"},"source":{"description":"Who split it: `manual`, or the integration that did.","title":"Source","type":"string"},"unit_price":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]}},"required":["id","category_id","amount","memo","source","external_ref","product_name","quantity","unit_price"],"title":"Split","type":"object"},"SplitInput":{"properties":{"amount":{"description":"Positive decimal string, at most two decimal places: `\"42.50\"`.","examples":["42.50"],"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","title":"Amount","type":"string"},"category_id":{"description":"An income or expense account in this ledger.","title":"Category Id","type":"integer"},"external_ref":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"description":"The line's id or SKU in your system.","title":"External Ref"},"memo":{"anyOf":[{"maxLength":2000,"type":"string"},{"type":"null"}],"title":"Memo"},"product_name":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"title":"Product Name"},"quantity":{"anyOf":[{"pattern":"^\\d{1,8}(\\.\\d{1,4})?$","type":"string"},{"type":"null"}],"description":"Decimal string.","title":"Quantity"},"unit_price":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"description":"Decimal string.","title":"Unit Price"}},"required":["category_id","amount"],"title":"SplitInput","type":"object"},"SplitList":{"description":"An event's splits, in the order they were written.","properties":{"data":{"items":{"$ref":"#/components/schemas/Split"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"SplitList","type":"object"},"SplitsReplace":{"properties":{"splits":{"description":"Every split the event is to have. Their amounts must add up to the event's amount. To go back to one category, use `splits.delete`.","items":{"$ref":"#/components/schemas/SplitInput"},"maxItems":200,"minItems":1,"title":"Splits","type":"array"}},"required":["splits"],"title":"SplitsReplace","type":"object"},"Stake":{"description":"This ledger's share of another ledger.","properties":{"account_id":{"description":"The stake's asset account in this ledger.","title":"Account Id","type":"integer"},"held_name":{"description":"What the owned ledger is, or was last, called.","title":"Held Name","type":"string"},"held_organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The ledger owned. Null once that ledger has been deleted.","title":"Held Organization Id"},"id":{"title":"Id","type":"integer"},"ownership_pct":{"description":"The share owned, as a decimal string (`\"50.0000\"`).","title":"Ownership Pct","type":"string"},"status":{"description":"One of `active`, `access_lost`, `source_deleted`. Anything but `active` means the value is frozen as of `valued_at`: the person who linked it is no longer an owner or admin of the owned ledger, or that ledger was deleted.","title":"Status","type":"string"},"value":{"$ref":"#/components/schemas/Money","description":"What the share is worth, in this ledger's base currency: the percentage of the owned ledger's assets minus liabilities, never below zero."},"valued_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"When the value was last brought up to date.","title":"Valued At"}},"required":["id","held_organization_id","held_name","ownership_pct","value","account_id","status","valued_at"],"title":"Stake","type":"object"},"StakeList":{"description":"A page of stakes, in id order.","properties":{"data":{"items":{"$ref":"#/components/schemas/Stake"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"StakeList","type":"object"},"StakeUpdate":{"properties":{"ownership_pct":{"description":"The share owned from today, as a decimal string between 0 and 100. Past values keep the share they had.","pattern":"^\\d{1,3}(\\.\\d{1,4})?$","title":"Ownership Pct","type":"string"}},"required":["ownership_pct"],"title":"StakeUpdate","type":"object"},"StartingPoint":{"description":"Where the household stands, read from the ledger just now.","properties":{"cash":{"$ref":"#/components/schemas/Money"},"debts":{"items":{"$ref":"#/components/schemas/PlanDebt"},"title":"Debts","type":"array"},"income_months":{"description":"Months the averages cover; 0 means nothing to average.","title":"Income Months","type":"integer"},"invested":{"$ref":"#/components/schemas/Money"},"monthly_housing":{"$ref":"#/components/schemas/Money","description":"Rent, or the running costs of a home."},"monthly_income":{"$ref":"#/components/schemas/Money","description":"After tax, averaged over the trailing months."},"monthly_spending":{"$ref":"#/components/schemas/Money","description":"Everything but housing and debt service."},"net_worth":{"$ref":"#/components/schemas/Money"},"other_assets":{"$ref":"#/components/schemas/Money"},"real_estate":{"$ref":"#/components/schemas/Money"},"vehicles":{"$ref":"#/components/schemas/Money"}},"required":["net_worth","cash","invested","real_estate","vehicles","other_assets","debts","monthly_income","monthly_spending","monthly_housing","income_months"],"title":"StartingPoint","type":"object"},"StatementBreakdownRow":{"properties":{"description":{"description":"Who the money went to or came from, as the entries describe it.","title":"Description","type":"string"},"entries":{"description":"How many transactions it sums.","title":"Entries","type":"integer"},"total":{"$ref":"#/components/schemas/Money"},"values":{"description":"One per month in `months`.","items":{"$ref":"#/components/schemas/Money"},"title":"Values","type":"array"}},"required":["description","values","total","entries"],"title":"StatementBreakdownRow","type":"object"},"StatementReconcile":{"properties":{"account_id":{"description":"The bank, card or loan account the statement is for.","title":"Account Id","type":"integer"},"statement_balance":{"description":"The closing balance the statement shows, as a decimal string, in the account's currency: `\"1520.34\"`.","examples":["1520.34"],"pattern":"^-?\\d{1,12}(\\.\\d{1,2})?$","title":"Statement Balance","type":"string"},"statement_date":{"description":"The statement's closing date.","format":"date","title":"Statement Date","type":"string"}},"required":["account_id","statement_date","statement_balance"],"title":"StatementReconcile","type":"object"},"StatementReconciliation":{"properties":{"account_id":{"title":"Account Id","type":"integer"},"computed_balance":{"$ref":"#/components/schemas/Money","description":"The ledger's balance for the account on that date."},"difference":{"$ref":"#/components/schemas/Money","description":"`statement_balance` minus `computed_balance`."},"group_id":{"description":"The reconciliation group this check is recorded as.","title":"Group Id","type":"integer"},"is_reconciled":{"description":"They agree to the cent. When not, a `balance_mismatch` exception is opened.","title":"Is Reconciled","type":"boolean"},"statement_balance":{"$ref":"#/components/schemas/Money"},"statement_date":{"format":"date","title":"Statement Date","type":"string"}},"required":["account_id","statement_date","statement_balance","computed_balance","difference","is_reconciled","group_id"],"title":"StatementReconciliation","type":"object"},"StatementSync":{"properties":{"downloaded":{"description":"New statements stored, across every bank.","title":"Downloaded","type":"integer"},"items":{"description":"One per linked bank.","items":{"$ref":"#/components/schemas/StatementSyncItem"},"title":"Items","type":"array"}},"required":["downloaded","items"],"title":"StatementSync","type":"object"},"StatementSyncItem":{"properties":{"downloaded":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"New statements stored from this bank.","title":"Downloaded"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why this bank's statements could not be pulled.","title":"Error"},"institution":{"title":"Institution","type":"string"},"outside_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Statements older than the pull reaches back.","title":"Outside Window"},"skipped":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Statements already in the vault.","title":"Skipped"}},"required":["institution","downloaded","skipped","outside_window","error"],"title":"StatementSyncItem","type":"object"},"Stats":{"description":"The latest session's figures, and what a year of closes says.","properties":{"average_volume":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Average Volume"},"fifty_two_week_high":{"anyOf":[{"$ref":"#/components/schemas/UnitPrice"},{"type":"null"}]},"fifty_two_week_low":{"anyOf":[{"$ref":"#/components/schemas/UnitPrice"},{"type":"null"}]},"high":{"anyOf":[{"$ref":"#/components/schemas/UnitPrice"},{"type":"null"}]},"low":{"anyOf":[{"$ref":"#/components/schemas/UnitPrice"},{"type":"null"}]},"open":{"anyOf":[{"$ref":"#/components/schemas/UnitPrice"},{"type":"null"}]},"volume":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Volume"}},"required":["open","high","low","volume","average_volume","fifty_two_week_high","fifty_two_week_low"],"title":"Stats","type":"object"},"Tag":{"properties":{"color":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A palette key (`amber`, `blue`, `gold`, `green`, `indigo`, `orange`, `purple`, `red`, `rose`, `sky`, `slate`, `teal`), drawn in the app's theme. Null for the default.","title":"Color"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"description":"The tag id. `transactions.list` filters by it as `tag_id`.","title":"Id","type":"integer"},"name":{"description":"Unique in the ledger, ignoring case.","title":"Name","type":"string"},"transaction_count":{"description":"Transactions carrying the tag.","title":"Transaction Count","type":"integer"}},"required":["id","name","color","transaction_count","created_at"],"title":"Tag","type":"object"},"TagCreate":{"properties":{"color":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A palette key (`amber`, `blue`, `gold`, `green`, `indigo`, `orange`, `purple`, `red`, `rose`, `sky`, `slate`, `teal`), drawn in the app's theme. Null for the default.","title":"Color"},"name":{"maxLength":40,"minLength":1,"title":"Name","type":"string"}},"required":["name"],"title":"TagCreate","type":"object"},"TagList":{"description":"A page of tags, in id order.","properties":{"data":{"items":{"$ref":"#/components/schemas/Tag"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"TagList","type":"object"},"TagUpdate":{"description":"Only the fields sent change.","properties":{"color":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A palette key (`amber`, `blue`, `gold`, `green`, `indigo`, `orange`, `purple`, `red`, `rose`, `sky`, `slate`, `teal`), drawn in the app's theme. Null for the default. Null clears it.","title":"Color"},"name":{"anyOf":[{"maxLength":40,"minLength":1,"type":"string"},{"type":"null"}],"title":"Name"}},"title":"TagUpdate","type":"object"},"Task":{"description":"Something the household should take care of.","properties":{"count":{"description":"How many things the task stands for (e.g. unfiled transactions).","title":"Count","type":"integer"},"dismissable":{"description":"Whether `tasks.dismiss` is allowed. The others can only be snoozed.","title":"Dismissable","type":"boolean"},"first_seen_at":{"format":"date-time","title":"First Seen At","type":"string"},"id":{"description":"The task's stable key: its kind, and for per-subject kinds the subject (`confirm_recurring:netflix`). Pass it as `task_id` to the task actions.","title":"Id","type":"string"},"kind":{"description":"What to do. One of `categorize_transactions`, `match_receipts`, `relink_bank`, `sync_stale_bank`, `confirm_recurring`, `link_named_bank`, `update_valuation`, `set_first_budget`, `invite_member`, `name_p2p_payment`, `route_transfers`; new kinds may be added.","title":"Kind","type":"string"},"last_seen_at":{"format":"date-time","title":"Last Seen At","type":"string"},"payload":{"additionalProperties":true,"description":"Facts about the task, per kind (ids, names, counts; amounts are decimal strings in the ledger's base currency). Keys are snake_case.","title":"Payload","type":"object"},"priority":{"description":"One of `urgent`, `normal`, `low`, most urgent first.","title":"Priority","type":"string"},"resolved_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Resolved At"},"snoozed_until":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Snoozed Until"},"state":{"description":"One of `open`, `snoozed`, `done`; `done` means resolved in the last 30 days.","title":"State","type":"string"}},"required":["id","kind","state","priority","count","payload","dismissable","first_seen_at","last_seen_at","snoozed_until","resolved_at"],"title":"Task","type":"object"},"TaskList":{"description":"A page of tasks, most urgent first (the app's own order).","properties":{"data":{"items":{"$ref":"#/components/schemas/Task"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"TaskList","type":"object"},"TaskRef":{"properties":{"task_id":{"description":"The task's `id`, from `tasks.list`.","minLength":1,"title":"Task Id","type":"string"}},"required":["task_id"],"title":"TaskRef","type":"object"},"TaskSnooze":{"properties":{"duration":{"default":"week","description":"One of `day`, `week`, `month`.","pattern":"^(day|week|month)$","title":"Duration","type":"string"},"task_id":{"description":"The task's `id`, from `tasks.list`.","minLength":1,"title":"Task Id","type":"string"}},"required":["task_id"],"title":"TaskSnooze","type":"object"},"TaskVerdict":{"description":"The task after the action. A task no longer listed (dismissed, or\ncompleted by the action) comes back as null.","properties":{"task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"type":"null"}]}},"required":["task"],"title":"TaskVerdict","type":"object"},"Transaction":{"description":"A transaction: one balanced journal entry, read from the side of the\nreal account (bank, card, loan) it moved money in.","properties":{"account_id":{"description":"The real account the transaction is on.","title":"Account Id","type":"integer"},"amount":{"$ref":"#/components/schemas/Money","description":"Negative when money left the account or debt grew, positive when money arrived or debt shrank. In the ledger's base currency."},"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The income or expense account it is filed under. Null for a transfer between the ledger's own accounts.","title":"Category Id"},"counterparty":{"anyOf":[{"$ref":"#/components/schemas/TransactionCounterparty"},{"type":"null"}],"description":"Who is on the other end. Null for transfers and unrecognized descriptions."},"created_at":{"format":"date-time","title":"Created At","type":"string"},"date":{"format":"date","title":"Date","type":"string"},"description":{"description":"What the bank or the author called it.","title":"Description","type":"string"},"id":{"description":"The journal entry id. The same id the app's transaction page uses.","title":"Id","type":"integer"},"ignored":{"description":"Set aside by the user: listed, but left out of spending totals.","title":"Ignored","type":"boolean"},"is_transfer":{"title":"Is Transfer","type":"boolean"},"lines":{"items":{"$ref":"#/components/schemas/TransactionLine"},"title":"Lines","type":"array"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"purpose":{"description":"`personal` or `business`.","title":"Purpose","type":"string"},"source":{"description":"Where it came from: `plaid`, `import`, `manual`, `assistant`, …","title":"Source","type":"string"},"statement_line":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The line as the bank printed it on the statement (`SQ *BLUE BOTTLE 0412 OAKLAND CA`), which `search` also matches. Null on an entry nobody imported.","title":"Statement Line"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"}},"required":["id","date","description","statement_line","memo","amount","account_id","category_id","is_transfer","counterparty","purpose","ignored","source","lines","created_at","updated_at"],"title":"Transaction","type":"object"},"TransactionCounterparty":{"properties":{"key":{"description":"Stable key of the merchant or person on the other end.","title":"Key","type":"string"},"name":{"title":"Name","type":"string"}},"required":["key","name"],"title":"TransactionCounterparty","type":"object"},"TransactionCreate":{"description":"A hand-written journal entry. Debits must equal credits.","properties":{"date":{"format":"date","title":"Date","type":"string"},"description":{"maxLength":500,"minLength":1,"title":"Description","type":"string"},"lines":{"items":{"$ref":"#/components/schemas/TransactionLineInput"},"maxItems":50,"minItems":2,"title":"Lines","type":"array"},"memo":{"anyOf":[{"maxLength":2000,"type":"string"},{"type":"null"}],"title":"Memo"}},"required":["date","description","lines"],"title":"TransactionCreate","type":"object"},"TransactionLine":{"description":"One side of the double entry.","properties":{"account_id":{"title":"Account Id","type":"integer"},"amount":{"$ref":"#/components/schemas/Money","description":"Always positive; `direction` says which side."},"direction":{"description":"`debit` or `credit`.","title":"Direction","type":"string"}},"required":["account_id","direction","amount"],"title":"TransactionLine","type":"object"},"TransactionLineInput":{"properties":{"account_id":{"description":"An account in this ledger (see `accounts.list`).","title":"Account Id","type":"integer"},"amount":{"description":"Positive decimal string, at most two decimal places: `\"42.50\"`.","examples":["42.50"],"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","title":"Amount","type":"string"},"direction":{"description":"`debit` or `credit`.","pattern":"^(debit|credit)$","title":"Direction","type":"string"}},"required":["account_id","direction","amount"],"title":"TransactionLineInput","type":"object"},"TransactionList":{"description":"A page of transactions, newest first.","properties":{"data":{"items":{"$ref":"#/components/schemas/Transaction"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"TransactionList","type":"object"},"TransactionTags":{"properties":{"tags":{"description":"The tags the transaction carries now, in id order.","items":{"$ref":"#/components/schemas/Tag"},"title":"Tags","type":"array"},"transaction_id":{"title":"Transaction Id","type":"integer"}},"required":["transaction_id","tags"],"title":"TransactionTags","type":"object"},"TransactionTagsInput":{"properties":{"tag_ids":{"description":"Every tag the transaction should carry (see `tags.list`); an empty list removes them all.","items":{"type":"integer"},"maxItems":25,"title":"Tag Ids","type":"array"}},"required":["tag_ids"],"title":"TransactionTagsInput","type":"object"},"TransactionUpdate":{"description":"Only the fields sent are changed.","properties":{"category_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Refile under this income or expense account. May give the transaction a new id (the entry is re-posted); the response carries it. A transaction marked as a transfer is un-marked first; a transfer the ledger paired from both of its sides cannot be refiled.","title":"Category Id"},"date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Date"},"description":{"anyOf":[{"maxLength":500,"minLength":1,"type":"string"},{"type":"null"}],"title":"Description"},"ignored":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Leave it out of spending totals (imported transactions only).","title":"Ignored"},"memo":{"anyOf":[{"maxLength":2000,"type":"string"},{"type":"null"}],"description":"Null clears it.","title":"Memo"},"stop_transfer_rule":{"default":false,"description":"With `transfer_account_id: null`: also stop the counterparty rule that files this payee as a transfer. What it already marked stays marked.","title":"Stop Transfer Rule","type":"boolean"},"transfer_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Mark it a transfer between the account it is on and this other balance-sheet account of the ledger's (see `accounts.list`), so it leaves income and spending. `null` takes a mark back and lets the categorizer file it. Imported transactions only; not with `category_id`. Re-posts the entry, so the response may carry a new `id`. Taking back a mark that a counterparty rule makes is refused with a 422 naming the rule, since the rule would mark it again at once: send `stop_transfer_rule` to stop the rule too, or `category_id` to file just this one.","title":"Transfer Account Id"}},"title":"TransactionUpdate","type":"object"},"TransferAccount":{"description":"An account money can move to or from.","properties":{"code":{"title":"Code","type":"string"},"id":{"description":"The account id (`accounts.get` takes it).","title":"Id","type":"integer"},"institution_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The bank it is held at, if any.","title":"Institution Id"},"institution_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"That bank's name as the ledger shows it (a rename wins).","title":"Institution Name"},"is_active":{"description":"False once closed; still a valid destination for old payments.","title":"Is Active","type":"boolean"},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The last digits of the account number.","title":"Mask"},"name":{"title":"Name","type":"string"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the account is for, when known (`checking`, `credit_card`, …).","title":"Role"},"type":{"description":"`asset` or `liability`.","title":"Type","type":"string"}},"required":["id","code","name","type","role","mask","is_active","institution_id","institution_name"],"title":"TransferAccount","type":"object"},"TransferAccountCreate":{"properties":{"name":{"maxLength":60,"minLength":1,"title":"Name","type":"string"},"type":{"description":"`asset` for somewhere money is kept, `liability` for a debt it pays down.","pattern":"^(asset|liability)$","title":"Type","type":"string"}},"required":["name","type"],"title":"TransferAccountCreate","type":"object"},"TransferAccountList":{"description":"A page of transfer accounts, in id order.","properties":{"data":{"items":{"$ref":"#/components/schemas/TransferAccount"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"TransferAccountList","type":"object"},"TransferSuggestion":{"description":"Transactions elsewhere in the ledger that look like transfers to one account.","properties":{"account_id":{"description":"The destination account; the suggestion's id.","title":"Account Id","type":"integer"},"account_name":{"title":"Account Name","type":"string"},"account_role":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the destination is for (`credit_card`, …).","title":"Account Role"},"first_date":{"format":"date","title":"First Date","type":"string"},"institution_name":{"description":"The bank the destination is held at.","title":"Institution Name","type":"string"},"last_date":{"format":"date","title":"Last Date","type":"string"},"mask":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mask"},"sample_descriptions":{"items":{"type":"string"},"title":"Sample Descriptions","type":"array"},"source_accounts":{"description":"Names of the accounts those transactions are on, most first.","items":{"type":"string"},"title":"Source Accounts","type":"array"},"total":{"$ref":"#/components/schemas/Money","description":"What they add up to."},"transaction_count":{"description":"How many transactions would be re-filed.","title":"Transaction Count","type":"integer"}},"required":["account_id","account_name","account_role","institution_name","mask","transaction_count","total","first_date","last_date","sample_descriptions","source_accounts"],"title":"TransferSuggestion","type":"object"},"TransferSuggestionList":{"description":"A page of suggestions, the most transactions first.","properties":{"data":{"items":{"$ref":"#/components/schemas/TransferSuggestion"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"TransferSuggestionList","type":"object"},"UnitPrice":{"description":"A price per share or per unit. Unlike ``Money`` it keeps the\nprecision the institution quoted (up to 8 places): a coin or a penny\nstock is not priced in whole cents.","properties":{"amount":{"examples":["187.2300"],"pattern":"^-?\\d+(\\.\\d+)?$","title":"Amount","type":"string"},"currency":{"description":"ISO 4217 code.","examples":["USD"],"pattern":"^[A-Z]{3}$","title":"Currency","type":"string"}},"required":["amount","currency"],"title":"UnitPrice","type":"object"},"UnlinkedInstitution":{"description":"A bank recent transfers keep going to, with no account in the ledger.","properties":{"account_hints":{"description":"Masked account numbers seen in the descriptions (`4821`).","items":{"type":"string"},"title":"Account Hints","type":"array"},"counterparty_type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the bank feed called the other party (`financial_institution`, `payment_app`), or null when inferred from a transfer marked by hand.","title":"Counterparty Type"},"first_date":{"format":"date","title":"First Date","type":"string"},"last_date":{"format":"date","title":"Last Date","type":"string"},"name":{"description":"The bank as the transactions spell it.","title":"Name","type":"string"},"sample_descriptions":{"items":{"type":"string"},"title":"Sample Descriptions","type":"array"},"slug":{"description":"Stable key of the bank's name; what a new institution for it would be keyed on.","title":"Slug","type":"string"},"total":{"$ref":"#/components/schemas/Money","description":"What those transactions add up to, in the currency most of them are in."},"transaction_count":{"description":"How many recent transactions name it, in any currency.","title":"Transaction Count","type":"integer"}},"required":["slug","name","transaction_count","total","first_date","last_date","account_hints","sample_descriptions","counterparty_type"],"title":"UnlinkedInstitution","type":"object"},"UnlinkedInstitutionList":{"description":"A page of unlinked banks, the ones most money moves to first.","properties":{"data":{"items":{"$ref":"#/components/schemas/UnlinkedInstitution"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"UnlinkedInstitutionList","type":"object"},"UploadedFile":{"description":"A file uploaded for other operations to use by `id` (as `file_id`).\nIt lasts until `expires_at`.","properties":{"content_type":{"description":"As the upload declared it.","title":"Content Type","type":"string"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"expires_at":{"description":"When the file is deleted. Use it before then; upload it again after.","format":"date-time","title":"Expires At","type":"string"},"filename":{"title":"Filename","type":"string"},"id":{"description":"Send it as `file_id` to the operation that needs the file.","title":"Id","type":"integer"},"sha256":{"description":"Hex SHA-256 of the bytes, to check what arrived.","title":"Sha256","type":"string"},"size_bytes":{"title":"Size Bytes","type":"integer"}},"required":["id","filename","content_type","size_bytes","sha256","created_at","expires_at"],"title":"UploadedFile","type":"object"},"Vehicle":{"description":"A car, motorcycle, boat or other vehicle the household owns.","properties":{"equity":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Value minus the loan. Null unless both are known."},"estimated_value":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"What it is worth. Null when nobody has said."},"excluded_from_totals":{"description":"Left out of the vehicle totals, and its loan out of net worth.","title":"Excluded From Totals","type":"boolean"},"hidden":{"description":"Hidden from the app's lists; still counted.","title":"Hidden","type":"boolean"},"id":{"title":"Id","type":"integer"},"label":{"title":"Label","type":"string"},"loan":{"anyOf":[{"$ref":"#/components/schemas/VehicleLoan"},{"type":"null"}]},"make":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Make"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"model_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Model Year"},"source":{"description":"`manual`, `inferred` (found from an auto loan) or `seed` (demo data).","title":"Source","type":"string"},"status":{"description":"`suggested` (found from an auto loan, not yet reviewed), `confirmed` or `dismissed`.","title":"Status","type":"string"},"value_age_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Days since `valued_at`.","title":"Value Age Days"},"value_is_stale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"The value is over six months old. Null when it was never dated: not fresh, unknown.","title":"Value Is Stale"},"value_source":{"description":"`user` or `none`.","title":"Value Source","type":"string"},"valued_at":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"The date the value is true for.","title":"Valued At"},"vehicle_type":{"description":"One of `car`, `motorcycle`, `truck`, `suv`, `van`, `rv`, `boat`, `other`.","title":"Vehicle Type","type":"string"},"vin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vin"}},"required":["id","label","vehicle_type","make","model","model_year","vin","estimated_value","value_source","valued_at","value_age_days","value_is_stale","source","status","hidden","excluded_from_totals","loan","equity"],"title":"Vehicle","type":"object"},"VehicleCreate":{"properties":{"estimated_value":{"anyOf":[{"pattern":"^\\d{1,12}(\\.\\d{1,2})?$","type":"string"},{"type":"null"}],"description":"What it is worth, as a decimal string.","title":"Estimated Value"},"label":{"description":"What to call it: `Blue Civic`.","maxLength":120,"minLength":1,"title":"Label","type":"string"},"loan_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Its loan: a liability account (see `accounts.list`) no other vehicle is linked to.","title":"Loan Account Id"},"make":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"title":"Make"},"model":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"title":"Model"},"model_year":{"anyOf":[{"maximum":2100,"minimum":1900,"type":"integer"},{"type":"null"}],"title":"Model Year"},"valued_at":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"The date the value is from. Defaults to today when a value is sent.","title":"Valued At"},"vehicle_type":{"default":"car","description":"One of `car`, `motorcycle`, `truck`, `suv`, `van`, `rv`, `boat`, `other`.","title":"Vehicle Type","type":"string"},"vin":{"anyOf":[{"maxLength":32,"type":"string"},{"type":"null"}],"title":"Vin"}},"required":["label"],"title":"VehicleCreate","type":"object"},"VehicleList":{"description":"A page of vehicles, in id order.","properties":{"data":{"items":{"$ref":"#/components/schemas/Vehicle"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"VehicleList","type":"object"},"VehicleLoan":{"properties":{"account_id":{"description":"The loan's liability account (see `accounts.list`).","title":"Account Id","type":"integer"},"balance":{"$ref":"#/components/schemas/Money","description":"What is owed on it today, positive while owed."},"name":{"title":"Name","type":"string"}},"required":["account_id","name","balance"],"title":"VehicleLoan","type":"object"},"VehicleUpdate":{"description":"Only the fields sent change. `loan_account_id` sent as null unlinks\nthe loan; the other fields cannot be cleared.","properties":{"estimated_value":{"description":"A new value. Dated today unless `valued_at` is sent with it.","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","title":"Estimated Value","type":"string"},"excluded_from_totals":{"description":"Leave it out of the totals, and its loan out of net worth.","title":"Excluded From Totals","type":"boolean"},"hidden":{"title":"Hidden","type":"boolean"},"label":{"maxLength":120,"minLength":1,"title":"Label","type":"string"},"loan_account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Link a loan, or null to unlink it.","title":"Loan Account Id"},"make":{"maxLength":80,"title":"Make","type":"string"},"model":{"maxLength":80,"title":"Model","type":"string"},"model_year":{"maximum":2100,"minimum":1900,"title":"Model Year","type":"integer"},"status":{"description":"One of `confirmed`, `dismissed`, `suggested`.","title":"Status","type":"string"},"valued_at":{"description":"The date the value is from; sent alone, it re-dates the current one.","format":"date","title":"Valued At","type":"string"},"vehicle_type":{"description":"One of `car`, `motorcycle`, `truck`, `suv`, `van`, `rv`, `boat`, `other`.","title":"Vehicle Type","type":"string"},"vin":{"maxLength":32,"title":"Vin","type":"string"}},"title":"VehicleUpdate","type":"object"},"Vest":{"properties":{"date":{"format":"date","title":"Date","type":"string"},"price":{"anyOf":[{"$ref":"#/components/schemas/UnitPrice"},{"type":"null"}],"description":"The close it vested at, or today's for a tranche still ahead."},"shares":{"pattern":"^-?\\d+(\\.\\d+)?$","title":"Shares","type":"string"},"shares_withheld":{"anyOf":[{"pattern":"^-?\\d+(\\.\\d+)?$","type":"string"},{"type":"null"}],"description":"Kept back to cover tax; vested tranches only.","title":"Shares Withheld"},"value":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"`shares` × `price`: wages on a vested tranche, an estimate on a future one."},"vested":{"description":"True once the date has passed: the shares are the holder's.","title":"Vested","type":"boolean"}},"required":["date","shares","vested","shares_withheld","price","value"],"title":"Vest","type":"object"},"WebhookEndpoint":{"properties":{"change_types":{"description":"The change types to deliver: any of `transaction.created`, `transaction.updated`, `transaction.deleted`, `account.balance_updated`, `budget.exceeded`, `import.completed`, `job.completed`, or `*` for every type, including ones added later.","items":{"type":"string"},"title":"Change Types","type":"array"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"disabled_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why it is disabled: `failing` (by us) or `user`. Null while enabled.","title":"Disabled Reason"},"failing_since":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"The first failed delivery since the last one it accepted. Null when healthy.","title":"Failing Since"},"id":{"description":"The endpoint id (`webhook_endpoint_id` in paths).","title":"Id","type":"integer"},"status":{"description":"`enabled` or `disabled`. An endpoint that has not accepted a delivery for three days is disabled for you (`disabled_reason: failing`) and the ledger's owners are emailed; set it back to `enabled` once it answers.","title":"Status","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"},"url":{"title":"Url","type":"string"}},"required":["id","url","description","change_types","status","disabled_reason","failing_since","created_at","updated_at"],"title":"WebhookEndpoint","type":"object"},"WebhookEndpointCreate":{"properties":{"change_types":{"description":"The change types to deliver: any of `transaction.created`, `transaction.updated`, `transaction.deleted`, `account.balance_updated`, `budget.exceeded`, `import.completed`, `job.completed`, or `*` for every type, including ones added later.","items":{"type":"string"},"minItems":1,"title":"Change Types","type":"array"},"description":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"description":"A note for yourself: what receives these.","title":"Description"},"url":{"description":"An https URL on the public internet. Its host may not resolve to a private, loopback, link-local or otherwise internal address; this is checked now and again before every delivery. Redirects are not followed.","maxLength":2048,"minLength":1,"title":"Url","type":"string"}},"required":["url","change_types"],"title":"WebhookEndpointCreate","type":"object"},"WebhookEndpointList":{"description":"A page of webhook endpoints, in id order.","properties":{"data":{"items":{"$ref":"#/components/schemas/WebhookEndpoint"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"WebhookEndpointList","type":"object"},"WebhookEndpointUpdate":{"description":"Only the fields sent change.","properties":{"change_types":{"anyOf":[{"items":{"type":"string"},"minItems":1,"type":"array"},{"type":"null"}],"description":"The change types to deliver: any of `transaction.created`, `transaction.updated`, `transaction.deleted`, `account.balance_updated`, `budget.exceeded`, `import.completed`, `job.completed`, or `*` for every type, including ones added later.","title":"Change Types"},"description":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`enabled` or `disabled`. An endpoint that has not accepted a delivery for three days is disabled for you (`disabled_reason: failing`) and the ledger's owners are emailed; set it back to `enabled` once it answers.","title":"Status"},"url":{"anyOf":[{"maxLength":2048,"minLength":1,"type":"string"},{"type":"null"}],"description":"An https URL on the public internet. Its host may not resolve to a private, loopback, link-local or otherwise internal address; this is checked now and again before every delivery. Redirects are not followed.","title":"Url"}},"title":"WebhookEndpointUpdate","type":"object"},"WebhookEndpointWithSecret":{"description":"An endpoint, with the signing secret shown this once.","properties":{"change_types":{"description":"The change types to deliver: any of `transaction.created`, `transaction.updated`, `transaction.deleted`, `account.balance_updated`, `budget.exceeded`, `import.completed`, `job.completed`, or `*` for every type, including ones added later.","items":{"type":"string"},"title":"Change Types","type":"array"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"disabled_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why it is disabled: `failing` (by us) or `user`. Null while enabled.","title":"Disabled Reason"},"failing_since":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"The first failed delivery since the last one it accepted. Null when healthy.","title":"Failing Since"},"id":{"description":"The endpoint id (`webhook_endpoint_id` in paths).","title":"Id","type":"integer"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The signing secret (`whsec_…`): verify `LumaLedger-Signature` with it. Shown only in this response and never again; `webhook_endpoints.rotate_secret` issues a new one. Null on a replayed `Idempotency-Key` response.","title":"Secret"},"status":{"description":"`enabled` or `disabled`. An endpoint that has not accepted a delivery for three days is disabled for you (`disabled_reason: failing`) and the ledger's owners are emailed; set it back to `enabled` once it answers.","title":"Status","type":"string"},"updated_at":{"format":"date-time","title":"Updated At","type":"string"},"url":{"title":"Url","type":"string"}},"required":["id","url","description","change_types","status","disabled_reason","failing_since","created_at","updated_at","secret"],"title":"WebhookEndpointWithSecret","type":"object"},"YearCategory":{"properties":{"category_id":{"description":"The expense account (`accounts.list?type=expense`).","title":"Category Id","type":"integer"},"code":{"title":"Code","type":"string"},"monthly_average":{"$ref":"#/components/schemas/Money"},"name":{"title":"Name","type":"string"},"previous_spent":{"$ref":"#/components/schemas/Money","description":"The same months of the year before."},"share":{"description":"Share of the year's spending, 0–1.","pattern":"^-?\\d+(\\.\\d+)?$","title":"Share","type":"string"},"spent":{"$ref":"#/components/schemas/Money"}},"required":["category_id","code","name","spent","previous_spent","share","monthly_average"],"title":"YearCategory","type":"object"},"YearHighlights":{"properties":{"best_month":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The month that put the most aside.","title":"Best Month"},"highest_spending_month":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`YYYY-MM`.","title":"Highest Spending Month"},"lowest_spending_month":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lowest Spending Month"},"months_in_the_black":{"description":"Months that ended with income above spending.","title":"Months In The Black","type":"integer"}},"required":["highest_spending_month","lowest_spending_month","best_month","months_in_the_black"],"title":"YearHighlights","type":"object"},"YearMonth":{"properties":{"expenses":{"$ref":"#/components/schemas/Money"},"income":{"$ref":"#/components/schemas/Money"},"month":{"description":"`YYYY-MM`.","title":"Month","type":"string"},"net":{"$ref":"#/components/schemas/Money"}},"required":["month","income","expenses","net"],"title":"YearMonth","type":"object"},"fastapi___compat__v2__Body_documents__create":{"properties":{"doc_type":{"default":"other","description":"What it is: `other`, `statement`, `tax`.","pattern":"^(other|statement|tax)$","title":"Doc Type","type":"string"},"file":{"contentMediaType":"application/octet-stream","description":"A PDF, PNG, JPEG, WebP or HEIC file, at most 15 MB. Its content type must match its bytes.","title":"File","type":"string"},"name":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"description":"What to call it. Defaults to the file's name.","title":"Name"},"tax_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The tax year a tax document is for.","title":"Tax Year"}},"required":["file"],"title":"Body_documents.create","type":"object"},"fastapi___compat__v2__Body_files__create":{"properties":{"file":{"contentMediaType":"application/octet-stream","description":"Any file, at most 15 MB.","title":"File","type":"string"}},"required":["file"],"title":"Body_files.create","type":"object"},"fastapi___compat__v2__Body_paystubs__create":{"properties":{"file":{"contentMediaType":"application/octet-stream","description":"A paystub, or a payroll export of many, as PDF or image; at most 10 MB.","title":"File","type":"string"}},"required":["file"],"title":"Body_paystubs.create","type":"object"},"fastapi___compat__v2__Body_receipts__create":{"properties":{"file":{"contentMediaType":"application/octet-stream","description":"The receipt: a JPEG, PNG, WebP, GIF, HEIC or PDF, at most 10 MB.","title":"File","type":"string"},"transaction_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Attach it to this transaction instead of letting the matcher find one.","title":"Transaction Id"}},"required":["file"],"title":"Body_receipts.create","type":"object"}},"securitySchemes":{"HTTPBearer":{"scheme":"bearer","type":"http"}}},"info":{"description":"The LumaLedger API. Authenticate with a personal access token (`Authorization: Bearer ll_…`) made under Settings → API & MCP. Conventions (money, pagination, errors, versioning): https://lumaledger.app/documentation/developers.","title":"LumaLedger API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/account-types":{"get":{"description":"The five account types, with the side each one's balance grows on and\nthe code prefix its accounts must carry. The same for every ledger.","operationId":"account_types.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountTypeList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List account types","tags":["account_types"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/accounts":{"get":{"description":"Every account in the ledger's chart of accounts, including the\ncategories transactions are filed under, with its current balance.","operationId":"accounts.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Also return closed accounts.","in":"query","name":"include_inactive","required":false,"schema":{"default":false,"description":"Also return closed accounts.","title":"Include Inactive","type":"boolean"}},{"description":"Only accounts of this type. `expense` and `income` are the categories transactions are filed under.","in":"query","name":"type","required":false,"schema":{"anyOf":[{"pattern":"^(asset|liability|equity|income|expense)$","type":"string"},{"type":"null"}],"description":"Only accounts of this type. `expense` and `income` are the categories transactions are filed under.","title":"Type"}},{"description":"Only accounts held at this bank (see `institutions.list`).","in":"query","name":"institution_id","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only accounts held at this bank (see `institutions.list`).","title":"Institution Id"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List accounts","tags":["accounts"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Add an account to the chart of accounts: a bank account, a card, a\nloan, an equity account, or a category. It starts at a zero balance.\nSend an `Idempotency-Key` so a retry cannot create it twice.","operationId":"accounts.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Create an account","tags":["accounts"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/accounts/{account_id}":{"delete":{"description":"Delete an account that was never used: no journal lines and no\nsub-accounts. An account with history cannot be deleted without\nunbalancing the books; close it instead (`accounts.close`).","operationId":"accounts.delete","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"title":"Account Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete an account","tags":["accounts"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One account by id, closed or not.","operationId":"accounts.get","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"title":"Account Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get an account","tags":["accounts"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Rename or renumber an account, move it in the tree, file it at a bank,\nhide it, leave it out of totals, mark it business, or set its low-balance\nalert. Only the fields sent change; the account is re-validated as a\nwhole, as when it was created.","operationId":"accounts.update","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"title":"Account Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update an account","tags":["accounts"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/accounts/{account_id}/balance":{"put":{"description":"Say what an account nothing syncs holds today, so the ledger catches\nup with the charges it cannot see. The account's opening entry is\nre-derived so its balance reads exactly this from today, with every\nposting it already has taken into account. For real asset and liability\naccounts only, and refused for one a bank connection feeds (its bank\nreports the balance).","operationId":"accounts.set_balance","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"title":"Account Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceSet"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Set a manual account's balance","tags":["accounts"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/accounts/{account_id}/close":{"post":{"description":"Retire an account the way the app's \"Remove account\" does: a closing\nentry dated today brings its balance to zero, it is deactivated (history\nbefore today stays), and if a bank connection feeds it, the connection\nstops syncing it; when it was the connection's last account, the\nconnection itself is removed at the bank. Closing a closed account does\nnothing. Needs an admin, because it stops data collection for everyone\nin the ledger. Only an asset or liability account can be closed: a\ncategory or an equity account is refused with a 422.","operationId":"accounts.close","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"title":"Account Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClosedAccount"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Close an account","tags":["accounts"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true}},"/accounts/{account_id}/ledger":{"get":{"description":"The account's register: every journal line posted to it, oldest\nfirst (by date, then entry, then line), each with the running balance\nafter it. The last line's running balance is the account's `balance`.","operationId":"accounts.ledger","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"title":"Account Id","type":"integer"}},{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerLineList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List an account's journal lines","tags":["accounts"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/accounts/{account_id}/purge":{"post":{"description":"Erase an account and everything it brought in, as if it had never\nbeen linked: its transactions, every journal entry on it (openings,\nclosings, valuations included), balances, holdings, its connection when\nnothing else hangs off it, and rules that name it. Unlike\n`accounts.close`, no history is kept. The other side of a transfer into\nit is kept and categorized again, so the accounts that stay do not\nmove; an entry that would move one of them is a 409 naming it (see\n`blockers`, or call with `dry_run=true` first). Needs an admin.","operationId":"accounts.purge","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"title":"Account Id","type":"integer"}},{"description":"Report what would go, change nothing.","in":"query","name":"dry_run","required":false,"schema":{"default":false,"description":"Report what would go, change nothing.","title":"Dry Run","type":"boolean"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Purge"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Erase an account and its history","tags":["accounts"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":false}},"/alternatives":{"get":{"description":"Every alternative investment in the ledger, live, exited or written\noff, with its gain and multiple.","operationId":"alternatives.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List alternative investments","tags":["alternatives"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Record a position and post its value to the ledger's Alternative\nInvestments account. Send an `Idempotency-Key` so a retry cannot record\nit twice.","operationId":"alternatives.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Investment"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Record an alternative investment","tags":["alternatives"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/alternatives/{investment_id}":{"delete":{"description":"Delete a position and take its value off the ledger, with its\ndocuments and their files. To keep its history, set `status` to\n`exited` or `written_off` instead.","operationId":"alternatives.delete","parameters":[{"in":"path","name":"investment_id","required":true,"schema":{"title":"Investment Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete an alternative investment","tags":["alternatives"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One alternative investment with the documents filed against it.","operationId":"alternatives.get","parameters":[{"in":"path","name":"investment_id","required":true,"schema":{"title":"Investment Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Investment"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get an alternative investment","tags":["alternatives"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Revalue a position, record its exit or write-off, correct its details,\nor hide it or leave it out of the totals. Only the fields sent change,\nand any change in what the position is worth is posted to the ledger.","operationId":"alternatives.update","parameters":[{"in":"path","name":"investment_id","required":true,"schema":{"title":"Investment Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Investment"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update an alternative investment","tags":["alternatives"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/alternatives/{investment_id}/documents":{"post":{"description":"File a document (the SAFE, the subscription agreement, a K-1) against\na position. Upload it first with `files.create` and send its `file_id`;\nthe document is kept with the position, after the upload itself\nexpires, and shows in the app. Send an `Idempotency-Key` so a retry\ncannot file it twice.","operationId":"alternatives.add_document","parameters":[{"in":"path","name":"investment_id","required":true,"schema":{"title":"Investment Id","type":"integer"}},{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentDocumentAdd"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentDocumentRef"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Attach a document to an alternative investment","tags":["alternatives"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/alternatives/{investment_id}/documents/{investment_document_id}":{"delete":{"description":"Remove a document from a position, and delete its file.\n`investment_document_id` is a document's `id` from the position's\n`documents`.","operationId":"alternatives.delete_document","parameters":[{"in":"path","name":"investment_id","required":true,"schema":{"title":"Investment Id","type":"integer"}},{"in":"path","name":"investment_document_id","required":true,"schema":{"title":"Investment Document Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Remove a document from an alternative investment","tags":["alternatives"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true}},"/budget-categories":{"get":{"description":"Every expense category in one period, as the app's budgets page lists\nthem: budgeted or not, with what was spent and what it usually costs.\nInactive categories with no budget and no spending are left out.","operationId":"budget_categories.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"The period to measure. Defaults to the current one. A budget period key: `YYYY-MM` while the ledger budgets by calendar month, otherwise the ISO date (`YYYY-MM-DD`) of the period's first day. As input either form is accepted, and any day names the period it falls in.","in":"query","name":"period","required":false,"schema":{"anyOf":[{"pattern":"^\\d{4}-\\d{2}(-\\d{2})?$","type":"string"},{"type":"null"}],"description":"The period to measure. Defaults to the current one. A budget period key: `YYYY-MM` while the ledger budgets by calendar month, otherwise the ISO date (`YYYY-MM-DD`) of the period's first day. As input either form is accepted, and any day names the period it falls in.","title":"Period"}},{"description":"Count only `personal` or only `business` spending. Both by default.","in":"query","name":"purpose","required":false,"schema":{"anyOf":[{"pattern":"^(personal|business)$","type":"string"},{"type":"null"}],"description":"Count only `personal` or only `business` spending. Both by default.","title":"Purpose"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetCategoryList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List categories with their budget figures","tags":["budgets"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/budget-cycle":{"get":{"description":"The cycle the ledger's budgets run on: the calendar month unless the\nhousehold budgets by paycheck.","operationId":"budget_cycle.get","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetCycle"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get the budget cycle","tags":["budgets"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"put":{"description":"Choose the cycle every budget runs on: the calendar month, a monthly\nperiod starting on another day, twice a month, or every one or two\nweeks from a payday. Budgets keep their amounts; their start and their\nper-period amounts move to the periods the new cycle defines.","operationId":"budget_cycle.update","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetCycleUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetCycle"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Set the budget cycle","tags":["budgets"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/budgets":{"get":{"description":"The ledger's budgets, each measured over one period (the current one\nunless `period` says otherwise): allowed, carried over, spent and left\nfor a spending budget; planned and paid for a loan's extra payment.","operationId":"budgets.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"The period to measure. Defaults to the current one. A budget period key: `YYYY-MM` while the ledger budgets by calendar month, otherwise the ISO date (`YYYY-MM-DD`) of the period's first day. As input either form is accepted, and any day names the period it falls in.","in":"query","name":"period","required":false,"schema":{"anyOf":[{"pattern":"^\\d{4}-\\d{2}(-\\d{2})?$","type":"string"},{"type":"null"}],"description":"The period to measure. Defaults to the current one. A budget period key: `YYYY-MM` while the ledger budgets by calendar month, otherwise the ISO date (`YYYY-MM-DD`) of the period's first day. As input either form is accepted, and any day names the period it falls in.","title":"Period"}},{"description":"Count only `personal` or only `business` spending. Both by default.","in":"query","name":"purpose","required":false,"schema":{"anyOf":[{"pattern":"^(personal|business)$","type":"string"},{"type":"null"}],"description":"Count only `personal` or only `business` spending. Both by default.","title":"Purpose"}},{"description":"Only `spend` or only `paydown` budgets.","in":"query","name":"kind","required":false,"schema":{"anyOf":[{"pattern":"^(spend|paydown)$","type":"string"},{"type":"null"}],"description":"Only `spend` or only `paydown` budgets.","title":"Kind"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List budgets","tags":["budgets"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Budget a category: an amount per period (or per year), optionally\nrolling over. With `kind: paydown`, plan extra principal on a loan\ninstead. A category has at most one budget: change an existing one with\n`budgets.update`.","operationId":"budgets.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetOut"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Create a budget","tags":["budgets"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/budgets/fill":{"post":{"description":"The app's one-click fills: budget every category at what it usually\ncosts, or carry last period's amounts into this one. At most 100\nbudgets are written. Send `dry_run: true` first to see the list.","operationId":"budgets.fill","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetFill"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetFillResult"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Fill budgets in one step","tags":["budgets"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/budgets/summary":{"get":{"description":"The totals of one budget period: what the spending budgets allowed,\ncarried, spent and have left, and what was spent outside any budget.\nPer budget, see `budgets.list`; per category, `budget_categories.list`.","operationId":"budgets.summary","parameters":[{"description":"The period to measure. Defaults to the current one. A budget period key: `YYYY-MM` while the ledger budgets by calendar month, otherwise the ISO date (`YYYY-MM-DD`) of the period's first day. As input either form is accepted, and any day names the period it falls in.","in":"query","name":"period","required":false,"schema":{"anyOf":[{"pattern":"^\\d{4}-\\d{2}(-\\d{2})?$","type":"string"},{"type":"null"}],"description":"The period to measure. Defaults to the current one. A budget period key: `YYYY-MM` while the ledger budgets by calendar month, otherwise the ISO date (`YYYY-MM-DD`) of the period's first day. As input either form is accepted, and any day names the period it falls in.","title":"Period"}},{"description":"Count only `personal` or only `business` spending. Both by default.","in":"query","name":"purpose","required":false,"schema":{"anyOf":[{"pattern":"^(personal|business)$","type":"string"},{"type":"null"}],"description":"Count only `personal` or only `business` spending. Both by default.","title":"Purpose"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetSummary"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Summarize a budget period","tags":["budgets"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/budgets/{budget_id}":{"delete":{"description":"Remove a budget and its per-period amounts. The spending it measured\nstays in the ledger.","operationId":"budgets.delete","parameters":[{"in":"path","name":"budget_id","required":true,"schema":{"title":"Budget Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a budget","tags":["budgets"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One budget by its id, measured over `period` (the current one by default).","operationId":"budgets.get","parameters":[{"in":"path","name":"budget_id","required":true,"schema":{"title":"Budget Id","type":"integer"}},{"description":"The period to measure. Defaults to the current one. A budget period key: `YYYY-MM` while the ledger budgets by calendar month, otherwise the ISO date (`YYYY-MM-DD`) of the period's first day. As input either form is accepted, and any day names the period it falls in.","in":"query","name":"period","required":false,"schema":{"anyOf":[{"pattern":"^\\d{4}-\\d{2}(-\\d{2})?$","type":"string"},{"type":"null"}],"description":"The period to measure. Defaults to the current one. A budget period key: `YYYY-MM` while the ledger budgets by calendar month, otherwise the ISO date (`YYYY-MM-DD`) of the period's first day. As input either form is accepted, and any day names the period it falls in.","title":"Period"}},{"description":"Count only `personal` or only `business` spending. Both by default.","in":"query","name":"purpose","required":false,"schema":{"anyOf":[{"pattern":"^(personal|business)$","type":"string"},{"type":"null"}],"description":"Count only `personal` or only `business` spending. Both by default.","title":"Purpose"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetOut"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a budget","tags":["budgets"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Change a budget's amount, frequency, rollover or start. Only the\nfields sent change. Making a budget `annual` drops its per-period\namounts.","operationId":"budgets.update","parameters":[{"in":"path","name":"budget_id","required":true,"schema":{"title":"Budget Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetOut"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update a budget","tags":["budgets"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/budgets/{budget_id}/period-amount":{"put":{"description":"Give one period of a monthly budget its own amount (\"December is\n600, not 200\"), including a period that has not started; null returns it\nto the default. Answers with the budget measured over that period.","operationId":"budgets.set_period_amount","parameters":[{"in":"path","name":"budget_id","required":true,"schema":{"title":"Budget Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodAmountUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetOut"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Set one period's amount","tags":["budgets"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/cards":{"get":{"description":"Every open credit card in the ledger: what it owes, its limit and\npurchase APR, the latest statement and its minimum payment, and when\nthe next payment is due. A due date the bank has not renewed yet is\ncarried forward a month and says so in `due_date_source`. Closed cards\nare left out.","operationId":"cards.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List credit cards with their statements and due dates","tags":["cards"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/categories":{"post":{"description":"Create an income or expense category to file transactions under. Its\ncode is allocated for you, and it is nested under its type's group, or\nunder `parent_id` as a subcategory (one level deep). Returns it as an\naccount, the shape every category has on this API. Send an\n`Idempotency-Key` so a retry cannot create it twice.","operationId":"categories.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Create a category","tags":["categories"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/categorization/run":{"post":{"description":"Categorize the events still waiting for a category: merchant memory\nand the bank's own categories first, then a model for the rest, then\nyour rules, which outrank every guess. Answers 202 with a Job (`kind`\n`categorize`). Its `result` counts each stage: `rule`,\n`merchant_memory`, `pfc`, `transfer` and `uncategorized` at the top\nlevel, then `llm` (`llm`, `new_categories`, `skipped`), `rules`\n(`matched`, `changed`), and with `drain` also `journals_generated`.\nOnly uncategorized events are touched.","operationId":"categorization.run","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategorizationRun"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Categorize waiting events","tags":["categorization"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/changes":{"get":{"description":"What changed in the ledger, oldest first, over the last 30 days. To\nfollow it, store `next_cursor` and pass it as `cursor` on the next poll:\nyou get exactly what happened since, in order, never twice and never\nskipping one (a change appears only once everything before it has\ncommitted, so a long import can hold the feed back a moment, never make\nit jump). Without a cursor the feed starts 30 days ago.\n\nA change carries ids, not records: fetch `transactions.get` and the like\nfor the current state. The same objects are delivered to webhook\nendpoints (`webhook_endpoints.create`).","operationId":"changes.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Only these change types (`transaction.created`, `transaction.updated`, `transaction.deleted`, `account.balance_updated`, `budget.exceeded`, `import.completed`, `job.completed`). Repeat to ask for several.","in":"query","name":"type","required":false,"schema":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"Only these change types (`transaction.created`, `transaction.updated`, `transaction.deleted`, `account.balance_updated`, `budget.exceeded`, `import.completed`, `job.completed`). Repeat to ask for several.","title":"Type"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List changes (the change feed)","tags":["changes"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/changes/{change_id}":{"get":{"description":"One change by its `id`, for 30 days. A receiver that would rather\nnot trust a delivery's body can fetch it here by the\n`LumaLedger-Change-Id` header instead.","operationId":"changes.get","parameters":[{"in":"path","name":"change_id","required":true,"schema":{"title":"Change Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Change"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a change","tags":["changes"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/counterparties":{"get":{"description":"Everyone the ledger paid or was paid by in the window, with totals\neach way and how their transactions are filed. Counterparties are\nderived from transactions when asked, so a page is computed from the\nwhole window each time.","operationId":"counterparties.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Only counterparties with transactions in this many days, and totals over them.","in":"query","name":"lookback_days","required":false,"schema":{"default":365,"description":"Only counterparties with transactions in this many days, and totals over them.","maximum":1095,"minimum":30,"title":"Lookback Days","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterpartyList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List counterparties","tags":["counterparties"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/counterparties/{counterparty_key}":{"get":{"description":"One counterparty over all time: totals, its rules, what the web\nlookup found, money per month and its latest transactions.","operationId":"counterparties.get","parameters":[{"in":"path","name":"counterparty_key","required":true,"schema":{"title":"Counterparty Key","type":"string"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterpartyDetails"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a counterparty","tags":["counterparties"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Rename a counterparty, give it a logo or a note, or correct what its\nAbout card says. Only the fields sent change. Its key does not change:\nthe name is an overlay on what the bank sends.","operationId":"counterparties.update","parameters":[{"in":"path","name":"counterparty_key","required":true,"schema":{"title":"Counterparty Key","type":"string"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterpartyUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterpartyDetails"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update a counterparty","tags":["counterparties"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/counterparties/{counterparty_key}/about":{"get":{"description":"The stored answer to \"who is this?\", and whether a lookup is still\nrunning (poll this after `counterparties.identify`).","operationId":"counterparties.get_about","parameters":[{"in":"path","name":"counterparty_key","required":true,"schema":{"title":"Counterparty Key","type":"string"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterpartyAboutResult"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get who a counterparty is","tags":["counterparties"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/counterparties/{counterparty_key}/category":{"post":{"description":"Give a counterparty a standing rule: file its transactions under\n`category_id`, or treat them as transfers to one of the ledger's own\naccounts (`transfer_account_id`: a card payment, a savings sweep). With\n`backfill` its past transactions move too. Send neither to drop the\nrule; transactions keep where they are.","operationId":"counterparties.set_category","parameters":[{"in":"path","name":"counterparty_key","required":true,"schema":{"title":"Counterparty Key","type":"string"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterpartyCategoryInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterpartyCategoryResult"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"File a counterparty under a category or mark it a transfer","tags":["counterparties"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/counterparties/{counterparty_key}/identify":{"post":{"description":"Search the web for who a counterparty is, and keep the answer. A\ncounterparty already identified returns what is stored without searching\nagain, so this is safe to call on every read. When the search runs in\nthe background `pending` is true: poll `counterparties.get_about`.\nAnswers 503 when lookups are not configured on this server.","operationId":"counterparties.identify","parameters":[{"in":"path","name":"counterparty_key","required":true,"schema":{"title":"Counterparty Key","type":"string"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterpartyAboutResult"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Look up who a counterparty is","tags":["counterparties"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/counterparties/{counterparty_key}/merge":{"delete":{"description":"Undo `counterparties.merge` for this key (one of the target's\n`merged_from`): its transactions group on their own again.","operationId":"counterparties.unmerge","parameters":[{"in":"path","name":"counterparty_key","required":true,"schema":{"title":"Counterparty Key","type":"string"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Separate a merged counterparty","tags":["counterparties"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Treat this counterparty as part of `target_key`: its transactions,\npast and future, group under the target, and its own key stops\nresolving. Nothing is refiled — who a transaction is with changes, not\nwhat it was for. Returns the target as it now stands; undo with\n`counterparties.unmerge`.","operationId":"counterparties.merge","parameters":[{"in":"path","name":"counterparty_key","required":true,"schema":{"title":"Counterparty Key","type":"string"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterpartyMergeInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterpartyDetails"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Merge a counterparty into another","tags":["counterparties"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/counterparties/{counterparty_key}/rules":{"post":{"description":"Add a rule narrower than the counterparty's default: \"over 200 from\nthis store is Equipment, the rest stays Supplies\". With `backfill`, its\nmatching past transactions are refiled now.","operationId":"counterparties.create_rule","parameters":[{"in":"path","name":"counterparty_key","required":true,"schema":{"title":"Counterparty Key","type":"string"}},{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterpartyRuleInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CounterpartyRuleResult"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Add a rule for a counterparty","tags":["counterparties"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/counterparties/{counterparty_key}/rules/{counterparty_rule_id}":{"delete":{"description":"Delete one of a counterparty's rules (ids from `counterparties.get`)\nand refile its transactions under whatever governs them next.","operationId":"counterparties.delete_rule","parameters":[{"in":"path","name":"counterparty_key","required":true,"schema":{"title":"Counterparty Key","type":"string"}},{"in":"path","name":"counterparty_rule_id","required":true,"schema":{"title":"Counterparty Rule Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a counterparty rule","tags":["counterparties"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true}},"/documents":{"get":{"description":"The vault's documents: bank statements, latest period first, then\nuploads without a period, newest first.","operationId":"documents.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Only documents of this kind: `other`, `statement`, `tax`.","in":"query","name":"doc_type","required":false,"schema":{"anyOf":[{"pattern":"^(other|statement|tax)$","type":"string"},{"type":"null"}],"description":"Only documents of this kind: `other`, `statement`, `tax`.","title":"Doc Type"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List documents","tags":["documents"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Upload a file to the vault as `multipart/form-data`.","operationId":"documents.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/fastapi___compat__v2__Body_documents__create"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Upload a document","tags":["documents"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/documents/statements/sync":{"post":{"description":"Pull any new statements from every linked bank into the vault. A bank\nthat does not offer statements reports an `error` without failing the\nrest, and statements already stored are skipped, so calling it again is\nharmless. Premium only: on the free plan this is a 402\n`premium_required`.","operationId":"documents.sync_statements","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatementSync"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Pull new bank statements","tags":["documents"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/documents/{document_id}":{"delete":{"description":"Delete a document and its file. A statement pulled from a bank comes\nback with the next `documents.sync_statements` while the bank still\noffers it.","operationId":"documents.delete","parameters":[{"in":"path","name":"document_id","required":true,"schema":{"title":"Document Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a document","tags":["documents"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One document's details. Its file is `documents.download`.","operationId":"documents.get","parameters":[{"in":"path","name":"document_id","required":true,"schema":{"title":"Document Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a document","tags":["documents"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/documents/{document_id}/download":{"get":{"description":"A short-lived URL for the document's file, named so a browser saves\nit under the document's name.","operationId":"documents.download","parameters":[{"in":"path","name":"document_id","required":true,"schema":{"title":"Document Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Download"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Download a document","tags":["documents"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/equity-grants":{"get":{"description":"The ledger's equity grants, each with what has vested and its\nschedule. Values are in the market's currency (USD).","operationId":"equity_grants.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Only grants whose shares land in this account.","in":"query","name":"account_id","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only grants whose shares land in this account.","title":"Account Id"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquityGrantList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List equity grants","tags":["equity_grants"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Record a grant and its vesting schedule. Every tranche already\nvested posts as wages at its vest-day close, with the withheld shares as\ntax; later tranches post on their dates.","operationId":"equity_grants.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquityGrantCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquityGrant"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Create an equity grant","tags":["equity_grants"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/equity-grants/{equity_grant_id}":{"delete":{"description":"Remove a grant and everything its vests posted.","operationId":"equity_grants.delete","parameters":[{"in":"path","name":"equity_grant_id","required":true,"schema":{"title":"Equity Grant Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete an equity grant","tags":["equity_grants"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One equity grant by its id.","operationId":"equity_grants.get","parameters":[{"in":"path","name":"equity_grant_id","required":true,"schema":{"title":"Equity Grant Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquityGrant"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get an equity grant","tags":["equity_grants"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/events":{"get":{"description":"The ledger's financial events, newest first, with how each was\ncategorized. Unposted ones are waiting for a category or a match;\n`categorization.run` and `journals.generate` move them along.","operationId":"events.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Only events on this account.","in":"query","name":"account_id","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only events on this account.","title":"Account Id"}},{"description":"Only events of this `event_type`.","in":"query","name":"event_type","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only events of this `event_type`.","title":"Event Type"}},{"description":"Only posted (true) or unposted (false) events.","in":"query","name":"is_posted","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only posted (true) or unposted (false) events.","title":"Is Posted"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List financial events","tags":["events"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/events/{event_id}":{"get":{"description":"One financial event by its id.","operationId":"events.get","parameters":[{"in":"path","name":"event_id","required":true,"schema":{"title":"Event Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a financial event","tags":["events"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/events/{event_id}/categorize":{"post":{"description":"File one event under a category by hand, as confirmed (`reviewed`).\nIts transaction is re-posted at once, so the ledger shows the new\ncategory. With `learn_merchant`, the merchant is remembered and its\nnext events are filed the same way.","operationId":"events.categorize","parameters":[{"in":"path","name":"event_id","required":true,"schema":{"title":"Event Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventCategorize"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Categorize a financial event","tags":["events"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/events/{event_id}/splits":{"delete":{"description":"Remove every split, filing the event under its own single category\nagain. Its transaction is re-posted at once.","operationId":"splits.delete","parameters":[{"in":"path","name":"event_id","required":true,"schema":{"title":"Event Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Remove an event's splits","tags":["events"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"How one event is split across categories. Empty when it is filed\nunder a single category (`category_id` on the event).","operationId":"splits.list","parameters":[{"in":"path","name":"event_id","required":true,"schema":{"title":"Event Id","type":"integer"}},{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List an event's splits","tags":["events"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"put":{"description":"Replace an event's splits with these. The amounts must add up to the\nevent's amount, and every part is filed on the event's own side: an\nexpense account for spending, fees and refunds, an income account for\nincome and interest. Its transaction is re-posted at once with one line\nper split. Answers with every split (up to 200, so one page).","operationId":"splits.replace","parameters":[{"in":"path","name":"event_id","required":true,"schema":{"title":"Event Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitsReplace"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Split an event across categories","tags":["events"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/files":{"post":{"description":"Upload a file as `multipart/form-data` and get back its `id`, to send\nas `file_id` to an operation that needs a file: a document for\n`alternatives.add_document`, a bank's export for `imports.create`, a\nRocket Money export for `imports.create_rocket_money`. The file is kept\n24 hours (`expires_at`). Send an `Idempotency-Key` so a retry cannot\nupload it twice.","operationId":"files.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/fastapi___compat__v2__Body_files__create"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadedFile"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Upload a file","tags":["files"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/files/{file_id}":{"delete":{"description":"Delete a file before it expires. What an operation already made from\nit (an attached document, imported rows) stays.","operationId":"files.delete","parameters":[{"in":"path","name":"file_id","required":true,"schema":{"title":"File Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a file","tags":["files"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"A file's details, while it lasts. An expired file is not found.","operationId":"files.get","parameters":[{"in":"path","name":"file_id","required":true,"schema":{"title":"File Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadedFile"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a file","tags":["files"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/holdings":{"get":{"description":"Every holding row: how many shares of which security each investment\naccount holds, what the institution says it is worth and what it cost.\nAmounts are in the holding's own currency.","operationId":"holdings.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Only this account's holdings. Ids from `accounts.list`.","in":"query","name":"account_id","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only this account's holdings. Ids from `accounts.list`.","title":"Account Id"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HoldingList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List holdings","tags":["holdings"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/imports":{"get":{"description":"The files imported into this ledger, newest first: bank exports,\nOFX statements, Rocket Money exports and the app's Chase importer.","operationId":"imports.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Only imports into this account.","in":"query","name":"account_id","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only imports into this account.","title":"Account Id"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List imports","tags":["imports"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Import a bank's export into an account and settle the ledger:\ntransfers are matched, transactions categorized, your rules applied and\neverything posted. Answers 202 with a Job (`kind` `import`); poll\n`jobs.get`. Its `result`: `import_id` (see `imports.list`),\n`row_count`, `new_count`, `duplicate_count` (rows already in the\nledger, skipped) and `journals_posted`. Importing the same file twice is\nharmless: its rows come back as duplicates. Send the file as `content`,\nor upload it with `files.create` and send its `file_id`. Send an\n`Idempotency-Key` so a retry cannot start a second job.","operationId":"imports.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportCreate"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Import a file","tags":["imports"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/imports/preview":{"post":{"description":"Read a bank's export and say how it would be imported, writing\nnothing: its columns, its first rows, a guessed `mapping`, and the\n`saved_mapping` the account used last time for the same header. Check\nor correct the mapping, then send it to `imports.create`. An OFX / QFX\nstatement needs no mapping (`format` is `ofx`). Send the file as\n`content`, or upload it with `files.create` and send its `file_id`.","operationId":"imports.preview","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportPreviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportPreview"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Preview a file before importing it","tags":["imports"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/imports/rocket-money":{"post":{"description":"Switch from Rocket Money: create the accounts its export names that\nthe ledger does not have, import each account's transactions, and settle\nthe ledger. Answers 202 with a Job (`kind` `rocket_money_import`); poll\n`jobs.get`. Its `result`: `accounts_created`, `accounts_used`,\n`row_count`, `new_count`, `duplicate_count` and `journals_posted`.\nImporting the same export twice is harmless: the second time finds the\naccounts it made and every row a duplicate. Send an `Idempotency-Key` so\na retry cannot start a second job.","operationId":"imports.create_rocket_money","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RocketMoneyImportCreate"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Import a Rocket Money export","tags":["imports"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/imports/rocket-money/preview":{"post":{"description":"Read a Rocket Money export (one CSV for every account) and say what\nimporting it would do, writing nothing: each account it names, how many\ntransactions, and the ledger account its rows would go into, or that a\nnew one would be created. Adjust with a `plan`, then send it to\n`imports.create_rocket_money`.","operationId":"imports.preview_rocket_money","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RocketMoneyPreviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RocketMoneyPreview"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Preview a Rocket Money export","tags":["imports"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/insights":{"get":{"description":"What is worth knowing about the ledger today, most urgent first and\nonly a handful: budgets over or nearly used, a subscription that\nchanged price, savings-goal milestones, a budget streak, last month's\nrecap, and categories that moved well away from the usual. Every figure\ncomes from the ledger; nothing is stored.","operationId":"insights.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List insights","tags":["insights"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/institutions":{"get":{"description":"Every bank in the ledger, connected or typed in, by the name the app\nshows. `accounts.list?institution_id=` gives the accounts at one.","operationId":"institutions.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List institutions","tags":["institutions"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Add a bank by hand, for one no connection reaches (a credit union, a\nbroker abroad). It starts empty; add accounts to it with\n`institutions.create_account`. A bank with the same name already in the\nledger is a 409: use that one. Send an `Idempotency-Key` so a retry\ncannot create it twice.","operationId":"institutions.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Institution"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Create an institution","tags":["institutions"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/institutions/{institution_id}":{"delete":{"description":"Delete a bank nothing points at: a typo, a duplicate, one whose\naccounts are all gone. A bank that still has an account (closed ones\nincluded, whose only record of where they were held is this) or a\nconnection is a 409.","operationId":"institutions.delete","parameters":[{"in":"path","name":"institution_id","required":true,"schema":{"title":"Institution Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete an institution","tags":["institutions"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One bank, with the connections that feed it, whether it could be\ndeleted, and who it is (the About card: what the web lookup found and\nyour corrections to it).","operationId":"institutions.get","parameters":[{"in":"path","name":"institution_id","required":true,"schema":{"title":"Institution Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionDetail"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get an institution","tags":["institutions"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Rename a bank, keep notes about it, or correct what its About card\nsays. A rename applies everywhere the ledger names the bank, and\nsurvives the connection refreshing the bank's own name. Only the fields\nsent change.","operationId":"institutions.update","parameters":[{"in":"path","name":"institution_id","required":true,"schema":{"title":"Institution Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Institution"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update an institution","tags":["institutions"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/institutions/{institution_id}/about":{"get":{"description":"The stored answer to \"who is this bank?\", and whether a lookup is\nstill running (poll this after `institutions.identify`).","operationId":"institutions.get_about","parameters":[{"in":"path","name":"institution_id","required":true,"schema":{"title":"Institution Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionAboutResult"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get who an institution is","tags":["institutions"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/institutions/{institution_id}/accounts":{"post":{"description":"Open an account at this bank by hand: one no connection returns (a\nsecond card, a CD, an account at a bank that cannot be connected). Its\ntype, role and code follow from `kind`, and with a `balance` it reads\nthat amount from today, with transfers to it counted on top. Once it\nexists, transfers to it can be filed as transfers instead of spending.\nSend an `Idempotency-Key` so a retry cannot create it twice.","operationId":"institutions.create_account","parameters":[{"in":"path","name":"institution_id","required":true,"schema":{"title":"Institution Id","type":"integer"}},{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualAccountCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Create an account at an institution","tags":["institutions"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/institutions/{institution_id}/identify":{"post":{"description":"Search the web for who a bank, broker or card issuer is, and keep the\nanswer. A bank already identified returns what is stored without\nsearching again, so this is safe to call on every read. When the search\nruns in the background `pending` is true: poll `institutions.get_about`.\nAnswers 503 when lookups are not configured on this server.","operationId":"institutions.identify","parameters":[{"in":"path","name":"institution_id","required":true,"schema":{"title":"Institution Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionAboutResult"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Look up who an institution is","tags":["institutions"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/institutions/{institution_id}/purge":{"post":{"description":"Put the ledger back the way it was before this bank was linked:\nevery account at it, open or closed, is erased with its history (see\n`accounts.purge`), every connection to it is revoked, and the bank\nitself is deleted. The other side of a transfer into one of its\naccounts is kept and categorized again. An entry that would move an\naccount being kept is a 409 naming it. Needs an admin.","operationId":"institutions.purge","parameters":[{"in":"path","name":"institution_id","required":true,"schema":{"title":"Institution Id","type":"integer"}},{"description":"Report what would go, change nothing.","in":"query","name":"dry_run","required":false,"schema":{"default":false,"description":"Report what would go, change nothing.","title":"Dry Run","type":"boolean"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Purge"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Erase an institution and everything it brought in","tags":["institutions"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":false}},"/jobs/{job_id}":{"get":{"description":"A job started by a long operation (`imports.create`,\n`plaid_items.sync`, `categorization.run`, …), by the `id` its 202\nanswered with. Poll until `status` is `succeeded` or `failed`; a second\nor two between polls is plenty. Jobs are kept for 30 days.","operationId":"jobs.get","parameters":[{"in":"path","name":"job_id","required":true,"schema":{"title":"Job Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a job","tags":["jobs"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/journals/generate":{"post":{"description":"Post every categorized event that is not posted yet as a balanced\njournal entry, by the posting rules (`posting_rules.list`). Answers 202\nwith a Job (`kind` `generate_journals`); its `result`:\n`journals_generated`. Posted events are never posted twice.","operationId":"journals.generate","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Post categorized events","tags":["categorization"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/loans":{"get":{"description":"Every loan in the ledger except dismissed ones, with today's balance\nand, where the terms allow, when it will be paid off. Suggested loans\n(found from the bank, not yet confirmed) are listed too; they post\nnothing until confirmed with `loans.set_status`.","operationId":"loans.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List loans","tags":["loans"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Record a loan's terms against its liability account. A confirmed\namortizing or accrue-only loan gets a standing order that posts its\ninterest (and its payments) every period from then on. Send an\n`Idempotency-Key` so a retry cannot create it twice.","operationId":"loans.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanDetail"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Create a loan","tags":["loans"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/loans/payoff-plan":{"get":{"description":"Simulate paying off every confirmed debt month by month, two ways:\navalanche (the highest rate first, cheapest in interest) and snowball\n(the smallest balance first). Both roll a finished debt's payment into\nthe next one, and both are compared with the baseline of paying each\ndebt's regular payment and nothing more. The arithmetic is monthly, so\ndates are to the month.","operationId":"loans.payoff_plan","parameters":[{"description":"Extra put towards debt each month on top of the regular payments, as a decimal string (`\"250.00\"`). At most 1000000.","in":"query","name":"extra","required":false,"schema":{"default":"0","description":"Extra put towards debt each month on top of the regular payments, as a decimal string (`\"250.00\"`). At most 1000000.","pattern":"^\\d{1,12}(\\.\\d{1,2})?$","title":"Extra","type":"string"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoffPlan"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Plan paying off every debt","tags":["loans"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/loans/{loan_id}":{"delete":{"description":"Delete a loan's terms and its standing order. The liability account\nand everything already posted to it stay in the ledger.","operationId":"loans.delete","parameters":[{"in":"path","name":"loan_id","required":true,"schema":{"title":"Loan Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a loan","tags":["loans"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One loan with its amortization table, recomputed from today's\nbalance: every remaining period's interest, principal and escrow until\nthe balance reaches zero.","operationId":"loans.get","parameters":[{"in":"path","name":"loan_id","required":true,"schema":{"title":"Loan Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanDetail"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a loan","tags":["loans"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Change a loan's terms. Only the fields sent change, and the standing\norder is rewritten from the result, so the next posting follows the new\nterms.","operationId":"loans.update","parameters":[{"in":"path","name":"loan_id","required":true,"schema":{"title":"Loan Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanDetail"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update a loan","tags":["loans"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/loans/{loan_id}/status":{"post":{"description":"Confirm a loan found from the bank (which starts its standing order),\nclose one that is paid off, or dismiss one that is not yours. A\ndismissed loan posts nothing and is no longer listed; it is kept so the\nnext sync does not suggest it again.","operationId":"loans.set_status","parameters":[{"in":"path","name":"loan_id","required":true,"schema":{"title":"Loan Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanStatusChange"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanDetail"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Confirm, close or dismiss a loan","tags":["loans"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/me":{"get":{"description":"Who is calling: the user, the ledger the request acts in, their role\nthere, and whether this credential may write. Useful as a first call to\ncheck a token works and what it can do.","operationId":"me.get","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get the caller","tags":["me"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/merchant-mappings":{"get":{"description":"The ledger's merchant memory: each merchant it recognizes, the name\nit shows and the category it files the merchant under.","operationId":"merchant_mappings.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantMappingList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List merchant mappings","tags":["categorization"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Teach the ledger a merchant: events whose description starts with\n`merchant_pattern` are named `merchant_name` and filed under\n`category_id` from now on. A pattern already remembered is updated in\nplace, so sending the same one twice leaves one mapping. Events already\ncategorized are left as they are.","operationId":"merchant_mappings.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantMappingInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantMappingOut"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Remember a merchant","tags":["categorization"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/net-worth":{"get":{"description":"The ledger's net worth today, its assets and liabilities, and how it\nmoved over the past 30 days, in the ledger's base currency.","operationId":"net_worth.get","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetWorth"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get net worth","tags":["net_worth"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/net-worth/breakdown":{"get":{"description":"What the assets and liabilities are made of today: classes (cash,\ninvestments, retirement, real estate, credit cards, loans, …) and the\naccounts in each, with every account's balance in the base currency and\nits own.","operationId":"net_worth.breakdown","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetWorthBreakdown"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Net worth breakdown","tags":["net_worth"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/net-worth/cash-real-value":{"get":{"description":"What holding each checking and savings account was really worth over\nthe window: the interest it earned against the consumer price index of\nits currency. The index line strips out deposits and withdrawals, so\ntwo accounts are comparable; `purchasing_power_change` is the money\nactually held against the inflation it sat through.","operationId":"net_worth.cash_real_value","parameters":[{"description":"The window: `3M`, `6M`, `1Y` or `ALL`.","in":"query","name":"range","required":false,"schema":{"default":"1Y","description":"The window: `3M`, `6M`, `1Y` or `ALL`.","pattern":"^(3M|6M|1Y|ALL)$","title":"Range","type":"string"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashRealValue"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Real value of cash after inflation","tags":["net_worth"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/net-worth/history":{"get":{"description":"Net worth, assets and liabilities at the end of every day that moved\nthem between `since` and `until`. The first point sits on `since` and\ncarries in the balance from before it, so a chart starts at the right\nheight. Narrow the series to some accounts with `account_id` or `role`\n(the investments or one loan's page do).","operationId":"net_worth.history","parameters":[{"description":"First day of the window. Defaults to a year ago.","in":"query","name":"since","required":false,"schema":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"First day of the window. Defaults to a year ago.","title":"Since"}},{"description":"Last day of the window. Defaults to today.","in":"query","name":"until","required":false,"schema":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"Last day of the window. Defaults to today.","title":"Until"}},{"description":"Only these accounts (repeat the parameter). Ids from `accounts.list`.","in":"query","name":"account_id","required":false,"schema":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"description":"Only these accounts (repeat the parameter). Ids from `accounts.list`.","title":"Account Id"}},{"description":"Only accounts with these roles (`brokerage`, `ira`, `mortgage`, …).","in":"query","name":"role","required":false,"schema":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"Only accounts with these roles (`brokerage`, `ira`, `mortgage`, …).","title":"Role"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetWorthHistory"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Net worth over time","tags":["net_worth"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/notifications":{"get":{"description":"The caller's notifications in this ledger, newest first: bills due,\nrenewals, large transactions, budgets crossing their line, receipts\nmatched, a bank that needs signing in again.","operationId":"notifications.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Only notifications not yet read.","in":"query","name":"unread_only","required":false,"schema":{"default":false,"description":"Only notifications not yet read.","title":"Unread Only","type":"boolean"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List notifications","tags":["notifications"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/notifications/preferences":{"get":{"description":"The categories of notification the caller has muted, and whether the\nweekly summary email and alert emails are on.","operationId":"notification_preferences.get","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferences"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get notification preferences","tags":["notifications"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Mute or unmute categories of notification, and switch the weekly\nsummary email and alert emails on or off. Muting stops new notifications of that kind;\nnothing is replayed when it is turned back on.","operationId":"notification_preferences.update","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferencesUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreferences"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update notification preferences","tags":["notifications"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/notifications/read":{"post":{"description":"Mark some of the caller's notifications read, or all of them with\n`all`. Ids that are not the caller's, or already read, are skipped.","operationId":"notifications.mark_read","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkRead"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkReadResult"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Mark notifications read","tags":["notifications"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/paystubs":{"get":{"description":"The ledger's paystubs with every row read from them, newest pay date\nfirst. Stubs that could not be read (no pay date) come first.","operationId":"paystubs.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Only paystubs in this state: `pending`, `parsed`, `failed`.","in":"query","name":"status","required":false,"schema":{"anyOf":[{"pattern":"^(pending|parsed|failed)$","type":"string"},{"type":"null"}],"description":"Only paystubs in this state: `pending`, `parsed`, `failed`.","title":"Status"}},{"description":"Only paychecks paid in this year.","in":"query","name":"year","required":false,"schema":{"anyOf":[{"maximum":2200,"minimum":1900,"type":"integer"},{"type":"null"}],"description":"Only paychecks paid in this year.","title":"Year"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaystubList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List paystubs","tags":["paystubs"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Upload a paystub as `multipart/form-data`. One stub is read before\nthe answer (a few seconds). A payroll export holding many paychecks is\nsplit into one paystub each and read in the background: they come back\n`pending`, and `reading` says how many to wait for. A paycheck already\non file is not added twice (`duplicate`).","operationId":"paystubs.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/fastapi___compat__v2__Body_paystubs__create"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaystubUpload"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Upload a paystub","tags":["paystubs"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/paystubs/breakdown":{"get":{"description":"Where a year's gross pay went (taxes, retirement, health, other\ndeductions, net), by band, by employer and by month, from the stubs on\nfile. Only what was uploaded is counted; `reported_ytd_gross` is the\nemployer's own figure for the whole year so far.","operationId":"paystubs.breakdown","parameters":[{"description":"The calendar year of the pay dates.","in":"query","name":"year","required":true,"schema":{"description":"The calendar year of the pay dates.","maximum":2200,"minimum":1900,"title":"Year","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayBreakdown"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Break down a year of pay","tags":["paystubs"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/paystubs/{paystub_id}":{"delete":{"description":"Delete a paystub, its rows and its file.","operationId":"paystubs.delete","parameters":[{"in":"path","name":"paystub_id","required":true,"schema":{"title":"Paystub Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a paystub","tags":["paystubs"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One paystub with every row read from it.","operationId":"paystubs.get","parameters":[{"in":"path","name":"paystub_id","required":true,"schema":{"title":"Paystub Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Paystub"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a paystub","tags":["paystubs"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/paystubs/{paystub_id}/download":{"get":{"description":"A short-lived URL for the paystub's PDF or image. A stub cut out of a\npayroll export is its own file, just its pages.","operationId":"paystubs.download","parameters":[{"in":"path","name":"paystub_id","required":true,"schema":{"title":"Paystub Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Download"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Download a paystub's file","tags":["paystubs"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/paystubs/{paystub_id}/reprocess":{"post":{"description":"Read the file again, for a stub that failed or whose numbers did not\nadd up. If the new reading is a paycheck already on file, this copy is\ndropped and the one on file is returned with `duplicate`.","operationId":"paystubs.reprocess","parameters":[{"in":"path","name":"paystub_id","required":true,"schema":{"title":"Paystub Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaystubResult"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Read a paystub again","tags":["paystubs"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":false}},"/plaid-items":{"get":{"description":"The ledger's bank connections, with when each last synced and\nwhether it needs a person to sign in again.","operationId":"plaid_items.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaidItemList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List bank connections","tags":["plaid_items"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/plaid-items/sync":{"post":{"description":"Pull new transactions and balances from the bank, then settle the\nledger: match transfers, categorize, apply your rules and post.\nConnections already sync by themselves when the bank says there is\nsomething new; this is the \"refresh\" button. Answers 202 with a Job\n(`kind` `plaid_sync`). Its `result`: `items_synced`, `results` (per\nconnection, its counts or an `error`), `matched`, `categorized`,\n`llm_categorized`, `rules_applied`, `journals_generated` and\n`notifications`. A connection that fails is reported in `results` and\ndoes not fail the job.","operationId":"plaid_items.sync","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaidSync"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Sync bank connections","tags":["plaid_items"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/plan":{"get":{"description":"The plan's settings (retirement age, return and inflation\nassumptions, overrides) and where the household stands today. A ledger\nthat never set a plan answers with the defaults.","operationId":"plan.get","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanOut"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get the plan","tags":["plan"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Change the plan's settings: birth year, retirement age, how long to\nplan for, income or spending overrides, and the return, volatility,\ninflation and growth assumptions. Only the fields sent change.","operationId":"plan.update","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanOut"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update the plan","tags":["plan"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/plan/milestones":{"get":{"description":"The milestones on the plan: a home, a car, a big purchase, a\nwindfall, a change in income, a new recurring cost.","operationId":"plan_milestones.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanMilestoneList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List plan milestones","tags":["plan"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Put something the household can see coming on the plan: \"a $650k\nhouse in June 2028, 20% down\", a windfall, a raise, childcare from\nnext year. The projection accounts for it from then on.","operationId":"plan_milestones.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanMilestoneCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanMilestone"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Add a plan milestone","tags":["plan"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/plan/milestones/{milestone_id}":{"delete":{"description":"Take a milestone off the plan.","operationId":"plan_milestones.delete","parameters":[{"in":"path","name":"milestone_id","required":true,"schema":{"title":"Milestone Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a plan milestone","tags":["plan"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One milestone by its id.","operationId":"plan_milestones.get","parameters":[{"in":"path","name":"milestone_id","required":true,"schema":{"title":"Milestone Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanMilestone"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a plan milestone","tags":["plan"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Change a milestone, or switch it off and on (`is_enabled`) to see\nthe projection with and without it. Only the fields sent change.","operationId":"plan_milestones.update","parameters":[{"in":"path","name":"milestone_id","required":true,"schema":{"title":"Milestone Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanMilestoneUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanMilestone"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update a plan milestone","tags":["plan"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/plan/projection":{"get":{"description":"Run the forecast: net worth month by month to the end of the plan,\nas a median and ranges over many market paths, with the odds of each\nmilestone and of the money lasting through retirement. Slower than the\nother reads; call it when the answer is needed, not on every change.","operationId":"plan.projection","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Projection"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Project net worth","tags":["plan"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/portfolio":{"get":{"description":"The investment portfolio's value, cost and gain, today's move, and\nhow it splits: by asset class, security type, account and tax\ntreatment, with its concentration. Accounts left out of the ledger's\ntotals are left out here too.","operationId":"portfolio.get","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Portfolio"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get the portfolio","tags":["portfolio"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/portfolio/accounts/{account_id}":{"get":{"description":"What one account holds, position by position, valued in the account's\nown currency and weighted within it. An account that holds nothing (a\nchecking account, most of the time) answers with no positions, not a\n404. Ids come from `accounts.list`.","operationId":"portfolio.account_holdings","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"title":"Account Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountHoldings"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get an account's holdings","tags":["portfolio"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/portfolio/activity":{"get":{"description":"The buys, sells, dividends, contributions, fees and transfers inside\nthe investment accounts, newest first: the history behind the holdings.\nCancelled trades are left out.","operationId":"investment_activity.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Only this investment account. Ids from `accounts.list`.","in":"query","name":"account_id","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only this investment account. Ids from `accounts.list`.","title":"Account Id"}},{"description":"On or after this date.","in":"query","name":"since","required":false,"schema":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"On or after this date.","title":"Since"}},{"description":"On or before this date.","in":"query","name":"until","required":false,"schema":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"On or before this date.","title":"Until"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentActivityList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List investment activity","tags":["portfolio"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/portfolio/positions":{"get":{"description":"Every security the portfolio holds, summed across accounts and valued\nin the ledger's base currency, with its weight in the whole.","operationId":"positions.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List positions","tags":["portfolio"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/portfolio/positions/{symbol}":{"get":{"description":"One position by ticker: how much the ledger holds, in which accounts,\nits cost and gain, the latest quote and a year of daily closes. Only a\nticker the ledger holds is found; this is not a market-data lookup.","operationId":"positions.get","parameters":[{"in":"path","name":"symbol","required":true,"schema":{"title":"Symbol","type":"string"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionDetail"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a position","tags":["portfolio"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/posting-rules":{"get":{"description":"The rules that turn categorized events into balanced journal\nentries. They are the platform's, the same for every ledger, and cannot\nbe changed through the API.","operationId":"posting_rules.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostingRuleList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List posting rules","tags":["categorization"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/project-budgets":{"get":{"description":"The ledger's project budgets, each with what has been spent on it so far.","operationId":"project_budgets.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBudgetList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List project budgets","tags":["project_budgets"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Budget a project: an amount for everything tagged with its tag\nbetween two dates. Tag its transactions (by hand or with a rule) and\nthey count towards it.","operationId":"project_budgets.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBudgetCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBudget"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Create a project budget","tags":["project_budgets"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/project-budgets/{project_budget_id}":{"delete":{"description":"Remove a project budget. Its tag, and the transactions carrying it, stay.","operationId":"project_budgets.delete","parameters":[{"in":"path","name":"project_budget_id","required":true,"schema":{"title":"Project Budget Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a project budget","tags":["project_budgets"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One project budget by its id.","operationId":"project_budgets.get","parameters":[{"in":"path","name":"project_budget_id","required":true,"schema":{"title":"Project Budget Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBudget"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a project budget","tags":["project_budgets"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Rename a project budget, change its amount or dates, or move it to\nanother tag. Only the fields sent change.","operationId":"project_budgets.update","parameters":[{"in":"path","name":"project_budget_id","required":true,"schema":{"title":"Project Budget Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBudgetUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectBudget"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update a project budget","tags":["project_budgets"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/properties":{"get":{"description":"Every property in the ledger, including suggested and dismissed\nones (see `status`), each with its mortgage and equity. Values are as\nlast refreshed; the app refreshes Zestimates when its page is opened.","operationId":"properties.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List properties","tags":["properties"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Add a property the household owns. Its value is posted to the\nledger, so net worth moves with it. Send an `Idempotency-Key` so a\nretry cannot add it twice.","operationId":"properties.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Property"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Add a property","tags":["properties"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/properties/affordability":{"get":{"description":"The inputs to a home-affordability calculation, from the ledger:\nincome, real spending, existing debt payments and cash, plus the\ndefaults and underwriting limits the app's calculator starts from. The\ncalculation itself (payment, ratios, verdict) is left to the client, so\nit can be redrawn for any price without another call.","operationId":"properties.affordability","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Affordability"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"What home the household can afford","tags":["properties"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/properties/{property_id}":{"delete":{"description":"Delete a property that was added by hand and take its value off the\nledger. One found from a mortgage cannot be deleted (the next sync\nwould find it again): set its `status` to `dismissed` instead.","operationId":"properties.delete","parameters":[{"in":"path","name":"property_id","required":true,"schema":{"title":"Property Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a property","tags":["properties"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One property with its mortgage and equity.","operationId":"properties.get","parameters":[{"in":"path","name":"property_id","required":true,"schema":{"title":"Property Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Property"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a property","tags":["properties"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Correct a property's address, revalue it, confirm or dismiss one\nfound from a mortgage, or hide it or leave it out of the totals. Only\nthe fields sent change. A new value, a status change or the exclusion\nswitch re-posts the property's value to the ledger.","operationId":"properties.update","parameters":[{"in":"path","name":"property_id","required":true,"schema":{"title":"Property Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Property"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update a property","tags":["properties"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/pulse":{"get":{"description":"How much is safe to spend today, with its working: the pay cycle's\nincome, what goes to savings, what was spent, the bills still due and\nthe cash actually on hand. Also what came in and went out since\nyesterday.","operationId":"pulse.get","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pulse"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get the money pulse","tags":["pulse"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/receipts":{"get":{"description":"The ledger's receipts, newest first: the app's receipt inbox. Filter\nby `status=parsed` for the ones read but not yet on a transaction.","operationId":"receipts.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Only receipts in this state: `pending`, `parsed`, `attached`, `failed`.","in":"query","name":"status","required":false,"schema":{"anyOf":[{"pattern":"^(pending|parsed|attached|failed)$","type":"string"},{"type":"null"}],"description":"Only receipts in this state: `pending`, `parsed`, `attached`, `failed`.","title":"Status"}},{"description":"Only receipts attached to this transaction.","in":"query","name":"transaction_id","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only receipts attached to this transaction.","title":"Transaction Id"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List receipts","tags":["receipts"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Upload a receipt as `multipart/form-data` and have it read. The\nanswer is the receipt as read (`status` `attached`, `parsed` or\n`failed`), which takes a few seconds. Given a `transaction_id` it is put\non that transaction; otherwise it is attached only when one charge\nclearly matches. The same file uploaded twice is one receipt\n(`already_here`).","operationId":"receipts.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/fastapi___compat__v2__Body_receipts__create"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptUpload"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Upload a receipt","tags":["receipts"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/receipts/{receipt_id}":{"delete":{"description":"Delete a receipt and its file. If it was on a transaction, the split\nit made comes off too.","operationId":"receipts.delete","parameters":[{"in":"path","name":"receipt_id","required":true,"schema":{"title":"Receipt Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a receipt","tags":["receipts"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One receipt with its line items and the transaction it is on.","operationId":"receipts.get","parameters":[{"in":"path","name":"receipt_id","required":true,"schema":{"title":"Receipt Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Receipt"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a receipt","tags":["receipts"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/receipts/{receipt_id}/attach":{"post":{"description":"Put a receipt on the transaction it paid for, replacing any\ntransaction it was on. Its line items become the transaction's split,\nscaled to what the card was actually charged.","operationId":"receipts.attach","parameters":[{"in":"path","name":"receipt_id","required":true,"schema":{"title":"Receipt Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Receipt"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Attach a receipt to a transaction","tags":["receipts"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/receipts/{receipt_id}/detach":{"post":{"description":"Take a receipt off its transaction, and its split with it. The\nreceipt stays, `parsed`, ready to attach elsewhere.","operationId":"receipts.detach","parameters":[{"in":"path","name":"receipt_id","required":true,"schema":{"title":"Receipt Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Receipt"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Detach a receipt from its transaction","tags":["receipts"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/receipts/{receipt_id}/download":{"get":{"description":"A short-lived URL for the receipt's image or PDF. A forwarded email\nthat carried no receipt has no file, and says so with a 422.","operationId":"receipts.download","parameters":[{"in":"path","name":"receipt_id","required":true,"schema":{"title":"Receipt Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Download"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Download a receipt's file","tags":["receipts"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/receipts/{receipt_id}/not-duplicate":{"post":{"description":"Two purchases, not one receipt sent twice: clear `duplicate_of_id`\nand let the receipt find its own transaction.","operationId":"receipts.mark_not_duplicate","parameters":[{"in":"path","name":"receipt_id","required":true,"schema":{"title":"Receipt Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Receipt"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Mark a receipt as not a duplicate","tags":["receipts"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/receipts/{receipt_id}/reprocess":{"post":{"description":"Read the file again from scratch, for a receipt that failed or was\nmisread. It comes off its transaction first, and is placed again from\nthe new reading.","operationId":"receipts.reprocess","parameters":[{"in":"path","name":"receipt_id","required":true,"schema":{"title":"Receipt Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Receipt"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Read a receipt again","tags":["receipts"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":false}},"/reconciliation/exceptions":{"get":{"description":"What is waiting for review, newest first: events with no category,\nsuspected duplicates, and balances that do not match a statement.","operationId":"reconciliation_exceptions.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Resolved ones instead of open ones.","in":"query","name":"is_resolved","required":false,"schema":{"default":false,"description":"Resolved ones instead of open ones.","title":"Is Resolved","type":"boolean"}},{"description":"Only this `exception_type`.","in":"query","name":"exception_type","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only this `exception_type`.","title":"Exception Type"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationExceptionList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List reconciliation exceptions","tags":["reconciliation"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/reconciliation/exceptions/{exception_id}/resolve":{"post":{"description":"Mark an exception settled, with a note saying how. Resolving one\nchanges nothing else in the ledger: fix the cause first (categorize the\nevent, delete the duplicate), then resolve it.","operationId":"reconciliation_exceptions.resolve","parameters":[{"in":"path","name":"exception_id","required":true,"schema":{"title":"Exception Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionResolve"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationExceptionOut"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Resolve a reconciliation exception","tags":["reconciliation"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/reconciliation/review-queue":{"get":{"description":"The size of the review queue: open exceptions by type, and events\nstill unposted.","operationId":"review_queue.get","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewQueue"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Count what is waiting for review","tags":["reconciliation"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/reconciliation/run":{"post":{"description":"Pair transfers, card payments and pending/posted twins, and flag\nsuspected duplicates, across the ledger. Imports and syncs already do\nthis; run it after correcting things by hand. Answers 202 with a Job\n(`kind` `reconcile`); its `result`: `transfers_matched`,\n`card_payments_matched`, `pending_posted_matched`,\n`duplicates_flagged`. Only rows not matched yet are touched, so running\nit again is harmless.","operationId":"reconciliation.run","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Run the matchers","tags":["reconciliation"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/reconciliation/statements":{"post":{"description":"Check the ledger's balance for an account against the balance a bank\nstatement shows on its closing date. A statement that agrees is\nrecorded as the bank's balance on that date, once per account and date\n(a second time is a 409 `conflict`); a difference opens a\n`balance_mismatch` exception.","operationId":"statement_reconciliations.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatementReconcile"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatementReconciliation"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Reconcile an account against a statement","tags":["reconciliation"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/recurring":{"get":{"description":"Every subscription, bill and recurring income the detector finds in\nthe last two years or so of transactions, including the ones the\nhousehold dismissed or cancelled (see `status` and `activity`). The\nmonthly total the app shows is the sum of `monthly_cost` over the\nexpenses that are neither `dismissed` nor `ended`.","operationId":"recurring.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Only bills and subscriptions (`expense`) or only income (`income`).","in":"query","name":"direction","required":false,"schema":{"anyOf":[{"pattern":"^(expense|income)$","type":"string"},{"type":"null"}],"description":"Only bills and subscriptions (`expense`) or only income (`income`).","title":"Direction"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringChargeList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List recurring charges","tags":["recurring"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/recurring/calendar":{"get":{"description":"Every transaction between `start` and `end`, marked when it belongs\nto a recurring charge, plus every recurring charge and income projected\nonto the days it is expected. Dismissed and cancelled charges are not\nprojected.","operationId":"recurring.calendar","parameters":[{"description":"The first day.","in":"query","name":"start","required":true,"schema":{"description":"The first day.","format":"date","title":"Start","type":"string"}},{"description":"The last day. At most 93 days after `start`.","in":"query","name":"end","required":true,"schema":{"description":"The last day. At most 93 days after `start`.","format":"date","title":"End","type":"string"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringCalendarOut"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get the bill calendar","tags":["recurring"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/recurring/declare":{"post":{"description":"Say that a merchant bills (or pays) on a cadence: for a yearly renewal\nwith one charge behind it, which the detector cannot see yet, or to\ncorrect a cadence it measured wrong. Declaring also confirms the charge.\nThe merchant must have at least one transaction in the ledger.","operationId":"recurring.declare","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringDeclaration"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringCharge"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Declare a recurring charge","tags":["recurring"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/recurring/forecast":{"get":{"description":"What the recurring charges and income will come to month by month,\nfrom today to the end of the horizon: the yearly bills a monthly view\nnever shows, before they land.","operationId":"recurring.forecast","parameters":[{"description":"`quarter` (3 months) or `year` (12).","in":"query","name":"horizon","required":false,"schema":{"default":"quarter","description":"`quarter` (3 months) or `year` (12).","pattern":"^(quarter|year)$","title":"Horizon","type":"string"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillForecast"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Forecast recurring bills","tags":["recurring"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/recurring/status":{"post":{"description":"Give the household's verdict on a recurring charge: confirm it,\ndismiss it as not recurring, or mark it cancelled (from `ended_on`).\n`detected` forgets the verdict but keeps a declared cadence. Returns the\ncharge as it now reads.","operationId":"recurring.set_status","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringStatusUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringCharge"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Set a recurring charge's status","tags":["recurring"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/reports/annual":{"get":{"description":"The year on one page: income, spending and net for each month; the\ncategories it went to beside the year before; net worth from January to\nnow; the biggest expenses; the goals; and the year's highlights.","operationId":"reports.annual","parameters":[{"description":"Defaults to this year.","in":"query","name":"year","required":false,"schema":{"anyOf":[{"maximum":2100,"minimum":2000,"type":"integer"},{"type":"null"}],"description":"Defaults to this year.","title":"Year"}},{"description":"Only the `personal` or the `business` side of the ledger. Both when omitted.","in":"query","name":"purpose","required":false,"schema":{"anyOf":[{"pattern":"^(personal|business)$","type":"string"},{"type":"null"}],"description":"Only the `personal` or the `business` side of the ledger. Both when omitted.","title":"Purpose"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnualReview"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Annual review","tags":["reports"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/reports/monthly":{"get":{"description":"The month on one page: what came in and went out, category by\ncategory beside last month and the budget; how the budget held; the\nrecurring charges that landed; the biggest expenses; what net worth did;\nand the savings goals. While the month is running the figures are\nmonth-to-date.","operationId":"reports.monthly","parameters":[{"description":"`YYYY-MM`. Defaults to this month.","in":"query","name":"month","required":false,"schema":{"anyOf":[{"pattern":"^\\d{4}-\\d{2}$","type":"string"},{"type":"null"}],"description":"`YYYY-MM`. Defaults to this month.","title":"Month"}},{"description":"Only the `personal` or the `business` side of the ledger. Both when omitted.","in":"query","name":"purpose","required":false,"schema":{"anyOf":[{"pattern":"^(personal|business)$","type":"string"},{"type":"null"}],"description":"Only the `personal` or the `business` side of the ledger. Both when omitted.","title":"Purpose"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonthlyReport"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Monthly report","tags":["reports"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/reports/recap":{"get":{"description":"A month's highlights, read off its monthly report: spending against\nthe month before, the savings rate, budgets kept, net worth growth, the\nbiggest drop in a category, goals reached. Wins lead; nothing is\ninvented.","operationId":"reports.recap","parameters":[{"description":"`YYYY-MM`. Defaults to the last complete month.","in":"query","name":"month","required":false,"schema":{"anyOf":[{"pattern":"^\\d{4}-\\d{2}$","type":"string"},{"type":"null"}],"description":"`YYYY-MM`. Defaults to the last complete month.","title":"Month"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recap"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Monthly recap","tags":["reports"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/rules":{"get":{"description":"The ledger's rules, in the order they run.","operationId":"rules.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List rules","tags":["rules"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Save a rule. It applies to transactions that arrive from now on; call\n`rules.run` to apply it to the ones already in the ledger.","operationId":"rules.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rule"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Create a rule","tags":["rules"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/rules/preview":{"post":{"description":"Which recent transactions a rule's conditions would match, without\nsaving the rule or changing anything. A read: any member may call it.","operationId":"rules.preview","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulePreviewInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulePreview"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Preview what a rule would match","tags":["rules"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/rules/run-all":{"post":{"description":"Run every active rule over the transactions the rules have not seen\nyet (new ones are normally handled as they sync). Runs synchronously\nwithin the request, one bounded batch per call: call again while\n`pending` is above zero.","operationId":"rules.run_all","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleRunPendingResult"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Apply every rule to transactions no rule has seen","tags":["rules"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/rules/schema":{"get":{"description":"Every condition field (with the operators it admits and the kind of\nvalue it takes), every action, and the limits a rule must stay within.\nRead it before writing a rule: a key that is not here is refused.","operationId":"rules.get_schema","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleSchema"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get the rule vocabulary","tags":["rules"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/rules/{rule_id}":{"delete":{"description":"Delete a rule. What it already did stays done: a category it set is\nthe transaction's category now.","operationId":"rules.delete","parameters":[{"in":"path","name":"rule_id","required":true,"schema":{"title":"Rule Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a rule","tags":["rules"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One rule, with its conditions and actions.","operationId":"rules.get","parameters":[{"in":"path","name":"rule_id","required":true,"schema":{"title":"Rule Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rule"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a rule","tags":["rules"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"put":{"description":"Replace a rule wholesale: send the whole rule, as `rules.create`\ntakes it. Its conditions and actions are rewritten (and get new ids).\nWhat the rule already did stays done.","operationId":"rules.update","parameters":[{"in":"path","name":"rule_id","required":true,"schema":{"title":"Rule Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rule"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Replace a rule","tags":["rules"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/rules/{rule_id}/run":{"post":{"description":"Apply one rule to the transactions already in the ledger. Runs within\nthe request and is bounded: when `truncated` is true there is older\nhistory left, and calling again continues. Applying a rule twice changes\nnothing the second time.","operationId":"rules.run","parameters":[{"in":"path","name":"rule_id","required":true,"schema":{"title":"Rule Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleRunResult"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Apply a rule to past transactions","tags":["rules"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/savings-goals":{"get":{"description":"The ledger's savings goals, each measured against its account's\nbalance today.","operationId":"savings_goals.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsGoalList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List savings goals","tags":["savings_goals"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Set a target on an asset account: \"6,000 in savings by June\". Two\ngoals may share an account; each measures the same balance.","operationId":"savings_goals.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsGoalCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsGoal"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Create a savings goal","tags":["savings_goals"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/savings-goals/{savings_goal_id}":{"delete":{"description":"Remove a savings goal. The account and its money are untouched.","operationId":"savings_goals.delete","parameters":[{"in":"path","name":"savings_goal_id","required":true,"schema":{"title":"Savings Goal Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a savings goal","tags":["savings_goals"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One savings goal by its id.","operationId":"savings_goals.get","parameters":[{"in":"path","name":"savings_goal_id","required":true,"schema":{"title":"Savings Goal Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsGoal"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a savings goal","tags":["savings_goals"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Rename a goal, move it to another account, or change its target,\nbaseline or date. Only the fields sent change.","operationId":"savings_goals.update","parameters":[{"in":"path","name":"savings_goal_id","required":true,"schema":{"title":"Savings Goal Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsGoalUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavingsGoal"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update a savings goal","tags":["savings_goals"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/schedules":{"get":{"description":"The ledger's standing orders, newest first, each with its last run.\nAmounts are in the ledger's base currency.","operationId":"schedules.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List schedules","tags":["schedules"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Set up a standing order. Its first period ends on `next_run_on`,\nand every period posts once, by itself, on the day it ends. Send an\n`Idempotency-Key` so a retry cannot create it twice.","operationId":"schedules.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleInput"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Create a schedule","tags":["schedules"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/schedules/run":{"post":{"description":"Post every period that is due now, without waiting for the daily\nrun. Answers 202 with a Job (`kind` `run_schedules`); its `result`:\n`posted`, the number of periods posted. A period posts once, however\noften this runs.","operationId":"schedules.run","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Post what schedules owe now","tags":["schedules"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/schedules/{schedule_id}":{"delete":{"description":"Delete a standing order. What it already posted stays in the ledger.","operationId":"schedules.delete","parameters":[{"in":"path","name":"schedule_id","required":true,"schema":{"title":"Schedule Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a schedule","tags":["schedules"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One standing order by its id.","operationId":"schedules.get","parameters":[{"in":"path","name":"schedule_id","required":true,"schema":{"title":"Schedule Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a schedule","tags":["schedules"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Rename a standing order, or pause or resume it.","operationId":"schedules.update","parameters":[{"in":"path","name":"schedule_id","required":true,"schema":{"title":"Schedule Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleChange"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update a schedule","tags":["schedules"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/schedules/{schedule_id}/runs":{"get":{"description":"Every period a schedule has run for, latest first, with what each\nposted.","operationId":"schedule_runs.list","parameters":[{"in":"path","name":"schedule_id","required":true,"schema":{"title":"Schedule Id","type":"integer"}},{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleRunList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List a schedule's runs","tags":["schedules"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/stakes":{"get":{"description":"Every ledger this one owns a share of, with what the share is worth.","operationId":"stakes.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakeList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List stakes in other ledgers","tags":["stakes"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/stakes/{stake_id}":{"delete":{"description":"Stop counting the share: its value comes off this ledger from today,\nand its account is retired with its history. Takes an owner or admin.","operationId":"stakes.delete","parameters":[{"in":"path","name":"stake_id","required":true,"schema":{"title":"Stake Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Unlink a stake","tags":["stakes"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One stake and what it is worth.","operationId":"stakes.get","parameters":[{"in":"path","name":"stake_id","required":true,"schema":{"title":"Stake Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stake"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a stake","tags":["stakes"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Set the percentage owned from today and revalue the stake. Takes an\nowner or admin of this ledger.","operationId":"stakes.update","parameters":[{"in":"path","name":"stake_id","required":true,"schema":{"title":"Stake Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakeUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stake"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Change the share owned","tags":["stakes"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/stakes/{stake_id}/revalue":{"post":{"description":"Bring the stake to the owned ledger's value right now instead of at\nthe next daily revaluation. Posts the change, if any, to this ledger.","operationId":"stakes.revalue","parameters":[{"in":"path","name":"stake_id","required":true,"schema":{"title":"Stake Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stake"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Revalue a stake now","tags":["stakes"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/statements/balance-sheet":{"get":{"description":"The balance sheet at the end of each of the last `months` months (the\nlast column is today): every asset, liability and equity account's\nbalance, with retained earnings derived so the statement balances, and\na currency translation adjustment when foreign balances moved with the\nrates.","operationId":"statements.balance_sheet","parameters":[{"description":"How many calendar months, ending with the current one (1–24).","in":"query","name":"months","required":false,"schema":{"default":6,"description":"How many calendar months, ending with the current one (1–24).","maximum":24,"minimum":1,"title":"Months","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceSheet"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Balance sheet","tags":["statements"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/statements/cash-flow":{"get":{"description":"Money in and out of each real account in each of the last `months`\nmonths, translated to the base currency at each month's own rate.","operationId":"statements.cash_flow","parameters":[{"description":"How many calendar months, ending with the current one (1–24).","in":"query","name":"months","required":false,"schema":{"default":6,"description":"How many calendar months, ending with the current one (1–24).","maximum":24,"minimum":1,"title":"Months","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashFlow"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Cash flow statement","tags":["statements"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/statements/income":{"get":{"description":"The income statement: what each income and expense category took in or\nspent in each of the last `months` calendar months, their totals, and net\nincome (income − expenses).","operationId":"statements.income","parameters":[{"description":"How many calendar months, ending with the current one (1–24).","in":"query","name":"months","required":false,"schema":{"default":6,"description":"How many calendar months, ending with the current one (1–24).","maximum":24,"minimum":1,"title":"Months","type":"integer"}},{"description":"Only the `personal` or the `business` side of the ledger. Both when omitted.","in":"query","name":"purpose","required":false,"schema":{"anyOf":[{"pattern":"^(personal|business)$","type":"string"},{"type":"null"}],"description":"Only the `personal` or the `business` side of the ledger. Both when omitted.","title":"Purpose"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomeStatement"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Income statement","tags":["statements"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/statements/income/breakdown":{"get":{"description":"One row of the income statement split by who the money went to or\ncame from, over the same months. A category id that is not in this\nledger has no activity and answers no rows.","operationId":"statements.income_breakdown","parameters":[{"description":"The income or expense account to split (`category_id` of a row).","in":"query","name":"category_id","required":true,"schema":{"description":"The income or expense account to split (`category_id` of a row).","title":"Category Id","type":"integer"}},{"description":"How many calendar months, ending with the current one (1–24).","in":"query","name":"months","required":false,"schema":{"default":6,"description":"How many calendar months, ending with the current one (1–24).","maximum":24,"minimum":1,"title":"Months","type":"integer"}},{"description":"Only the `personal` or the `business` side of the ledger. Both when omitted.","in":"query","name":"purpose","required":false,"schema":{"anyOf":[{"pattern":"^(personal|business)$","type":"string"},{"type":"null"}],"description":"Only the `personal` or the `business` side of the ledger. Both when omitted.","title":"Purpose"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncomeStatementBreakdown"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Income statement row by counterparty","tags":["statements"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/tags":{"get":{"description":"The ledger's tags, with how many transactions carry each.","operationId":"tags.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List tags","tags":["tags"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Create a tag. Names are unique ignoring case: asking for one that\nexists returns the existing tag (its color unchanged) instead of an\nerror, so creating a tag by name is safe to repeat.","operationId":"tags.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Create a tag","tags":["tags"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/tags/{tag_id}":{"delete":{"description":"Delete a tag and take it off every transaction. Rules that name it\nkeep their row; the condition simply stops matching.","operationId":"tags.delete","parameters":[{"in":"path","name":"tag_id","required":true,"schema":{"title":"Tag Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a tag","tags":["tags"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One tag by id.","operationId":"tags.get","parameters":[{"in":"path","name":"tag_id","required":true,"schema":{"title":"Tag Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a tag","tags":["tags"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Rename or recolor a tag. Only the fields sent change. Renaming to a\nname another tag has is a 409. Transactions and rules that use the tag\nkeep it: they refer to its id, not its name.","operationId":"tags.update","parameters":[{"in":"path","name":"tag_id","required":true,"schema":{"title":"Tag Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Rename or recolor a tag","tags":["tags"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/tasks":{"get":{"description":"The ledger's to-do list: what is open, what is snoozed and what was\ndone in the last 30 days. Tasks come from the ledger itself and\ndisappear when their condition does (filing the last uncategorized\ntransaction completes that task), so the list is recomputed on every\nread. Dismissed tasks are not listed.","operationId":"tasks.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Only tasks in this state. Every state when omitted.","in":"query","name":"state","required":false,"schema":{"anyOf":[{"pattern":"^(open|snoozed|done)$","type":"string"},{"type":"null"}],"description":"Only tasks in this state. Every state when omitted.","title":"State"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List tasks","tags":["tasks"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/tasks/dismiss":{"post":{"description":"\"Never\": stop suggesting this task. Only tasks marked `dismissable`\ncan be dismissed. The verdict is written where the feature keeps it:\ndismissing `confirm_recurring` marks the charge as not recurring (see\n`recurring.set_status`). Undo with `tasks.restore`.","operationId":"tasks.dismiss","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRef"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskVerdict"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Dismiss a task","tags":["tasks"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/tasks/restore":{"post":{"description":"Undo `tasks.dismiss`. The task is listed again if its condition\nstill holds.","operationId":"tasks.restore","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRef"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskVerdict"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Restore a dismissed task","tags":["tasks"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/tasks/snooze":{"post":{"description":"\"Not now\": hide an open task for a day, a week or a month. It comes\nback on its own when the time is up, if its condition still holds.","operationId":"tasks.snooze","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskSnooze"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskVerdict"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Snooze a task","tags":["tasks"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/tasks/unsnooze":{"post":{"description":"Bring a snoozed task back to the open list now.","operationId":"tasks.unsnooze","parameters":[{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRef"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskVerdict"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Unsnooze a task","tags":["tasks"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/transactions":{"get":{"description":"The ledger's transactions, newest first. Daily market-value entries\non investment accounts are balance facts, not transactions, and are\nnever listed.","operationId":"transactions.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"description":"Only transactions touching this account.","in":"query","name":"account_id","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only transactions touching this account.","title":"Account Id"}},{"description":"Only transactions filed under this category account.","in":"query","name":"category_id","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only transactions filed under this category account.","title":"Category Id"}},{"description":"Only transactions carrying this tag.","in":"query","name":"tag_id","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only transactions carrying this tag.","title":"Tag Id"}},{"description":"On or after this date.","in":"query","name":"since","required":false,"schema":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"On or after this date.","title":"Since"}},{"description":"On or before this date.","in":"query","name":"until","required":false,"schema":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"On or before this date.","title":"Until"}},{"description":"Text in the description, the bank's statement line or the name the user gave the counterparty, or an amount (`72.80`, `72,80`; `72` is any amount from 72.00 to 72.99).","in":"query","name":"search","required":false,"schema":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"description":"Text in the description, the bank's statement line or the name the user gave the counterparty, or an amount (`72.80`, `72,80`; `72` is any amount from 72.00 to 72.99).","title":"Search"}},{"description":"Only transactions still waiting for a category.","in":"query","name":"uncategorized","required":false,"schema":{"default":false,"description":"Only transactions still waiting for a category.","title":"Uncategorized","type":"boolean"}},{"description":"`personal` or `business` only.","in":"query","name":"purpose","required":false,"schema":{"anyOf":[{"pattern":"^(personal|business)$","type":"string"},{"type":"null"}],"description":"`personal` or `business` only.","title":"Purpose"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List transactions","tags":["transactions"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Post a hand-written transaction as a balanced journal entry: a cash\npurchase, a loan payment split into interest and principal, an opening\nbalance. Send an `Idempotency-Key` so a retry cannot post it twice.","operationId":"transactions.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Create a transaction","tags":["transactions"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/transactions/categorize":{"post":{"description":"File up to 200 transactions under one category in a single step.\nNothing moves if any of them cannot be filed there (an income account\nfor a purchase, say); ids that are not in this ledger, and transfers,\nwhich have no category, are returned in `skipped`.","operationId":"transactions.categorize","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategorizeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategorizeResult"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Categorize transactions in bulk","tags":["transactions"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/transactions/{transaction_id}":{"delete":{"description":"Delete a hand-written transaction. Imported ones cannot be deleted\n(the next sync would bring them back); set `ignored` instead.","operationId":"transactions.delete","parameters":[{"in":"path","name":"transaction_id","required":true,"schema":{"title":"Transaction Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a transaction","tags":["transactions"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One transaction by its id (the journal entry id).","operationId":"transactions.get","parameters":[{"in":"path","name":"transaction_id","required":true,"schema":{"title":"Transaction Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a transaction","tags":["transactions"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Correct a transaction's description, date or memo, refile it under\nanother category, mark it a transfer between two of the ledger's own\naccounts (or take that back), or set it aside from spending totals.\nOnly the fields sent change. Refiling or marking an imported\ntransaction re-posts its entry, so the returned transaction may carry a\nnew `id`.","operationId":"transactions.update","parameters":[{"in":"path","name":"transaction_id","required":true,"schema":{"title":"Transaction Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update a transaction","tags":["transactions"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/transactions/{transaction_id}/tags":{"put":{"description":"Replace the tags on a transaction with exactly `tag_ids`. Tags a rule\napplied are replaced too. Hand-written transactions cannot carry tags\n(a 422).","operationId":"transactions.set_tags","parameters":[{"in":"path","name":"transaction_id","required":true,"schema":{"title":"Transaction Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionTagsInput"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionTags"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Set a transaction's tags","tags":["tags"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/transfer-accounts":{"get":{"description":"Every account a transfer can land on: the ledger's real asset and\nliability accounts, closed ones included. A transaction moved to one of\nthese is a transfer between your own accounts, not spending.","operationId":"transfer_accounts.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferAccountList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List transfer accounts","tags":["transfer_accounts"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Create an asset or liability account for money that goes somewhere\nthe ledger does not track yet (a bank that is not connected, a wallet),\nso a transfer there can be filed as a transfer instead of spending. Its\ncode is allocated for you and it starts at zero. For an account at a\nnamed bank with a known balance, `institutions.create_account` does\nmore. Send an `Idempotency-Key` so a retry cannot create it twice.","operationId":"transfer_accounts.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferAccountCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferAccount"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Create a transfer account","tags":["transfer_accounts"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/transfer-suggestions":{"get":{"description":"Accounts in this ledger that other accounts' transactions keep\npaying, while those transactions are still filed as spending or income\nby a guess. A category someone chose, or a rule, is never second-guessed.\nSuggestions already accepted or dismissed are left out.","operationId":"transfer_suggestions.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferSuggestionList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List transfer suggestions","tags":["transfer_suggestions"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/transfer-suggestions/{account_id}/accept":{"post":{"description":"Re-file the suggested transactions as transfers to this account, and\nroute new ones like them the same way from now on. Accepting again\nmoves only what arrived since.","operationId":"transfer_suggestions.accept","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"title":"Account Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptResult"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Accept a transfer suggestion","tags":["transfer_suggestions"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/transfer-suggestions/{account_id}/decision":{"delete":{"description":"Forget whether this account's suggestion was accepted or dismissed,\nso it can be suggested again. Transactions already re-filed stay filed.\nA 404 when there was no verdict.","operationId":"transfer_suggestions.reset","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"title":"Account Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Forget a transfer suggestion's verdict","tags":["transfer_suggestions"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true}},"/transfer-suggestions/{account_id}/dismiss":{"post":{"description":"Stop suggesting transfers to this account. Nothing is re-filed.","operationId":"transfer_suggestions.dismiss","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"title":"Account Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Dismiss a transfer suggestion","tags":["transfer_suggestions"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/unlinked-institutions":{"get":{"description":"Banks recent transfers keep naming that no account in this ledger is\nheld at: why spending can look too high (a card payment to an\nunconnected bank has nowhere to go but spending). A short list, the\nbanks the most money moves to first. Banks dismissed in the app are left\nout.","operationId":"unlinked_institutions.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnlinkedInstitutionList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List banks the transactions name but the ledger lacks","tags":["unlinked_institutions"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/vehicles":{"get":{"description":"Every vehicle in the ledger, including suggested and dismissed ones\n(see `status`), each with its loan and equity.","operationId":"vehicles.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehicleList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List vehicles","tags":["vehicles"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Add a vehicle the household owns, optionally linked to its loan.\nSend an `Idempotency-Key` so a retry cannot add it twice.","operationId":"vehicles.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehicleCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vehicle"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Add a vehicle","tags":["vehicles"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/vehicles/{vehicle_id}":{"delete":{"description":"Delete a vehicle that was added by hand. Its loan account stays. One\nfound from an auto loan cannot be deleted (the next sync would find it\nagain): set its `status` to `dismissed` instead.","operationId":"vehicles.delete","parameters":[{"in":"path","name":"vehicle_id","required":true,"schema":{"title":"Vehicle Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a vehicle","tags":["vehicles"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One vehicle with its loan and equity.","operationId":"vehicles.get","parameters":[{"in":"path","name":"vehicle_id","required":true,"schema":{"title":"Vehicle Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vehicle"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a vehicle","tags":["vehicles"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Correct a vehicle's details, revalue it, link or unlink its loan,\nconfirm or dismiss one found from an auto loan, or hide it or leave it\nout of the totals. Only the fields sent change.","operationId":"vehicles.update","parameters":[{"in":"path","name":"vehicle_id","required":true,"schema":{"title":"Vehicle Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VehicleUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vehicle"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update a vehicle","tags":["vehicles"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/webhook-endpoints":{"get":{"description":"The ledger's webhook endpoints. Secrets are never listed.","operationId":"webhook_endpoints.list","parameters":[{"description":"Page size, 1–200.","in":"query","name":"limit","required":false,"schema":{"default":50,"description":"Page size, 1–200.","maximum":200,"minimum":1,"title":"Limit","type":"integer"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The `next_cursor` of the previous page.","title":"Cursor"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"List webhook endpoints","tags":["webhook_endpoints"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"post":{"description":"Start pushing the ledger's changes of `change_types` to `url`. The\nresponse carries the signing `secret`, shown this once: store it and\nverify every delivery's `LumaLedger-Signature` with it. Changes from\nbefore the endpoint existed are not pushed (read them from\n`changes.list`). A ledger may have up to 16 endpoints.","operationId":"webhook_endpoints.create","parameters":[{"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","in":"header","name":"Idempotency-Key","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Any unique string (a UUID is ideal). A retry with the same key returns the first attempt's response instead of doing the work twice. Keys are kept for 24 hours.","title":"Idempotency-Key"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Create a webhook endpoint","tags":["webhook_endpoints"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/webhook-endpoints/{webhook_endpoint_id}":{"delete":{"description":"Stop pushing to this endpoint, and drop what it is still owed. The\nchange feed is unaffected.","operationId":"webhook_endpoints.delete","parameters":[{"in":"path","name":"webhook_endpoint_id","required":true,"schema":{"title":"Webhook Endpoint Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Delete a webhook endpoint","tags":["webhook_endpoints"],"x-lumaledger-access":"write","x-lumaledger-destructive":true,"x-lumaledger-idempotent":true},"get":{"description":"One webhook endpoint, with whether it is failing. The secret is not shown.","operationId":"webhook_endpoints.get","parameters":[{"in":"path","name":"webhook_endpoint_id","required":true,"schema":{"title":"Webhook Endpoint Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Get a webhook endpoint","tags":["webhook_endpoints"],"x-lumaledger-access":"read","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true},"patch":{"description":"Change an endpoint's URL, description or change types, or turn it\noff and on. Only the fields sent change. Turning a disabled endpoint\nback on clears its failure record; what it missed meanwhile is in\n`changes.list`, not re-sent.","operationId":"webhook_endpoints.update","parameters":[{"in":"path","name":"webhook_endpoint_id","required":true,"schema":{"title":"Webhook Endpoint Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Update a webhook endpoint","tags":["webhook_endpoints"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":true}},"/webhook-endpoints/{webhook_endpoint_id}/rotate-secret":{"post":{"description":"Issue a new signing secret, shown in this response only. For the next\n24 hours deliveries carry two `v1` signatures, one per secret, so a\nreceiver can switch over without refusing any; after that only the new\nsecret signs.","operationId":"webhook_endpoints.rotate_secret","parameters":[{"in":"path","name":"webhook_endpoint_id","required":true,"schema":{"title":"Webhook Endpoint Id","type":"integer"}},{"in":"header","name":"accept-language","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}},{"in":"header","name":"X-Organization-Id","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Organization-Id"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}},"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The request was malformed or a parameter is invalid."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No valid credential was sent."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"The credential or the member's role does not allow this."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such resource in this ledger."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting request, e.g. one with the same Idempotency-Key still running."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many requests; retry after the Retry-After header."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Something failed on our side; the request_id identifies it."}},"security":[{"HTTPBearer":[]}],"summary":"Rotate a webhook endpoint's signing secret","tags":["webhook_endpoints"],"x-lumaledger-access":"write","x-lumaledger-destructive":false,"x-lumaledger-idempotent":false}}},"servers":[{"url":"https://api.lumaledger.app/v1"}]}