Description

Gets all created geofences.


Request

GET https://api.foursquare.com/v2/apps/CLIENT_ID/geofences


Authentication

User authentication.


Parameters

None.


Response Fields

Field Description
geofences Array of geofence objects.
id A unique string identifier for this geofence.
type Can be either Venue, LatLng, or Polygon.
name Name of the geofence that will appear in the Pilgrim Console.
venueIds Venues that were geofenced.
chainIds Chains that were geofenced.
categoryIds Categories that were geofenced.
boundary Bounds of the geofence. For polygons it will be an array of points.

Response

{
    "meta": {
        "code": 200,
        "requestId": "5cabcaa01ed2190bebe905bb"
    },
    "notifications": [
        {
            "type": "notificationTray",
            "item": {
                "unreadCount": 0
            }
        }
    ],
    "response": {
        "geofences": [
            {
                "type": "Venue",
                "name": "Favorite Coffee Shop",
                "id": "5cabca9b237dee002c1f6510",
                "venueIds": [
                    "4b5901d3f964a520167828e3"
                ],
                "boundary": {
                    "radius": 100
                },
                "dwellTime": 5
            },
            {
                "type": "LatLng",
                "name": "LatLngFence",
                "id": "5cabca9b237dee002c1f6511",
                "boundary": {
                    "center": {
                        "lat": 40.7001,
                        "lng": -73.988
                    },
                    "radius": 175
                },
                "dwellTime": 10
            },
            {
                "type": "Polygon",
                "name": "SF-ChinaTown",
                "id": "5cabca9b237dee002c1f650f",
                "boundary": {
                    "points": [
                        {
                            "lat": 37.79315153932501,
                            "lng": -122.40858972072601
                        },
                        {
                            "lat": 37.790353670610145,
                            "lng": -122.40798890590668
                        },
                        {
                            "lat": 37.7908666211391,
                            "lng": -122.40397632122038
                        },
                        {
                            "lat": 37.79366023134501,
                            "lng": -122.40449666976929
                        },
                        {
                            "lat": 37.79315153932501,
                            "lng": -122.40858972072601
                        }
                    ]
                },
                "dwellTime": 2
            }
        ]
    }
}
Was this page helpful?
Yes
No
Thank you!