List Distance Targeting Geometries

Why List Distance Targeting Geometries?

You may find it useful to occasionally review all distance targeting geometry objects associated with a flight to determine if you would like to make changes to the object being used for distance targeting. The Kevel API enables you to return a list of all distance targeting geometry objects associated with a specific flight. You simply need to make a GET request to the Distance Targeting Geometries API endpoint and include the FlightID and distance parameters.

The JSON response will include all distance targeting geometry objects for that flight.

API Syntax

When using the List Distance Targeting Geometries 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

Where:

FlightID

Type Description
int32 The ID of the flight (required)

Response

Code Type Description
200 array of objects Successful response containing the list of geometries

Object Structure

Field Type Default Description
Id integer 0 Unique identifier for the geometry
Latitude number 0 Latitude coordinate
Longitude number 0 Longitude coordinate
StreetAddress string Address associated with the point
FlightId integer 0 ID of the associated flight
Distance integer 0 Distance in associated units
curl -H "X-Adzerk-ApiKey:
$ADZERK_API_KEY" https://api.kevel.co/v1/flight/12345/distance

Example Response

[
  {
    "Id": 12345,
    "Latitude": 35.99505,
    "Longitude": -78.90818,
    "StreetAddress": "kevel",
    "FlightId": 1234567,
    "Distance": 10
  },
  {
    "Id": 12346,
    "Latitude": 35.99505,
    "Longitude": -78.90818,
    "StreetAddress": "kevel uk",
    "FlightId": 1234567,
    "Distance": 10
  },
  {
    "Id": 12347,
    "Latitude": 35.99505,
    "Longitude": -78.90818,
    "StreetAddress": "kevel san francisco",
    "FlightId": 1234567,
    "Distance": 10
  }
]