This API will give mileage and fuel wear for all on going trips.
Request
Add parameter in header x-api-key
Example:x-api-key: ********************
Body Params application/json
isDriverDetailsRequired
boolean
optionalif isDriverDetailsRequired flag is true Driver Details for Trip will be fetched in response. This field is optional.
{
"acctId": "string",
"isDriverDetailsRequired": true
}
Request samples
curl --location --request POST '/trips/ongoing-trips' \
--header 'token;' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
"acctId": "string",
"isDriverDetailsRequired": true
}'
Responses
response status (http status)
Fuel consumed in duration of trips in centiliters
Trip Start Time (UTC-0) format- YYYYmmddHHmmss
Trip End Time (UTC-0) format -YYYYmmddHHmmss
Mileage of trip with above start and end time in meters
Start Location of trip Lattitude and Longitude For e.g. 120397165,-403924246
End Location of trip Lattitude and Longitude for e.g 120397165,-403924246
Vehicle name of the device
All the drivers who had driven vehicle during the trip
{
"status": 0,
"data": [
{
"fuelWear": "string",
"devId": "string",
"startTime": "string",
"endTime": "string",
"tripMileage": "string",
"startLocation": "string",
"endLocation": "string",
"startAddress": "string",
"endAddress": "string",
"vehicle": "string",
"drivers": [
"string"
]
}
]
}
Modified at 2025-02-28 08:12:14