Get provider earnings data with optional grouping.
This endpoint returns all data in a single response, including:
- Groups with their summaries and individual rows
- Grand totals across all data
Group options:
- "none": No grouping (flat list of all providers)
- "location": Group by location
- "date": Group by charge date
Example response:
{
"groups": [
{
"key": "loc_123",
"label": "Main Office",
"count": 5,
"summary": { "total_sold": 10000, ... },
"rows": [
{ "provider_id": "...", "total_sold": 5000, ... },
...
]
}
],
"grand_totals": { "total_sold": 10000, ... },
"total_count": 5
}