---
title: "Get a Geofence"
method: GET
path: "/geofence/{id}"
tags: ["Geofence"]
---

# Get a Geofence

`GET /geofence/{id}`

## Path parameters

- `id` string, required

## Query parameters

- `key` string, 32 character alphanumeric string, required

## Response `200`

OK

- DtoGetGeofenceResp
  - `status` string — A string indicating the state of the response. On successful responses, the value will be Ok. Indicative error messages are returned for different errors. See the [API Error Codes](#api-error-codes) section below for more information.
  - `data` object
    - `geofence` DtoGeofence — An object with details of the geofence.
      - `id` string — ID of the geofence provided/generated at the time of creating the geofence.
      - `name` string — Name of the geofence added at the time of creating or updating it.
      - `type` 'circle' | 'polygon' | 'isochrone' — Type of the geofence.
      - `geojson` PolygonGeojson — An object with geoJSON details of the geofence. The contents of this object follow the [geoJSON standard](https://datatracker.ietf.org/doc/html/rfc7946).
        - `type` string — Type of the geoJSON geometry. Will always be Polygon.
        - `coordinates` array[] — An array of coordinates in the [longitude, latitude] format, representing the geofence boundary.
          - number[] — [longitude, latitude] format location.
      - `circle_center` DtoGeofencePosition
        - `lat` number — Latitude of the location.
        - `lon` number — Longitude of the location.
      - `circle_radius` number — When the type of the geofence is circle, this property returns the radius of the geofence in meters (m).
      - `ic_contours_meter` integer — For a geofence based on isochrone contour determined using a specific driving distance, this property returns the duration value, in meters. The value would be the same as that provided for the contours_meter parameter at the time of creating or updating the geofence.
      - `ic_contours_minute` integer — For a geofence based on isochrone contour determined using a specific driving duration, this property returns the duration value, in minutes. The value would be the same as the value provided for the contours_minute parameter at the time of creating or updating the geofence.
      - `ic_coordinates` string, latitude,longitude — For a geofence based on isochrone contour, this property returns the coordinates of the location, in [latitude,longitude] format, which was used as the starting point to identify the geofence boundary. The value would be the same as that provided for the coordinates parameter at the time of creating or updating the geofence.
      - `ic_departure_time` integer — For a geofence based on isochrone contour, this property returns the departure time, as a UNIX epoch timestamp in seconds, which was used to determine the geofence boundary after taking into account the traffic conditions at the time. The value would be the same as that provided for the departure_time parameter at the time of creating or updating the geofence.
      - `ic_mode` number — For a geofence based on isochrone contour, this property returns the driving mode used to determine the geofence boundary. The value would be the same as that provided for the mode parameter at the time of creating or updating the geofence.
      - `ic_denoise` number — For a geofence based on isochrone contour, this property returns the denoise value which would be the same as that provided for the denoise parameter at the time of creating or updating the geofence.
      - `tags` string[] — An array of strings representing the tags associated with the geofence added at the time of creating or updating it.
      - `created_at` integer — Time at which the geofence was created, expressed as a UNIX timestamp in seconds.
      - `updated_at` integer — Time at which the geofence was last updated, expressed as a UNIX timestamp in seconds.
      - `meta_data` object — Metadata of the geofence added at the time of creating or updating it.

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.net/nextbillion-ai/apis/one-spec-service.md) · [All operations](https://skmtc.net/nextbillion-ai/apis/one-spec-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nextbillion-ai/one-spec-service/versions/b647f1808dda/schema)
