The Official Documentation for the Adastra Toll API

Adastra Toll API Documentation

Welcome to the Adastra Toll API Documentation

The Adastra Toll API provides powerful tools for calculating toll costs and generating detailed reports for routes within Turkey. Seamlessly integrate our API with Google and TomTom Maps to enhance your applications.

Key Features

  • Real-time Toll Calculation: Accurate toll costs for routes within Turkey.
  • Seamless Integration: Easy integration with Google and TomTom Maps.
  • Comprehensive Reporting: Detailed insights on API usage and performance.

Quick Start

Ready to get started? Follow these steps:

  1. Explore the Limitations and Capacity to understand API scope.
  2. Request an API Key by contacting us.
  3. Start using the Toll Calculation and Reporting endpoints.
  4. Explore the Code Examples for guidance.

Membership Plans

  • Free: Ideal for exploring the API and basic testing for single projects.
  • Ultimate: Offers full API access, higher limits, and better support.
  • Enterprise: Provides custom solutions, dedicated support, and a robust SLA. View Membership Plans

Try the API Playground now

API Currency and Consistency

The Adastra Toll API is continuously updated to ensure data accuracy and reliability. We maintain a dual update process:

  1. Continuous Map Data Updates: Our system integrates seamlessly with map providers (Google Maps, TomTom Maps, etc.) to ensure that road and toll locations are always up-to-date.
  2. Automated Price Updates: Toll prices are automatically updated every 24 hours to ensure that users receive the most current information.

These processes guarantee that the API is always providing the most accurate data possible.

Getting Started

To learn more, explore the following sections:

Contact Us

If you have any questions or need support, please contact us at support@adastrai.com.

Authentication

API Authentication To access the Adastra Toll API, you need to authenticate your requests using an API key. This key verifies that you have permission to use the API. Obtaining Your API Key To obtain an API key, please send a request to api-request@adastrai.com with the following information: Your Name Your Company/Organization (if applicable) Your Intended Use Case for the API Your Contact Information We will review your request and provide you with an API key if appropriate.

Toll Calculation

Toll Calculation Endpoint

The Adastra Toll API’s toll calculation endpoint allows you to calculate the estimated toll costs for routes within Turkey. This endpoint considers various factors, such as vehicle type, road type, and toll structure, to provide accurate pricing.

Endpoint URL

The toll calculation endpoint can be accessed via a POST request to the following URL:

https://api.adastrai.com/toll?key=YOUR_API_KEY

Request Parameters

The toll calculation endpoint requires the following parameters to be sent in the body as a JSON object:

  • vehicleTypeId (Required):
    • Type: string
    • Description: The ID of the vehicle type.
    • Possible values:
      • "1": Two-axle vehicles with an axle spacing less than 3.20m
      • "2": Two-axle vehicles with an axle spacing of 3.20m or more (subject to UKOME decision)
      • "3": Three-axle vehicles
      • "4": Four and five-axle vehicles
      • "5": Six or more axle vehicles
      • "6": Motorcycles
    • Example: "1"
  • lang (Optional):
    • Type: string
    • Description: The language code for the response. (default “en”)
    • Possible values:
      • "en": English
      • "tr": Turkish
    • Example: "en"
  • mapsource (Required):
    • Type: string
    • Description: The source of the map data used for route calculation.
    • Possible values:
      • "google": Google Maps
      • "tomtomv1": TomTom Maps
      • "tomtomv2": TomTom Orbis Maps
    • Example: "google"
  • expandTollsData (Optional):
    • Type: boolean
    • Description: A flag to indicate whether the details of tolls (routeEntry, routeExit etc..) should be expanded on the tolls array on the response.
    • Possible values:
      • true: Tolls data will be expanded on the response.
      • false: Tolls data will not be expanded on the response.
    • Default value: false
  • departureTime (Optional):
    • Type: string
    • Description: The departure time of the route in ISO 8601 format. This parameter is used to calculate the toll costs based on the price at the given time. If this parameter is not provided, the current time will be used for the calculation.
    • Example: "2024-12-18T20:11:08.726Z"
  • steps (Required):
    • Type: string
    • Description: The route’s coordinates string (semicolon-separated latitude and longitude pairs).
    • Important Note: The steps parameter should be a string of semicolon-separated latitude and longitude pairs, where latitude and longitude values are floating-point numbers with 5 decimal places. It is necessary to format the coordinates before sending them to the server. See the Preparing the steps Parameter section for details.
    • Example: "40.90855,29.31515;40.90878,29.31577;40.90878,29.31578;40.90922,29.31678;..."

