Link geofence to object

This API links an existing geofence to a vehicle, allowing you to set control parameters such as speed limits, idle time, and alerts.

How to get data

Method

GET

Request address

To get the data, use the address: https://<server_address>/api/api.php?

Request parameters

  • cmd=geofencelink — command to link a geofence
  • zone_id — geofence ID (required if external_id is not specified)
  • external_id — external identifier of the geofence (optional, ignored if zone_id is provided)
  • agent_id — identifier of the agent (vehicle)
  • idle — idle time control in the geofence in minutes (optional)
  • speedlimit — speed limit in the geofence in km/h (optional)
  • alerts — alerts configuration:
  • 0 — no alerts
  • 1 — idle alert
  • 2 — border crossing alert
  • 3 — border and checkpoint alert
  • node — node number where the command should be executed
 

Example request

http://<server_address>/api/api.php?cmd=geofencelink&zone_id=158414&agent_id=66497&idle=10&speedlimit=80&alerts=0&node=1
Response
{
  "code": 0,
  "msg": "OK"
}
In response to the API request, the following is returned:
  • code — result code (0 = success)
  • msg — server message indicating the result of the operation