FleetUp API Docs
  1. API Guides
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
      • /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
  • Schemas
    • Schemas
      • DevicesHistoryRequest
      • Devices List Request
      • Geofence Name Response
      • Alerts Bulk History Request
      • Alerts History Request
      • Device List Response
      • Historic Gps Response
      • Device Odometer Response
      • DevicesDetailsRequest
      • DevicesUpdateRequest
      • Get Users Response
      • Ongoing Trips Response
      • Job Creation Response
      • Alerts Summary Response
      • Token Response
      • JWT Token Response
      • Trip History Request
      • DevId with date range Request
      • Device Latest Ecu Data Response
      • Device Data
      • Geofence Alerts Request
      • Latest Gps Request
      • Maintenance History Response
      • Device Status Response
      • Geofence Name Request
      • Historic Gps Request
      • DevId Request
      • Ongoing Trips Request
      • Alerts History Response
      • Account Info Request
      • Device Fuel Level Response
      • Empty Schema
      • Latest 5ta Gps Request
      • DevicesResponse
      • Device List Response
      • Devices Last Location Request
      • Trip History Response
      • DevicesHistoryResponse
      • Geofence Alerts Response
      • Error Schema
      • Device Last Location Response
      • Bulk Historic Gps Request
      • Account Information Response
      • Device Engine Hours Response
      • Devices Status Request
      • Devices Driver Overview Request
      • DevicesDetailsResponse
      • Maintenance Indicators Config Response
      • Latest Gps Response
      • Devices Unlock Request
      • Maintenance Indicators Config Response
      • Drivers List Response
      • Maintenance Indicators Response
      • Job creation request
      • Trip Share Devices Response
      • Live ETA OK Schema
      • TripShare OK Schema
      • TripShare Error Schema
      • Error Schema
      • Temperature Sensor Data Response
      • Geofence List Response
      • Geofence Detail Response
      • Geofence Alert Pagination Response
  1. API Guides

Retrieve All Devices from an Enterprise

Overview#

This user case demonstrates how to retrieve all devices from an enterprise using the FleetUp API. The process involves two main steps:
1.
Obtain a JWT token using the /token endpoint.
2.
Use the obtained token to call the /devices endpoint to fetch the devices.

Step 1: Obtain JWT Token#

First, you need to obtain a JWT token by making a POST request to the /token endpoint.

Request#

Response#

The response will include a JWT token that you can use for subsequent API calls.
{
  "token": "YOUR_JWT_TOKEN"
}

Step 2: Retrieve Devices#

Use the obtained JWT token to make a POST request to the /devices endpoint.

Request#

Response#

The response will include a list of devices.
[
  {
    "deviceId": "device1",
    "deviceName": "Device 1",
    "status": "active"
  },
  {
    "deviceId": "device2",
    "deviceName": "Device 2",
    "status": "inactive"
  }
  // Additional devices...
]

Notes#

Replace YOUR_X_API_KEY with your actual x-api-key.
Replace YOUR_ENTERPRISE_ACCOUNT_ID with your actual acctId.
Replace YOUR_APP_SECRET with your actual appSecret.
Replace YOUR_JWT_TOKEN with the token obtained from the /token endpoint.
Ensure that the x-api-key and JWT token are kept secure and not exposed publicly.
If you encounter any issues with the API endpoints, please verify the validity of the URLs and ensure that your network connection is stable.
Modified at 2025-03-03 04:56:12
Previous
/jobs
Next
DevicesHistoryRequest
Built with