Analysis Partial Trips Result
Purpose
Get a partial trips result by sending a POST request.
Request data
HTTPS Method: POST
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/partial/trips?key={Your_API_Key}&dateRange={dateRange}&timeRange={timeRange}Example
https://api.tomtom.com/origindestination/1/analysis/flowmatrix/123/result/partial/trips?key={Your_API_Key}&dateRange=0&timeRange=0Required 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
Optional parameters | Description |
|---|---|
| Drops every link whose origin equals its destination, that is the internal traffic of a region. Default value: |
Required POST headers
Header | Value |
|---|---|
|
Request POST body example
{ "origins": [0, 1, 2, 3], "destinations": [4, 5, 6, 7, 8], "vias": [10]}Request POST body stucture
Field | Description |
|---|---|
| List of region indexes where trips started. Must not be empty. |
| List of region indexes where trips ended. Must not be empty. |
| List of region indexes where trips went through. Leaving it out, or sending an empty list, is not a wildcard: it returns the origin-destination view, that is only the links whose via equals their destination. Send the indexes of all your regions to get the full drill-down by via region. |
Response data
This response returns the normalized trip count for trips that started at a given origin, went through the given vias, and ended at a given destination.
The result is available once the analysis reaches the ACCEPTED status.
Response example
A link has five positions:
{ "links": [[0,0,0,0,28.5], [0,1,1,2,3.0], ...]}[0,0,0,0,28.5] - [Origin region index (number), Destination region index (number), Via region index (number), externalEndsCode (number), Normalized trip count (number)]
Reading the normalized trip count
The last position of a link is the normalized trip count for this date range and time range - for the whole analysis, not for the subset you asked about, as described at Normalized probe counts. Filtering by origins, destinations or vias therefore never rescales the values: it only removes links.
- With
viasleft empty, the returned links add up to at most 100, and to exactly about 100 when you ask for all origins and all destinations. - With
viasfilled in, the same trip can appear in several links, so the values add up to more than the origin-destination view. - Normalized values of two different results - a different
dateRangeortimeRange- have different denominators and must not be added together.
Response structure
Field | Description |
|---|---|
| An array of links between regions. |
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
Code | Meaning & possible causes |
|---|---|
| OK |
| Bad request |
| Unauthorized |
| Forbidden |
| Not Found |