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

Analysis Partial Trips Result

Request

Get partial trips result by sending a POST request.

https://api.tomtom.com/origindestination/1/analysis/<id>/result/partial/trips?key=<apiKey>&dateRange=<dateRange>&timeRange=<timeRange>

Example

https://api.tomtom.com/origindestination/1/analysis/1/result/partial/trips?key=test-api-key&dateRange=0&timeRange=0

Required POST Headers

Header Value

Content-Type

application/json

Parameters

Parameter Description

apiKey

Authorization key for access to the API.

dateRange

Index of date range.

timeRange

Index of time range.

Request body stucture

Field Description

origins

List of regions' indexes where trips started

destinations

List of regions' indexes where trips ended

vias

List of regions' indexes where trips went through

Request body example

{
    "origins": [0,1,2,3],
    "destinations": [4,5,6,7,8],
    "vias": [10]
}

Response

This response will return information about number of trips which started in given origin, went through given vias and ended in given origins. The table below describe all of the fields that can appear in a response.

Reponse structure

Field Description

links

Array of link between regions

Result interpretation example

{
  "links": [[0,0,0,100], [0,1,1,200], ...]
}

Result contains list of 'links'. Each link contains information about trips between regions and looks like this:
[Origin region index (number), Destination region index (number), Via region index (number), Amount of trips (number)]

Errors

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

HTTP Response Codes
Code Reason

201

Created

400

Bad request

401

Unauthorized

403

Forbidden

404

Not Found

You are here