Ctrack Fleet API Documentation

Download OpenAPI specification:

Overview

Ctrack WCF API is a web service application interface for Ctrack Fleet.

It allows you to create a custom integration between your fleet management solution and other business systems using secure telematics API connections. This helps you make more informed decisions, automate data collection, and improve your fleet operations.

\newpage

📌 Notes:

  • Request samples are provided in Curl, Python, and C#.
  • Response samples are provided in JSON.
  • Fully SOAP and REST compatible endpoints are available.

Getting Started

What is a REST API?

A REST API (Representational State Transfer) enables programs to communicate over HTTP using unique URLs known as endpoints. Each endpoint represents a resource, which can be accessed using HTTP methods such as:

  • GET — retrieves data

Ctrack Fleet API is organized into functional groups. You can use these endpoints to retrieve information such as:

  • Cost Centre structure
  • Telematics information
  • Driver information

Data Modules Overview

The API consists of five main modules:

  • Cost Centre: View your organizational structure
  • Vehicles: Access vehicle and telematics data
  • Driver: Retrieve driver information
  • Location: View saved locations
  • Queues: Access queue data for de-duplicated telemetry

Which modules you use depends on your needs. Some API calls return data for the entire fleet; others are specific to a vehicle.


Vehicle API Features

Vehicle Data

Vehicle information can be retrieved by:

  • Registration number
  • Tracking cell number
  • MIT number
  • Search criteria (multiple results)

Key vehicle data includes:

  • Unit type
  • Registration, serial number, MIT, description, make, model
  • Last reported time
  • Trip history (with date filters)

Trip Information Includes:

  • Duration and distance
  • Odometer readings at start and end
  • GPS coordinates and reverse geolocation
  • Telemetry: RPM, speed, idling, harsh braking/cornering, etc.
  • Assigned driver (if tagged)
  • Business/private trip indicator

Positional Data Includes:

  • Latitude/longitude + reverse geocode
  • Vehicle status and ignition state
  • Speed, odometer reading, heading
  • Nearby POI distance and direction

Real-time positional queues are supported. Duplicates are filtered out.
Trip queues are also available and updated daily.


Response Codes

Each API request returns a standard HTTP response code:

  • 2XX – Success
  • 4XX – Client errors (fix the request)
  • 5XX – Server errors (temporary issues)

Common Error Codes

Status Code Description
400 Bad request – malformed or missing parameters
401 Unauthenticated – invalid or missing API key
404 Not found – invalid endpoint or parameter
405 Method not allowed – wrong HTTP method
5XX Server error – try again later

How to Use the API

This documentation gives you access to a test environment with live vehicle data.

To begin, visit the Membership section for login details.

Authentication

  1. Login to obtain a session token.
  2. Use this token for all subsequent requests.
  3. Tokens are valid for 60 minutes of inactivity (they auto-refresh if used).

Sample Response

{
  "ErrorCode": "Success = 0",
  "UserId": 89471,
  "SessionToken": "9ed4bd2a-7fa1-4af3-9dd4-08ac76376b89",
  "SessionDurationMinutes": 60,
  "xml": null
}

Some Examples may have the (+) sign next to them meaning that they can be expanded to see the example


Usage Plans and Throttling Limits

⚠️ Important:
Only one API user can be issued per customer or company.
Requests for multiple API users will not be approved.


Throttling Overview

To ensure service performance and reliability, we have implemented rate limits on API usage. These limits apply to:

  • Individual customers — based on your specific service agreement
  • All customers collectively — to maintain system-wide stability

Rate limits are enforced on:

  • Requests per second
  • Requests per minute
  • Requests per hour

Rate Limit Scenarios

  1. Per-Customer Limits
    Limits are defined according to the customer's subscribed service agreement.

  2. Global System Limit
    When multiple customers access the API concurrently, a shared cap ensures fair usage and protects service availability.


HTTP Error Responses

If you exceed your rate limits, the API may return:

Status Code Description
400 Bad request – rate limit exceeded
401 Authentication failed – invalid or throttled API key

💡 Tip: Implement retry logic with exponential backoff when receiving rate-limit errors.

Membership

This interface implements Membership functionality.

Login

Logs into user account based on username and password provided.