Preparing the steps Parameter

The steps parameter requires a specific format: a string of semicolon-separated latitude and longitude pairs, with each value rounded to 5 decimal places. Here’s how to format your route coordinates before sending them to the API:

Example with JavaScript

const routePoints = [
    { latitude: 40.908783, longitude: 29.315771 },
    { latitude: 41.003054, longitude: 28.961125 },
];

// Format the data
const formattedRoutePoints = routePoints.map(point => ({
    latitude: parseFloat(point.latitude.toFixed(5)),
    longitude: parseFloat(point.longitude.toFixed(5)),
}));


const stepsString = formattedRoutePoints.map(point => `${point.latitude},${point.longitude}`).join(';');

// Send to server
console.log(stepsString);
// Expected output "40.90878,29.31577;41.00305,28.96113"

Explanation:

  • The code takes an array of route points. Each point is an object containing the latitude and longitude as floating point number.
  • The map method iterates through each point and creates a new object where latitude and longitude are converted to 5 decimal places.
  • The map method is used to convert each point to a string of latitude,longitude format.
  • The join(';') method combines all the points into a single string separated by semicolons.

Response Structure

The toll calculation endpoint returns a JSON response with the following structure:

{
    "status": "success",
    "code": 200,
    "message": "Toll calculation completed successfully",
    "data": {
        "totalPrice": 60,
        "currency": "TRY",
        "vehicle": {
            "type": "two_axle_small",
            "code": "1"
        },
         "companyPrices": {
            "KGM": {
                "totalPrice": 60,
                "tollCount": 2
            }
        },
        "calculatedAt": "2024-12-20T08:49:45.4146910Z",
        "tolls": [
            {
                "highwayCode": "KGM_ANADOLU",
                "companyCode": "KGM",
                "routeEntry": "ORHANLI",
                "routeExit": "SAMANDIRA",
                "priceAmount": 27,
                "priceType": "actual",
                "tollType": "directional_pricing",
                "tollStructure": "barrier",
                  "found": true,
                "order": 463
            },
            {
                "highwayCode": "KGM_BRIDGES_ISTANBUL",
                "companyCode": "KGM",
                "routeEntry": "15TemmuzKöp",
                "routeExit": "15TemmuzKöp",
                "priceAmount": 33,
                "priceType": "actual",
                "tollType": "sensor_pricing",
                "tollStructure": "bridge",
                  "found": true,
                "order": 954
            }
        ],
        "elapsedMilliseconds": 512,
          "tollingStartDate": 20240816,
        "cache": false
    }
}

Response Fields

  • status:
    • Type: string
    • Description: The status of the API request. Possible values: "success", "error".
  • code:
    • Type: integer
    • Description: The HTTP status code of the response.
  • message:
    • Type: string
    • Description: A message indicating the result of the operation.
  • data:
    • Type: object
    • Description: An object containing the toll calculation results.
      • totalPrice:
        • Type: number
        • Description: The total toll price for the route.
      • currency:
        • Type: string
        • Description: The currency of the toll price. (e.g: "TRY")
      • vehicle:
        • Type: object
        • Description: Information about the vehicle used for calculation.
          • type:
            • Type: string
            • Description: The type of vehicle (e.g: "two_axle_small").
          • code:
            • Type: string
            • Description: The vehicle type ID. (e.g: "1")
      • companyPrices:
        • Type: object
        • Description: An object containing the toll prices for each company.
          • KGM:
            • Type: object
            • Description: Toll prices for KGM (Karayolları Genel Müdürlüğü). * totalPrice:
              • Type: number
              • Description: Total toll price for KGM. * tollCount:
              • Type: integer
              • Description: Total count for KGM tolls.
      • calculatedAt:
        • Type: string
        • Description: The timestamp of when the calculation was performed.
      • tolls:
        • Type: array
        • Description: An array of objects, each representing a toll on the route.
          • highwayCode:
            • Type: string
            • Description: The code of the highway on which the toll is located (e.g: "KGM_ANADOLU").
          • companyCode:
            • Type: string
            • Description: The code of the company operating the toll (e.g: "KGM").
          • routeEntry:
            • Type: string
            • Description: The entry point of the toll.
          • routeExit:
            • Type: string
            • Description: The exit point of the toll.
          • priceAmount:
            • Type: number
            • Description: The price of the toll.
          • priceType:
            • Type: string
            • Description: The type of price, typically "actual".
          • tollType: * Type: string * Description: The type of toll (e.g: "directional_pricing", "sensor_pricing").
          • tollStructure:
            • Type: string
            • Description: The structure of the toll (e.g: "barrier", "bridge").
          • found:
            • Type: boolean * Description: Boolean field that indicates if the toll was found on the route.
          • order: * Type: integer * Description: The order of toll on the route.
      • elapsedMilliseconds:
        • Type: integer
        • Description: The time taken to calculate tolls in milliseconds.
      • tollingStartDate: * Type: integer * Description: The start date for the tolling period in the format YYYYMMDD.
      • cache:
        • Type: boolean
        • Description: A flag to indicate whether the response was retrieved from the cache.

