Skip to main content

Drivers

GET /v1/analytics/drivers

Returns performance metrics for a specific driver or for every driver in your fleet. When driverID is omitted, returns a roster ordered by driverRank ascending (unranked drivers last).

Requires an API key sent as a Bearer token in the Authorization header.

Request

Query Parameters

ParameterTypeRequiredDescription
driverIDstringOptionalReturns metrics for a single driver. Omit to return metrics for every driver in the fleet.

Example Request — single driver

curl "https://api.core.doorstep.ai/v1/analytics/drivers?driverID=drv_8812a" \
-H "Authorization: Bearer $API_KEY"

Example Request — full fleet

curl "https://api.core.doorstep.ai/v1/analytics/drivers" \
-H "Authorization: Bearer $API_KEY"

Response

Performance metrics for the requested driver or fleet.

Response Body — single driver

FieldTypeDescription
driverIDstringDriver identifier.
sessionCountintegerDistinct delivery sessions the driver has completed.
deliveryTypesobjectCount of completed sessions per delivery type, e.g. { "doorstep": 12, "curbside": 3 }.
timeMetricsobjectFleet-wide percentile score (0–100, higher is better) for each timing metric. See Scoring methodology.
Keys: totalTime, walkingTime, inBuildingTime, handoverTime, activeTime, idleTime. Any key is null if the driver has no comparable sessions for that metric.
onTimeRatenumber or nullFraction (0–1) of the driver's sessions with a handoverTime faster than the 75th percentile of other drivers at the same building. null if no comparable sessions.
driverScorenumber or nullOverall performance score, 0–100. Equal to timeMetrics.handoverTime.
driverRankinteger or nullDriver's rank within the fleet by activeTime performance, 1 = best. null if the driver has no comparable activeTime sessions.
fleetSizeintegerTotal number of distinct drivers with sessions on record.
regionsarray of stringsCBSA (metro/micro area) names the driver has made dropoffs in.

Response Body — fleet (no driverID)

Returns a drivers array where each entry matches the single-driver shape above, ordered by driverRank ascending (drivers with a null rank are sorted last).

FieldTypeDescription
driversarray of objectsOne entry per driver. Each entry matches the single-driver response shape.

Scoring methodology

A driver's raw session values are compared against other drivers' sessions at the same building to get a per-session percentile rank (a session is only comparable if at least one other driver has a session at that same building). Those percentile ranks are averaged, flipped so lower time = higher score, and shrunk toward a neutral 50 when the driver has few comparable sessions — so a couple of lucky/unlucky sessions can't swing the score as much as a large sample would. timeMetrics is then this shrunk score re-expressed as a percentile against every other driver in the fleet, so 100 means best-in-fleet for that metric and 50 means average.

onTimeRate and driverRank are computed the same way: against building peers for on-time rate, and fleet-wide by activeTime score for rank.

Example Response — single driver

{
"driverID": "drv_8812a",
"sessionCount": 47,
"deliveryTypes": {
"doorstep": 39,
"curbside": 8
},
"timeMetrics": {
"totalTime": 68,
"walkingTime": 71,
"inBuildingTime": 65,
"handoverTime": 74,
"activeTime": 69,
"idleTime": null
},
"onTimeRate": 0.83,
"driverScore": 74,
"driverRank": 3,
"fleetSize": 18,
"regions": ["San Francisco-Oakland-Fremont, CA"]
}

Example Response — fleet

{
"drivers": [
{
"driverID": "drv_2201c",
"sessionCount": 61,
"deliveryTypes": { "doorstep": 50, "curbside": 11 },
"timeMetrics": {
"totalTime": 82,
"walkingTime": 79,
"inBuildingTime": 84,
"handoverTime": 88,
"activeTime": 91,
"idleTime": null
},
"onTimeRate": 0.92,
"driverScore": 88,
"driverRank": 1,
"fleetSize": 18,
"regions": ["San Francisco-Oakland-Fremont, CA"]
},
{
"driverID": "drv_8812a",
"sessionCount": 47,
"deliveryTypes": { "doorstep": 39, "curbside": 8 },
"timeMetrics": {
"totalTime": 68,
"walkingTime": 71,
"inBuildingTime": 65,
"handoverTime": 74,
"activeTime": 69,
"idleTime": null
},
"onTimeRate": 0.83,
"driverScore": 74,
"driverRank": 3,
"fleetSize": 18,
"regions": ["San Francisco-Oakland-Fremont, CA"]
}
]
}

Notes

  • Driver data is scoped to your organization. You cannot query drivers belonging to another client.
  • A metric is null whenever there isn't at least one other driver's session at the same building to compare against — small fleets or buildings visited by a single driver will see more null metrics.
  • driverRank has no minimum fleet-size gate — with very few drivers, ranks are still returned but are less meaningful.

Common Applications

  • Daily driver scorecards for operations managers
  • Compare driver performance on equivalent routes
  • Identify productivity gaps between top and bottom quartile drivers
  • Flag drivers whose on-time rate is falling behind their peers at the same buildings