New clients and first visits
new_clients_summaryNew clients and first visits at one site in one call. firstVisits: clients whose first booked class or appointment falls in the range, by day, week or month and by home location, with the newest clients' contact details and consent flags for follow-up. newClients: profiles created in the range, with prospects, home locations, referral sources and how many have visited. Inactive profiles are counted. compareTo previous_period or previous_year adds the earlier window at no extra cost. Every client profile is read once whatever the sections, so leaving one out saves no credit; above 15000 a call returns their count and credits until confirmLargeRead is true. For members by membership use membership_summary; for late cancels use late_cancel_count; for attendance use class_attendance_summary; for revenue use sales_summary. Mindbody calls: 1 per 200 client profiles, and with firstVisitDetails 1 for program names and 1 per listed client (at most 701).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Rows in byHomeLocation and topReferralSources, 1-25 (default 10); the rest is folded into one row. | |
| limit | No | First-visit clients listed with contact details, newest first, 0-200 (default 25). | |
| 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 | Sections to return (default both). | |
| compareTo | No | Add an earlier window. previous_period: the same number of days just before (a whole month compares with the month before). previous_year: the same dates a year earlier. | |
| startDate | No | First day, e.g. 2026-09-01 (business-local). Default: 30 days ending endDate. | |
| confirmLargeRead | No | Read every profile of a large site (default false: return their count and credits first). | |
| firstVisitDetails | No | Add each listed client's first-visit service category and visits since, and byServiceCategory (1 credit per listed client, plus 1). |