---
updatedAt: 2025-09-18T22:00:31.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# Get Distance Targeting Geometry

## 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

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "management-api-2",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.kevel.co"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "X-Adzerk-ApiKey",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/flight/{FlightID}/distance/{GeometryID}": {
      "get": {
        "summary": "Get Distance Targeting Geometry",
        "description": "",
        "operationId": "get-geodistance-targeting-geometry",
        "parameters": [
          {
            "name": "FlightID",
            "in": "path",
            "description": "The ID of the flight",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "name": "GeometryID",
            "in": "path",
            "description": "The ID of the Distance Targeting geometry",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"Distance\": 42,\n  \"StreetAddress\": \"1 Kevel Boulevard, Keveltown NC 27701\",\n  \"FlightId\": 12345,\n  \"Latitude\": 35.9950488,\n  \"Longitude\": -78.9081815,\n  \"Id\": 123\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "Distance": {
                      "type": "integer",
                      "example": 42,
                      "default": 0
                    },
                    "StreetAddress": {
                      "type": "string",
                      "example": "1 Kevel Boulevard, Keveltown NC 27701"
                    },
                    "FlightId": {
                      "type": "integer",
                      "example": 12345,
                      "default": 0
                    },
                    "Latitude": {
                      "type": "number",
                      "example": 35.9950488,
                      "default": 0
                    },
                    "Longitude": {
                      "type": "number",
                      "example": -78.9081815,
                      "default": 0
                    },
                    "Id": {
                      "type": "integer",
                      "example": 123,
                      "default": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "text/plain": {
                "examples": {
                  "Not found": {
                    "value": "{\n  \"message\": \"GeoDistance Targeting Geometry not found.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "GeoDistance Targeting Geometry not found."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -H \"X-Adzerk-ApiKey:$ADZERK_API_KEY\" https://api.kevel.co/v1/flight/12345/distance/1234 \n",
              "name": "cURL"
            },
            {
              "language": "javascript",
              "code": "const Adzerk = require('@adzerk/management-sdk');\nconst apiKey = process.env.ADZERK_API_KEY;\n\nasync function getDistanceTargeting() {\n  let specifications = await Adzerk.fetchSpecifications();\n  let client = await Adzerk.buildClient({apiKey, specifications, logger});\n  \n  let distanceTargeting = await client.run(\"distanceTargeting\", \"get\", {\n    flightId: 12345,\n    geometryId: 123\n  });\n  \n  console.log(distanceTargeting);\n}\ngetDistanceTargeting()"
            },
            {
              "language": "ruby",
              "code": "require \"adzerk\"\n\ndef get_distance_targeting()\n    client = Adzerk::Client.new(ENV[\"ADZERK_API_KEY\"])\n    flight_id = 12345\n    geometry_id = 123\n    pp client.distance_targetings.get(flight_id, geometry_id)\nend\nget_distance_targeting()"
            }
          ],
          "samples-languages": [
            "curl",
            "javascript",
            "ruby"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "X-Adzerk-Sdk-Version",
        "value": "Readme.io:ManagementAPI2"
      }
    ],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```