Geofence

The GEOFENCE event is used to notify when a vehicle enters or exits a predefined geofence region. It helps monitor vehicle movement in and out of designated areas.

Event Type: GEOFENCE

Trigger Condition

Subscription to the GEOFENCE event is mandatory. The event is triggered whenever a vehicle crosses the boundary of a created geofence, either entering into or exiting from the defined region.

Example Payload

{
  "inputBit7": 0,
  "partialUpdate": false,
  "inputBit4": 0,
  "voiceCallActive": 0,
  "inputBit3": 0,
  "inputBit6": 0,
  "groupId": "dc6a970e-7cae-11ed-afbb-df3f4417d760",
  "inputBit5": 0,
  "type": "GeoFenceMessageVO",
  "deviceId": "8a8529d0-2aea-11ed-9985-8b9249c81d56",
  "networkService": 0,
  "commStateConnected": 0,
  "messageType": "GEOFENCE",
  "dimentionFix": 0,
  "lastKnownLon": 0,
  "geoFenceType": "EXIT",
  "inputBit0": 0,
  "vendorTypeId": 0,
  "inputBit2": 0,
  "id": "6d8f2961-a6fd-11ef-be85-5f14b5342ae7",
  "inputBit1": 0,
  "fixStatuslastKnown": 0,
  "fixStatusHistoric": 0,
  "serialNumber": "1113002266",
  "commStatusAvaliable": 0,
  "locationTime": 1732079278000,
  "odometer": 0,
  "offset": -480,
  "virtualTripEnd": false,
  "eventIndex": 0,
  "fixStatusCorrected": 0,
  "insideHOO": true,
  "deviceSerial": "1113002266",
  "groupName": "Team",
  "lastKnownLat": 0,
  "fixQuality": 0,
  "unitStatusBit0": 0,
  "vehicleName": "Team 02",
  "unitStatusBit2": 0,
  "deviceTypeId": 1,
  "unitStatusBit1": 0,
  "unitStatusBit3": 0,
  "storedLocation": false,
  "protocolVersionIdChange": false,
  "unitStatus": 0,
  "fixStatusPredict": 0,
  "invalidFix": 0,
  "dataService": 0,
  "network3G": 0,
  "noOfAccums": 0,
  "privacyModeEnable": false,
  "customerId": 19018,
  "fixStatus": 0,
  "vehicleId": "8a8529cf-2aea-11ed-9985-f72270ecd7b3",
  "tripNumber": 0,
  "lastKnownFixQuality": 0,
  "spare": 0,
  "roaming": 0,
  "stateId": 0,
  "userName": "1113002266",
  "userId": "8a885e21-2aea-11ed-9985-3d8d1128a129",
  "fenceName": "Cross, Barbara - 86620186",
  "messageTypeId": 0,
  "location": {
    "latitude": 37.3022754,
    "longitude": -121.9509528
  },
  "batteryPercentage": 0,
  "commonState": 0,
  "currentState": 0,
  "fenceId": "e16240ae-a64d-11ef-83da-61feb21814a5",
  "messageEventTypeId": 0
}

Reference

Field

Description

groupId
String (UUID)

Unique identifier of the group.
Example: dc6a970e-7cae-11ed-afbb-df3f4417d760

type
String

Message type category.
Example: GeoFenceMessageVO

deviceId
String (UUID)

Unique identifier of the device.
Example: 8a8529d0-2aea-11ed-9985-8b9249c81d56

messageType
String

Type of event message.
Example: GEOFENCE

lastKnownLon
Double

Last known longitude in degrees.
Example: 0

geoFenceType
String

Type of geofence event (ENTER / EXIT).
Example: EXIT

vendorTypeId
Integer

Vendor type identifier.
Example: 0

id
String (UUID)

Unique identifier of the message.
Example: 6d8f2961-a6fd-11ef-be85-5f14b5342ae7

serialNumber
String

Device serial number.
Example: 1113002266

locationTime
Long

Timestamp of location in milliseconds.
Example: 1732079278000

odometer
Integer

Vehicle odometer reading in kilometers.
Example: 0

offset
Integer

Time offset in minutes.
Example: -480

virtualTripEnd
Boolean

Indicates if a virtual trip end was detected.
Example: false

insideHOO
Boolean

Indicates if the vehicle is inside HOO (Hours of Operation).
Example: true

deviceSerial
String

Device serial identifier.
Example: 1113002266

groupName
String

Name of the group.
Example: Team

lastKnownLat
Double

Last known latitude in degrees.
Example: 0

vehicleName
String

Name of the vehicle.
Example: Team 02

deviceTypeId
Integer

Type identifier of the device.
Example: 1

storedLocation
Boolean

Whether the location is stored or live.
Example: false

protocolVersionIdChange
Boolean

Indicates a protocol version change.
Example: false

privacyModeEnable
Boolean

Indicates if privacy mode is enabled.
Example: false

customerId
Integer

Customer identifier.
Example: 19018

vehicleId
String (UUID)

Unique identifier of the vehicle.
Example: 8a8529cf-2aea-11ed-9985-f72270ecd7b3

tripNumber
Integer

Trip number counter.
Example: 0

roaming
Integer

Roaming network status.
Example: 0

stateId
Integer

State identifier.
Example: 0

userName
String

Username associated with the record.
Example: 1113002266

userId
String (UUID)

Identifier of the user who triggered event.
Example: 8a885e21-2aea-11ed-9985-3d8d1128a129

fenceName
String

Geofence name.
Example: Cross, Barbara - 86620186

messageTypeId
Integer

Identifier for the message type.
Example: 0

batteryPercentage
Integer

Battery level percentage.
Example: 0

commonState
Integer

Common state indicator.
Example: 0

currentState
Integer

Current state indicator.
Example: 0

fenceId
String (UUID)

Unique identifier for the geofence.
Example: e16240ae-a64d-11ef-83da-61feb21814a5

messageEventTypeId
Integer

Identifier for message event type.
Example: 0

location
Location { latitude: 34.12 longitude: -82.14 }

Current location object of the vehicle

latitude
Double

Latitude co-ordinate value in degrees Example: 17.696502

longitude
Double

Longitude co-ordinate value in degrees Example: 77.565824