post
/api/v2/origin-destination/open-matrixPython SDK method:
client.origin_destination.open_matrix(params).run()Start open OD matrix job
Creates a job to generate an open-ended origin-destination analysis. Unlike Closed OD, callers supply anchor zones and the API returns all counterpart zones observed across the requested flow types (I:I, I:E, E:I, E:E). Set generateTimeSeries to true to produce time-series breakdowns.
Altitude Help Center — Open-Ended OD APIRequest Body
Analysis parameters.
application/json: object
| Name | Type | Input Shape | Values | Description | Value Required |
|---|---|---|---|---|---|
aggregationUnits | array<string> | - | hour, dayofweek, daytype, daytypehour | Time-series dimensions to generate when generateTimeSeries is true. Valid values: hour, dayofweek, daytype, daytypehour. An empty array generates all four. | N |
customAggregationValues | array<object> | aggregationValue: string; hourEnd: integer; hourStart: integer | - | Custom hourly range buckets appended to the time-series output in addition to any aggregationUnits selections. | N |
dateRanges | array<object> | dateFrom: string; dateTo: string | - | Date ranges to include in the analysis. Maximum 4 non-overlapping ranges, each up to 365 days. Results are aggregated across all ranges unless isTrendAnalysis is true. | Y |
daysOfWeek | array<integer> | - | 1, 2, 3, 4, 5, 6, 7 | Days of the week to include (1=Sunday … 7=Saturday). An empty array includes all days. | N |
externalZoneFilterRadius | integer | - | - | Radius (km or miles, matching isMetric) used to limit external zones returned. A value of 0 applies no filter. | N |
externalZoneType | string | - | Country, State, County, City, FSA, ZIP, TAZ, CTR, Custom, Segment, RelatedRoad | Zone type of the external zones returned for I:E, E:I, and E:E flow types. Required when non-I:I flows are selected. Accepted values (case-insensitive): State, County, City, TAZ, ZIP, CTR, FSA. | N |
generateTimeSeries | boolean | - | - | When true, a time-series breakdown child analysis is generated for each aggregation unit. Results are retrievable via GET /api/v2/origin-destination/open-matrix/{id}/time-series once the job is complete. | Y |
industries | array<string> | - | 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, unclassified | Named 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 |
isMetric | boolean | - | - | When true, distance values are returned in kilometres; when false, in miles. If omitted, defaults to the isMetric setting on the authenticated user's profile. | N |
isTrendAnalysis | boolean | - | - | When true, results are returned per date range instead of aggregated across all ranges. Applies to both the primary output and the time-series output. | N |
naics | array<integer> | - | - | Explicit raw NAICS integer codes to filter by. Combined with any industries values. Leave both naics and industries empty to include all industries. | N |
percentiles | array<integer> | - | - | Percentile values (1–99) to calculate for journey distance, duration, and dwell time. Defaults to [15, 85] when omitted. | N |
timeFrom | string | - | - | Start of the time-of-day window. Defaults to 00:00:00 when omitted. | N |
timeTo | string | - | - | End of the time-of-day window. Defaults to 23:59:59.999 when omitted. | N |
tripChainCriteria | object | maxStopDuration: integer; shortJourneyDistanceThreshold: number | - | Trip-chaining criteria. Omit or send zero values to run without trip chaining. | N |
vehicleClassIds | array<string> | - | - | Vehicle class filter IDs from GET /api/v2/filters/vehicle-classes. IDs must use the scheme_vehicleClassIndex_categoryIndex format and share one scheme; IDs that do not name a known vehicle class are rejected. An empty array includes all vehicle classes. | N |
vehicleClassSchemeId | integer | - | 1, 2, 3, 4, 5 | Vehicle classification scheme, from 1 through 5. Defaults to 2 (FHWA/GVWR) when omitted. | N |
vehicleClasses | array<object> | vehicleType: string (values: Truck, Passenger, MPV, Bus, Limo, Other, n/a); weightClass: string (values: *, Class 1, Class 2, Class 3, Class 4, Class 5, Class 6, Class 7, Class 8, Class A, Class B, Class C, Class D, Class E, Class F, Class G, Class H) | - | Vehicle class filters. Use an empty array to include all vehicle classes. | N |
vocations | array<integer> | - | 1, 2, 3, 4, 5 | Vocation IDs from GET /api/v2/filters/vocations. An empty array includes all vocations. | N |
zoneFlowTypes | array<string> | - | I:I, I:E, E:I, E:E | Zone flow types to analyse relative to the anchor zone: I:I (Internal-Internal), I:E (Internal-External), E:I (External-Internal), E:E (External-External). Values are case-insensitive. An empty array includes all four flow types. | N |
zoneIds | array<string> | - | - | Encoded anchor zone IDs. Provide either zoneIds or zones, not both. At least one anchor zone is required. | N |
zones | array<object> | code: string; iso_3166_2: string; type: string (values: State, County, City, FSA, ZIP, TAZ, CTR, Custom) | - | Anchor zone objects for the analysis. Country, Segment, and RelatedRoad zones are not supported. Provide either zones or zoneIds, not both. At least one anchor zone is required. | N |
Examples
County open OD request
Converted from the v1 open-ended OD example using v2 zone fields.
{
"dateRanges": [
{
"dateFrom": "2026-01-01",
"dateTo": "2026-01-31"
}
],
"externalZoneType": "County",
"generateTimeSeries": false,
"isMetric": false,
"zoneFlowTypes": [
"I:I"
],
"zones": [
{
"code": "32003",
"iso_3166_2": "US-NV",
"type": "County"
}
]
}Success Responses
202 response: object
Job accepted and queued for processing. Poll the location header URL to check status.
| Name | Type | Description |
|---|---|---|
error | object | Details about why the job failed (RFC 7807 format), or null if it succeeded. |
id | string | Unique job identifier. |
links | object | Navigation URLs for polling and result retrieval. |
status | string | Current job lifecycle state: PENDING, QUEUED, RUNNING, DONE, FAILED, CANCELED, or NOT_FOUND. |
Response Errors
| HTTP Status Code | Reason |
|---|---|
| 400 | The request body or parameters are invalid. |
| 401 | Authentication is required or the provided credentials are invalid. |
| 403 | The authenticated user lacks permission to perform this operation. |
| 409 | The operation conflicts with the current state of the resource. |
| 422 | The request is syntactically valid but semantically cannot be processed. |
| 429 | The request rate limit has been exceeded. |
| 500 | An unexpected server error occurred. |