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.

ElementDefinitionRequired
IdThe Id of the geofence to update.Y
NameThe name of your geofence.Y
LabelThe optional label of your geofence. Max length is 255.N
ShapeTypeThe shape of this geofence.
1 = circle
5 = polygon
Y
RadiusThe radius in miles for a circular geofence.Y - if defining a circle geofence
ShapePointsAn 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
StartTimeThe 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
EndTimeThe 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 ElementDescriptionData TypeValue/Example
TypeIndicates whether the error is an exception or warning
Enum
Warning
Exception
CodeError code
Enum
Please refer to Appendix for complete list
LegacyErrorCodeThe legacy error code with is an integer valued code that would have been returned in PC*MILER Web Services v25 and earlier.
Int
DescriptionThe detailed error description.
string
Last updated December 6, 2022.
Contents