Request Examples

Here are some examples of how to send a request to the Toll Calculation endpoint using different platforms.

Curl

curl -X POST \
  'https://api.adastrai.com/toll?key=YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "vehicleTypeId": "1",
    "lang": "en",
    "mapsource": "google",
    "expandTollsData": true,
    "departureTime": "2024-12-18T20:11:08.726Z",
"steps": "40.90855,29.31515;40.90878,29.31577;40.90878,29.31578;40.90922,29.31678;..."
  }'

JavaScript (fetch)

const url = 'https://api.adastrai.com/toll?key=YOUR_API_KEY';
const data = {
    "vehicleTypeId": "1",
    "lang": "en",
    "mapsource": "google",
    "expandTollsData": true,
    "departureTime": "2024-12-18T20:11:08.726Z",
    "steps": "40.90855,29.31515;40.90878,29.31577;40.90878,29.31578;40.90922,29.31678;..."
};

fetch(url, {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
    },
    body: JSON.stringify(data),
})
.then(response => response.json())
.then(data => console.log(data))
.catch((error) => console.error('Error:', error));

Python (requests)

import requests
import json

url = 'https://api.adastrai.com/toll?key=YOUR_API_KEY'
data = {
    "vehicleTypeId": "1",
    "lang": "en",
    "mapsource": "google",
    "expandTollsData": True,
    "departureTime": "2024-12-18T20:11:08.726Z",
    "steps": "40.90855,29.31515;40.90878,29.31577;40.90878,29.31578;40.90922,29.31678;..."
}
headers = {'Content-Type': 'application/json'}

response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())

Important Considerations

  • Ensure your API key is included in the URL as a query parameter.
  • All parameters except expandTollsData are required.
  • The steps parameter should be a string of semicolon-separated latitude and longitude pairs.
  • The departureTime parameter should be in ISO 8601 format.
  • For accurate results, make sure that the vehicle type matches the vehicle that will be using the route.
  • The API uses a caching mechanism. If the results are the same as before, response will be sent from the cache.
  • Please refer to our rate limiting documentation or contact us for assistance if you are experiencing issues.

Error Handling

  • In case of an error, the status field in the response will be "error".
  • The code field will contain the corresponding HTTP status code.
  • The message field will provide a detailed error description.

Error Handling

The Adastra Toll API uses standard HTTP status codes to indicate the result of a request. Here are the possible error codes you may encounter with the Toll Calculation endpoint:

  • 200 OK:
    • Description: The request was successful, and the toll calculation was completed.
    • Response body includes the calculated toll information, as described in the Response Structure section.
  • 400 Bad Request:
    • Description: The request was invalid due to incorrect parameters or input data.
    • Response body includes:
      • status: "invalidinput"
      • code: 400
      • message: A detailed message describing the input error.
    • Example:
      {
          "status": "invalidinput",
          "code": 400,
          "message": "Invalid vehicleTypeId provided."
      }
      
  • 404 Not Found:
    • Description: No toll gates were found for the given route.
    • Response body includes:
      • status: "notollgates"
      • code: 404
      • message: A message indicating no toll gates were found.
    • Example:
    {
        "status": "notollgates",
        "code": 404,
        "message": "No toll gates were found for the provided route."
    }
    
  • 422 Unprocessable Entity:
    • Description: The request was valid, but the server could not process it due to a problem with price calculation.
    • Response body includes:
      • status: "pricecalculationfailed"
      • code: 422
      • message: A detailed message describing why price calculation failed.
    • Example:
      {
          "status": "pricecalculationfailed",
           "code": 422,
           "message": "Price calculation failed due to internal error."
      }
      
  • 503 Service Unavailable:
    • Description: Pricing data is currently unavailable.
    • Response body includes:
      • status: "pricingdataunavailable"
      • code: 503
      • message: A message indicating the pricing data is unavailable.
    • Example:
      {
         "status": "pricingdataunavailable",
          "code": 503,
          "message": "Pricing data is currently unavailable. Please try again later."
      }
      
  • 500 Internal Server Error:
    • Description: An unexpected server error occurred.
    • Response body includes:
      • status: "error"
      • code: 500
      • message: "An unexpected error occurred."
    • Example:
      {
          "status": "error",
           "code": 500,
           "message": "An unexpected error occurred."
      }
      

