GetTruckTripSchedule

  • This method contains the Truck Trip Schedule.
  • Returns following information:
    1. Vehicle Loading Status with AutoGuard Unique Vehicle Identification number(VehicleId), Source Name, Destination Name, Truck Capacity, Delivery Volume, Schedule Date,Estimated Pickup Time And Estimated Arrival Time.

Use Case

  • Use to query to get the Truck Trip Schedule with VehicleId, Source Name, Destination Name, Truck Capacity, Delivery Volume, Schedule Date,Estimated Pickup Time And Estimated Arrival Time.

Use an HTTP GET request to obtain your vehicles' Trip Schedule:

[GET] https://secure.autoguardtracking.com/WebApi/api/v2.0/GetTruckTripSchedule/{Vehicle_ID}?TripScheduleTime={TripScheduleTime}

Request Header

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

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

URL Parameter

Parameter Name Description Value Format Example
Vehicle ID To get the Truck Loading Status of a specific vehicle. numeric 825
Trip Schedule Date Schedule Date Date for your query* MM/dd/yyyy 10/30/2022

Create GetTruckTripSchedule Object

Below is the GetTruckTripSchedule 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/GetTruckTripSchedule");
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/GetTruckTripSchedule",
                            dataType: "json",
                            success: function(data){
                    //data object will contain the result as a JSON object
                            }
                        });

Sample GetTruckTripSchedule Object


    $.ajax({
        beforeSend: function(xhrObj){
            xhrObj.setRequestHeader("Authorization","Bearer YOUR_API_TOKEN");
        },
        type: "GET",
        url: "https://secure.autoguardtracking.com/WebApi/api/v2.0/GetTruckTripSchedule",
        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": 22609,
    "RoutePlanId": 3945,
    "SourceId": 2403900,
    "SourceName": "Phoenix Warehouse",
    "DestinationId": 2403900,
    "DestinationName": "Alam New Market",
    "TruckCapacity": 2.4,
    "DeliveryVolume": 1.9,
    "ScheduleDate": "08/01/2022",
    "EstPickupTime": "09:30 AM",
    "EstArrivalTime": "11:30 AM"
    },
    {
    "VehicleId": 22609,
    "RoutePlanId": 3945,
    "SourceId": 2403898,
    "SourceName": "Phoenix Warehouse",
    "DestinationId": 2403898,
    "DestinationName": "Agrani Moghbazar",
    "TruckCapacity": 2.4,
    "DeliveryVolume": 2.4,
    "ScheduleDate": "08/01/2022",
    "EstPickupTime": "03:37 PM",
    "EstArrivalTime": "05:31 PM"
    },
    {
    "VehicleId": 22609,
    "RoutePlanId": 3946,
    "SourceId": 2403898,
    "SourceName": "Phoenix Warehouse",
    "DestinationId": 2403898,
    "DestinationName": "Agrani Moghbazar",
    "TruckCapacity": 2.4,
    "DeliveryVolume": 2.4,
    "ScheduleDate": "08/01/2022",
    "EstPickupTime": "09:30 AM",
    "EstArrivalTime": "11:24 AM"
    },
    .............
    .............
    .............
    ]
    }

Test

Test the GetTruckTripSchedule using your AccessToken by entering it below:

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