curl --request GET \
--url https://api.mytruv.com/v1/users/spending \
--header 'Authorization: Basic <encoded-value>'{
"spending": {
"by_category": [
{
"category": "Food & Dining",
"total_amount": "1020.00",
"transaction_count": 36,
"average_transaction": "28.33",
"percentage_of_total": "20.0",
"largest_transaction": {
"transaction_id": "<string>",
"amount": "200.31",
"date": "2025-05-04",
"description": "Whole Foods Market",
"merchant_category_code": "5812"
},
"subcategories": [
{
"name": "Groceries",
"amount": "500.00",
"count": 15
}
],
"time_series": [
{
"end_date": "2025-10-16",
"amount": "31.27",
"count": 1,
"start_date": "2025-10-16"
}
],
"trend": "5.0"
}
],
"by_merchant": [
{
"merchant_name": "Whole Foods",
"category": "Food & Dining",
"total_amount": "408.00",
"transaction_count": 12,
"average_transaction": "34.00",
"percentage_of_total": "20.0",
"is_recurring": true,
"largest_transaction": {
"transaction_id": "<string>",
"amount": "200.31",
"date": "2025-05-04",
"description": "Whole Foods Market",
"merchant_category_code": "5812"
},
"time_series": [
{
"end_date": "2025-10-16",
"amount": "31.27",
"count": 1,
"start_date": "2025-10-16"
}
],
"trend": "5.0"
}
],
"by_time_period": [
{
"time_period": "month",
"end_date": "2025-11-01",
"total_amount": "408.00",
"transaction_count": 12,
"average_transaction": "34.00",
"percentage_of_total": "20.0",
"largest_transaction": {
"transaction_id": "<string>",
"amount": "200.31",
"date": "2025-05-04",
"description": "Whole Foods Market",
"merchant_category_code": "5812"
},
"start_date": "2025-10-02",
"trend": "5.0"
}
]
},
"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": "<string>",
"created_at": "<string>",
"by_time_period": [
{
"end_date": "2024-01-31",
"total_amount": "1450.00",
"transaction_count": 52,
"percentage_of_total": "31.7",
"breakdown": [
{
"name": "Food & Dining",
"amount": "650.00",
"transaction_count": 24,
"percentage": "44.8"
}
],
"start_date": "2024-01-01",
"trend": "5.5"
}
]
}Get spending analysis for the authenticated user.
Returns categorized spending breakdown with totals.
Double aggregation: Use group_by=time_period with secondary_group_by=category
or secondary_group_by=merchant to get a breakdown within each time period (top 10 + “Other”).
The end_date is capped at today if it is in the future or omitted.
Returns 404 if no spending data is available.
curl --request GET \
--url https://api.mytruv.com/v1/users/spending \
--header 'Authorization: Basic <encoded-value>'{
"spending": {
"by_category": [
{
"category": "Food & Dining",
"total_amount": "1020.00",
"transaction_count": 36,
"average_transaction": "28.33",
"percentage_of_total": "20.0",
"largest_transaction": {
"transaction_id": "<string>",
"amount": "200.31",
"date": "2025-05-04",
"description": "Whole Foods Market",
"merchant_category_code": "5812"
},
"subcategories": [
{
"name": "Groceries",
"amount": "500.00",
"count": 15
}
],
"time_series": [
{
"end_date": "2025-10-16",
"amount": "31.27",
"count": 1,
"start_date": "2025-10-16"
}
],
"trend": "5.0"
}
],
"by_merchant": [
{
"merchant_name": "Whole Foods",
"category": "Food & Dining",
"total_amount": "408.00",
"transaction_count": 12,
"average_transaction": "34.00",
"percentage_of_total": "20.0",
"is_recurring": true,
"largest_transaction": {
"transaction_id": "<string>",
"amount": "200.31",
"date": "2025-05-04",
"description": "Whole Foods Market",
"merchant_category_code": "5812"
},
"time_series": [
{
"end_date": "2025-10-16",
"amount": "31.27",
"count": 1,
"start_date": "2025-10-16"
}
],
"trend": "5.0"
}
],
"by_time_period": [
{
"time_period": "month",
"end_date": "2025-11-01",
"total_amount": "408.00",
"transaction_count": 12,
"average_transaction": "34.00",
"percentage_of_total": "20.0",
"largest_transaction": {
"transaction_id": "<string>",
"amount": "200.31",
"date": "2025-05-04",
"description": "Whole Foods Market",
"merchant_category_code": "5812"
},
"start_date": "2025-10-02",
"trend": "5.0"
}
]
},
"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": "<string>",
"created_at": "<string>",
"by_time_period": [
{
"end_date": "2024-01-31",
"total_amount": "1450.00",
"transaction_count": 52,
"percentage_of_total": "31.7",
"breakdown": [
{
"name": "Food & Dining",
"amount": "650.00",
"transaction_count": 24,
"percentage": "44.8"
}
],
"start_date": "2024-01-01",
"trend": "5.5"
}
]
}Use user_id as username and access_token as password.
category, merchant, time_period day, week, month, quarter, year category, merchant Successful Response
Spending analysis response with optional double aggregation.
Wraps the MyTruv API response and adds by_time_period with breakdown when
secondary_group_by is specified.
Spending data from MyTruv API.
Show child attributes
Summary statistics from MyTruv API.
Show child attributes
Unique request identifier.
Analysis creation timestamp.
Time periods with category/merchant breakdown. Only present when group_by=time_period and secondary_group_by is set.
Show child attributes
Was this page helpful?