Batch Upload Distance Targeting Geometries

Caution

StreetAddress resolution is not available when using batch geometry creation.

Why Batch Upload Distance Targeting Geometries?

The Kevel API enables you to create, override, or remove multiple geometry objects associated with a flight in one single API call. This provides efficiency and allows you to make changes to a geometry object without making individual API calls for each object.

API Syntax

When using the Batch Upload 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:

POST https://api.kevel.co/v1/flight/{FlightID}/distance/batch

Where:

FlightID

int32

required

The ID of the flight

ReplaceExisting

boolean

Defaults to false

Whether to replace any existing geometries on a flight. Defaults to false.

Geometries

array of objects

required

Must contain at least 0 geometry objects. If 1 or more objects are present, Distance, Latitude, and Longitude (float) are all required.

Batch create/override

curl -X POST -H "X-Adzerk-ApiKey:$ADZERK_API_KEY" https://api.kevel.co/v1/flight/1234567/distance/batch -d '{"ReplaceExisting": false, "Geometries": [{"Latitude": -89.05, "Longitude": -170.1, "Distance": 5},{"Latitude": 14, "Longitude": 57.1, "Distance": 5}]}'

Remove all geometries on the flight

curl -X POST -H "X-Adzerk-ApiKey:$ADZERK_API_KEY" https://api.kevel.co/v1/flight/1234567/distance/batch -d '{"ReplaceExisting": true, "Geometries": []}'

Batch create/override

{
  "InsertedGeometries": 2
}

Remove all geometries on the flight

{
  "InsertedGeometries": 0
}