Get Spending report for the financial account group by Merchant Category

Get Spending Report for Financial Account Grouped by Merchant Category

Deprecated: This endpoint has been marked deprecated. It may be removed in a future API version. Review available UserReport endpoints for current alternatives.

This endpoint returns a spending report for a specific financial account, aggregating transaction amounts by merchant category. The response includes each category's total spend and its percentage of overall spending, as well as the grand total across all categories. Use optional date range parameters to scope the report to a specific time window.

Endpoint

GET /api/userReport/spendingReportByAccountGroupByCategory

Authentication

Bearer token required. Obtain via:

POST https://api.banking.netevia.dev/api/auth/v2

Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.

When to use

Use this endpoint when you need to present a category-level spending summary to a customer for a given financial account. It is useful for dashboards and analytics screens where customers want to understand where their money is being spent across merchant categories. Providing from and to parameters allows filtering to a specific billing period or custom date range.

Query Parameters

ParameterTypeRequiredDescription
finAccountIdstringYesThe unique identifier of the financial account to report on.
fromstring (date-time)NoStart of the date range (ISO 8601 format). If omitted, no lower bound is applied.
tostring (date-time)NoEnd of the date range (ISO 8601 format). If omitted, no upper bound is applied.

Response

200 OK

Top-level response object (spendingreportbycategory):

FieldTypeDescription
categoriesarrayList of spending amounts broken down by merchant category.
totalinteger (int64)Grand total spending amount across all categories, in the smallest currency unit (e.g., cents).

Each item in categories (spendingamountbycategory):

FieldTypeDescription
categorystringMerchant category name (e.g., "Groceries", "Travel"). May be null if uncategorized.
amountinteger (int64)Total spending amount for this category, in the smallest currency unit (e.g., cents).
percentagenumber (double)Percentage of total spending that this category represents.
{
  "categories": [
    {
      "category": "Groceries",
      "amount": 45230,
      "percentage": 32.5
    },
    {
      "category": "Travel",
      "amount": 28900,
      "percentage": 20.8
    },
    {
      "category": "Restaurants",
      "amount": 21500,
      "percentage": 15.5
    },
    {
      "category": null,
      "amount": 43370,
      "percentage": 31.2
    }
  ],
  "total": 139000
}

Error Codes

CodeWhen it happens
400Missing or invalid finAccountId, or malformed from/to date-time values.
401Token missing, expired, or invalid.
403Insufficient permissions to access the specified financial account.
404Financial account not found for the provided finAccountId.
500Internal server error.

Common Mistakes

  • Omitting the required finAccountId query parameter will result in a 400 error.
  • Providing from or to in a format other than ISO 8601 date-time (e.g., 2024-01-01T00:00:00Z) will cause a parse error.
  • Amount values are returned in the smallest currency unit (cents). Divide by 100 to display dollar amounts.
  • This endpoint is deprecated — plan migration to a current alternative to avoid breakage when it is removed.

Related Endpoints

  • GET /api/userReport/spendingReportByAccount — Retrieve overall spending report for a financial account without category grouping.
  • GET /api/userReport/spendingReportByAccountGroupByMerchant — Retrieve spending report for a financial account grouped by merchant.

Example

curl -X GET "https://api.banking.netevia.dev/api/userReport/spendingReportByAccountGroupByCategory?finAccountId=XXXXXXXXXX&from=2024-01-01T00%3A00%3A00Z&to=2024-01-31T23%3A59%3A59Z" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"
Query Params
string
required
date-time
date-time
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json