query Parameters
Username
required
string
Default: "API_Demo"

Username of login account.

Password
required
string <password>
Default: "Password01"

Password of login account.

Responses

Request samples

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

public class Program
{
private readonly IHttpClientFactory _httpClientFactory;
public static async Task Main(string[] args)
{
var client = _httpClientFactory.CreateClient();
var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Membership/Login?Username=API_Demo&Password=Password01");
var response = await request.Content.ReadAsStringAsync();

Console.WriteLine(response);
}
}

Response samples

Content type
application/json
{
  • "ErrorCode": "Success = 0",
  • "UserId": 89471,
  • "SessionToken": "9ed4bd2a-7fa1-4af3-9dd4-08ac76376b89",
  • "SessionDurationMinutes": 60
}

GetServiceVersion

Returns the current assembly version for the service.

Responses

Request samples

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

public class Program
{
  private readonly IHttpClientFactory _httpClientFactory;
  public static async Task Main(string[] args)
  {
    var client = _httpClientFactory.CreateClient();
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Membership/GetServiceVersion");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
    }

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "Version": {
    }
}

CostCentre

This interface implements CostCentre functionality

FindCostCentreContainingVehiclesNodeIds

FindCostCentreContainingVehiclesNodeIds takes an AuthenticationDetails object and a list of vehicles nodeIds as input. It determines if there exist a cost centre that contain that and only that list of vehicles and return the Cost Centre if indeed found.

path Parameters
authenticationToken
required
string

The authentication token for this session.

query Parameters
sVehicleNodeIds
required
string

The node ID's of the vehicles.

Responses

Request samples

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

public class Program
{
private readonly IHttpClientFactory _httpClientFactory;
public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/CostCentres/" + AuthenticationToken + "/FindCostCentreContainingVehiclesNodeIds?sVehicleNodeIds=string");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "CostCentre": [
    ]
}

GetCostCentre

GetCostCentre method takes an AuthenticationDetails object and cost centre name as parameters to return a CostCentreDetails object. If successful a CostCentreDetails object is returned.

path Parameters
authenticationToken
required
string

The authentication token for this session.

query Parameters
name
required
string

The name of the cost centre.

Responses

Request samples

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

public class Program
{
private readonly IHttpClientFactory _httpClientFactory;
public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/CostCentres/" + AuthenticationToken + "/GetCostCentre?name=string");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "CostCentre": [
    ]
}

GetCostCentres

GetCostCentres method takes an AuthenticationDetails object, it determines to which CostCentres this user belongs to and return those CostCentres.

path Parameters
authenticationToken
required
string

The authentication token for this session.

Responses

Request samples

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

public class Program
{
private readonly IHttpClientFactory _httpClientFactory;
    public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/CostCentres/" + AuthenticationToken + "/GetCostCentres");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "CostCentre": [
    ]
}

GetCostCentresForUser

GetCostCentresForUser method takes an AuthenticationDetails object and a User object. It determines to which CostCentres the User object belongs to and return those CostCentres.

path Parameters
authenticationToken
required
string

The authentication token for this session.

query Parameters
userId
required
integer

The ID of the user to be used for the query.

Responses

Request samples

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

public class Program
{
private readonly IHttpClientFactory _httpClientFactory;
public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/CostCentres/" + AuthenticationToken + "/GetCostCentresForUser?userId=0");
    var response = await request.Content.ReadAsStringAsync();
    
Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "CostCentre": [
    ]
}

GetCustomFieldsForCostCentre

GetCustomFields method takes AuthenticationDetails object, CostCentre object and will return the CustomFieldValue pairs for the Cost Centre. If successful a new CustomFieldValueResults object is created and returned.

path Parameters
authenticationToken
required
string

The authentication token for this session.

query Parameters
costCentreId
required
integer

ID of cost centre to be used for query.

Responses

Request samples

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

public class Program
{
    private readonly IHttpClientFactory _httpClientFactory;
    public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/CostCentres/" + AuthenticationToken + "/GetCustomFieldsForCostCentre?costCentreId=0");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": "AuthorisationFailed = 4"
}

Vehicle

This interface implements Vehicle functionality.

GetVehicles

Multiple status values can be provided with comma separated strings

