List Flights

Why List Flights?

The List Flights endpoint enables you to call the Flights endpoint and return an array of existing flights in the campaign.

The filter attribute specifies the set of flights that will be returned by selecting them based on the state of the IsArchived and IsActive properties.

Caution

Specifying both filter and either isActive or isArchived generates an error.

filter
value
Includes flights where IsActive is Includes flights where IsArchived is Comments
not-archived Any value false or null The default - omitting the filter attribute is equivalent to specifying this value.
archived Any value true
active true false or null
inactive false false or null

API Syntax

When using the List Flights API, 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

Where:

filter

string

enum

Limit the set of returned flights. Omission is equivalent to not-archived. See below.

Allowed:

not-archived``archived``active``inactive

200 200

json

ShellJavaScriptRuby

curl -X GET \
     -H "X-Adzerk-ApiKey:$ADZERK_API_KEY" \
     "https://api.kevel.co/v1/flight"

List Archived only

curl -X GET \
     -H "X-Adzerk-ApiKey:$ADZERK_API_KEY" \
     "https://api.kevel.co/v1/flight?isArchived=true"
{
    "page":1,
    "items":[
        {
            "Id":12345,
            "Price":1.000,
            "Impressions":100,
            "IsNoDuplicates":true,
            "Keywords":"",
            "Name":"My Flight is Best Flight",
            "IsCompanion":false,
            "CampaignId":1234,
            "PriorityId":1234,
            "IsDeleted":false,
            "IsActive":true,
            "CustomTargeting":"",
            "GoalType":2,
            "RateType":1,
            "IsSunday":true,
            "IsMonday":true,
            "IsTuesday":true,
            "IsWednesday":true,
            "IsThursday":true,
            "IsFriday":true,
            "IsSaturday":true,
            "FreqCap":0,
            "FreqCapDuration":0,
            "FreqCapType":0,
            "DontAffectParentFreqCap": true,
            "DeliveryStatus":1,
            "IsArchived":null,
            "CanPassback":true,
            "PassbackSortOrder":1,
            "StartDateISO":"2017-05-29T15:41:00.0000000",
            "Created": "2022-03-08T12:34:56.123Z",
            "LastModified": "2022-03-08T12:34:56.123Z",
            "Version": 1
        }
    ]
}