add_flow
Record a single income or expense entry for a period using predefined categories (e.g., salary, rent). Overwrites existing entry with same period and category.
Instructions
Upsert a single cash flow entry for a period (also edits — same composite key overwrites). Use this when recording just one or two flow items; prefer add_monthly for full month-end settlement. VALID FLOW CATEGORIES — income (sub_type=employment): salary, business. Income (sub_type=investment): dividends, interest. Income (sub_type=other): income_other. Expense (sub_type=consumption): personal. Expense (sub_type=fixed): insurance, phone, utilities. Expense (sub_type=housing): rent, maintenance. Expense (sub_type=debt): loan_repayment. Expense (sub_type=other): expense_other. Use ONLY these category strings — do NOT invent your own.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | Yes | YYYY-MM | |
| date | Yes | YYYY-MM-DD (typically month-end) | |
| type | Yes | ||
| sub_type | Yes | Must match the category sub_type. Income: employment, investment, other. Expense: consumption, fixed, housing, debt, other. | |
| category | Yes | Must be one of the predefined flow categories. Income: salary, business, dividends, interest, income_other. Expense: personal, insurance, phone, utilities, rent, maintenance, loan_repayment, expense_other. | |
| amount | Yes | Amount in `currency` units (whole units) | |
| currency | No | Currency of `amount` (USD/KRW/JPY/EUR/CNY/GBP). Non-USD converted via historical FX at `date`. | USD |
| memo | No |