API Reference
Summary
Aggregated data for the dashboard — total balance, monthly income/expense, and an expense breakdown by category for the current calendar month.
/api/summary
Get dashboard summary
Returns the data needed to render the home screen of the app. Always scoped to the current calendar month.
Response
200 OK
{
"total_balance": 1425.50,
"accounts": [
{
"id": 1,
"name": "GTBank Checking",
"type": "bank",
"starting_balance": "1000.00",
"balance": 1350.00
},
{
"id": 2,
"name": "MTN MoMo",
"type": "mobile",
"starting_balance": "200.00",
"balance": 75.50
}
],
"monthly_summary": {
"income": 2500.00,
"expense": 1074.50,
"net": 1425.50
},
"category_breakdown": [
{ "category_name": "Groceries", "total": 420.00 },
{ "category_name": "Transport", "total": 180.50 },
{ "category_name": "Eating out", "total": 230.00 },
{ "category_name": "Uncategorized", "total": 244.00 }
]
}
401 Unauthorized
{ "message": "Unauthenticated." }
Response fields
| Field | Type | Description |
|---|---|---|
total_balance |
number | Sum of every account's calculated balance. |
accounts |
array | The user's accounts, each with its calculated balance. |
monthly_summary.income |
number | Total income for the current calendar month. |
monthly_summary.expense |
number | Total expenses for the current calendar month. |
monthly_summary.net |
number | Income minus expense. |
category_breakdown |
array | Expenses grouped by category for the current month. Each row is { category_name, total }; rows with no category appear as Uncategorized. |