path Parameters
authenticationToken
required
Array of arrays

Status values that need to be considered for filter

Responses

Request samples

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

public class Program
{
  private readonly IHttpClientFactory _httpClientFactory;
  public static async Task Main(string[] args)
  {
    var client = _httpClientFactory.CreateClient();
    var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetVehicles");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
  }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "VehicleList": [
    ]
}

GetVehicleDetail

Obtain the vehicle details of an individual vehicle .

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
costCentreId
required
integer

The Cost Centre nodeid the vehicle recides in

searchType
required
string

Define the Parameter to search using one of the following vehicleID, MIT, NodeId or SerialNumber

value
required
string

This would be the vehicleID, MIT, NodeId or SerialNumber of the vehiclce the details

Responses

Request samples

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

public class Program
{
  private readonly IHttpClientFactory _httpClientFactory;
  public static async Task Main(string[] args)
  {
    var client = _httpClientFactory.CreateClient();
    var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetVehicleDetail?costCentreId=0&searchType=string&value=string");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
  }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "VehicleList": [
    ]
}

GetLastVehiclePositionsforAuthenticatedUser

Multiple status values can be provided with comma separated strings

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

Responses

Request samples

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

public class Program
{
  private readonly IHttpClientFactory _httpClientFactory;
  public static async Task Main(string[] args)
  {
    var client = _httpClientFactory.CreateClient();
    var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetLastVehiclePositionsforAuthenticatedUser");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
  }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "LastVehiclePositions": [
    ]
}

GetLastVehiclePosition

Multiple status values can be provided with comma separated strings

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
vehicleNodeId
required
Array of strings

List of vehicle node IDs that postition data should be retrieved on.

Responses

Request samples

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

public class Program
{
  private readonly IHttpClientFactory _httpClientFactory;
  public static async Task Main(string[] args)
  {
    var client = _httpClientFactory.CreateClient();
    var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetLastVehiclePosition?vehicleNodeId=string");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
  }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "LastVehiclePosition": [
    ]
}

GetLastVehiclePositions

Multiple status values can be provided with comma separated strings

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
svehicleNodeIds
required
Array of strings

List of vehicle node IDs that postition data should be retrieved on.

Responses

Request samples

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

public class Program
{
    private readonly IHttpClientFactory _httpClientFactory;
    public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
      var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetLastVehiclePositions?svehicleNodeIds=string");
    var response = await request.Content.ReadAsStringAsync();
    Console.WriteLine(response);
    
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "LastVehiclePositions": [
    ]
}

GetVehiclePositionsDetailed

Multiple status values can be provided with comma separated strings

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
vehicleNodeId
required
integer

NodeId of the vehicle

fromDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

toDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

Responses

Request samples

import requests

authentication_token = "YOUR_authenticationToken_PARAMETER"
url = "https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + authentication_token + "/GetVehiclePositionsDetailed"

query = {
    "svehicleNodeIds": "string"
 }
 
 response = requests.get(url, params=query)
 
 data = response.json()
 print(data)

Response samples

Content type
application/json
{
  • "NodeId": 566,
  • "Latitude": -25.865379333496094,
  • "Longitude": 28.257020950317383,
  • "SingleStatus": 4,
  • "Ignition": false,
  • "Speed": 0,
  • "Odo": 0,
  • "VehicleHeading": "",
  • "StatusText": "Battery Tamper; (Ignition off);(Usage Reminder)",
  • "Location": "",
  • "LocationDirection": 0,
  • "LocationString": "at Ctrack; near Regency Drive; Irene Ext 30; in Centurion; South Africa; 0157; ",
  • "Area": "",
  • "StreetMaxSpeed": 0,
  • "VehicleMaxSpeed": 0,
  • "Tag": "",
  • "DriverName": "string",
  • "DriverId": "",
  • "DeliveryTag": 0,
  • "EventTimeUTC": "2023-04-30T02:01:26.000Z"
}

GetVehiclePositionsCANDetailed

Multiple status values can be provided with comma separated strings

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
vehicleNodeId
required
integer

NodeId of the vehicle

fromDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

toDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

Responses

Request samples

import requests

authentication_token = "YOUR_authenticationToken_PARAMETER"
url = "https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + authentication_token + "/GetVehiclePositionsCANDetailed"

