GET /api/v1/team-members/{publicUserId}/reports/ignition
This endpoint retrieves the ignition reports for a specific team member on a given trip date.
Request Method: GET
URL: https://api.locate2u.com/api/v1/team-members/{publicUserId}/reports/ignition?tripDate=yyyy-MM-dd
Input parameters:
publicUserId
Required* publicUserId (string) in the path which is the Public identifier for the team-member/user.
tripDate
Optional query parameter, Type : string ($date) with format “yyyy-MM-dd”
Specifies the trip date of the ignition report.
Sample code
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.locate2u.com/api/v1/team-members/{publicUserId}/reports/ignition?tripDate=yyyy-MM-dd");
request.Headers.Add("Authorization", "Bearer yourBearerTokenHere");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.locate2u.com/api/v1/team-members/{publicUserId}/reports/ignition?tripDate=yyyy-MM-dd")
.method("GET", body)
.addHeader("Authorization", "Bearer yourBearerTokenHere")
.build();
Response response = client.newCall(request).execute();
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'GET',
'hostname': 'api.locate2u.com',
'path': '/api/v1/team-members/{publicUserId}/reports/ignition?tripDate=yyyy-MM-dd',
'headers': {
'Authorization': 'Bearer yourBearerTokenHere'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
req.end();
'https://api.locate2u.com/api/v1/team-members/{publicUserId}/reports/ignition?tripDate=yyyy-MM-dd',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer yourBearerTokenHere'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://api.locate2u.com/api/v1/team-members/{publicUserId}/reports/ignition?tripDate=yyyy-MM-dd"
payload = {}
headers = {
'Authorization': 'Bearer yourBearerTokenHere'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Response
Response
The response for this request is a JSON object conforming to the following schema:
JSON
{
“type”: “object”,
“properties”: {
“reportId”: {
“type”: “string”
},
“tripDate”: {
“type”: “string”,
“format”: “date”
},
“ignitionStatus”: {
“type”: “string”
},
“startTime”: {
“type”: “string”,
“format”: “date-time”
},
“endTime”: {
“type”: “string”,
“format”: “date-time”
}
}
}
Sample response :
[
{
"departure": {
"dateTime": "2024-06-06T08:21:29.0000000+10:00",
"address": "Ferry Road, Glebe",
"location": {
"latitude": -33.8741892,
"longitude": 151.1875748
}
},
"arrival": {
"dateTime": "2024-06-06T08:28:32.0000000+10:00",
"address": "23-27 Mountain Street, Ultimo",
"location": {
"latitude": -33.8812652,
"longitude": 151.1959733
}
},
"travelDistanceMeters": 1305,
"travelTimeMinutes": 5.05
},
{
"departure": {
"dateTime": "2024-06-06T08:31:22.0000000+10:00",
"address": "23-27 Mountain Street, Ultimo",
"location": {
"latitude": -33.8811965,
"longitude": 151.1959623
}
},
"arrival": {
"dateTime": "2024-06-06T08:41:19.0000000+10:00",
"address": "Taylor Street, Glebe",
"location": {
"latitude": -33.8741247,
"longitude": 151.1870726
}
},
"travelDistanceMeters": 1383,
"travelTimeMinutes": 6.000000000000001
}
]