Skip to main content

Volume

GET /v1/analytics/volume

Returns the total delivery volume over a given time window. Volume is broken out by delivery type and includes an overall total. Optional interval parameter to observe volume over time.

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

Request

Query Parameters

ParameterTypeRequired?Description
addressstringOptionalFilters volume to a specific address.
Example: 123 Main St, San Francisco, CA 94105
driverIDstringOptionalFilters volume to sessions completed by a specific driver.
deliveryTypestringOptionalComma-separated delivery type filter.
Allowed values: doorstep, threshold, curbside, vehicle_handoff
Example: doorstep,threshold
timeFramestringOptionalPreset time window. Default: week.
Allowed values: day, week, month, 3m, ytd, year, all
intervalstringOptionalLength of each time interval. Default: none.
Allowed values: none, hour, day, week, month
fromintegerOptionalStart time in epoch seconds. Overrides timeFrame. Must be ≤ to.
Example: 1748390400
tointegerOptionalEnd time in epoch seconds. Overrides timeFrame. Must be ≥ from.
Example: 1748995200

Example Request

curl "https://api.core.doorstep.ai/v1/analytics/volume?address=123 Main St, San Francisco, CA 94105&deliveryType=doorstep,threshold&timeFrame=week" \
-H "Authorization: Bearer $API_KEY"

Response

Delivery volume for the requested address.

Response Body

FieldTypeDescription
totalintegerTotal delivery count across all delivery types for the window.
seriesarray of objectsBreakdown by delivery type.
series[].timestampintegerStart of the interval if specified, in epoch seconds.
series[].keystringThe delivery type.
series[].countintegerDelivery count for that delivery type.

Example Response

{
"total": 115,
"interval": "week",
"from": 1704067200,
"to": 1704153600,
"series": [
{
"timestamp": 1704067200,
"count": 45,
"key": "doorstep"
},
{
"timestamp": 1704067200,
"count": 12,
"key": "threshold"
},
{
"timestamp": 1704153600,
"count": 58,
"key": "doorstep"
}
]
}

Example Usage

Common Applications

  • Anomaly flagging for customer support agents
  • Identify peak and low delivery windows