query = {
    "svehicleNodeIds": "string"
 }
 
 response = requests.get(url, params=query)
 
 data = response.json()
 print(data)

Response samples

Content type
application/json
{
  • "NodeId": 566,
  • "Latitude": -25.865379333496094,
  • "Longitude": 28.257020950317383,
  • "SingleStatus": 4,
  • "Ignition": false,
  • "Speed": 0,
  • "Odo": 0,
  • "VehicleHeading": "",
  • "StatusText": "Battery Tamper; (Ignition off);(Usage Reminder)",
  • "Location": "",
  • "LocationDirection": 0,
  • "LocationString": "at Ctrack; near Regency Drive; Irene Ext 30; in Centurion; South Africa; 0157; ",
  • "Area": "",
  • "StreetMaxSpeed": 0,
  • "VehicleMaxSpeed": 0,
  • "Tag": "",
  • "DriverName": "string",
  • "DriverId": "",
  • "DeliveryTag": 0,
  • "CanVehicleRangeBatteryInMeter": "",
  • "CanBatteryLevelInPercentage": "100",
  • "ChargerConnected": false,
  • "Charging": false,
  • "EventTimeUTC": "2023-04-30T02:01:26.000Z"
}

GetVehicleOdoattime

Multiple status values can be provided with comma separated strings

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
searchType
required
Array of strings

Define the Parameter to search using one of the following vehicleID, MIT, NodeId or SerialNumber.

odoDateTime
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

sValues
required
Array of strings

List of vehicle node IDs that postition data should be retrieved on.

Responses

Request samples

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

public class Program
{
    private readonly IHttpClientFactory _httpClientFactory;
    public static async Task Main(string[] args)
    {
        var client = _httpClientFactory.CreateClient();
          var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
        var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetVehicleOdoattime?searchType=string&odoDateTime=string&sValues=string");
        var response = await request.Content.ReadAsStringAsync();
        
        Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "VehicleOdoList": [
    ]
}

GetVehicleOdoOverPeriod

Multiple status values can be provided with comma separated strings

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
vehicleNodeId
required
Array of strings

List of vehicle node IDs that postition data should be retrieved on.

fromDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

toDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

Responses

Request samples

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

public class Program
{
    private readonly IHttpClientFactory _httpClientFactory;
    public static async Task Main(string[] args)
    {
        var client = _httpClientFactory.CreateClient();
          var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
        var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetVehicleOdoOverPeriod?vehicleNodeId=string&fromDateTimeUTC=string&toDateTimeUTC=string");
        var response = await request.Content.ReadAsStringAsync();
        
        Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "VehicleRegistration": "Trailer 4 (2G)",
  • "DriverId": "string",
  • "VehicleOdo": 0,
  • "OdoTimestamp": "2017-04-30T02:01:26Z"
}

GetVehicleRunningHours

Obtain trip data that occured for a specified vehicle between specified dates.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
vehicleNodeId
required
integer

Status values that need to be considered for filter

Responses

Request samples

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

public class Program
{
   private readonly IHttpClientFactory _httpClientFactory;
   public static async Task Main(string[] args)
   {
    var client = _httpClientFactory.CreateClient();
      var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetVehicleRunningHours?vehicleNodeId=0");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "VehicleRunningHours": [
    ]
}

GetVehiclesRunningHours

Obtain trip data that occured for a specified vehicle between specified dates.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
vehicleNodeId
required
integer

Status values that need to be considered for filter

Responses

Request samples

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

public class Program
{
   private readonly IHttpClientFactory _httpClientFactory;
   public static async Task Main(string[] args)
   {
    var client = _httpClientFactory.CreateClient();
      var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetVehiclesRunningHours?vehicleNodeId=0");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
} 

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "VehicleRunningHours": [
    ]
}

GetVehicleTrips

Obtain trip data that occured for a specified vehicle between specified dates.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
vehicleNodeId
required
integer

Status values that need to be considered for filter

fromDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

toDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

Responses

Request samples

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

public class Program
{
    private readonly IHttpClientFactory _httpClientFactory;
    public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetVehicleTrips?vehicleNodeId=0&fromDateTimeUTC=string&toDateTimeUTC=string");
    var response = await request.Content.ReadAsStringAsync();
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "VehicleTrips": [
    ]
}

GetVehicleTripsDetailed

Obtain trip data that occured for a specified vehicle between specified dates.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
vehicleNodeId
required
integer

Status values that need to be considered for filter

fromDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

toDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

Responses

Request samples

using System;
    using System.Net.Http;
    using System.Threading.Tasks;
    