Important Considerations

  • Ensure your API key is included in the URL as a query parameter.
  • All parameters except expandTollsData are required.
  • The steps parameter should be a string of semicolon-separated latitude and longitude pairs.
  • The departureTime parameter should be in ISO 8601 format.
  • For accurate results, make sure that the vehicle type matches the vehicle that will be using the route.
  • The API uses a caching mechanism. If the results are the same as before, response will be sent from the cache.
  • Please refer to our rate limiting documentation or contact us for assistance if you are experiencing issues.

Reporting

Reporting Endpoint The Adastra Toll API’s reporting endpoint allows you to retrieve valuable usage statistics, performance metrics, and analytical insights. This endpoint is designed to help you monitor API usage, identify trends, and optimize your integration. Endpoint URL The reporting endpoint can be accessed via a GET request to the following URL: https://api.adastrai.com/report?key=YOUR_API_KEY&secret=YOUR_SECRET_KEY Request Parameters The reporting endpoint requires the following parameters to be sent as query parameters in the URL:

Data Models

Data Models

This section provides detailed information about the data models used by the Adastra Toll API for both requests and responses. Understanding these data structures is crucial for successful API integration.

Toll Calculation Endpoint Data Models

Request Model

The request body for the Toll Calculation endpoint is a JSON object with the following structure:

{
  "vehicleTypeId": "string",
  "lang": "string",
  "mapsource": "string",
  "expandTollsData": "boolean",
  "departureTime": "string",
  "steps": "string"
}
  • vehicleTypeId:
    • Type: string
    • Description: The ID of the vehicle type.
    • Possible Values: "1", "2", "3", "4", "5", "6"
  • lang:
    • Type: string
    • Description: The language code for the response.
    • Possible Values: "en", "tr"
  • mapsource:
    • Type: string
    • Description: The source of the map data.
    • Possible Values: "google", "tomtomv1","tomtomv2"
  • expandTollsData:
    • Type: boolean
    • Description: A flag to indicate whether the tolls data should be expanded.
  • departureTime:
    • Type: string
    • Description: The departure time of the route in ISO 8601 format.
  • steps:
    • Type: string
    • Description: The route’s coordinates string.

Response Model

The response from the Toll Calculation endpoint is a JSON object with the following structure:

{
  "status": "string",
  "code": "integer",
  "message": "string",
  "data": {
    "totalPrice": "number",
    "currency": "string",
    "vehicle": {
      "type": "string",
      "code": "string"
    },
    "companyPrices": {
      "KGM": {
        "totalPrice": "number",
        "tollCount": "integer"
      }
    },
    "calculatedAt": "string",
    "tolls": [
      {
        "highwayCode": "string",
        "companyCode": "string",
        "routeEntry": "string",
        "routeExit": "string",
        "priceAmount": "number",
        "priceType": "string",
         "tollType": "string",
        "tollStructure": "string",
        "found": "boolean",
        "order": "integer"
      }
    ],
    "elapsedMilliseconds": "integer",
     "tollingStartDate": "integer",
    "cache": "boolean"
  }
}
  • status:
    • Type: string
    • Description: The status of the API request.
  • code:
    • Type: integer
    • Description: The HTTP status code of the response.
  • message:
    • Type: string
    • Description: A message indicating the result of the operation.
  • data:
    • Type: object
    • Description: An object containing the toll calculation results.
      • totalPrice:
        • Type: number
        • Description: The total toll price for the route.
      • currency:
        • Type: string
        • Description: The currency of the toll price.
      • vehicle:
        • Type: object
        • Description: Information about the vehicle used for calculation.
          • type:
            • Type: string
            • Description: The type of vehicle.
          • code:
            • Type: string
            • Description: The vehicle type ID.
      • companyPrices:
        • Type: object
        • Description: An object containing the toll prices for each company.
          • KGM:
            • Type: object
            • Description: Toll prices for KGM (Karayolları Genel Müdürlüğü).
              • totalPrice:
                • Type: number
                • Description: Total toll price for KGM.
              • tollCount: * Type: integer * Description: Total count for KGM tolls.
      • calculatedAt:
        • Type: string
        • Description: The timestamp of when the calculation was performed.
      • tolls:
        • Type: array
        • Description: An array of objects, each representing a toll on the route.
          • highwayCode:
            • Type: string
            • Description: The code of the highway on which the toll is located.
          • companyCode:
            • Type: string
            • Description: The code of the company operating the toll.
          • routeEntry:
            • Type: string
            • Description: The entry point of the toll.
          • routeExit:
            • Type: string
            • Description: The exit point of the toll.
          • priceAmount:
            • Type: number
            • Description: The price of the toll.
          • priceType:
            • Type: string
            • Description: The type of price.
          • tollType: * Type: string
            • Description: The type of toll.
          • tollStructure: * Type: string
            • Description: The structure of the toll.
          • found: * Type: boolean
            • Description: Boolean field that indicates if the toll was found on the route.
          • order:
            • Type: integer
            • Description: The order of toll on the route.
      • elapsedMilliseconds:
        • Type: integer
        • Description: The time taken to calculate tolls in milliseconds.
      • tollingStartDate: * Type: integer
        • Description: The start date for the tolling period in the format YYYYMMDD.
      • cache:
        • Type: boolean
        • Description: A flag to indicate whether the response was retrieved from the cache.

