Get executive summary of sales with KPIs
cURL
curl --request GET \ --url https://api.example.com/api/v1/ventas/summary
{ "totalSales": 123, "totalPayouts": 123, "totalTickets": 123, "totalWinners": 123, "netRevenue": 123, "winRate": 123, "avgTicketValue": 123 }
scope=mine
today
yesterday
week
month
year
range
YYYY-MM-DD
date=range
all
mine
GET /api/v1/ventas/summary?date=today&scope=all
{ "success": true, "data": { "totalSales": 1500000, "totalPayouts": 800000, "totalTickets": 1234, "totalWinners": 89, "netRevenue": 700000, "winRate": 7.21, "avgTicketValue": 1215.80 }, "meta": { "range": { "fromAt": "2024-03-15T06:00:00.000Z", "toAt": "2024-03-16T05:59:59.999Z", "tz": "America/Costa_Rica" }, "effectiveFilters": { "ventanaId": null, "vendedorId": null } } }