    public class Program
        {
        private readonly IHttpClientFactory _httpClientFactory;
        public static async Task Main(string[] args)
        {
        var client = _httpClientFactory.CreateClient();
            var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
        var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetVehicleTripsDetailed?vehicleNodeId=0&fromDateTimeUTC=string&toDateTimeUTC=string");
        var response = await request.Content.ReadAsStringAsync();
        
        Console.WriteLine(response);
        }
    }

Response samples

Content type
application/json
{
  • "NodeId": 0,
  • "DrivingTime": 0,
  • "StartOdometerReading": 0,
  • "EndOdometerReading": 0,
  • "TripDistance": 0,
  • "StartLatitude": 0.1,
  • "StartLongitude": 0.1,
  • "EndLatitude": 0.1,
  • "EndLongitude": 0.1,
  • "StartLocation": "string",
  • "EndLocation": "string",
  • "OverRevCount": 0,
  • "MaxRPM": 0,
  • "OverRevDuration": 0,
  • "RPMLimit": 0,
  • "OverSpeedCount": 0,
  • "MaxSpeed": 0,
  • "OverSpeedDuration": 0,
  • "SpeedLimit": 0,
  • "ExcessIdleCount": 0,
  • "ExcessIdleTime": 0,
  • "ExcessIdleSpeed": 0,
  • "ExcessIdleRPM": 0,
  • "FreeWheeling": 0,
  • "FreeWheelingTime": 0,
  • "FreeWheelingSpeed": 0,
  • "FreeWheelingRPM": 0,
  • "HarshBrakeCount": 0,
  • "HarshAccelerateCount": 0,
  • "HarshCornerCount": 0,
  • "HarshBumpCount": 0,
  • "GreenBandTime": 0,
  • "GreenBandLo": 0,
  • "GreenBandHi": 0,
  • "TripFuel": 0,
  • "FuelDataSource": 0,
  • "Tag": "string",
  • "DriverId": "string",
  • "DriverName": "string",
  • "IsBusinessPrivate": 0,
  • "Comment": "string",
  • "CustomIdentifier": "string",
  • "DeliveryTag": 0,
  • "TripStartUTC": "2023-04-30T10:01:26Z",
  • "TripEndUTC": "2023-04-30T12:10:34Z"
}

GetVehiclesTripDistances

Obtain trip data that occured for a specified vehicle between specified dates.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
fromDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

toDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

Responses

Request samples

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

public class Program
    {
    private readonly IHttpClientFactory _httpClientFactory;
    public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetVehiclesTripDistances?fromDateTimeUTC=string&toDateTimeUTC=string");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "VehicleTripPeriodDistances": [
    ]
}

GetVehicleUsage

Obtain trip data that occured for a specified vehicle between specified dates.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
vehicleNodeId
required
integer

Status values that need to be considered for filter

fromDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

toDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

Responses

Request samples

using System;
    using System.Net.Http;
    using System.Threading.Tasks;
    
    public class Program
        {
        private readonly IHttpClientFactory _httpClientFactory;
        public static async Task Main(string[] args)
        {
        var client = _httpClientFactory.CreateClient();
            var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
        var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetVehicleUsage?vehicleNodeId=0&fromDateTimeUTC=string&toDateTimeUTC=string");
        var response = await request.Content.ReadAsStringAsync();
        
        Console.WriteLine(response);
        }
    }

Response samples

Content type
application/json
{
  • "NodeId": 566,
  • "WorkingHours": "2.4",
  • "OperatingDate": "2023-04-30T02:01:26Z"
}

GetVehicleUsageByCostCentre

Obtain trip data that occured for a specified vehicle between specified dates.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
costCentreId
required
integer

Status values that need to be considered for filter

fromDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

toDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

Responses

Request samples

using System;
    using System.Net.Http;
    using System.Threading.Tasks;
    
