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/history

POST
/trips/history
This API will give mileage and fuel wear for trips for a given device.

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
devId
string 
required
Device ID
startDate
string 
required
Start Date
>= 8 characters<= 8 characters
endDate
string 
required
End Date
>= 8 characters<= 8 characters
isDriverDetailsRequired
boolean 
optional
Set this flag to true if you want to include Driver Details for the Trip in the response. This field is optional with default as false.
Default:
false
isTripScoreRequired
boolean 
optional
Set this flag to true if you want to include the Safety Score for the Trip in the response. This field is optional with default as false.
Default:
false
Example
{
    "acctId": "string",
    "devId": "string",
    "startDate": "stringst",
    "endDate": "stringst",
    "isDriverDetailsRequired": false,
    "isTripScoreRequired": false
}

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/history' \
--header 'token;' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
    "acctId": "string",
    "devId": "string",
    "startDate": "stringst",
    "endDate": "stringst",
    "isDriverDetailsRequired": false,
    "isTripScoreRequired": false
}'

Responses

🟢200成功
application/json
200 response
Body
trips
array [object {12}] 
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)
endTime
string 
optional
Trip End Time (UTC-0)
tripMileage
string 
optional
Mileage of trip with above start and end time in meters
startLocation
string 
optional
Start Location of trip Lattitude and Longtude for e.g.122053158,-425820408
endLocation
string 
optional
End Location of trip Lattitude and Longtude for e.g.122052612,-425819058
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
tripScore
string 
optional
Entire trip's Safety score
Example
{
    "trips": [
        {
            "fuelWear": "string",
            "devId": "string",
            "startTime": "string",
            "endTime": "string",
            "tripMileage": "string",
            "startLocation": "string",
            "endLocation": "string",
            "startAddress": "string",
            "endAddress": "string",
            "vehicle": "string",
            "drivers": [
                "string"
            ],
            "tripScore": "string"
        }
    ]
}
Modified at 2025-02-28 08:12:14
Previous
/devices/{device-type}/history
Next
/trips/ongoing-trips
Built with