Reporting Endpoint Data Models

Request Model

The request for the Reporting endpoint is a GET request. The parameters are passed as query strings in the URL, they are:

  • key:
    • Type: string
    • Description: Your API key for authentication.
  • secret: * Type: string * Description: Your secret key for authentication.
  • reportName:
    • Type: string
    • Description: The name of the report to retrieve.
  • timeCriteria:
    • Type: string
    • Description: The time criteria for the report.

Response Model

The response is a JSON object with the following structure:

{
  "status": "string",
  "code": "integer",
  "message": "string",
  // Report data varies based on the reportName
  "requestDateTime": "string",
  "cacheDurationMinutes": "integer"
  }
  • status: * Type: string * Description: The status of the API request.
  • code:
    • Type: integer
    • Description: The HTTP status code of the response.
  • message:
    • Type: string
    • Description: A message indicating the result of the operation.
  • Report Data: The structure of the report data varies based on the reportName parameter. Please refer to the Reporting Endpoint section for detailed report structures.
  • requestDateTime: * Type: string * Description: The time the report request was made.
  • cacheDurationMinutes: * Type: integer * Description: The number of minutes the report will be cached by the server.

Please refer to the Reporting Endpoint section for detailed data structures for each report type.

Important Considerations

  • Understanding the data types and structures is crucial for correct API usage.
  • Refer to the specific endpoint documentation for detailed information about each parameter and field.
  • The data models can be used as a guide for parsing and handling data in your application.

Code Examples

Code Examples

This section provides practical code examples demonstrating how to use the Adastra Toll API in different programming languages. These examples will help you understand how to interact with the API and integrate it into your applications.

Toll Calculation Examples

JavaScript (fetch)

const url = 'https://api.adastrai.com/toll?key=YOUR_API_KEY';
const data = {
    "vehicleTypeId": "1",
    "lang": "en",
    "mapsource": "google",
    "expandTollsData": true,
    "departureTime": "2024-12-18T20:11:08.726Z",
    "steps": "40.90855,29.31515;40.90878,29.31577;40.90878,29.31578;40.90922,29.31678;..."
};

fetch(url, {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
    },
    body: JSON.stringify(data),
})
.then(response => response.json())
.then(data => console.log(data))
.catch((error) => console.error('Error:', error));

Python (requests)

import requests
import json

url = 'https://api.adastrai.com/toll?key=YOUR_API_KEY'
data = {
    "vehicleTypeId": "1",
    "lang": "en",
    "mapsource": "google",
    "expandTollsData": True,
    "departureTime": "2024-12-18T20:11:08.726Z",
    "steps": "40.90855,29.31515;40.90878,29.31577;40.90878,29.31578;40.90922,29.31678;..."
}
headers = {'Content-Type': 'application/json'}

response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())

C# (HttpClient)

using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class Example
{
    public static async Task Main(string[] args)
    {
        using (HttpClient client = new HttpClient())
        {
            string url = "https://api.adastrai.com/toll?key=YOUR_API_KEY";
            var data = new {
                 vehicleTypeId = "1",
                 lang = "en",
                 mapsource = "google",
                 expandTollsData = true,
                 departureTime = "2024-12-18T20:11:08.726Z",
                 steps = "40.90855,29.31515;40.90878,29.31577;40.90878,29.31578;40.90922,29.31678;..."
            };
            string jsonData = JsonConvert.SerializeObject(data);
            HttpContent content = new StringContent(jsonData, Encoding.UTF8, "application/json");
            HttpResponseMessage response = await client.PostAsync(url, content);
            string responseContent = await response.Content.ReadAsStringAsync();
             Console.WriteLine(responseContent);
        }
    }
}

