# \_get

Gathers the details of a chosen Geofence.

### Parameters

#### id

The ID of the sought after Geofence.

### Example

```
FM_api(
    'Geofence_get',[
        'id' => '1'
    ]
);
```

### Results

#### On Success

From a Geofence with the ID of 1, which was centered on 'Forthill Park, Enniskillen', named "Test Geofence", with a size of 105 and the shape of a circle:

```
{"id":1,"max_lat":54.347103,"min_lat":54.343506,"max_lng":-7.629587,
"min_lng":-7.6357584,"points":{"radius":105,"type":"circle"},
"name":"Test Geofence","meta":[],"last_edited":1679824638,
"cdate":1679824638}
```

#### On Failure

If there is no ID given or it is less than 1:

```
{"error":"missing or invalid parameter: id"}
```

If a valid ID is given but there is no Geofence assigned to said ID.

```
{"error":"geofence does not exist"}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fieldmotion.com/fieldmotion-api-docs/geofence/_get.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
