Summarize a case's transactions by month and 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/case/{caseId}/transactions/monthly-category-summary

Returns debit and credit totals and counts per category for each month, across all the case's accounts or the ones given, with optional category and date filters. On a case shared with opposing counsel, only accounts the caller may see are counted. Returns 403 while the monthly category summary feature is turned off.

Path parameters

  • caseId string Required

    Case ID

Query parameters

  • accountIds array[string]

    Restrict the aggregation to these FinancialAccount IDs (all must belong to the case). Omit to include every linked account in the case. Accepts a repeated query param or a comma-separated list.

  • category array[string]

    Filter by one or more categories (case-insensitive partial match on categoryPrimary; matches any of them). Accepts a repeated query param or a comma-separated list. If omitted, every category is returned per month.

  • startDate string

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

  • endDate string

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

  • groupBy string

    Category granularity. detailed nests Plaid subcategories under each broad category; primary (default) returns the broad-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
      • months array[object] Required

        One entry per month that has matching transactions, ascending.

        Hide months attributes Show months attributes object
        • month string Required

          Month bucket in UTC. Format: YYYY-MM.

        • categories array[object] Required

          Per-category debit/credit totals for this month, sorted by debitTotal desc.

          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

          Totals across all categories for this month.

          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.

      • totals object Required

        Grand totals across every month and category.

        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.

      • accountIds array[string] Required

        FinancialAccount IDs included in the aggregation.

    • statusCode number Required
    • timestamp string(date-time) Required
GET /financial-data/case/{caseId}/transactions/monthly-category-summary
curl \
 --request GET 'http://api.example.com/financial-data/case/{caseId}/transactions/monthly-category-summary' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "months": [
      {
        "month": "2024-01",
        "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
        }
      }
    ],
    "totals": {
      "debitTotal": 3120.75,
      "creditTotal": 4500,
      "transactionCount": 86
    },
    "accountIds": [
      "507f1f77bcf86cd799439011",
      "65a1b2c3d4e5f6a7b8c9d0e2"
    ]
  },
  "statusCode": 200,
  "timestamp": "2026-01-15T10:15:00.000Z"
}