post
/api/v2/origin-destination/routesPython SDK method:
client.origin_destination.route(params).run()Start OD route analysis job
Creates a job to generate an OD route analysis using zone-pair identifiers from a completed OD matrix job. You must first run and complete an O/D matrix (Closed, Segment Flow, or Open-Ended) before calling this endpoint. An empty zonePairIds list includes all pairs for Closed and Segment Flow parent matrices; if the parent matrix is an Open-Ended matrix, at least one and no more than 5 zonePairIds are required. The jobId you pass must be the jobId of the parent matrix.
Altitude Help Center — getRouteAnalysisRequest Body
Analysis parameters.
application/json: object
| Name | Type | Input Shape | Values | Description | Value Required |
|---|---|---|---|---|---|
excludeServiceRoads | boolean | - | - | When true, service road categories are excluded from computed routes. | Y |
isMetric | boolean | - | - | When true, distance values are returned in kilometres; when false, in miles. | Y |
jobId | string | - | - | Job ID of the OD Matrix (Closed, Segment or Open Ended) on which to run the Route Analysis. | Y |
routeGroupingThreshold | number (double) | - | - | Fraction (0–1) of trips a road segment must carry to be included in a grouped route. Higher values produce fewer, more common routes. | Y |
zonePairIds | array<string> | - | - | Identifiers of the OD matrix rows to include in the route analysis: zonePairId values from closed matrix results, or flowId values from open-ended and corridor matrix results. An empty or omitted array includes all pairs for Closed and Segment Flow parent matrices; if the parent matrix is an Open-Ended matrix, at least one and no more than 5 zonePairIds are required. | N |
Examples
OD route analysis request
Converted from the v1 route analysis example. Use zonePairIds from a completed OD matrix result.
{
"excludeServiceRoads": true,
"isMetric": false,
"jobId": "its_1784148529857_j2z6k08bocf",
"routeGroupingThreshold": 0.9,
"zonePairIds": [
"zone-pair-id-from-matrix"
]
}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. |