Documentation 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.
Finper provides two complementary modules for tracking money that moves outside your regular transaction flow: Debts for informal IOUs with named third parties, and Goals for ring-fencing savings toward a specific target. Neither module requires a formal account or loan structure — they are intentionally lightweight.
Debts
A Debt represents an informal obligation between you and a named person or organisation. Because Finper is self-hosted and personal, the counterparty is stored as a free-text string in the from field — there is no contact directory.
Debt type
| Type | Meaning |
|---|
from | The counterparty owes you money (you lent it) |
to | You owe the counterparty money (you borrowed it) |
Endpoints
| Method | Route | Description |
|---|
POST | /api/debts | Create a new debt |
GET | /api/debts | List all debts, grouped by type and summarised by person |
GET | /api/debts/from/:from | List all debts for a specific counterparty name |
PUT | /api/debts/:id | Replace a debt record |
DELETE | /api/debts/:id | Delete a debt record |
POST | /api/debts/:id/pay | Register a payment or receipt against a debt |
Debt fields
| Field | Type | Required | Description |
|---|
from | string | ✅ | Free-text name of the counterparty |
amount | number | ✅ | Outstanding amount |
type | from | to | ✅ | Direction of the debt |
date | number | ❌ | Unix timestamp (ms) of the debt date |
paymentDate | number | ❌ | Unix timestamp (ms) of the expected or actual payment date |
concept | string | ❌ | Optional description or notes |
Recording a payment with POST /:id/pay
POST /api/debts/:id/pay subtracts the supplied amount from the debt’s outstanding balance. If the payment covers the full remaining amount (or more), the debt record is automatically deleted. The body requires a single field:
The endpoint does not automatically create a transaction in your accounts — if you want to record the cash movement, create a transaction separately.
Example: Create a debt
curl -X POST http://localhost:3008/api/debts \
-H 'token: <your-jwt>' \
-H 'Content-Type: application/json' \
-d '{
"from": "Alice",
"amount": 120,
"type": "from",
"date": 1718000000000,
"paymentDate": 1720000000000,
"concept": "Concert tickets advance"
}'
Example: Record a payment on a debt
curl -X POST http://localhost:3008/api/debts/abc123/pay \
-H 'token: <your-jwt>' \
-H 'Content-Type: application/json' \
-d '{ "amount": 60 }'
The remaining balance will be updated to 60. If you pass 120 or more, the debt is deleted entirely.
Goals
A Goal is a named savings target. You set a targetAmount and then gradually increase currentAmount through explicit fund and withdraw operations. Goals are visual-friendly — each one carries a color and an icon chosen from closed enums.
Endpoints
| Method | Route | Description |
|---|
POST | /api/goals | Create a new goal |
GET | /api/goals | List all goals |
GET | /api/goals/:id | Get a single goal by ID |
PUT | /api/goals/:id | Update goal metadata (name, target, deadline, color, icon) |
DELETE | /api/goals/:id | Delete a goal |
POST | /api/goals/:id/fund | Add money to the goal |
POST | /api/goals/:id/withdraw | Remove money from the goal |
Goal fields
| Field | Type | Required | Description |
|---|
name | string | ✅ | Human-readable label |
targetAmount | number | ✅ | Savings target (must be positive) |
currentAmount | number | ❌ | Current saved amount (defaults to 0) |
deadline | ISO date string | ❌ | Optional target date as an ISO 8601 string (e.g. "2026-12-31"), or null |
color | string (hex) | ✅ | One of the 10 allowed hex values |
icon | string | ✅ | One of the 10 allowed Ant Design icon names |
deadline accepts an ISO 8601 date string such as "2026-12-31" — not a Unix timestamp. Pass null to clear a deadline.
Color options
#4CAF50 #2196F3 #9C27B0 #FF9800 #F44336
#00BCD4 #795548 #607D8B #E91E63 #FFC107
Icon options
DollarOutlined HomeOutlined CarOutlined LaptopOutlined
HeartOutlined RocketOutlined GiftOutlined BankOutlined
TrophyOutlined StarOutlined
Funding and withdrawing
Both sub-actions take a single amount field (positive number).
POST /api/goals/:id/fund — increases currentAmount by amount. The total allocation across all goals is validated against your active account balances; an error is returned if the new total would exceed your available balance.
POST /api/goals/:id/withdraw — decreases currentAmount by amount. Returns an error if amount exceeds the current balance of the goal.
currentAmount is always rounded to 2 decimal places after each fund or withdraw operation.
Example: Create a goal
curl -X POST http://localhost:3008/api/goals \
-H 'token: <your-jwt>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Emergency Fund",
"targetAmount": 5000,
"color": "#4CAF50",
"icon": "BankOutlined",
"deadline": "2026-12-31"
}'
Example: Add funds to a goal
curl -X POST http://localhost:3008/api/goals/xyz789/fund \
-H 'token: <your-jwt>' \
-H 'Content-Type: application/json' \
-d '{ "amount": 250 }'
The response returns the updated goal object with the new currentAmount.