accountsByRole
#Get distribution of accounts by role. Returns count and percentage of accounts for each role (Admin, Customer, Driver, Merchant, etc.)
Arguments
- input!
Default
{ "app": null }
Earnings, performance metrics, and driver / merchant analytics.
Get distribution of accounts by role. Returns count and percentage of accounts for each role (Admin, Customer, Driver, Merchant, etc.)
Arguments
Default
{
"app": null
}Get activity distribution (active vs inactive users). Shows breakdown of users by activity status based on configurable threshold.
Arguments
Default
{
"actorType": null,
"app": null,
"activityDays": 0
}Get a Monday–Sunday driver timesheet in the driver's operational time zone.
Arguments
Why the orders placed in a window were cancelled, and by whom.
Arguments
Default
{
"period": "LAST30_DAYS",
"fromDate": null,
"toDate": null,
"kind": null
}Get country distribution. Shows geographic breakdown of users by country.
Arguments
Default
{
"actorType": null,
"app": null,
"period": "LAST7_DAYS"
}Customers who placed an order in a window, new against returning.
Arguments
Default
{
"period": "LAST30_DAYS",
"fromDate": null,
"toDate": null,
"kind": null
}Operator dispatch-health analytics over all dispatched orders in the tenant. For the workspace's owner and for staff who may view reports: it is the Dispatch tab of the Taxi Insights page.
Arguments
One row per driver for a window, with the fleet's totals. For the workspace's owner and for staff who manage drivers and may view reports.
Arguments
Default
{
"period": "LAST30_DAYS",
"fromDate": null,
"toDate": null,
"sortBy": "EARNINGS",
"descending": true,
"pagination": null
}Get gender distribution. Shows breakdown of users by gender (Male, Female, Other, Not Specified).
Arguments
Default
{
"actorType": null,
"app": null,
"period": "LAST7_DAYS"
}Get paginated earnings chart data for the authenticated driver.
Returns one "page" of earnings data aligned to period boundaries:
- WEEKLY: One week (Monday to Sunday) with daily data points
- MONTHLY: One calendar month with daily data points
- YEARLY: One calendar year with monthly data points
Use endBefore cursor to navigate to older periods. Use includePreviousPeriod
to get comparison data (earnings/rides change vs previous period).
# Security
This endpoint is scoped to the authenticated driver - drivers can only see their own data.
Arguments
Get my performance metrics and trends Returns comprehensive performance data for the authenticated driver including: - All-time operational KPIs - Historical daily metrics for the specified period - Performance trends (recent 7 days vs previous 7 days) # Security This endpoint is scoped to the authenticated driver - drivers can only see their own data.
Arguments
Number of days of historical data to fetch
Default
30Discrete order lifecycle events with location snapshots (from PostgreSQL).
Returns:
- Lifecycle events (DriverAccepted, DriverArrived, RideStarted, …) from order_activities.
- Per-driver dispatch offers (one entry per contacted driver) from dispatch_attempts,
with the driver exposed as an Account reference.
All entries are interleaved chronologically.
Staff-only (admin-tier): it names every driver offered the ride, with
their scores and distances.
Arguments
Continuous GPS breadcrumb trail during an active order (from ClickHouse). Returns the full movement path of the driver, with computed total distance. Staff-only (admin-tier): the driver's live whereabouts are not the business of any other session in the tenant.
Arguments
Deprecation reason: Use orderMetricsSummaryWithDetails; BET-205
Arguments
Default
{
"kind": null,
"period": "LAST7_DAYS",
"fromDate": null,
"toDate": null
}Get summary metrics for order dashboard cards.
Returns 4 key metrics (total orders, total revenue, completion rate, average order value)
with current values, comparison to previous period, and sparkline data for trend visualization.
# Arguments
* input - Query parameters including order kind filter, time period, and optional currency
# Returns
Summary of order metrics for dashboard display
Arguments
Get distribution of orders by kind.
Returns breakdown of orders grouped by kind (Taxi, Shop, Parking, Service)
with counts, percentages, and comparison to previous period.
# Arguments
* input - Query parameters including time period and whether to include revenue
# Returns
Order kind distribution with counts, percentages, and period comparison
Deprecation reason: Legacy Flutter-admin distribution; retain until supported-client and trace checks permit retirement; BET-222
Arguments
Default
{
"period": "LAST7_DAYS",
"includeRevenue": false
}Deprecation reason: Use orderStatusDistributionWithDetails; BET-205
Arguments
Default
{
"kind": null,
"period": "LAST7_DAYS",
"fromDate": null,
"toDate": null
}Get distribution of orders by status.
Returns breakdown of orders grouped by status (Finished, DriverCanceled, RiderCanceled, etc.)
with counts and percentages for each status.
# Arguments
* input - Query parameters including order kind filter and time period
# Returns
Order status distribution with counts and percentages
Arguments
Get order volume time series grouped by order kind.
Returns time-bucketed order counts for each kind (Taxi, Shop, Parking, Service),
along with aggregated totals and period-over-period comparisons.
Ideal for rendering stacked area charts or line charts.
The aggregation interval is automatically determined based on the period:
- Today: hourly buckets
- Last 7 days, Last 30 days, This month, Last month: daily buckets
- This year: monthly buckets
# Arguments
* input - Query parameters including time period, kind filter, and optional custom dates
# Returns
Order volume time series with per-kind breakdown and aggregated totals
Arguments
Default
{
"period": "LAST7_DAYS",
"kinds": null,
"currency": null,
"fromDate": null,
"toDate": null
}Get expense breakdown by category over time.
Groups expenses by category (PAYOUTS, REFUNDS, PROMOTIONS, PARTNER_SHARES,
CHARGEBACKS, OTHER) and returns time-bucketed data.
# Arguments
* input - Query parameters including currency and chart filter (date range, period)
# Returns
Vector of expense entries, one per (category, time_bucket) combination
Arguments
Get revenue vs expense over time.
Returns time-bucketed revenue and expense totals with net income
for financial comparison charts.
# Arguments
* input - Query parameters including currency and chart filter (date range, period)
# Returns
Vector of revenue/expense entries, one per time bucket
Arguments
Get platform wallet balance history over time.
Returns time series of platform wallet balances with summary statistics
(start, end, min, max, average, percent change).
# Arguments
* input - Query parameters including currency and chart filter (date range, period)
# Returns
Financial timeline with points and summary
Arguments
Get retention metrics for user cohorts. Shows retention rates at 1, 7, 30, and 90 days.
Arguments
Default
{
"actorType": null,
"cohortPeriod": "LAST7_DAYS"
}Query revenue metrics for the authenticated tenant.
Arguments
Query ride metrics for the authenticated tenant.
Arguments
Customer accounts opened in a window and how many have ordered since.
Arguments
Default
{
"period": "LAST30_DAYS",
"fromDate": null,
"toDate": null,
"kind": null
}The workspace's taxi business over a window, for the Taxi Insights page. For the workspace's owner and for staff who may view reports.
Arguments
Default
{
"regionId": null,
"period": "LAST30_DAYS",
"fromDate": null,
"toDate": null,
"bucket": null,
"timeZone": null
}Get top spenders/earners leaderboard. For customers: shows top spenders by total spending. For drivers/merchants: shows top earners by total earnings.
Arguments
Get total platform expenses with daily breakdown.
Aggregates expenses including payouts, refunds, promotions,
partner shares, and chargebacks from ledger entries.
# Arguments
* input - Query parameters including currency and time period
# Returns
Total expenses with daily sparkline and period comparison
Deprecation reason: Legacy Flutter-admin financial view; retain until supported-client and trace checks permit retirement; BET-222
Arguments
Get total outstanding user balances with daily breakdown.
Sum of all customer wallet balances at the current time.
daily is the balance at the end of each bucket of the period, and
comparison sets the balance at the period's end against the one at
the previous period's end.
# Arguments
* input - Query parameters including currency and time period
# Returns
Total outstanding balances with their history and period comparison
Arguments
Get total platform revenue with daily breakdown.
Aggregates revenue from platform wallet credits with revenue-related
ledger purposes (PLATFORM_REVENUE_CREDIT, etc.).
# Arguments
* input - Query parameters including currency and time period
# Returns
Total revenue with daily sparkline and period comparison
Deprecation reason: Legacy Flutter-admin financial view; retain until supported-client and trace checks permit retirement; BET-222
Arguments
Get distribution of users by app (Taxi, Shop, Parking, etc.) Optionally filter by actor type (Customer, Driver, etc.)
Arguments
Default
{
"actorType": null,
"app": null,
"period": "LAST7_DAYS"
}Answer an analytics question asked in plain language. The model
picks a structured plan from a closed set of metrics and groupings,
and the plan is run against the workspace's own analytics; amounts
are in the workspace currency. Admin-only; staff need View reports.
Requires natural-language analytics to be switched on under
Settings → AI and an AI provider with budget left.
Errors carry a code: AI_NOT_ENABLED when the feature is off,
AI_CALL_FAILED when the provider could not be reached or refused,
AI_PARSE_FAILED when its answer could not be used,
QUESTION_NOT_SUPPORTED when none of the available figures answers
the question, and INVALID_INPUT for an empty or over-long question.
Arguments
BetterSuite is built for teams who see on-demand as a business — not a feature.