Create Geo-Targeting

Why Create Geo-Targeting?

This API endpoint enables you to target a flight to a geographical area, either inclusively (only show the flight in this area) or exclusively (show the flight everywhere except this area). To add multiple geo-targeting locations, make multiple requests to the endpoint. Each will get their own LocationId.

📘

Note

Use Kevel's List Geo Endpoints to receive the most current and up-to-date Countries/Regions/MetroCodes.

API Syntax

When using the Create Get-Targeting 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}/geotargeting

Where:

  • POST - 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.
  • geotargeting - the object used to create geo-targeting for the flight.
Path Params
int32
required

ID of the Flight

Body Params
string

The 2-3 character string that denotes the country you want to target

string

The 2-3 character string that denotes the region (or state) that you want to target

int32

The 3 digit number that denotes the metropolitan area you want to target. US only.

boolean
Defaults to false

If leave blank, this will default to false/null and target the country. If you want to exclude it instead, use true

Response

Language
Credentials
Header
LoadingLoading…
Response
Choose an example:
application/json