FleetUp API Docs
  1. Geofence
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
      • Get fence detail
        GET
      • Retrieve geofence alerts
        GET
    • Others
      • /jobs
  • API Guides
    • Retrieve All Devices from an Enterprise
  1. Geofence

Retrieve geofence alerts

GET
/geofence/alerts
This API fetches geofence alerts for a specific device and geofence within the provided start and end time. If no device ID is entered, alerts for all devices under the account will be included, and if no fence ID is entered, alerts for all geofences will be considered.

Request

Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Query Params
devId
string 
optional
Device ID, if no value provided, query all devices under the account
fenceId
string 
optional
Fence ID, if no value provided, query all fences under the account
startTime
number 
optional
Start time. Format: yyyyMMddHHmmss
Example:
20250208000000
endTime
number 
optional
End time. Format: yyyyMMddHHmmss
Example:
20250209000000
pageNo
number 
optional
The index number for pagination.
Default:
1
pageSize
number 
optional
The maximum records count for pagination
Default:
200

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 GET '/geofence/alerts' \
--header 'x-api-key;'

Responses

🟢200成功
application/json
200 response
Body
total
integer 
required
Total number of records
Example:
1
pageSize
integer 
required
Number of records per page
Example:
200
pageNo
integer 
required
Current page number
Example:
1
rows
array [object {6}] 
required
Array of alert records
deviceId
string 
required
Device ID
Example:
7200000087
alertAction
integer 
required
Alert action type
Example:
1
tmTime
string 
required
Timestamp of the alert
Example:
20250208014810
acconTime
string 
required
Timestamp of the trip start
Example:
20250208014120
fenceId
integer 
required
Fence ID
Example:
12345
fenceName
string 
required
Fence name
Example:
A Test Fence
totalPage
integer 
required
Total number of pages
Example:
1
nextPage
integer 
required
Number of the next page
Example:
1
lastPage
boolean 
required
Whether this is the last page
Example:
true
firstPage
boolean 
required
Whether this is the first page
Example:
true
prePage
integer 
required
Number of the previous page
Example:
1
Example
{
    "total": 1,
    "pageSize": 200,
    "pageNo": 1,
    "rows": [
        {
            "deviceId": "7200000087",
            "alertAction": 1,
            "tmTime": "20250208014810",
            "acconTime": "20250208014120",
            "fenceId": 12345,
            "fenceName": "A Test Fence"
        }
    ],
    "totalPage": 1,
    "nextPage": 1,
    "lastPage": true,
    "firstPage": true,
    "prePage": 1
}
Modified at 2025-02-28 08:12:14
Previous
Get fence detail
Next
/jobs
Built with