Price check

Service version: 1

Purpose

Check the price in tokens for creating an Area Analytics report by sending a POST request.

Request data

HTTPS method: POST

For ease of viewing and identification:

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

Format

post
URL request format
https://{baseURL}/areaanalytics/reports/price?key={Your_API_Key}

Example

post
URL request example
https://api.tomtom.com/areaanalytics/reports/price?key={Your-API-Key}

Request parameters

Required parameters

Description

baseURL string

The base URL for calling TomTom services.

Value: api.tomtom.com

key string

Authorization key for access to the API.

Value: Your valid API key.

Request POST body

Same as in analysis-creation, see Request POST body example.

Required POST headers

Header

Value

Content-Type

application/json

Pricing calculation

The maximum number of tokens required for a given report is calculated using the following formula:

Tokens = (Number of Days) × (Number of Regions) × (Data Type Multiplier)

Where:

  • Number of Days is the total count of days between startDate and endDate.
  • Number of Regions is the total count of unique regions specified in the features.
  • Data Type Multiplier is an additional factor based on the number of data types being analyzed. For example, if you are analyzing multiple data types, the multiplier may be greater than 1.

The number of tokens consumed for analysis may be less than the calculated maximum, depending on TomTom data coverage for the selected dates and regions.

Response data

The response is an integer indicating how many tokens the report would consume if created.

Response structure

Field

Description

tokens integer

Number of tokens required for the analysis report.

Errors

If the supplied parameters are invalid or an internal error occurs, the API returns an error response in the requested format.

Response codes

Code

Meaning & possible causes

200

OK, the token count was successfully retrieved.

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found