Price check
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
https://{baseURL}/areaanalytics/reports/price?key={Your_API_Key}
Example
https://api.tomtom.com/areaanalytics/reports/price?key={Your-API-Key}
Request parameters
Required parameters | Description |
---|---|
| The base URL for calling TomTom services. Value: |
| 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 |
---|---|
|
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
andendDate
. - 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 |
---|---|
| 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 |
---|---|
| OK, the token count was successfully retrieved. |
| Bad Request |
| Unauthorized |
| Forbidden |
| Not Found |