Reporting Endpoint Examples

JavaScript (fetch)

const url = 'https://api.adastrai.com/report?key=YOUR_API_KEY&secret=YOUR_SECRET_KEY&reportName=all&timeCriteria=d';

fetch(url, {
    method: 'GET',
})
.then(response => response.json())
.then(data => console.log(data))
.catch((error) => console.error('Error:', error));

Python (requests)

import requests
import json

url = 'https://api.adastrai.com/report?key=YOUR_API_KEY&secret=YOUR_SECRET_KEY&reportName=all&timeCriteria=d'

response = requests.get(url)
print(response.json())

C# (HttpClient)

using System;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class Example
{
    public static async Task Main(string[] args)
    {
        using (HttpClient client = new HttpClient())
        {
            string url = "https://api.adastrai.com/report?key=YOUR_API_KEY&secret=YOUR_SECRET_KEY&reportName=all&timeCriteria=d";
            HttpResponseMessage response = await client.GetAsync(url);
            string responseContent = await response.Content.ReadAsStringAsync();
             Console.WriteLine(responseContent);
        }
    }
}

Mapsource Parameter

The mapsource parameter in the Toll Calculation endpoint can take one of the following values:

  • "google": Google Maps
  • "tomtomv1": TomTom Maps V1
  • "tomtomv2": TomTom Orbis Maps V2

Important Considerations

  • Replace YOUR_API_KEY and YOUR_SECRET_KEY with your actual API key and secret key.
  • These examples provide a basic framework for interacting with the API. You may need to modify them based on your specific requirements.
  • Refer to the documentation for detailed explanations of each parameter and response field.

Membership Comparison

Membership Comparison

This page provides a detailed comparison of the different membership plans offered for the Adastra Toll API: Free, Ultimate, and Enterprise. Choose the plan that best suits your needs and scale requirements.

Plan Overview

Here’s a quick overview of each plan:

  • Free: Ideal for individual developers starting out, with limited access and basic features. Suitable for a single website or project.
  • Ultimate: Designed for small to medium-sized businesses needing full API access, higher rate limits, priority support, and the flexibility to integrate with multiple projects within your organization. A one-month free trial is available during the development process.
  • Enterprise: Tailored for large organizations that require custom solutions, a dedicated support team, a robust SLA, and fully customizable network access.

Plan Comparison

Feature Free Ultimate Enterprise
Target Audience Individual Developers, Basic Projects Small to Medium Businesses, Growing Projects Large Organizations, High Traffic Applications
Toll Calculation Endpoint
Supported Vehicle Types One Vehicle Type All Vehicle Types All Vehicle Types
expandTollsData Parameter Support Not Supported Supported Supported
Reporting Endpoint Not Supported Full Access Full Access
API Rate Limits Per Second: 2, Per Minute: 50, Per Hour: 300 Per Second: 50, Per Minute: 500, Per Hour: 3000 Customizable
Support & SLA Community Support, No Response SLA Priority Support, 95% Response SLA Dedicated Support & SLA, 99.9% Service Guarantee
Network Access One Website Multiple Domains and IP Addresses Fully Customizable
Free Trial Not Available 1 Month Free Ultimate Trial Contact Sales
Other Features Basic Features Advanced Features Fully Customizable

Detailed Features

Toll Calculation Endpoint

  • Supported Vehicle Types:
    • Free: Supports toll calculations for one vehicle type.
    • Ultimate: Supports toll calculations for all vehicle types.
    • Enterprise: Supports toll calculations for all vehicle types.
  • expandTollsData Parameter:
    • Free: Does not support the expandTollsData parameter.
    • Ultimate: Fully supports the expandTollsData parameter.
    • Enterprise: Fully supports the expandTollsData parameter.

Reporting Endpoint

  • Reporting Capabilities:
    • Free: Does not support the reporting endpoint.
    • Ultimate: Provides full access to all reporting features.
    • Enterprise: Provides full access to all reporting features.

