Aggregate Tasks
POST/v1/tasks/aggregate
Counts tasks by status, the distinct companies and the distinct records of each type that have a task in each status, for a scorecard of open, overdue and closed work.
companies: Number of distinct companies (by company domain) with at least one task in each status. A company with tasks in several statuses is counted once in each, so the three numbers do not sum to a total. A task on a contact, deal, note, investor or fundraising opportunity counts toward the company domain(s) of that record; a task on a record with no company appears in tasks only.
records: Number of distinct records of each type (deal, company, investor, fundraising opportunity, contact, note) with at least one task in each status, keyed by entity type. A record with tasks in several statuses is counted once in each, so the three numbers do not sum to a total, and open includes overdue. This is the per-record view: unlike companies, which groups records by company domain, each record counts once however many records share a company.
Overdue: Not done and due before the start of today in the authenticated user's calendar.
scope: Whose tasks to count. "mine" (default) counts tasks assigned to the authenticated user. "all" counts every task in the organization and is available to organization admins only; any other caller is refused with admin_role_required. The public API answers that refusal with 403.
Request
Responses
- 200
- 400
- 401
- 403
- 500
Task, company and record counts by status
Invalid request parameters
Invalid or missing API key
Only organization admins can use scope all
Internal server error