curl --request GET \
--url https://api.example.com/api/v1/expense-insights{
"year": 2025,
"prevYear": 2024,
"totalCurrent": 450000,
"totalPrevious": 380000,
"totalChangePct": 18.4,
"totalDirection": "up",
"hasPreviousYear": true,
"monthly": [
{
"month": 1,
"name": "January",
"current": 120000,
"previous": 95000,
"changePct": 26.3,
"direction": "up"
}
],
"quarterly": [
{
"quarter": 1,
"current": 350000,
"previous": 290000,
"changePct": 20.7,
"direction": "up"
}
],
"categories": [
{
"category": "travel",
"label": "Travel",
"current": 180000,
"previous": 120000,
"changePct": 50.0,
"direction": "up",
"flagged": true
}
],
"categoryMonthly": {}
}
Get year-over-year expense trends and category analysis.
curl --request GET \
--url https://api.example.com/api/v1/expense-insights{
"year": 2025,
"prevYear": 2024,
"totalCurrent": 450000,
"totalPrevious": 380000,
"totalChangePct": 18.4,
"totalDirection": "up",
"hasPreviousYear": true,
"monthly": [
{
"month": 1,
"name": "January",
"current": 120000,
"previous": 95000,
"changePct": 26.3,
"direction": "up"
}
],
"quarterly": [
{
"quarter": 1,
"current": 350000,
"previous": 290000,
"changePct": 20.7,
"direction": "up"
}
],
"categories": [
{
"category": "travel",
"label": "Travel",
"current": 180000,
"previous": 120000,
"changePct": 50.0,
"direction": "up",
"flagged": true
}
],
"categoryMonthly": {}
}
{
"year": 2025,
"prevYear": 2024,
"totalCurrent": 450000,
"totalPrevious": 380000,
"totalChangePct": 18.4,
"totalDirection": "up",
"hasPreviousYear": true,
"monthly": [
{
"month": 1,
"name": "January",
"current": 120000,
"previous": 95000,
"changePct": 26.3,
"direction": "up"
}
],
"quarterly": [
{
"quarter": 1,
"current": 350000,
"previous": 290000,
"changePct": 20.7,
"direction": "up"
}
],
"categories": [
{
"category": "travel",
"label": "Travel",
"current": 180000,
"previous": 120000,
"changePct": 50.0,
"direction": "up",
"flagged": true
}
],
"categoryMonthly": {}
}
false, change badges and comparison lines are omitted in the UI.true when the category has a 10%+ increase year-over-year. Displayed as a warning in the UI.