Flight Filtering

Why Filter Fights?

When you have a large number of flights, you may find it necessary to filter the number or results returned in a single request.

This API request returns a stream of line-delimited JSON where each line of output is a single JSON object representing one flight. The flight object contains the properties of the flight as well as an array of the "Ad IDs" associated with that flight.

📘

Note

This endpoint does not return ad objects. By default, this endpoint returns all flights saved in an account, but you can use the query parameters to filter.

Filtering Behaviors

Use the StartDate and EndDate query parameters to filter flights by a range time periods. For example, ?beforeStartDate:2017-01-01&afterStartDate:2016-11-30 returns all flights with a StartDate between 2016-12-01 and 2016-12-31. ?afterStartDate:2016-11-30 returns all flights with a StartDate of 2016-12-01 or later.

You can also use StartDate and EndDate query parameters in combination, which will only return flights that fall within both those ranges.

Besides beforeEndDate and afterEndDate, you can also include the noEndDate=true query parameter. This will return any flights without an EndDate set in addition to any flights filtered by an EndDate range.

👍

Important

You should URL encode special characters when filtering with the name and nameContains parameters.

API Syntax

When using the Flight Filtering API call, 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/fast/flight]

Where:

  • GET - the type of API request being made.
  • https://api.kevel.co - the URL for the request.
  • v1 - the API version.
  • fast - the API endpoint being called.
  • flight - The value returned from the

Response Parameters

📘

Note

Along with flight information, additional response parameters will be returned with this request, which are listed in the table below.

PropertyDescription
LastModifiedDate
(string)
The date/time the flight was last updated
CustomFieldsJson
(string)
An object of custom fields available for the flight and their values
StartDate
(string)
The start date for the flight. YYYY-MM-DD HH:MM:SS
PriorityId
(integer)
The Priority's ID
IsDeleted
(boolean)
If the flight is set as deleted
Id
(integer)
The Flight's ID
IsNoDuplicates
(boolean)
If the flight is set to not serve more than once per ad request
IsArchived
(boolean)
If the flight is archived
RateType
(integer)
Enum value for the Rate of the flight
FreqCap
(integer)
The value of the frequency cap
IsCompanion
(boolean)
If the all the ads in the flight must be served together
CanPassback
(boolean)
If the flight can pass back to the next flight in an adChain
CapType
(integer)
Enum value for the Cap of the flight
Price
(integer)
The Flight's price
IsActive
(boolean)
If the flight is Active and available to serve
FreqCapType
(integer)
The unit of time for frequency capping
CustomTargeting
(string)
A JSON custom targeting query
IsTrackingConversions
(boolean)
If the flight is set to track conversions
FreqCapDuration
(integer)
How often a frequency cap should occur
PassbackSortOrder
(integer)
The order of the flight in its priority's adChain
GoalType
(integer)
Enum value for the Goal type of the flight
DailyCapAmount
(integer)
When a cap is set, the max events allowed per day
Name
(string)
The name of the flight
LifetimeCapAmount
(integer)
When a cap is set, the max events allowed per the lifetime of the flight
AdvertiserId
(integer)
The advertiser the flight belongs to
Keywords
(string)
The keyword targeting set on the flight
EndDate
(string)
The end date for the flight. YYYY-MM-DD HH:MM:SS
AdIds
(array)
The IDs of the ads associated with the flight
Impressions
(integer)
The Goal Amount of the flight
CampaignId
(integer)
The campaign the flight belongs to
Language
Authorization
Header