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 | Unique identifier of the group. |
type | Message type category. |
deviceId | Unique identifier of the device. |
messageType | Type of event message. |
lastKnownLon | Last known longitude in degrees. |
geoFenceType | Type of geofence event ( |
vendorTypeId | Vendor type identifier. |
id | Unique identifier of the message. |
serialNumber | Device serial number. |
locationTime | Timestamp of location in milliseconds. |
odometer | Vehicle odometer reading in kilometers. |
offset | Time offset in minutes. |
virtualTripEnd | Indicates if a virtual trip end was detected. |
insideHOO | Indicates if the vehicle is inside HOO (Hours of Operation). |
deviceSerial | Device serial identifier. |
groupName | Name of the group. |
lastKnownLat | Last known latitude in degrees. |
vehicleName | Name of the vehicle. |
deviceTypeId | Type identifier of the device. |
storedLocation | Whether the location is stored or live. |
protocolVersionIdChange | Indicates a protocol version change. |
privacyModeEnable | Indicates if privacy mode is enabled. |
customerId | Customer identifier. |
vehicleId | Unique identifier of the vehicle. |
tripNumber | Trip number counter. |
roaming | Roaming network status. |
stateId | State identifier. |
userName | Username associated with the record. |
userId | Identifier of the user who triggered event. |
fenceName | Geofence name. |
messageTypeId | Identifier for the message type. |
batteryPercentage | Battery level percentage. |
commonState | Common state indicator. |
currentState | Current state indicator. |
fenceId | Unique identifier for the geofence. |
messageEventTypeId | Identifier for message event type. |
location | Current location object of the vehicle |
latitude | Latitude co-ordinate value in degrees
Example: |
longitude | Longitude co-ordinate value in degrees
Example: |
Updated 4 days ago