Overview
Budgets help you control spending by setting monthly limits for each expense category. Your Finance App provides hierarchical budget tracking with automatic rollup calculations and visual status indicators.Category-Based
Set budgets for any expense category in your system
Hierarchical Tracking
Parent categories automatically sum their children’s spending
Visual Status
OK, WARNING, or EXCEEDED status based on spending percentage
Parent-Child Validation
Built-in rules prevent budget conflicts in category hierarchies
Creating a Budget
Set a monthly spending limit for a category with POST/budgets:
Request Parameters
Budget limit (must be positive)
Month (1-12)
Year (minimum: 2024)
UUID of the category to budget
Response
You can only create one budget per category per month. Attempting to create a duplicate returns a conflict error.
Hierarchical Budget Rules
When working with category hierarchies, the system enforces two critical rules:Rule 1: Child Cap (Upward Validation)
Children cannot exceed their parent’s budget:Rule 2: Parent Floor (Downward Validation)
Parents must cover all their children:Viewing Budget Status
Get a comprehensive budget report for a specific month with GET/budgets:
Response Format
The response shows a hierarchical tree with calculated spending:Response Fields
id
id
Budget ID (null if category has no budget but appears due to spending)
spent (Recursive)
spent (Recursive)
Total spent in this category AND all its children. Used for parent categories.
directSpent
directSpent
Amount spent directly in this category (excludes children). Used for leaf categories.
remaining
remaining
Budget amount minus recursive spending (max of 0)
percentage
percentage
(spent / amount) × 100, rounded to nearest integer
status
status
- OK: 0-79% spent (green)
- WARNING: 80-99% spent (yellow)
- EXCEEDED: 100%+ spent (red)
- UNBUDGETED: No budget set but has spending
Budget Status Indicators
The system calculates status based on spending percentage:OK
0-79% of budget spentYou’re on track!
WARNING
80-99% of budget spentGetting close to your limit
EXCEEDED
100%+ of budget spentYou’ve exceeded your budget
UNBUDGETED Status: Categories with spending but no budget are marked as UNBUDGETED, helping you identify where to add budgets.
Updating Budgets
Modify an existing budget with PATCH/budgets/:id:
Update Validations
When updating, the system re-validates:- Upward: New amount + siblings must not exceed parent budget
- Downward: New amount must be ≥ sum of children budgets
Deleting Budgets
Remove a budget with DELETE/budgets/:id:
- Removes the budget limit
- Does NOT delete children’s budgets
- Children become “orphaned” but remain functional
Timezone Handling
Budget periods respect your user timezone setting:The system uses your user profile’s timezone. Update it via the user settings endpoint if you travel or relocate.
Recursive Spending Calculation
Parent categories show the sum of:- Direct spending in the parent category
- All spending in child categories
- All spending in grandchild categories (if any)
Best Practices
Start with Top-Level Categories
Start with Top-Level Categories
Create budgets for main categories (Food, Transport, Housing) before subcategories. This prevents validation errors.
Use the 50/30/20 Rule
Use the 50/30/20 Rule
- 50% for needs (housing, food, utilities)
- 30% for wants (entertainment, dining out)
- 20% for savings and debt
Review Weekly
Review Weekly
Check your budget status weekly to catch overspending early and adjust behavior.
Adjust Monthly
Adjust Monthly
Review and update budgets at the end of each month based on actual spending patterns.
Leave Buffer Room
Leave Buffer Room
Set budgets 10-15% lower than your absolute limit to account for unexpected expenses.
