Analytics - Summary
Get Period Comparison
Compare two time periods to analyze performance changes. Returns summary, breakdown, and chart data for the comparison.
post/api/analytics/summary/comparison
Request body
Example request
{
"account_ids": [
"acc_abc123",
"acc_def456"
],
"period_a": {
"start": "2024-01-01",
"end": "2024-03-31"
},
"period_b": {
"start": "2024-04-01",
"end": "2024-06-30"
},
"granularity": "months",
"stat_type": "totalEarnings"
}Response
Example response
{
"summary": {
"period_a_total": 15000,
"period_b_total": 18000,
"change": 3000,
"change_percentage": 20
},
"breakdown": [],
"chart_data": [],
"period_a_label": "Q1 2024",
"period_b_label": "Q2 2024"
}