Support and SLA (Service Level Agreement)

  • Support:
    • Free: Community support only, with no guarantee on response times.
    • Ultimate: Priority email support, with a 95% response SLA.
    • Enterprise: Dedicated support manager, guaranteed response times, and a custom SLA with a 99.9% service guarantee.
  • API Rate Limits:
    • Free:
      • Per Second: 2
      • Per Minute: 50
      • Per Hour: 300
    • Ultimate:
      • Per Second: 50
      • Per Minute: 500
      • Per Hour: 3000
    • Enterprise: Customizable rate limits to meet specific requirements.

Network Access

  • Network Access:
    • Free: The API can only be accessed from a single specified website.
    • Ultimate: The API can be accessed from multiple domains and IP addresses, allowing use across various projects within your organization or infrastructure.
    • Enterprise: Network access is fully customizable to meet the specific requirements of the enterprise client, including specific IP ranges and domains.

Development Trial

  • Development Trial:
    • A one-month free trial of the Ultimate plan is available during the development process. This allows you to fully explore all features and capabilities of the Adastra Toll API before choosing a plan.

Project Integration Support

  • Project Integration Support:

  • Free: No specific project integration support provided.

  • Ultimate: No specific project integration support provided.

  • Enterprise: Optional: Tailored integration support with a dedicated development team, project adaptation and customization.

  • Other Features:

    • Free: Offers basic features.
    • Ultimate: Offers more advanced features.
    • Enterprise: Fully customizable, tailored to the client’s specific needs.

Choosing the Right Plan

  • Free: Ideal for individual developers, beginners, or those with limited testing and usage needs for a single project.
  • Ultimate: Perfect for small to medium-sized businesses needing full API functionality, higher usage limits, priority support, and the ability to integrate across multiple projects. The free trial is also beneficial for this group.
  • Enterprise: The ideal choice for large organizations with high-volume, critical applications, requiring custom solutions, dedicated support, and a robust SLA.

How to Upgrade

To upgrade your membership plan or to activate your free trial, please contact our sales team at sales@adastrai.com.

API Playground

Adastra Toll API Playground

The Adastra Toll API playground is a web-based platform that allows you to test and experiment with the API in real-time. This tool provides a convenient way to explore the API’s features, understand its functionality, and validate your integration.

Overview

The playground offers the following key features:

  • Interactive Interface: A user-friendly interface to input API parameters and view responses.
  • Real-time Testing: Send requests to the API and receive responses instantly.
  • Toll Calculation Support: A section to test the Toll Calculation endpoint.
  • Report API (Coming Soon): A section to test the Reporting endpoint (currently under development).
  • Maps Visualization: Displays a map with the selected route.
  • Code Snippets: Shows the corresponding code snippet for the API request.

Toll Calculation Playground

The Toll Calculation section includes the following elements:

  1. Start and End Location Inputs: Two input fields to search for or enter latitude and longitude coordinates.
    • You can either enter coordinates manually or search for locations.
  2. Route Options:
    • Checkboxes to avoid tolls, highways, and ferries.
  3. Date Selection:
    • A date picker to select the departure date and time.
  4. Expand Tolls Data: * A checkbox to include expanded toll data in the response.
  5. Vehicle Type Selection:
    • A dropdown menu to select the vehicle type for calculation.
      • The options are the same as the vehicleTypeId parameter (1st class vehicles, 2nd class vehicles etc.)
  6. Language Selection: * A dropdown menu to select the language for the response.
    • The options are the same as the lang parameter (en, tr ).
  7. Map Source Selection: * A dropdown menu to select the map source for route calculation.
    • The options are the same as the mapsource parameter (google, tomtomv1, tomtomv2).
  8. Clean Button:
    • A button to clear the input parameters
  9. Search Button:
    • A button to send the request to the Toll Calculation endpoint with the specified parameters.
  10. Map Visualization:
    • A map area to visualize the route on the map.
  11. API Request and Response Display: * A display area to show the request sent to the API and the response received.

Note: The Toll Calculation playground is fully functional. You can experiment with all available options and see the results instantly.

Report API Playground (Coming Soon)

The Report API playground is currently under development and will be available soon. It will offer a similar interactive interface for testing the Reporting endpoint.

Access the Playground

You can access the Adastra Toll API playground at https://api-playground.adastrai.com/

Please Note: This playground is intended for testing and exploration purposes. Performance and stability may vary. Please be aware of rate limiting and other usage considerations.

Limitations and Capacity

Limitations and Capacity

This page provides information about the limitations and capacity of the Adastra Toll API, including the list of supported highway companies, highways, the total number of prices in the system, and the different types of tolls and their counts. Understanding these limitations will help you plan your integration and manage your expectations.

System Capacity

  • Total Registered Prices: 19.797

Supported Highway Companies

