Use this API to create a geofence. Geofence is a virtual boundary around a geographical area. A geofence can have radius configured up to 10 Miles. Azuga will notify you when your vehicle enters or exits a geofence. This helps you to determine how long your vehicle was in a particular area.

📘

Sample Request

https://api.azuga.com/azuga-ws/v1/geofence/create.json

For Circular Geofence:
{  
   "name":"Office Building",
   "latitude":39.288815,
   "longitude":-77.860099,
   "radiusUnit":"metres",
   "radius":4.1234,
   "address":"101 West Washington Street, Charles Town, WV, United States",
   "color":"#15eb15",
   "alertType":"BOTH",
   "ccAddress":"[email protected]",
   "mode":"0",
   "landmarkCategory": {"name": "Home"},
   "groupNames":[  
      "USA-1"
   ],
   "email":[  
      "[email protected]"
   ]
}

For Polygon Geofence:
{  
   "name":"Office Building",
   "latitude":"39.288815",
   "longitude":"-77.860099",
   "fenceType":"Polygon",
   "geometry":[  
      [  
         [  
            -77.86007488891755,
            39.28885426493847
         ],
         [  
            -77.86009098217164,
            39.28876240490376
         ],
         [  
            -77.85992468521272,
            39.28875462014952
         ],
         [  
            -77.86000716313993,
            39.288873467303375
         ]
      ]
   ],
   "address":"101 West Washington Street, Charles Town, WV, United States",
   "color":"#15eb15",
   "alertType":"BOTH",
   "ccAddress":"[email protected]",
   "mode":"0",
   "landmarkCategory": {"name": "Office"},
   "vehicleNames":[  
      "Range Rover"
   ],
   "email":[  
      "[email protected]"
   ]
}

API Response explanation

FieldDescription
codeAPI Status Code
messageAPI Message (Success/Failure)
generatedAtAPI generation timestamp in UTC
reasonThe reason for failure
currentPageThe current page
totalPagesThe total number of pages in the result
Language
Authorization
Header
Click Try It! to start a request and see the response here!