FleetUp API Docs
  1. Location
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
      • /trips/ongoing-trips
    • 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
        POST
      • /gpsdata/device-last-location
        POST
      • /gpsdata/latest
        POST
      • /gpsdata/latest/4cj
        POST
      • /gpsdata/latest/5ta
        POST
      • /bulk-gpsdata
        POST
    • 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. Location

Retrieve GPS data within a 24-hour time range

POST
/gpsdata
This API returns a list of GPS data within the specified start-time and end-time range (max 24 hours). Enterprise users must include a JWT token in the Authorization header.

Request

Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Header Params
Authorization
string 
optional
JWT token (e.g., Bearer <token>)
Example:
Bearer your_jwt_token_here
Body Params application/json
devId
string 
required
Device ID
Example:
213NW1000000078
start-time
string 
required
Lower bound of the date range
>= 14 characters<= 14 characters
Example:
20250224030830
end-time
string 
required
Upper bound of the date range
>= 14 characters<= 14 characters
Example:
20250224030930
Example
{
    "devId": "213NW1000000078",
    "start-time": "20250224030830",
    "end-time": "20250224030930"
}

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 '/gpsdata' \
--header 'Content-Type: application/json' \
--header 'x-api-key;' \
--data-raw '{
    "devId": "213NW1000000078",
    "start-time": "20250224030830",
    "end-time": "20250224030930"
}'

Responses

🟢200成功
application/json
200 response
Body
array of:
devId
string 
optional
Device ID
tmTime
number 
optional
GPS trigger time, UTC time zone, yyyyMMddHHmmss
acconTime
number 
optional
Vehicle Ignition time, UTC time zone, yyyyMMddHHmmss
direction
number 
optional
The returned number is between 0 and 3600, e.g. 1311
Conversion:
1311/10 = 131.1
The direction of where the vehicle is driving toward. There are 360 degrees, with zero at the 12 o’clock position, increasing in clock-wise direction. For example:
0 = 12 o’clock 90 = 3 o’clock
e.g. 1311 will be 1311 / 10 = 131.1 (direction in between 4 o’clock and 5 o’clock)
fuelWear
number 
optional
Fuel consumed in centiliters
lat
number 
optional
GPS data latitude, e.g. 142198116
Conversion to Decimal Degree format:
142198116 / 3600000 = 39.4994767 (Positive # = North, Negative # = South)
lng
number 
optional
GPS data longitude, e.g., -438079242
Conversion to Decimal Degree format:
-438079242 / 3600000 = -121.688678 (Positive # = East, Negative # = West)
tripMileage
number 
optional
Trip's incremental trip mileage in meters
rpm
number 
optional
Revolutions Per Minute
speed
number 
optional
The value for instant speed, unit: cm/s, e.g. 2861
Conversion:
2861 * 0.036 km/h = 102.99 km/h
deviceMileage
number 
optional
Odometer from System in Meters
odometer
number 
optional
Odometer from ECU in Kilometers. Consider using deviceMileage, if this reading is 0
preference
number 
optional
Preferred Odometer reading for the device, 0 = from ECU and 1 = from system
Example
[
    {
        "devId": "string",
        "tmTime": 0,
        "acconTime": 0,
        "direction": 0,
        "fuelWear": 0,
        "lat": 0,
        "lng": 0,
        "tripMileage": 0,
        "rpm": 0,
        "speed": 0,
        "deviceMileage": 0,
        "odometer": 0,
        "preference": 0
    }
]
Modified at 2025-02-28 08:12:14
Previous
/fencealerts/geo-fencealerts
Next
/gpsdata/device-last-location
Built with