Skip to content

Directions API

GET Async Route Matrix - Poll Job Status enterprise only

Poll this endpoint to check if your async route matrix calculation is complete. The jobId is the id returned from the Submit Job endpoint.

Resource URL

https://www.mapquestapi.com/directions/v2/routematrix/jobs/{jobId}

Resource Information

Response FormatsJSON
AuthenticationYes (Requires Key)
Rate LimitedYes

Request Parameters

Request ParameterDescriptionRequired
key
String
The API Key, which is needed to make requests to MapQuest services.Yes

Note: The jobId is specified in the URL path, not as a query parameter.

Response Object

idThe unique job identifier.
statusThe current job status. See Job Status Values below.
resultsUrlURL to retrieve the job results once the status is completed.

Job Status Values

StatusDescription
acceptedJob has been received and is queued for processing.
inProgressJob is currently being processed.
completedJob has finished processing successfully. Results are ready for retrieval.

Transaction / Billing

TIP

This endpoint is non-billable (0 transactions). You can poll as often as needed without incurring additional costs.

Example Request

bash
curl "https://www.mapquestapi.com/directions/v2/routematrix/jobs/YWJjMTIzLWRlZjQ1Ni1naGk3ODk6dXMtZWFzdC0xOm0?key=YOUR_API_KEY"

Example Response (In Progress)

json
{
  "id": "YWJjMTIzLWRlZjQ1Ni1naGk3ODk6dXMtZWFzdC0xOm0",
  "status": "inProgress",
  "resultsUrl": "https://www.mapquestapi.com/directions/v2/routematrix/jobs/YWJjMTIzLWRlZjQ1Ni1naGk3ODk6dXMtZWFzdC0xOm0/results"
}

Example Response (Completed)

json
{
  "id": "YWJjMTIzLWRlZjQ1Ni1naGk3ODk6dXMtZWFzdC0xOm0",
  "status": "completed",
  "resultsUrl": "https://www.mapquestapi.com/directions/v2/routematrix/jobs/YWJjMTIzLWRlZjQ1Ni1naGk3ODk6dXMtZWFzdC0xOm0/results"
}

Important Notes

  • Polling: Repeat this request until the status is completed, then call the Retrieve Results endpoint.
  • Processing time: Large matrices may take minutes to hours to compute. Use a reasonable polling interval (e.g. every 5-30 seconds depending on matrix size).
  • Job ID: The jobId used in the URL path is the id value returned by the Submit Job endpoint. Use it as-is.