TrackService API Documentation

CalculateDistanceByLocation

distance

Use the following method to calculate distance and time between two locations by using GPS coordinates


/distance

Usage and SDK Samples

curl -X POST -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/trackservice/distance"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CalculateDistanceByLocationApi;

import java.io.File;
import java.util.*;

public class CalculateDistanceByLocationApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        CalculateDistanceByLocationApi apiInstance = new CalculateDistanceByLocationApi();
        String apiecoKey = apiecoKey_example; // String | 
        String contentType = contentType_example; // String | To receive response in JSON format you must specify content type text/json or application/json.
        Body_4 body = ; // Body_4 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.
        try {
            inline_response_200_3 result = apiInstance.distance(apiecoKey, contentType, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateDistanceByLocationApi#distance");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CalculateDistanceByLocationApi;

public class CalculateDistanceByLocationApiExample {

    public static void main(String[] args) {
        CalculateDistanceByLocationApi apiInstance = new CalculateDistanceByLocationApi();
        String apiecoKey = apiecoKey_example; // String | 
        String contentType = contentType_example; // String | To receive response in JSON format you must specify content type text/json or application/json.
        Body_4 body = ; // Body_4 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.
        try {
            inline_response_200_3 result = apiInstance.distance(apiecoKey, contentType, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateDistanceByLocationApi#distance");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *contentType = contentType_example; // To receive response in JSON format you must specify content type text/json or application/json.
Body_4 *body = ; // The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

CalculateDistanceByLocationApi *apiInstance = [[CalculateDistanceByLocationApi alloc] init];

// 
[apiInstance distanceWith:apiecoKey
    contentType:contentType
    body:body
              completionHandler: ^(inline_response_200_3 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var TrackServiceApiDocumentation = require('track_service_api_documentation');
var defaultClient = TrackServiceApiDocumentation.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new TrackServiceApiDocumentation.CalculateDistanceByLocationApi()

var apiecoKey = apiecoKey_example; // {String} 

var contentType = contentType_example; // {String} To receive response in JSON format you must specify content type text/json or application/json.

var body = ; // {Body_4} The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.distance(apiecoKey, contentType, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class distanceExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new CalculateDistanceByLocationApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var contentType = contentType_example;  // String | To receive response in JSON format you must specify content type text/json or application/json.
            var body = new Body_4(); // Body_4 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

            try
            {
                // 
                inline_response_200_3 result = apiInstance.distance(apiecoKey, contentType, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CalculateDistanceByLocationApi.distance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\CalculateDistanceByLocationApi();
$apiecoKey = apiecoKey_example; // String | 
$contentType = contentType_example; // String | To receive response in JSON format you must specify content type text/json or application/json.
$body = ; // Body_4 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

try {
    $result = $api_instance->distance($apiecoKey, $contentType, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CalculateDistanceByLocationApi->distance: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CalculateDistanceByLocationApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CalculateDistanceByLocationApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $contentType = contentType_example; # String | To receive response in JSON format you must specify content type text/json or application/json.
my $body = WWW::SwaggerClient::Object::Body_4->new(); # Body_4 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

eval { 
    my $result = $api_instance->distance(apiecoKey => $apiecoKey, contentType => $contentType, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CalculateDistanceByLocationApi->distance: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CalculateDistanceByLocationApi()
apiecoKey = apiecoKey_example # String | 
contentType = contentType_example # String | To receive response in JSON format you must specify content type text/json or application/json.
body =  # Body_4 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

try: 
    # 
    api_response = api_instance.distance(apiecoKey, contentType, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CalculateDistanceByLocationApi->distance: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
ContentType*
String
To receive response in JSON format you must specify content type text/json or application/json.
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Successful

Status: 405 - Invalid input


CalculateRoute

calculateRoute

Use the following URL template to get a route by specifying a series of locations. A location is a specified geographical location defined by longitude and latitude that is used for navigational purposes. The route includes information such as route instructions, travel durati...


/route

Usage and SDK Samples

curl -X POST -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/trackservice/route"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CalculateRouteApi;

import java.io.File;
import java.util.*;

public class CalculateRouteApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        CalculateRouteApi apiInstance = new CalculateRouteApi();
        String apiecoKey = apiecoKey_example; // String | 
        String contentType = contentType_example; // String | To receive response in JSON format you must specify content type text/json or application/json.
        Body_1 body = ; // Body_1 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.
        try {
            inline_response_200_1 result = apiInstance.calculateRoute(apiecoKey, contentType, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateRouteApi#calculateRoute");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CalculateRouteApi;

public class CalculateRouteApiExample {

    public static void main(String[] args) {
        CalculateRouteApi apiInstance = new CalculateRouteApi();
        String apiecoKey = apiecoKey_example; // String | 
        String contentType = contentType_example; // String | To receive response in JSON format you must specify content type text/json or application/json.
        Body_1 body = ; // Body_1 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.
        try {
            inline_response_200_1 result = apiInstance.calculateRoute(apiecoKey, contentType, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateRouteApi#calculateRoute");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *contentType = contentType_example; // To receive response in JSON format you must specify content type text/json or application/json.
Body_1 *body = ; // The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

CalculateRouteApi *apiInstance = [[CalculateRouteApi alloc] init];

// 
[apiInstance calculateRouteWith:apiecoKey
    contentType:contentType
    body:body
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var TrackServiceApiDocumentation = require('track_service_api_documentation');
var defaultClient = TrackServiceApiDocumentation.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new TrackServiceApiDocumentation.CalculateRouteApi()

var apiecoKey = apiecoKey_example; // {String} 

var contentType = contentType_example; // {String} To receive response in JSON format you must specify content type text/json or application/json.

var body = ; // {Body_1} The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.calculateRoute(apiecoKey, contentType, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class calculateRouteExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new CalculateRouteApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var contentType = contentType_example;  // String | To receive response in JSON format you must specify content type text/json or application/json.
            var body = new Body_1(); // Body_1 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

            try
            {
                // 
                inline_response_200_1 result = apiInstance.calculateRoute(apiecoKey, contentType, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CalculateRouteApi.calculateRoute: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\CalculateRouteApi();
$apiecoKey = apiecoKey_example; // String | 
$contentType = contentType_example; // String | To receive response in JSON format you must specify content type text/json or application/json.
$body = ; // Body_1 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

try {
    $result = $api_instance->calculateRoute($apiecoKey, $contentType, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CalculateRouteApi->calculateRoute: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CalculateRouteApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CalculateRouteApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $contentType = contentType_example; # String | To receive response in JSON format you must specify content type text/json or application/json.
my $body = WWW::SwaggerClient::Object::Body_1->new(); # Body_1 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

eval { 
    my $result = $api_instance->calculateRoute(apiecoKey => $apiecoKey, contentType => $contentType, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CalculateRouteApi->calculateRoute: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CalculateRouteApi()
apiecoKey = apiecoKey_example # String | 
contentType = contentType_example # String | To receive response in JSON format you must specify content type text/json or application/json.
body =  # Body_1 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

try: 
    # 
    api_response = api_instance.calculate_route(apiecoKey, contentType, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CalculateRouteApi->calculateRoute: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
ContentType*
String
To receive response in JSON format you must specify content type text/json or application/json.
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Successful

Status: 405 - Invalid input


CalculateRoutes

calculateRoutes

Use the following URL template to get routes by specifying a series of locations. A location is a specified geographical location defined by longitude and latitude that is used for navigational purposes. The routes includes information such as route instructions, travel durations


/routes

Usage and SDK Samples

curl -X POST -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/trackservice/routes"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CalculateRoutesApi;

import java.io.File;
import java.util.*;

public class CalculateRoutesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        CalculateRoutesApi apiInstance = new CalculateRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String contentType = contentType_example; // String | To receive response in JSON format you must specify content type text/json or application/json.
        Body_2 body = ; // Body_2 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.
        try {
            inline_response_200_1 result = apiInstance.calculateRoutes(apiecoKey, contentType, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateRoutesApi#calculateRoutes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CalculateRoutesApi;

public class CalculateRoutesApiExample {

    public static void main(String[] args) {
        CalculateRoutesApi apiInstance = new CalculateRoutesApi();
        String apiecoKey = apiecoKey_example; // String | 
        String contentType = contentType_example; // String | To receive response in JSON format you must specify content type text/json or application/json.
        Body_2 body = ; // Body_2 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.
        try {
            inline_response_200_1 result = apiInstance.calculateRoutes(apiecoKey, contentType, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CalculateRoutesApi#calculateRoutes");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *contentType = contentType_example; // To receive response in JSON format you must specify content type text/json or application/json.
Body_2 *body = ; // The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

CalculateRoutesApi *apiInstance = [[CalculateRoutesApi alloc] init];

// 
[apiInstance calculateRoutesWith:apiecoKey
    contentType:contentType
    body:body
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var TrackServiceApiDocumentation = require('track_service_api_documentation');
var defaultClient = TrackServiceApiDocumentation.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new TrackServiceApiDocumentation.CalculateRoutesApi()

var apiecoKey = apiecoKey_example; // {String} 

var contentType = contentType_example; // {String} To receive response in JSON format you must specify content type text/json or application/json.

var body = ; // {Body_2} The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.calculateRoutes(apiecoKey, contentType, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class calculateRoutesExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new CalculateRoutesApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var contentType = contentType_example;  // String | To receive response in JSON format you must specify content type text/json or application/json.
            var body = new Body_2(); // Body_2 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

            try
            {
                // 
                inline_response_200_1 result = apiInstance.calculateRoutes(apiecoKey, contentType, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CalculateRoutesApi.calculateRoutes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\CalculateRoutesApi();
$apiecoKey = apiecoKey_example; // String | 
$contentType = contentType_example; // String | To receive response in JSON format you must specify content type text/json or application/json.
$body = ; // Body_2 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

try {
    $result = $api_instance->calculateRoutes($apiecoKey, $contentType, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CalculateRoutesApi->calculateRoutes: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CalculateRoutesApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CalculateRoutesApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $contentType = contentType_example; # String | To receive response in JSON format you must specify content type text/json or application/json.
my $body = WWW::SwaggerClient::Object::Body_2->new(); # Body_2 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

eval { 
    my $result = $api_instance->calculateRoutes(apiecoKey => $apiecoKey, contentType => $contentType, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CalculateRoutesApi->calculateRoutes: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CalculateRoutesApi()
apiecoKey = apiecoKey_example # String | 
contentType = contentType_example # String | To receive response in JSON format you must specify content type text/json or application/json.
body =  # Body_2 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

try: 
    # 
    api_response = api_instance.calculate_routes(apiecoKey, contentType, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CalculateRoutesApi->calculateRoutes: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
ContentType*
String
To receive response in JSON format you must specify content type text/json or application/json.
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Successful

Status: 405 - Invalid input


Dispatch

dispatch

Dispatch method can optimize 100's of stops using one or several vehicles. You can use address or latitude/longitude to define a location of a Vehicle and a Stop.


/dispatch

Usage and SDK Samples

curl -X POST -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/trackservice/dispatch"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DispatchApi;

import java.io.File;
import java.util.*;

public class DispatchApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        DispatchApi apiInstance = new DispatchApi();
        String apiecoKey = apiecoKey_example; // String | 
        String contentType = contentType_example; // String | To receive response in JSON format you must specify content type text/json or application/json.
        Body body = ; // Body | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.
        try {
            inline_response_200 result = apiInstance.dispatch(apiecoKey, contentType, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DispatchApi#dispatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DispatchApi;

public class DispatchApiExample {

    public static void main(String[] args) {
        DispatchApi apiInstance = new DispatchApi();
        String apiecoKey = apiecoKey_example; // String | 
        String contentType = contentType_example; // String | To receive response in JSON format you must specify content type text/json or application/json.
        Body body = ; // Body | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.
        try {
            inline_response_200 result = apiInstance.dispatch(apiecoKey, contentType, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DispatchApi#dispatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *contentType = contentType_example; // To receive response in JSON format you must specify content type text/json or application/json.
Body *body = ; // The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

DispatchApi *apiInstance = [[DispatchApi alloc] init];

// 
[apiInstance dispatchWith:apiecoKey
    contentType:contentType
    body:body
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var TrackServiceApiDocumentation = require('track_service_api_documentation');
var defaultClient = TrackServiceApiDocumentation.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new TrackServiceApiDocumentation.DispatchApi()

var apiecoKey = apiecoKey_example; // {String} 

var contentType = contentType_example; // {String} To receive response in JSON format you must specify content type text/json or application/json.

var body = ; // {Body} The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.dispatch(apiecoKey, contentType, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class dispatchExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new DispatchApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var contentType = contentType_example;  // String | To receive response in JSON format you must specify content type text/json or application/json.
            var body = new Body(); // Body | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

            try
            {
                // 
                inline_response_200 result = apiInstance.dispatch(apiecoKey, contentType, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DispatchApi.dispatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\DispatchApi();
$apiecoKey = apiecoKey_example; // String | 
$contentType = contentType_example; // String | To receive response in JSON format you must specify content type text/json or application/json.
$body = ; // Body | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

try {
    $result = $api_instance->dispatch($apiecoKey, $contentType, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DispatchApi->dispatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DispatchApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::DispatchApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $contentType = contentType_example; # String | To receive response in JSON format you must specify content type text/json or application/json.
my $body = WWW::SwaggerClient::Object::Body->new(); # Body | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

eval { 
    my $result = $api_instance->dispatch(apiecoKey => $apiecoKey, contentType => $contentType, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DispatchApi->dispatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DispatchApi()
apiecoKey = apiecoKey_example # String | 
contentType = contentType_example # String | To receive response in JSON format you must specify content type text/json or application/json.
body =  # Body | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

try: 
    # 
    api_response = api_instance.dispatch(apiecoKey, contentType, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DispatchApi->dispatch: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
ContentType*
String
To receive response in JSON format you must specify content type text/json or application/json.
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Successful

Status: 405 - Invalid input


Geocode

geocode

Use the following method to get latitude and longitude coordinates for a location by specifying values such as a postal code, and street address.


/geocode

Usage and SDK Samples

curl -X POST -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/trackservice/geocode"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GeocodeApi;

import java.io.File;
import java.util.*;

public class GeocodeApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        GeocodeApi apiInstance = new GeocodeApi();
        String apiecoKey = apiecoKey_example; // String | 
        String contentType = contentType_example; // String | To receive response in JSON format you must specify content type text/json or application/json.
        Body_3 body = ; // Body_3 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.
        try {
            inline_response_200_2 result = apiInstance.geocode(apiecoKey, contentType, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GeocodeApi#geocode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GeocodeApi;

public class GeocodeApiExample {

    public static void main(String[] args) {
        GeocodeApi apiInstance = new GeocodeApi();
        String apiecoKey = apiecoKey_example; // String | 
        String contentType = contentType_example; // String | To receive response in JSON format you must specify content type text/json or application/json.
        Body_3 body = ; // Body_3 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.
        try {
            inline_response_200_2 result = apiInstance.geocode(apiecoKey, contentType, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GeocodeApi#geocode");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

String *apiecoKey = apiecoKey_example; // 
String *contentType = contentType_example; // To receive response in JSON format you must specify content type text/json or application/json.
Body_3 *body = ; // The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

GeocodeApi *apiInstance = [[GeocodeApi alloc] init];

// 
[apiInstance geocodeWith:apiecoKey
    contentType:contentType
    body:body
              completionHandler: ^(inline_response_200_2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var TrackServiceApiDocumentation = require('track_service_api_documentation');
var defaultClient = TrackServiceApiDocumentation.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new TrackServiceApiDocumentation.GeocodeApi()

var apiecoKey = apiecoKey_example; // {String} 

var contentType = contentType_example; // {String} To receive response in JSON format you must specify content type text/json or application/json.

var body = ; // {Body_3} The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.geocode(apiecoKey, contentType, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class geocodeExample
    {
        public void main()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new GeocodeApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var contentType = contentType_example;  // String | To receive response in JSON format you must specify content type text/json or application/json.
            var body = new Body_3(); // Body_3 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

            try
            {
                // 
                inline_response_200_2 result = apiInstance.geocode(apiecoKey, contentType, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GeocodeApi.geocode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\GeocodeApi();
$apiecoKey = apiecoKey_example; // String | 
$contentType = contentType_example; // String | To receive response in JSON format you must specify content type text/json or application/json.
$body = ; // Body_3 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

try {
    $result = $api_instance->geocode($apiecoKey, $contentType, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GeocodeApi->geocode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GeocodeApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::GeocodeApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $contentType = contentType_example; # String | To receive response in JSON format you must specify content type text/json or application/json.
my $body = WWW::SwaggerClient::Object::Body_3->new(); # Body_3 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

eval { 
    my $result = $api_instance->geocode(apiecoKey => $apiecoKey, contentType => $contentType, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GeocodeApi->geocode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.GeocodeApi()
apiecoKey = apiecoKey_example # String | 
contentType = contentType_example # String | To receive response in JSON format you must specify content type text/json or application/json.
body =  # Body_3 | The following request uses Latitude and Longitude for Vehicle start location and Latitude and Longitude for a location.

try: 
    # 
    api_response = api_instance.geocode(apiecoKey, contentType, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GeocodeApi->geocode: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
ContentType*
String
To receive response in JSON format you must specify content type text/json or application/json.
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Successful

Status: 405 - Invalid input