    public class Program
        {
        private readonly IHttpClientFactory _httpClientFactory;
        public static async Task Main(string[] args)
        {
        var client = _httpClientFactory.CreateClient();
            var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
        var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetVehicleUsageByCostCentre?costCentreId=0&fromDateTimeUTC=string&toDateTimeUTC=string");
        var response = await request.Content.ReadAsStringAsync();
        
        Console.WriteLine(response);
        }
    }

Response samples

Content type
application/json
{
  • "NodeId": 566,
  • "WorkingHours": "2.4",
  • "OperatingDate": "2023-04-30T02:01:26Z"
}

GetVehicleCostCentres

Obtain trip data that occured for a specified vehicle between specified dates.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
vehicleNodeId
required
string

Status values that need to be considered for filter

Responses

Request samples

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

public class Program
{
    private readonly IHttpClientFactory _httpClientFactory;
    public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetVehicleCostCentres?vehicleNodeId=string");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "CostCentre": [
    ]
}

GetVehiclesinCostCentre

Obtain the vehicles within the specified Cost Centre.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
costCentreId
required
string

Status values that need to be considered for filter

Responses

Request samples

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

public class Program
{
    private readonly IHttpClientFactory _httpClientFactory;
    public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetVehiclesinCostCentre?costCentreId=string");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "VehicleList": [
    ]
}

getgritterstatus

Obtain the Gritter status for the specified vehicle.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
vehicleNodeId
required
string

Status values that need to be considered for filter

Responses

Request samples

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

public class Program
{
    private readonly IHttpClientFactory _httpClientFactory;
    public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/getgritterstatus?vehicleNodeId=string");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": "AuthorisationFailed = 4"
}

getgritterstatusForAuthenticatedUser

Obtain the Gritter status for vehicles user has access to.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

Responses

Request samples

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

public class Program
{
    private readonly IHttpClientFactory _httpClientFactory;
    public static async Task Main(string[] args)
    {
        var client = _httpClientFactory.CreateClient();
    var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/getgritterstatusForAuthenticatedUser");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": "AuthorisationFailed = 4"
}

GetVehicleDrivingBehaviour

Obtain the driving behaviour status for vehicles user has access to.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
vehicleNodeId
required
string

Status values that need to be considered for filter

fromDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

toDateTimeUTC
required
string <datetime>

Time format in YYYY-MM-DDTHH:MM:SSZ

Responses

Request samples

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

public class Program
{
    private readonly IHttpClientFactory _httpClientFactory;
    public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Vehicles/" + AuthenticationToken + "/GetVehicleDrivingBehaviour?vehicleNodeId=string&fromDateTimeUTC=string&toDateTimeUTC=string");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": "AuthorisationFailed = 4"
}

Driver

This interface implements Driver functionality

GetDriversInCostCentre

Returnes The drivers associated with a Specific Cost Centre.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
costCentreId
required
string

Status values that need to be considered for filter

Responses

Request samples

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

public class Program
{
    private readonly IHttpClientFactory _httpClientFactory;
    public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Drivers/" + AuthenticationToken + "/GetDriversInCostCentre?costCentreId=string");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "DriverList": [
    ]
}

GetDriver

Returnes The drivers associated with a Specific Cost Centre.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
costCentreId
required
string

Status values that need to be considered for filter

searchType
required
string

Status values that need to be considered for filter

Value
required
string

Status values that need to be considered for filter

Responses

Request samples

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

public class Program
{
    private readonly IHttpClientFactory _httpClientFactory;
    public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Drivers/" + AuthenticationToken + "/GetDriver?costCentreId=string&searchType=string&Value=string");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }     
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "Driver": {
    }
}

GetDriversAssociatedWithVehicle

Returnes The drivers associated with a Specific Cost Centre.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
vehicleNodeId
required
string

Status values that need to be considered for filter

Responses

Request samples

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

