PointList
- This method contains the latest, most up-to-date list of PointIDs and associated Point/Geofence Names
-
Returns two pieces of information:
- TYT Unique Point Identification number
- Point/Geofence common Name (ex. Main Office, Warehouse…)
Use Case
- Use to query the PointID and associated Point/Geofence Name
- Point/Geofence Names can change but PointID will never change
Use an HTTP GET request to obtain your list of Points:
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. |
URL Parameter
If you want to receive Lat Lon and PointAddress of a point, the URL should contain the isLatLon and isPointAddress parameter below.
Parameter Name | Description | Value Format | Example |
---|---|---|---|
isLatLon (Optional) | "True" returns Lat Lon | true or false | true |
isPointAddress (optional) | "True" returns Point Address | true or false | true |
Create PointList Object
Below is the PointList request API examples:
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization","Bearer YOUR_API_TOKEN")
var response = await client.GetAsync("https://secure.trackyourtruck.com/WebApi/api/v2.1/PointList");
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.trackyourtruck.com/WebApi/api/v2.1/PointList",
dataType: "json",
success: function(data){
//data object will contain the result as a JSON object
}
});
Sample PointList Object
A successful request will return the following JSON result:
Test
Test the PointList using your AccessToken by entering it below:
Clicking the test button will send a request to the TYT API and display the result below.