## Why Get Distance Targeting Geometry?

Sometimes, you may find it necessary to retrieve a distance targeting geometry object associated with a flight to see if you would like to make changes to the object. The Kevel API enables you to retrieve this information using the Get Distance Targeting Geometry endpoint and passing the `FlightID`, `distance`, and `GeometryID` parameters as part of the `GET` request. When you make the request, all of the information about that geometry object for the flight will be displayed.

## API Syntax

When using the Get Distance Targeting Geometry API endpoint, it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:

`GET https://api.kevel.co/v1/flight/{FlightID}/distance/{GeometryID}`

Where:

- `GET` \- the type of API request being made.
- `https://api.kevel.co` \- the URL for the request.
- `v1` \- the API version.
- `flight` \- the API endpoint being called.
- `FlightID` \- the ID associated with the flight.
- `distance` \- the distance targeting geometry object that contains the `Distance`, `Latitude`, `Longitude`, and `StreetAddress` body parameters used for distance targeting.
- `GeometryID` \- The ID of the Distance Targeting geometry

### FlightID

- **Type:** int32  
- **Required:** Yes  
- **Description:** The ID of the flight

### GeometryID

- **Type:** int32  
- **Required:** Yes  
- **Description:** The ID of the Distance Targeting geometry

### accept

- **Type:** string  
- **Enum:** Defaults to application/json  
- **Generated from available response content types**  
- **Allowed:**  
  `application/json``text/plain`

### 200 Response

```json
{
  "Distance": 42,
  "StreetAddress": "1 Kevel Boulevard, Keveltown NC 27701",
  "FlightId": 12345,
  "Latitude": 35.9950488,
  "Longitude": -78.9081815,
  "Id": 123
}
```

### 400 Response

```
```

### Example Curl Command

```shell
curl -H "X-Adzerk-ApiKey:$ADZERK_API_KEY" https://api.kevel.co/v1/flight/12345/distance/1234
```

---

Updated 10 months ago
