VehicleList

  • This method contains the latest, most up-to-date VehicleID and Vehicle Name
  • Returns two pieces of information:
    1. AutoGuard Unique Vehicle Identification number
    2. Vehicle common Name (ex. Bob’s Truck, 2018 F250…)

Use Case

  • Use to query the vehicleID and associated Vehicle Name
  • Vehicle Names can change but VehicleID will never change

Use an HTTP GET request to obtain your list of vehicles:

[GET] https://secure.autoguardtracking.com/WebApi/api/v2.0/VehicleList

Request Header

The request header should contain the API Access Token obtained from the authentication process. Get Access Token.

Header Name Description
Authorization Access Token obtained from the 1st step's authentication process.

Create VehicleList Object

Below is the VehicleList request API examples:



    var client = new HttpClient();
    client.DefaultRequestHeaders.Add("Authorization","Bearer YOUR_API_TOKEN")
    var response = await client.GetAsync("https://secure.autoguardtracking.com/WebApi/api/v2.0/VehicleList");
    var responseString = await response.Content.ReadAsStringAsync();

//responseString will contain the response in JSON format

    $.ajax({
    beforeSend: function(xhrObj){
    xhrObj.setRequestHeader("Authorization","Bearer YOUR_API_TOKEN");
    },
    type: "GET",
    url: "https://secure.autoguardtracking.com/WebApi/api/v2.0/VehicleList",
    dataType: "json",
    success: function(data){
    //data object will contain the result as a JSON object
    }
    });

Sample VehicleList Object


    $.ajax({
    beforeSend: function(xhrObj){
    xhrObj.setRequestHeader("Authorization","Bearer YOUR_API_TOKEN");
    },
    type: "GET",
    url: "https://secure.autoguardtracking.com/WebApi/api/v2.0/VehicleList",
    dataType: "json",
    success: function(data){
    //data object will contain the result as a JSON object
    }
    });

A successful request will return the following JSON result:


    {
    "StatusCode": "200",
    "Message": "OK",
    "Data":[
    {
    "VehicleId": "5555",
    "VehicleName": "Bob’s Vehicle"
    },
    {
    "VehicleId": "5654",
    "VehicleName": "John’s Vehicle"
    },
    ..........
    ]
    }

Test

Test the VehicleList using your AccessToken by entering it below:

Clicking the test button will send a request to the AutoGuard API and display the result below.