Analysis Trips Result as a CSV file

Service version: 1
Last edit: 2022.08.22

Purpose

Get the full trips result as a CSV file by sending a GET request.

Request data

HTTPS Method: GET

For ease of viewing and identification:

  • Constants and parameters enclosed in curly brackets { } must be replaced with their values.
  • Please see the following Request parameters section with the required and optional parameters tables for their values. The generic request format is as follows.

Format

GET
URL request format
https://{baseURL}/origindestination/{versionNumber}/analysis/flowmatrix/{id}/result/trips/csv?key={Your_API_Key}&dateRange={dateRange}&timeRange={timeRange}

Example

GET
URL request example
https://api.tomtom.com/origindestination/1/analysis/flowmatrix/123/result/trips/csv?key={Your_API_Key}&dateRange=0&timeRange=0

Request parameters

b
Required parametersDescription
baseURL
string
The base URL for calling TomTom services.
Value: api.tomtom.com
versionNumber
string
Version of the service to call.
Value: The current value is 1.
id
integer
Analysis number id.
Value: The analysis number id.
key
string
Authorization key for access to the API.
Value: Your valid API Key.
dateRange
integer
Index of the date range.
Value: Example: 0
timeRange
integer
Index of the time range.
Value: Example: 0

Response data

This response will return a CSV file containing all trips for all possible combinations of a single origin and destination.

Response structure

The response contains a CSV file which should be self describing.

  • The first row contains labels.
  • The following rows contain data.
  • The first two columns are reserved for region names and the third is reserved for the trips value.

Response example

CSV response example
1Origin,Destination,Trips
2Region A,Region A,1
3Region A,External,2
4External,Region A,3
5External,External,4

Errors

If there is an error in the supplied parameters or any other internal problem. an error response is generated in the requested format.

Response codes

CodeMeaning & possible causes
200OK
400Bad request
401Unauthorized
403Forbidden
404Not Found