Summary attributes
| Attribute | Type | Description |
|---|---|---|
| total_spending | string | Total spending amount |
| average_daily_spending | string | Average daily spending |
| average_monthly_spending | string | Average monthly spending |
| total_transactions | integer | Total number of transactions |
| unique_merchants | integer | Number of unique merchants |
| top_category | string | Highest-spending category |
| top_merchant | string | Highest-spending merchant |
Spending data attributes
| Attribute | Type | Description |
|---|---|---|
| by_category | array of objects | Spending grouped by category |
| by_merchant | array of objects | Spending grouped by merchant |
| by_time_period | array of objects | Spending grouped by time period |
Response attributes
| Attribute | Type | Description |
|---|---|---|
| spending | object | Spending data from MyTruv API |
| summary | object | Summary statistics |
| request_id | string | Unique request identifier |
| created_at | string | Analysis creation timestamp |
| by_time_period | array of objects | Time periods with category/merchant breakdown (only when group_by=time_period and secondary_group_by is set) |
| total_income | string | Total income (credits) across the period. Null unless include_income=true. |
| total_expenses | string | Total expenses (debits) across the period. |
| savings_rate | string | Share of income retained, as a percentage. Null unless income is included. |
Endpoints
Example response
{
"spending": {
"by_category": [
{
"category": "Food & Dining",
"total_amount": "1250.00",
"transaction_count": 45,
"average_transaction": "27.78",
"percentage_of_total": "24.5"
}
],
"by_merchant": [
{
"merchant_name": "Whole Foods",
"total_amount": "850.00",
"transaction_count": 12,
"average_transaction": "70.83",
"percentage_of_total": "16.7"
}
]
},
"summary": {
"total_spending": "5100.00",
"average_daily_spending": "170.00",
"average_monthly_spending": "5100.00",
"total_transactions": 249,
"unique_merchants": 3,
"top_category": "Food & Dining",
"top_merchant": "Whole Foods"
},
"request_id": "req_abc123",
"created_at": "2025-03-15T10:00:00Z",
"total_income": null,
"total_expenses": "5100.00",
"savings_rate": null
}