post
/api/v2/stop-analytics/stop-events
Python SDK method:
client.stop_analytics.stop_events(params).run()

Start stop events job

Creates a job to generate a stop analytics analysis. Returns stop event records for vehicles that stopped in the specified zones during the date/time window, with filters for industry, vocation, and vehicle class.

Altitude Help Center — getStopAnalytics

Request Body

Analysis parameters.

application/json: object

NameTypeInput ShapeValuesDescriptionValue Required
aggregationModeinteger (int64)--Geographic aggregation mode: 0=road segment, 1=related roads, 2=zone, 3=H3, 4=geohash, 5=S2.Y
dateRangesarray<DateRangeDto>dateFrom: string; dateTo: string-Date ranges to include in the analysis. Results are aggregated across all ranges.Y
daysOfWeekarray<DayOfWeek>-1, 2, 3, 4, 5, 6, 7Days of the week to include (1=Sunday … 7=Saturday). An empty array includes all days.N
fuelTypesarray<FuelType>-diesel, electric, flexible, gasoline, hybrid, other, unknownFuel types to include. Valid values: diesel, electric, flexible, gasoline, hybrid, other, unknown. An empty array includes all fuel types.N
hashHierarchyboolean--When true, returns the hierarchy of spatial hash cells rather than each level separately. Applies only to aggregation modes 3 (H3), 4 (geohash), and 5 (S2).N
includeGeographyboolean--When true, includes GeoJSON geography in the response. Forced true for aggregation modes 3, 4, and 5. Defaults to false for all other modes.N
industriesarray<IndustryGroup>-agriculture, mining, utilities, construction, manufacturing, wholesale, retail, transportation_and_warehousing, information_and_cultural, finance_and_insurance, real_estate, science_and_technology, management, administrative_and_support, education, health_care, arts_and_entertainment, accommodation_and_food, public_administration, other_services, unclassifiedNamed industry IDs from GET /api/v2/filters/industries (e.g. 'manufacturing', 'retail'). Resolved to NAICS codes at query time and combined with any naics values. Leave both industries and naics empty to include all industries.N
isMetricboolean--When true, distance values are returned in kilometres; when false, in miles. Defaults to the authenticated user's profile preference when omitted.N
maxCellLevelinteger (int64)--Maximum cell level for H3, geohash, or S2 aggregation modes. Defaults to 10 for H3, 7 for geohash, and 16 for S2.N
maxPostStopTripDistancenumber (double)--Maximum distance (miles or km) of the trip after the stop to be included in the analysis. Defaults to +inf when omitted.N
maxPostStopTripDurationnumber (double)--Maximum duration (minutes) of the trip after the stop to be included in the analysis. Defaults to +inf when omitted.N
maxPreStopTripDistancenumber (double)--Maximum distance (miles or km) of the trip before the stop to be included in the analysis. Defaults to +inf when omitted.N
maxPreStopTripDurationnumber (double)--Maximum duration (minutes) of the trip leading up to the stop to be included in the analysis. Defaults to +inf when omitted.N
maxStopDurationnumber (double)--Maximum stop duration (minutes) to be included in the analysis. Defaults to +inf when omitted.N
minCellLevelinteger (int64)--Minimum cell level for H3, geohash, or S2 aggregation modes. Defaults to 5 for H3, 5 for geohash, and 10 for S2.N
minPostStopTripDistancenumber (double)--Minimum distance (miles or km) of the trip after the stop to be included in the analysis. Defaults to 0.N
minPostStopTripDurationnumber (double)--Minimum duration (minutes) of the trip after the stop to be included in the analysis. Defaults to 0.N
minPreStopTripDistancenumber (double)--Minimum distance (miles or km) of the trip before the stop to be included in the analysis. Defaults to 0.N
minPreStopTripDurationnumber (double)--Minimum duration (minutes) of the trip leading up to the stop to be included in the analysis. Defaults to 0.N
minStopCountinteger (int64)--Minimum number of stops an output zone must have to be included in the results.N
minStopDurationnumber (double)--Minimum stop duration (minutes) to be included in the analysis. Defaults to 0.N
naicsarray<integer (int64)>--Explicit raw NAICS integer codes to filter by. Combined with any industries values. Leave both naics and industries empty to include all industries.N
percentilesarray<integer (int64)>--Integer percentiles to compute for stop and trip metrics (e.g. [10, 50, 90]). Defaults to [15, 85] when omitted.N
relatedRoadTypesarray<RoadType>-living_street, motorway, motorway_link, primary, primary_link, residential, road, secondary, secondary_link, service, tertiary, tertiary_link, trunk, trunk_link, unclassifiedRelated road types to include. Applies only when aggregationMode is 1. Omit or send an empty array to include all road types.N
roadTypesarray<RoadType>-living_street, motorway, motorway_link, primary, primary_link, residential, road, secondary, secondary_link, service, tertiary, tertiary_link, trunk, trunk_link, unclassifiedRoad types to include. Applies only when aggregationMode is 0. Omit or send an empty array to include all road types.N
stopDurationBinsarray<integer (int64)>--Upper bounds (inclusive, minutes) of stop duration bins. Example: [10, 30, 60] creates bins (0,10], (10,30], (30,60], (60,+inf).N
timeFromstring--Start of the time-of-day window (hh:mm:ss). Defaults to 00:00:00 when omitted.N
timeTostring--End of the time-of-day window (hh:mm:ss). Defaults to 23:59:59.999 when omitted.N
vehicleClassIdsarray<string>--Vehicle class filter IDs from GET /api/v2/filters/vehicle-classes. IDs must use the scheme_vehicleClassIndex_categoryIndex format and share one scheme. An empty array includes all vehicle classes.N
vehicleClassSchemeIdinteger--Vehicle classification scheme, from 1 through 5. Defaults to 2 (FHWA/GVWR) when omitted.N
vehicleClassesarray<object>vehicleType: string; weightClass: string-Vehicle class filters. Use an empty array to include all vehicle classes.N
vocationsarray<VocationID>-1, 2, 3, 4, 5Vocation IDs from GET /api/v2/filters/vocations. An empty array includes all vocations.N
zoneIdsarray<string>--Encoded zone ID strings. Provide exactly one of zoneIds or zones (not both).N
zonesarray<object>code: string; iso_3166_2: string; type: string-Zone objects with code, type, and iso_3166_2. Provide exactly one of zones or zoneIds (not both).N

Examples

County stop events request

Translated from the v1 getStopAnalytics sample.

{
  "aggregationMode": 2,
  "dateRanges": [
    {
      "dateFrom": "2026-01-01",
      "dateTo": "2026-01-31"
    }
  ],
  "isMetric": false,
  "zones": [
    {
      "code": "13121",
      "iso_3166_2": "US-GA",
      "type": "County"
    }
  ]
}

Success Responses

202 response: object

Job accepted and queued for processing. Poll the location header URL to check status.

NameTypeDescription
errorobjectDetails about why the job failed (RFC 7807 format), or null if it succeeded.
idstringUnique job identifier.
linksobjectNavigation URLs for polling and result retrieval.
statusstringCurrent job lifecycle state: PENDING, QUEUED, RUNNING, DONE, FAILED, CANCELED, or NOT_FOUND.

Response Errors

HTTP Status CodeReason
400The request body or parameters are invalid.
401Authentication is required or the provided credentials are invalid.
403The authenticated user lacks permission to perform this operation.
409The operation conflicts with the current state of the resource.
422The request is syntactically valid but semantically cannot be processed.
429The request rate limit has been exceeded.
500An unexpected server error occurred.