Update a Geofence
Client Parameters
client_id
The unique ID associated with your developer project.geofence_id
The unique ID associated with the user-created geofence. A Geofence ID is generated for all geofences and can be found in your Developer Console.oauth_token
The access token generated via your web application as described here.name
A custom string that you can set to help you identify the set of geofences.venueId
A single FoursquarevenueId.categoryId
A single Foursquare category.chainId
A single Foursquare chain.center
A comma separated lat/long coordinate.radius
Area around the lat/lng that will trigger a geofence event. Default and minimum radius is 50 meters, with a max of 5000.dwellTime
Number of minutes user needs to be inside of a geofence to trigger a dwell event. Default is 1 minute.v
The API version date as documented here.properties
A string of comma-separated key-value pairs containing metadata about the venue associated with the geofence. Can contain up to 10 key-value pairs formatted asmuseum_type=Art,has_cafe=yes.
Response Example
Success (200)
{
"meta": {
"code": 200,
"requestId": "5cab901e4c1f6715dfb6dee7"
},
"notifications": [
{
"type": "notificationTray",
"item": {
"unreadCount": 0
}
}
],
"response": {
"geofence": {
"type": "LatLng",
"name": "My Custom Location",
"id": "5cab901ebfc6d0002ce1ff33",
"boundary": {
"center": {
"lat": 40.7435179,
"lng": -73.988242149
},
"radius": 100
},
"dwellTime": 2
}
}
}
Error (400)
{
"meta": {
"code": 400,
"requestId": "Error_Request_ID"
},
"notifications": [],
"response": {}
}
cURL Example
curl --request POST \
--url https://api.foursquare.com/v2/apps/client_id/geofence/geofence_id/update \
--header 'accept: application/json'