Analysis Trips Result as a CSV file
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:
- 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
https://api.tomtom.com/origindestination/1/analysis/flowmatrix/{id}/result/trips/csv?key={Your_API_Key}&dateRange={dateRange}&timeRange={timeRange}Example
https://api.tomtom.com/origindestination/1/analysis/flowmatrix/123/result/trips/csv?key={Your_API_Key}&dateRange=0&timeRange=0Request parameters
Required parameters | Description |
|---|---|
| Analysis number id. Value: The analysis number id. |
| Authorization key for access to the API. Value: Your valid API Key. |
| Index of the date range. Value: Example: |
| Index of the time range. Value: Example: |
Optional parameters | Description |
|---|---|
| Adds a Value: Example: Default value: |
Response data
This response returns a CSV file containing the trips per origin and destination, or per origin,
destination and via when includeVia=true. The file is
served as an attachment named trips_{id}_{dateRange}_{timeRange}-v2.csv.
Response structure
The response contains a CSV file which should be self describing.
- The first row contains labels.
- The following rows contain data.
The key columns are
Origin,Destination, orOrigin,Destination,ViawhenincludeVia=true. They are followed byExternalEndsCode, and the last column,Trips, holds the value.
The file holds only the combinations that carry trips, sorted by origin, destination, via and
ExternalEndsCode. A combination with no traffic gets no row.
Trips is the normalized trip count for this date range and time range, written with a dot as the decimal separator.
Without includeVia the rows are the origin-destination view and add up to about 100.
With includeVia they are a drill-down by via region and add up to more, because a trip that passed through three regions appears in three rows.
See Normalized probe counts.
Region names come from the name property of the analyzed regions; a comma in a name is replaced
with a hyphen, and a region without a name is written as Region {index}.
Every key column names one of your own regions. A trip that starts or ends outside your regions is
counted under the boundary region it entered or left, and ExternalEndsCode records which of its
ends fell outside. It takes the same four values as
externalEndsCode
in the JSON result.
Response example
Origin,Destination,ExternalEndsCode,TripsRegion A,Region A,0,28.5Region A,Region A,1,4.2Region A,Region B,2,3.0Region B,Region A,1,5.5Region B,Region B,0,23.0Errors
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
Code | Meaning & possible causes |
|---|---|
| OK |
| Bad request |
| Unauthorized |
| Forbidden |
| Not Found |