Skip to main content

Update Geofence

Contents

Please see the Sites feature in our Places API if you are looking for predefined geofences around warehouses, distribution centers, and many other important trucking facilities in North America.

This API allows you to update an existing geofence.

PUT /Geofence

Request Element

The update Geofence operation requires JSON format data in the Post body.

Element Definition Required
Id The Id of the geofence to update. Y
Name The name of your geofence. Y
Label The optional label of your geofence. Max length is 255. N
ShapeType The shape of this geofence.
1 = circle
5 = polygon
Y
Radius The radius in miles for a circular geofence. Y - if defining a circle geofence
ShapePoints An array of latitude and longitude coordinates that represent the border of the fence. The first and last points in the array must match.
For circle geofences, use a single point as the center of the geofence.
Y
StartTime The date/time indicating the beginning of a time window during which this geofence will be active. The time should be formatted according to the ISO 8601 Standard (YYYY-MM-DDTHH:MM:SSZ) N
EndTime The date/time indicating the end of a time window during which this geofence will be active. The time should be formatted according to the ISO 8601 Standard (YYYY-MM-DDTHH:MM:SSZ) N

Sample JSON Post Body

{
  "Id": 2035,
  "Name": "El Dorado, AR",
  "Label": "my updated label",
  "ShapeType": 1,
  "Radius": 50,
  "ShapePoints": [[-92.665901, 33.210973]],
  "StartTime": "2017-01-06T14:59:36-04:00",
  "EndTime": "2018-01-06T14:59:36-04:00"
}

Response

The return from this operation is the 1 for success or an error on failure.

1

Errors

Data Element Description Data Type Value/Example
Type Indicates whether the error is an exception or warning
Enum
Warning
Exception
Code Error code
Enum
Please refer to Appendix for complete list
LegacyErrorCode The legacy error code with is an integer valued code that would have been returned in PC*Miler Web Services v25 and earlier.
Int
Description The detailed error description.
string
Last updated June 7, 2024.
API Endpoint:

Contents