TruckUnloadingStatus
- This method contains the Loading Status of the vehicle.
-
Returns following information:
- Vehicle Loading Status with AutoGuard Unique Vehicle Identification number(VehicleId), VehicleName, Driver Information, Current Status And Location, Source Name, Destination Name And Estimated Arrival Time.
Use Case
- Use to query to get the Truck Loading Status with Driver Information, Source Name, Destination Name, Current Location And Status
Use an HTTP GET request to obtain your vehicles' Current Loading Status:
[GET] https://secure.autoguardtracking.com/WebApi/api/v2.0/TruckUnloadingStatus?Vehicle_ID={Vehicle_ID}
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
If you want to receive Truck Loading Status for a specific vehicle, the URL should contain the VehicleID parameter below.
Parameter Name | Description | Value Format | Example |
---|---|---|---|
Vehicle ID (Optional) | To get the Truck Loading Status of a specific vehicle. | numeric | 825 |
Create TruckUnloadingStatus Object
Below is the TruckUnloadingStatus 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/TruckUnloadingStatus");
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/TruckUnloadingStatus",
dataType: "json",
success: function(data){
//data object will contain the result as a JSON object
}
});
Sample TruckUnloadingStatus Object
$.ajax({
beforeSend: function(xhrObj){
xhrObj.setRequestHeader("Authorization","Bearer YOUR_API_TOKEN");
},
type: "GET",
url: "https://secure.autoguardtracking.com/WebApi/api/v2.0/TruckUnloadingStatus",
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": 5835,
"VehicleStatus": "Key On (IS)",
"Lat": 23.78843,
"Lon": 90.32676,
"DriverName": "Mr. Salam",
"DriverContact": "01700000000",
"SourceId": 2403889,
"SourceName": "Mirpur",
"DestinationId": 2403896,
"DestinationName": "Gulshan",
"EstArrivalTime": "10/12/2022 11:07:00"
},
{
"VehicleId": 7920,
"VehicleStatus": "Key On (IS)",
"Lat": 23.93753,
"Lon": 90.44258,
"DriverName": "MD. Rohim",
"DriverContact": "01700000000",
"SourceId": 2403568,
"SourceName": "Dhaka",
"DestinationId": 2403900,
"DestinationName": "Sylhet",
"EstArrivalTime": "10/12/2022 12:25:00"
},
{
"VehicleId": 8601,
"VehicleStatus": "Key On (IS)",
"Lat": 23.93753,
"Lon": 90.44258,
"DriverName": "Mr. Korim",
"DriverContact": "01700000000",
"SourceId": 2403568,
"SourceName": "Chittagong",
"DestinationId": 2403900,
"DestinationName": "Dhaka",
"EstArrivalTime": "10/12/2022 11:37:00"
},
.............
.............
.............
]
}
Test
Test the TruckUnloadingStatus using your AccessToken by entering it below:
Clicking the test button will send a request to the AutoGuard API and display the result below.