Summarize an account's transactions by category

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.usehearsay.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "integrations MCP server": {
    "url": "https://docs.usehearsay.com/mcp"
  }
}

Close
GET /financial-data/account/{accountId}/transactions/summary

Returns debit and credit totals and a transaction count per category for one account, plus overall totals; optionally filter by category text and date range, or nest subcategories with groupBy=detailed. On a case shared with opposing counsel, an account the caller may not see returns an empty summary. Returns 404 when a Plaid item or account id sent belongs to another case.

Path parameters

  • accountId string Required

    Financial account ID

Query parameters

  • caseId string Required

    Case ID this financial data belongs to.

  • plaidItemId string

    Internal PlaidItem document ID. Optional — resolved automatically from accountId.

  • category string

    Filter by category (case-insensitive partial match on categoryPrimary). If omitted, all categories are included.

  • startDate string

    Filter transactions from this date (inclusive). Format: YYYY-MM-DD.

  • endDate string

    Filter transactions up to this date (inclusive). Format: YYYY-MM-DD.

  • groupBy string

    Category granularity. detailed nests Plaid subcategories under each category; primary (default) returns the category breakdown only.

    Values are primary or detailed. Default value is primary.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • categories array[object] Required
        Hide categories attributes Show categories attributes object
        • category string | null Required

          Normalized category name (uppercase). Null for uncategorized transactions.

        • debitTotal number Required

          Sum of positive amounts (money out) for this category. In the account currency's major unit (dollars for USD), not cents, rounded to 2 decimals.

        • creditTotal number Required

          Sum of absolute negative amounts (money in) for this category. In the account currency's major unit (dollars for USD), not cents, rounded to 2 decimals.

        • transactionCount number Required

          Total number of transactions in this category.

        • subcategories array[object]

          Per-subcategory breakdown, present only when groupBy=detailed. Sorted by debitTotal desc, uncategorized (null) last.

          Hide subcategories attributes Show subcategories attributes object
          • subcategory string | null Required

            Normalized subcategory name (uppercase). Transactions with no Plaid subcategory or whose primary category was overridden fall under a bucket labelled 'UNCATEGORIZED' in the per-account summary (null in the monthly summary).

          • debitTotal number Required

            Sum of positive amounts (money out) for this subcategory. In the account currency's major unit (dollars for USD), not cents, rounded to 2 decimals.

          • creditTotal number Required

            Sum of absolute negative amounts (money in) for this subcategory. In the account currency's major unit (dollars for USD), not cents, rounded to 2 decimals.

          • transactionCount number Required

            Total number of transactions in this subcategory.

      • totals object Required
        Hide totals attributes Show totals attributes object
        • debitTotal number Required

          Total sum of positive amounts (money out) across all matched transactions. In the account currency's major unit (dollars for USD), not cents, rounded to 2 decimals.

        • creditTotal number Required

          Total sum of absolute negative amounts (money in) across all matched transactions. In the account currency's major unit (dollars for USD), not cents, rounded to 2 decimals.

        • transactionCount number Required

          Total number of matched transactions.

    • statusCode number Required
    • timestamp string(date-time) Required
GET /financial-data/account/{accountId}/transactions/summary
curl \
 --request GET 'http://api.example.com/financial-data/account/{accountId}/transactions/summary?caseId=string' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "categories": [
      {
        "category": "FOOD_AND_DRINK",
        "debitTotal": 482.35,
        "creditTotal": 0,
        "transactionCount": 17,
        "subcategories": [
          {
            "subcategory": "FOOD_AND_DRINK_COFFEE",
            "debitTotal": 64.2,
            "creditTotal": 0,
            "transactionCount": 9
          }
        ]
      }
    ],
    "totals": {
      "debitTotal": 3120.75,
      "creditTotal": 4500,
      "transactionCount": 86
    }
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}