---
title: "Get a geofence"
method: GET
path: "/v1/locate/geofences/{geofenceId}"
tags: ["Device Locator"]
---

# Get a geofence

`GET /v1/locate/geofences/{geofenceId}`

## Request

- Base URL: `https://api.1nce.com/management-api`
- URL: `https://api.1nce.com/management-api/v1/locate/geofences/{geofenceId}`
- Auth: HTTP bearer

Get details of a geofence.

## Path parameters

- `geofenceId` string, required

## Response `200`

OK

- union: Response to get geofence request.
  - PolygonGeofenceData
    - `id` string, required: Identifier of the geofence
    - `name` string, required: The name of the geofence
    - `created` string, date-time, required: When the Geofence was created
    - `updated` string, date-time, required: When the Geofence was last updated
    - `deviceId` unknown, required
    - `eventTypes` string[], required: The event types to register to. Defaults to [ENTER, EXIT]
    - `eventSources` string[], required: The sources of coordinates to evaluate towards geofence. Defaults to [GPS, CellTower]
    - `type` string, required: The type of geofence
    - `coordinates` array[], required: The polygon geofence coordinates
      - array[]
        - number[]: Coordinates (long, lat)
  - CircleGeofenceData
    - `id` string, required: Identifier of the geofence
    - `name` string, required: The name of the geofence
    - `created` string, date-time, required: When the Geofence was created
    - `updated` string, date-time, required: When the Geofence was last updated
    - `deviceId` unknown, required
    - `eventTypes` string[], required: The event types to register to. Defaults to [ENTER, EXIT]
    - `eventSources` string[], required: The sources of coordinates to evaluate towards geofence. Defaults to [GPS, CellTower]
    - `type` string, required: The type of geofence
    - `radius` number, required: Circle geofence radius in meters
    - `center` number[], required: The coordinates of the center of the geofence (long, lat)

## Other responses

- `404`: Not Found Error
- `500`: Internal Server Error

---

[API](https://skmtc.dev/1nce/apis/1nce-os.md) - [All operations](https://skmtc.dev/1nce/apis/1nce-os/llms.txt) - [OpenAPI document](https://skmtc.dev/1nce/apis/1nce-os/revisions/f1aabbc6aeea?raw)
