A geofence object represents a virtual perimeter for a real-world geographic area. The object consists of a set of latitude and longitude points that form a closed polygon.
We’ll use this API to retrieve all geofences, and then sync the two systems by creating a new geofence, and also deleting an outdated geofence.
GET call retrieves a list of all your company’s geofences in the Motive system. The list includes each geofence ID, name, category, status (‘active’ or ‘deactivated’), address, and location points.
Perhaps you have found a recent geofence in your system that has not yet been synchronized in the Motive system. The
POST call creates a new geofence in Motive's system. Provide the geofence’s
category, and an array of
location_points; optionally provide its
category is a required field, ‘Uncategorized’ is an accepted value. The array of
location_points must form a closed polygon and is expected as an array of hashes. The
status value defaults to ‘active’ if none is provided.
Now let’s say you have also found a recently invalid geofence in your system, which you also want to remove from Motive's system. The
DELETE call requires only the geofence’s ID.
You’re done with the setup portion of our workflow! In the next handful of steps, you will use the TMS core functionality for your day-to-day operations.