Sorry, you need to enable JavaScript to visit this website.

Batch Routing

 

Service version: 1
Last edit: 2019.02.21

On this page

Purpose

Batch Routing works as a subset of the Routing API suite. This service enables you to dispatch batches of Calculate Route and Calculate Reachable Range Requests with ease.

Asynchronous and Synchronous batch processing

You can call Batch Routing APIs to run either asynchronously or synchronously.

Asynchronous API overview

The Asynchronous API is appropriate for processing big volumes of relatively complex routing requests.

  • It allows the retrieval of results in a separate call (multiple downloads are possible).
  • The Asynchronous API is optimized for reliability and is not expected to run into a timeout.
  • The number of batch items is limited to 700 for this API.

Data retention period notice

Please be aware that batches processed by an Asynchronous API are available for download for 14 days, after which a results download will return a HTTP 404 (Not Found) Response.

Sequence of Asynchronous API client actions

  1. A client sends a Request to the Asynchronous Batch Submission endpoint.
  2. The server will respond with one of the following:
  3. After getting an HTTP 202 or HTTP 303 Response, the client should follow the redirect to the Asynchronous Batch Download endpoint which is a blocking long poll Request.
  4. When a client calls the Asynchronous Batch Download endpoint the possible scenarios are:
    • Batch Response is calculated before timeout (120 seconds).
      • The client receives HTTP 200.
      • Batch Response is ready and it gets streamed to the client.
    • Batch response is not ready before timeout.
      • The client receives HTTP 202.
      • Batch Request is accepted for processing.
      • The client downloads batch results from the URL specified by the Location header (see point 3).

Synchronous API overview

The Synchronous API is recommended for lightweight routing requests with quickly-expiring results (e.g., due to changing traffic conditions).

  • In such a case, when the service receives a Request, it will respond as soon as the routes of the batch are calculated and there will be no possibility to retrieve the results later on.
  • The Synchronous API will return a timeout error if the request takes longer than 60 seconds.
  • The number of batch items is limited to 100 for this API.

Sequence of Synchronous API client actions

  1. A client sends a Request to the Synchronous Batch endpoint.
  2. The server will respond with one of the following:
    • A HTTP 200 Batch processing result: The calculation is finished before timeout and the client downloads results straight away.
    • A HTTP 408 Request timeout error: This occurs if the Request takes longer than 60 seconds and cannot be finished in this timeframe.
    • Another HTTP error: See the Synchronous Batch HTTP status codes.

▲ Return to top

You are here