FleetUp API Docs
  1. Trips
FleetUp API Docs
  • Quick Start
    • Your First API Call
    • Token Expiration
    • Rate Limit
    • Error Codes
  • API Reference
    • Introduction
    • Authentication
      • /token
      • Obtain JWT Token
    • Account & User & Device
      • /account-info
      • /users
      • /drivers/list
      • /devices
      • /devices/status
      • /devices/unlock
      • /devices/driver-overview
      • /devices/engine-hours
      • /devices/fuel-level
      • /devices/odometer
      • /devices/latest-ecu-data
      • /devices/{device-id}
      • /devices/{device-type}
      • /devices/{device-type}/details
      • /devices/{device-type}/history
    • Trips
      • /trips/history
        POST
      • /trips/ongoing-trips
        POST
    • Trip Share
      • /tripshare/live-eta
      • /tripshare/partners
      • /tripshare/share
    • Alerts
      • /alerts/summary
      • /alerts/history
      • /alerts/bulk-history
      • /fencealerts/fence-names
      • /fencealerts/geo-fencealerts
    • Location
      • Retrieve GPS data within a 24-hour time range
      • /gpsdata/device-last-location
      • /gpsdata/latest
      • /gpsdata/latest/4cj
      • /gpsdata/latest/5ta
      • /bulk-gpsdata
    • Maintenance
      • /maintenance/history
      • /maintenance/indicators
      • /maintenance/settings/indicators
      • /maintenance/settings/measurements
    • Reports
      • /reports/temperature-sensors
      • /reports/{report-key}
    • Geofence
      • Get all fences
      • Get fence detail
      • Retrieve geofence alerts
    • Others
      • /jobs
  • API Guides
    • Retrieve All Devices from an Enterprise
  1. Trips

/trips/ongoing-trips

POST
/trips/ongoing-trips
This API will give mileage and fuel wear for all on going trips.

Request

Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Header Params
token
string 
required
Body Params application/json
acctId
string 
required
Account ID
isDriverDetailsRequired
boolean 
optional
if isDriverDetailsRequired flag is true Driver Details for Trip will be fetched in response. This field is optional.
Example
{
    "acctId": "string",
    "isDriverDetailsRequired": true
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
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

🟢200成功
application/json
200 response
Body
status
number 
optional
response status (http status)
data
array [object {11}] 
optional
fuelWear
string 
optional
Fuel consumed in duration of trips in centiliters
devId
string 
optional
Device ID
startTime
string 
optional
Trip Start Time (UTC-0) format- YYYYmmddHHmmss
endTime
string 
optional
Trip End Time (UTC-0) format -YYYYmmddHHmmss
tripMileage
string 
optional
Mileage of trip with above start and end time in meters
startLocation
string 
optional
Start Location of trip Lattitude and Longitude For e.g. 120397165,-403924246
endLocation
string 
optional
End Location of trip Lattitude and Longitude for e.g 120397165,-403924246
startAddress
string 
optional
Start Address of trip
endAddress
string 
optional
End Address of trip
vehicle
string 
optional
Vehicle name of the device
drivers
array[string]
optional
All the drivers who had driven vehicle during the trip
Example
{
    "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
Previous
/trips/history
Next
/tripshare/live-eta
Built with