Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/astrxnomo/financial-analytics-agent/llms.txt

Use this file to discover all available pages before exploring further.

The /api/finance/data-overview endpoint answers meta questions about the dataset itself rather than financial figures within it. It tells you how much data exists, how far back it goes, and how many departments, categories, transactions, and budget rows are present. This is useful as a first call when building a UI that needs to know the valid date range before constructing other queries, or when presenting dataset provenance information to a user. It takes no query parameters and always returns figures for the full dataset.

Request

This endpoint accepts no query parameters. Send a plain GET request.

Response

dataFrom
string
The date of the earliest transaction in the dataset, in YYYY-MM-DD format.
dataTo
string
The date of the most recent transaction in the dataset, in YYYY-MM-DD format.
departments
number
The total number of departments in the dataset. The seeded demo contains 5: Sales, Marketing, Engineering, Operations, and Finance.
categories
object
An object containing category counts broken down by type.
transactions
number
Total number of individual transaction rows across all departments, categories, and dates.
budgets
number
Total number of budget rows in the budgets table. The seeded demo stores one row per department per month, so this equals the number of departments multiplied by the number of months covered.
For richer dataset metadata, use GET /api/finance/highlights. This endpoint returns the same dataFrom and dataTo coverage dates plus higher-level insights derived from the data:
  • latestMonth — the most recently completed calendar month with data
  • topAnomaly — the single largest statistical outlier: department, category, amount, and date
  • mostOverBudgetDept — the department that has exceeded its budget in the most months
  • fastestGrowingCategory — the category with the highest month-over-month growth multiple
/api/finance/highlights is consumed internally by the useFinanceHighlights hook in the chat UI to ground the suggested question chips in real seeded data, requiring no extra model round-trip. It is not documented separately because it is intended as an internal UI primitive rather than a general-purpose analytics endpoint.

Example

Request

curl "http://localhost:3000/api/finance/data-overview"

Response

{
  "dataFrom": "2023-07-01",
  "dataTo": "2026-06-30",
  "departments": 5,
  "categories": {
    "total": 11,
    "revenue": 3,
    "expense": 8
  },
  "transactions": 15420,
  "budgets": 180
}

Build docs developers (and LLMs) love