The update geofence API allows you to edit the details of an existing geofence. Only one geofence can be updated in a single API call. You are allowed to update geofences for those you have access to modify.

📘

Sample Request

https://api.azuga.com/azuga-ws/v1/geofence/update.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",
   "groupNames":[  
      "West Coast"
   ],
   "email":[  
      "[email protected]"
   ]
}

For Polygon Geofence:
{  
   "name":"Office Building",
   "latitude":"39.2888",
   "longitude":"-77.86",
   "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",
   "groupNames":[  
      "West Coast"
   ],
   "email":[  
      "[email protected]"
   ]
}

API Response explanation

FieldDescription
codeAPI Status Code
messageAPI Message
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!