Skip to content

Entity KPIs

Taxi & Private HireProductsStatistics › Entity KPIs

Generally available

Weekly roll-up KPI snapshots for each entity (driver, vehicle, customer, account, fleet) — trip count, distance, revenue, and cancellation, no-show and completion rates. Computed in the background and surfaced in operator dashboards, driver scorecards and account billing summaries.

Example request

GET /client/{clientId}/statistics

See the API reference for the full request and response schema.

Endpoints

MethodPath
GET /client/{clientId}/statistics · primary

Full request/response schemas and an interactive explorer will live in the API reference (coming soon).

Fields

FieldTypeDescription
entityType StatisticEntityType · CUSTOMER | ACCOUNT | TRANSPORTER | DRIVER | VEHICLE | ZONE Which entity type this row aggregates (DRIVER / VEHICLE / CUSTOMER / ACCOUNT / FLEET). Combined with `entityId` to identify the subject of the weekly snapshot.
entityId bigint ID of the entity being aggregated (Snowflake BIGINT). The (entityType, entityId, weekStartDate, clientId) tuple is unique.
weekStartDate integer Unix timestamp of the Monday 00:00 that starts the week this row aggregates. Snapshots are weekly; lookups are by week + entity.
tripCount integer Total trip count attributed to this entity in the week — every dispatched trip whose driver/vehicle/customer/etc. matches the entity.
successfulTripCount integer Trips that reached FINISHED state (vs. cancelled / no-show). Drives completion-rate KPIs on dashboards.
noshowCount integer Trips that ended in NOSHOW. Drives the no-show-rate KPI and (for drivers) the priority-recalculation penalty.
totalMetres bigint Total distance covered by trips attributed to this entity in the week (metres). BIGINT to handle accumulated fleet totals over time.
totalPrice bigint Total revenue attributable to this entity in the week (cents of trip currency). For corporate accounts this rolls up to the invoice; for drivers it powers payout-summary screens.
clientId bigint Tenant scope. Every tenant-aware entity carries this; `ClientFilter` enforces row-level isolation on read; the multi-tenancy routing layer (`/client/{clientId}`) sets it at create time. Surfaced only under `admin` / `tripLog` groups — never to end users.
internalKey string Optional client-supplied external reference / idempotency key. When present, lets external systems correlate platform-side records back to their own source-of-truth ids. Not persisted to a column — populated by the request handler when the caller sets it.
__objectType string Discriminator string (entity class short-name) emitted alongside the id in serialized output. Resolved at read time by `getObjectType()`; lets the FE dispatch entity-specific rendering without inspecting the URL.
id bigint Snowflake-style primary key (unsigned BIGINT). Generated by `IdFactory` at create time; surfaced to the FE / API as a `G`-prefixed string and stripped back to plain bigint server-side before Doctrine lookup.
createdDate integer Unix timestamp the row was first persisted. Set in the entity's PrePersist hook; never rewritten on subsequent updates.
updatedDate integer Unix timestamp the row was last touched. Bumped on every commit that hits the Doctrine UoW for this entity; drives FE invalidation + the listing change cursor.
passiveUpdatedDate int Read-through alias for `updatedDate` exposed under different serializer groups. Lets the FE distinguish "real edit" from "background touch" projections without changing the underlying column.
listingUpdatedDate int Listing-projection timestamp surfaced only under the `listMode` group. Driven by `TripCache` and other listing-shape refreshers separately from `updatedDate` so a listing rebuild doesn't trigger detail-page invalidation.