The Adastra Toll API supports the following highway companies:

Company Name Code
KUZEY MARMARA OTOYOLU KMO
ICA-YAVUZ SULTAN SELİM KÖPRÜSÜ ve KUZEY ÇEVRE OTOYOLU İŞLETMESİ ICA
Karayolları Genel Müdürlüğü KGM
Avrasya Tüneli İşletme İnşaat ve Yatırım A.Ş. (ATAŞ) ATAS
Otoyol Yatırım ve İşletme A.Ş. OTYL
Çanakkale Otoyol ve Köprüsü İnşaat Yatırım ve İşletme A.Ş. 1915
İDO IDO
KUZEY EGE OTOYOLU GENEL MÜDÜRLÜĞÜ-Menemen-Aliağa-Çandarlı Otoyolu KEGE
FERNAS OTOYOL İŞLETMESİ A.Ş AYDIN-DENİZLİ OTOYOLU FNS
ANKARA NİĞDE OTOYOLU ANO

Supported Highways and Ferries

The Adastra Toll API supports the following highways and some ferry crossings:

Name Code
Kuzey Marmara Avrupa (Kınalı - Odayeri)​ KMO_EUROPA
Kuzey Marmara Anadolu ​(Kurt​köy - ​Akyazı) KMO_ASIA
Yavuz Sultan Selim Köprüsü ve Kuzey Çevre O​toyolu YSS_BRIDGE_RINGROAD
KGM Anadolu (Çamlıca İstasyonu - Akıncı Kesimi ) KGM_ANADOLU
KGM İzmir - Çeşme KGM_IZMIR_CESME
KGM İzmir - Aydın (Işıkkent - Aydın Batı Kesimi ) KGM_IZMIR_AYDIN
KGM Avrupa (Mahmutbey - Edirne Kesimi) KGM_EUROPA_EDIRNE
KGM-İstanbul Köprüler KGM_BRIDGES_ISTANBUL
KGM-Çukurova Otoyolları (Adana-Hatay-Gaziantep Batı) KGM_CUKUROVA
KGM-Gaziantep Doğu-Şanlıurfa KGM_GAZIANTEP_SANLIURFA
KGM-NİĞDE-MERSİN-ADANA BATI KESİMİ KGM_NIGDE_MERSIN_ADANA
Avrasya Tüneli AVRASYA_TUNNEL
Gebze - Bursa (İstanbul - İzmir Otoyolu O5) ISTANBUL_IZMIR_O5_GEBZE_BURSA
Bursa - İzmir (İstanbul - İzmir Otoyolu O5) ISTANBUL_IZMIR_O5_BURSA_IZMIR
Malkara - Çanakkale ​(1915 ​Çanakkale Köprürüsü​ dahil) Otoyolu MALKARA_CANAKKALE_1915
Kuzey Ege Otoyolu NORTHERN_AEGEAN
Aydın Denizli Otoyolu AYDIN_DENIZLI
Ankara Niğde Otoyolu ANKARA_NIGDE
Sirkeci-Harem SIRKECI_HAREM
Eskihisar-Topçular ESKIHISAR_TOPCULAR

Supported Toll Types and Counts

The Adastra Toll API uses two primary types for pricing:

  • Directional Pricing: This type of pricing is determined based on the entry and exit points (A-B points).
    • Number of Directional Pricing Points: 392
    • Data returned in API as: "tollType": "directional_pricing"
  • Sensor Pricing: This type of pricing is used for single point passage (e.g., bridges, tunnels, sensor-based tolls).
    • Number of Sensor Pricing Points: 48
    • Data returned in API as: "tollType": "sensor_pricing"

The Adastra Toll API also categorizes the toll structures based on their physical characteristics:

Structure Code Count
barrier 1 382
sensor 2 39
bridge 3 9
tunnel 4 2
ferry 5 8

Important Considerations

  • This list is not exhaustive, and new highways and companies are added periodically.
  • API support for new companies or highways will be updated regularly.
  • While the API strives to provide full coverage, there might be limitations in certain regions or routes. Please check the detailed responses to understand the coverage.

Change Log

Change Log This page documents the development and evolution of the Adastra Toll API over the past year. We are committed to continuous improvement and providing a robust and reliable service. - 2025-01-20 feature: The new Teknosab toll booth and its fees have been added to the ISTANBUL_IZMIR_O5_BURSA_IZMIR highway. - 2025-01-14 feature: Ministry of Transport and Infrastructure of Turkey has implemented highway toll price updates announced on January 13, 2025, following comprehensive testing procedures.