public class Program
{
    private readonly IHttpClientFactory _httpClientFactory;
    public static async Task Main(string[] args)
{
    var client = _httpClientFactory.CreateClient();
      var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Drivers/" + AuthenticationToken + "/GetDriversAssociatedWithVehicle?vehicleNodeId=string");
    var response = await request.Content.ReadAsStringAsync();Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "DriverList": [
    ]
}

Location

This interface implements Location functionality

GetPointPOIs

GetPointPOIs takes an AuthenticationDetails object and a Cost Centre nodeId as input.
It determines if there exist a cost centre that contain that and only that list of POIs and return the Cost Centre if indeed found.

path Parameters
authenticationToken
required
string

The authentication token for this session.

query Parameters
CostCentreNodeGroupId
required
string

The node ID of the Cost Centre.

modifiedAfter
required
string <datetime>

Status values that need to be considered for filter

Responses

Request samples

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

public class Program
{
private readonly IHttpClientFactory _httpClientFactory;
public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Location/" + AuthenticationToken + "/GetPointPOIs?CostCentreNodeGroupId=string&modifiedAfter=string");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "Points": [
    ]
}

GetLocationString

GetLocationString takes an AuthenticationDetails object and a Vehicle nodeid and Logitude and Latitude as input. .

path Parameters
authenticationToken
required
string

The authentication token for this session.

query Parameters
vehicleNodeId
required
string

The node ID of the Vehicle.

latitude
required
string

The latitude.

longitude
required
string

The longitude.

useMetric
required
string

The .

Responses

Request samples

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

public class Program
{
private readonly IHttpClientFactory _httpClientFactory;
public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Location/" + AuthenticationToken + "/GetLocationString?vehicleNodeId=string&latitude=string&longitude=string&useMetric%20=string");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": "AuthorisationFailed = 4"
}

Queues

This interface implements Queues functionality.

Subscribe

Subscribe method takes AuthenticationDetails object. Subscribes user to his queue type (Queues can take up to 24 hours to start populating) QueueType Trips, Positions etc. Once a queue is subscribed to and not used for 14 days it will delete itself with any messages that have been built up.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
type
required
string

we have three types of queue to subscribe to Positions, Trips or Scripts

directAccess
required
boolean

Responses

Request samples

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

public class Program
{
private readonly IHttpClientFactory _httpClientFactory;
public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Queues/" + AuthenticationToken + "/Subscribe?type=string&directAccess=true");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "Subscribe": "Success"
}

Unsubscribe

Allows you to Unsubscribe from a specified queue. If queue not consumed for 2 weeks subscription will automatically be removed. QueueType Trips, Positions etc

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
type
required
string

we have three types of queue to Unsubscribe to Positions, Trips or Scripts

directAccess
required
boolean

Responses

Request samples

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

public class Program
{
private readonly IHttpClientFactory _httpClientFactory;
public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Queues/" + AuthenticationToken + "/Unsubscribe?type=string&directAccess=true");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "Subscribe": "Success"
}

Ack

If acknowledgment of the queue is needed once the contents has been recived you can use the Ack function

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
type
required
string

Queue type currently in use Positions, Trips or Scripts

Tags
required
integer

Delivery Tag multiple can be passed at once seperated by a comma

Responses

Request samples

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

public class Program
{
private readonly IHttpClientFactory _httpClientFactory;
public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Queues/" + AuthenticationToken + "/Ack?type=string&Tags=0");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": 0,
  • "Result": "Success"
}

GetTrips

Once subscribed to the Trips queue will populate once a day with all the trips over the previous 24 hours that vehicles have completed.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
autoack
required
boolean

All queue messages have a TTL and expired messages are discarded; acknowledging a delivery tag will acknowledge all unacknowledged messages up to and including that tag (delivery tags must be received in order before acknowledgment), and subscriptions are automatically removed after 2 weeks of inactivity.

limit
required
integer

this is the number of messages you with to retrieve from the queue with a maximum of 1000

Responses

Request samples

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

