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.
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.
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
EndDate query parameters in combination, which will only return flights that fall within both those ranges.
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
You should URL encode special characters when filtering with the
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- 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
Along with flight information, additional response parameters will be returned with this request, which are listed in the table below.
|The date/time the flight was last updated|
|An object of custom fields available for the flight and their values|
|The start date for the flight. YYYY-MM-DD HH:MM:SS|
|The Priority's ID|
|If the flight is set as deleted|
|The Flight's ID|
|If the flight is set to not serve more than once per ad request|
|If the flight is archived|
|Enum value for the Rate of the flight|
|The value of the frequency cap|
|If the all the ads in the flight must be served together|
|If the flight can pass back to the next flight in an adChain|
|Enum value for the Cap of the flight|
|The Flight's price|
|If the flight is Active and available to serve|
|The unit of time for frequency capping|
|A JSON custom targeting query|
|If the flight is set to track conversions|
|How often a frequency cap should occur|
|The order of the flight in its priority's adChain|
|Enum value for the Goal type of the flight|
|When a cap is set, the max events allowed per day|
|The name of the flight|
|When a cap is set, the max events allowed per the lifetime of the flight|
|The advertiser the flight belongs to|
|The keyword targeting set on the flight|
|The end date for the flight. YYYY-MM-DD HH:MM:SS|
|The IDs of the ads associated with the flight|
|The Goal Amount of the flight|
|The campaign the flight belongs to|