Budgets set a monthly spending limit for a given category. Finper stores one budget record per (category, year, month, user) combination. The budget system supports upsert semantics — the same PATCH endpoint creates or updates depending on whether a record already exists — and a copy operation that replicates an entire month’s budget plan to a different period. All endpoints require theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/soker90/finper/llms.txt
Use this file to discover all available pages before exploring further.
token header.
Budgets enforce a unique constraint on the combination of
(category, year, month, user). The PATCH /:category/:year/:month endpoint relies on this index to perform an upsert: if a budget for that combination already exists it is updated, otherwise a new budget record is inserted.GET /api/budgets
List all budgets for the authenticated user, optionally filtered by year and/or month.GET /api/budgets
Query Parameters
The calendar year to retrieve budgets for (e.g.
2024).The month number (0–11, where
0 = January and 11 = December). If omitted, all months for the specified year are returned.Response — 200 OK
Returns an array of budget objects. Thecategory field is populated with the category object.
Unique identifier of the budget record.
Populated category object (id, name, type).
The budget year.
The budget month (0–11).
The budgeted spending limit for this category in this period.
Example
PATCH /api/budgets/:category/:year/:month
Create or update the budget amount for a specific category and period.PATCH /api/budgets/:category/:year/:month
This endpoint uses upsert semantics: if a budget already exists for the given (category, year, month) combination it is updated; otherwise a new budget record is created.
Path Parameters
The ID of the category to set the budget for. The category must belong to the authenticated user.
The calendar year (e.g.
2024).The month number (0–11, where
0 = January and 11 = December).Request Body
The spending limit to set for this category and period.
Response — 200 OK
Returns the upserted budget object.Example
POST /api/budgets
Copy all budgets from one month to another.POST /api/budgets
This is a bulk-copy operation. It reads every budget that exists for the origin period and creates (or overwrites) corresponding budget records in the destination period. This is useful for recurring monthly plans where most category limits stay the same.
Request Body
The source year to copy budgets from. Must be between
2000 and 2100.The source month (0–11) to copy budgets from.
The destination year to copy budgets to. Must be between
2000 and 2100.The destination month (0–11) to copy budgets to.