public class Program
{
private readonly IHttpClientFactory _httpClientFactory;
public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Queues/" + AuthenticationToken + "/GetTrips?autoack=true&limit=0");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "NodeId": 0,
  • "DrivingTime": 0,
  • "StartOdometerReading": 0,
  • "EndOdometerReading": 0,
  • "TripDistance": 0,
  • "StartLatitude": 0.1,
  • "StartLongitude": 0.1,
  • "EndLatitude": 0.1,
  • "EndLongitude": 0.1,
  • "StartLocation": "string",
  • "EndLocation": "string",
  • "OverRevCount": 0,
  • "MaxRPM": 0,
  • "OverRevDuration": 0,
  • "RPMLimit": 0,
  • "OverSpeedCount": 0,
  • "MaxSpeed": 0,
  • "OverSpeedDuration": 0,
  • "SpeedLimit": 0,
  • "ExcessIdleCount": 0,
  • "ExcessIdleTime": 0,
  • "ExcessIdleSpeed": 0,
  • "ExcessIdleRPM": 0,
  • "FreeWheeling": 0,
  • "FreeWheelingTime": 0,
  • "FreeWheelingSpeed": 0,
  • "FreeWheelingRPM": 0,
  • "HarshBrakeCount": 0,
  • "HarshAccelerateCount": 0,
  • "HarshCornerCount": 0,
  • "HarshBumpCount": 0,
  • "GreenBandTime": 0,
  • "GreenBandLo": 0,
  • "GreenBandHi": 0,
  • "TripFuel": 0,
  • "FuelDataSource": 0,
  • "Tag": "string",
  • "DriverId": "string",
  • "DriverName": "string",
  • "IsBusinessPrivate": 0,
  • "Comment": "string",
  • "CustomIdentifier": "string",
  • "DeliveryTag": 0,
  • "TripStartUTC": "2023-04-30T10:01:26Z",
  • "TripEndUTC": "2023-04-30T12:10:34Z"
}

GetPositions

Once the positions Queue has been subscriped to it will populate with all positions for vehicles the user has access too.

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
autoack
required
boolean

All queue messages have a TTL and expired messages are discarded; acknowledging a delivery tag will acknowledge all unacknowledged messages up to and including that tag (delivery tags must be received in order before acknowledgment), and subscriptions are automatically removed after 2 weeks of inactivity.

limit
required
integer

this is the number of messages you with to retrieve from the queue with a maximum of 1000

Responses

Request samples

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

public class Program
{
private readonly IHttpClientFactory _httpClientFactory;
public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Queues/" + AuthenticationToken + "/GetPositions?autoack=true&limit=0");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "NodeId": 566,
  • "Latitude": -25.865379333496094,
  • "Longitude": 28.257020950317383,
  • "SingleStatus": 4,
  • "Ignition": false,
  • "Speed": 0,
  • "Odo": 0,
  • "VehicleHeading": "",
  • "StatusText": "Battery Tamper; (Ignition off);(Usage Reminder)",
  • "Location": "",
  • "LocationDirection": 0,
  • "LocationString": "at Ctrack; near Regency Drive; Irene Ext 30; in Centurion; South Africa; 0157; ",
  • "Area": "",
  • "StreetMaxSpeed": 0,
  • "VehicleMaxSpeed": 0,
  • "Tag": "",
  • "DriverName": "string",
  • "DriverId": "",
  • "DeliveryTag": 0,
  • "EventTimeUTC": "2023-04-30T02:01:26.000Z"
}

GetScripts

Once the scripts queue has been subscribed to it will provde extended data for specified vehicles (this can only be used with certaibn types of units)

path Parameters
authenticationToken
required
string

Status values that need to be considered for filter

query Parameters
autoack
required
boolean

All queue messages have a TTL and expired messages are discarded; acknowledging a delivery tag will acknowledge all unacknowledged messages up to and including that tag (delivery tags must be received in order before acknowledgment), and subscriptions are automatically removed after 2 weeks of inactivity.

limit
required
integer

this is the number of messages you with to retrieve from the queue with a maximum of 1000

Responses

Request samples

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

public class Program
{
private readonly IHttpClientFactory _httpClientFactory;
public static async Task Main(string[] args)
    {
    var client = _httpClientFactory.CreateClient();
        var AuthenticationToken = "YOUR_authenticationToken_PARAMETER";
    var request = await client.GetAsync("https://uksb-fleet.ctrack.com/DCTTPIEngine/TPIEngine/REST/Queues/" + AuthenticationToken + "/GetScripts?autoack=true&limit=0");
    var response = await request.Content.ReadAsStringAsync();
    
    Console.WriteLine(response);
    }
}

Response samples

Content type
application/json
{
  • "ErrorCode": "AuthorisationFailed = 4"
}