Sales and revenue summary
sales_summaryAnswers revenue and sales questions in one call. Reads every sale in a date range and returns a compact summary instead of raw sales: totals (sales, net sales, discounts, tax, amount collected, average sale, unique clients, contract and gift card sales, returns), sales by day, week or month, top items, and revenue by category, payment method and location, plus optional top clients and a comparison with the previous period. Filters by location name or ID, which get_sales itself cannot. Use this instead of get_sales for any "how much did we sell or make" question. netSales is after discounts and before tax; collected is payments received by any method (account and gift card payments included, see byPaymentMethod). Amounts are in the site's currency. Mindbody calls: 1 per 200 sales (up to 10000 sales per range), fetched in parallel and doubled by compareToPrevious, plus cached lookups for location and category names and 1 per 20 topClients (at most 104).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Rows per ranked breakdown, 1-25 (default 10). The rest are folded into one "other" row. | |
| range | No | Date range ending today (default last_30_days). Use startDate/endDate for other ranges. | |
| siteId | No | Site to call (SiteId header). Default -99. | |
| endDate | No | Last day, inclusive (default today). At most 366 days after startDate. | |
| include | No | Breakdowns to return besides totals (default byPeriod, topItems, byCategory, byPaymentMethod, byLocation). Add "topClients" for the biggest spenders by name. | |
| interval | No | byPeriod granularity. auto (default): day up to 31 days, week up to 120, else month. | |
| locations | No | Only sales at these locations: names or IDs, e.g. ["Clubville"] or ["1"]. | |
| startDate | No | First day, e.g. 2026-09-01 (business-local). Default: 30 days ending endDate. | |
| compareToPrevious | No | Also total the previous period and report the change in percent (doubles the sales calls). Whole calendar months compare with the previous whole months, month to date with the same days last month, other ranges with the same number of days just before. |