Campaigns [DEPRECATED]

Service

/campaign

Method

GET

Parameters

NameTypeRequiredDescription
line_item_idintNIf this is set, the service will return the line items with corresponding campaigns.


Service

/campaign

Method

POST

Parameters


NameTypeRequiredDescription
namestringYThe name of the campaign.
statestringNDefault: active
start_datestringN

Default: null, corresponds to "immediately".
Example: 2014-08-21 01:30:00

end_datestringNDefault: null, corresponds to "immediately".
Example: 2014-08-31 22:30:00
run_indefinitelybooleanNDefault: false
if true, end_date is set to null
lifetime_budgetdoubleNThe lifetime budget in dollars (media cost). Null corresponds to "unlimited"
daily_budgetdoubleNThe daily budget in dollars (media cost). Null corresponds to "unlimited".
segment_targets[id]intNSegment Id
segment_targets[code]stringNCode
segment_targets[action]stringNinclude/exclude
cpm_bid_typestringNPossible values: "base", "average", "clearing", "predicted", "margin", or "none".
Default: base
base_biddoubleNRequired when cpm_bid_type is base.
min_biddoubleNSet a minimum bid that will apply to variable pricing models.
max_biddoubleNSet a maximum bid that will apply to variable pricing models.
bid_margindoubleNIf cpm_bid_type is margin, the bid_margin is set to 0.
Default: 0
cpc_goaldoubleNIf cpm_bid_type is base, this value is set to null.
pixels[id]intNPixel id
pixels[state]stringNActive, inactive
pixels[roi_click_goal]doubleNIf paying on a per-impression (CPM) basis and optimizing to a predicted CPA goal, set this field to the click goal.
pixels[roi_view_goal]doubleNIf paying on a per-impression (CPM) basis and optimizing to a predicted CPA goal, set this field to the view goal.
inventory_typestringNThe type of inventory targeted by this campaign. Possible values: "real_time", "direct", or "both". "Real-time"
Default: real_time
cadence_typestringNThe level at which the cadence modifier is applied. Possible values: "advertiser" or "creative".
Default: advertiser
enable_pacingbooleanN

If true, the campaign's daily budgeted spend is spread out evenly throughout each day. This is only applicable if daily_budget is set.

Default: true
daypart_targets[day]stringNThe day of the week. Possible values: "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", or "all". Note that these strings must be in lower case.
daypart_targets[start_hour]stringNThe start hour for the daypart. This must be an integer between 0 and 23. The campaign will start serving at the beginning of the hour (6 is equivalent to "6:00" am).
daypart_targets[end_hour]stringNThe end hour for the daypart. This must be an integer between 0 and 23. The campaign will stop serving at the end of the hour (23 is equivalent to "23:59").
zip_targets[from_zip]stringNFrom zip
zip_targets[to_zip]stringNTo zip
location_target_latitudeintNLatitude
location_target_longitudeintNLongitude
location_target_radiusintNLength in meters
max_lifetime_impsintNThe maximum number of impressions per person.
Default: null (unlimited)
max_day_impsintN

The maximum number of impressions per person per day.
Default: null (unlimited)

min_minutes_per_impintNThe minimum number of minutes between impressions per person.
Default: 0
content_category_targets[id]intNId
content_category_targets[action]stringNInclude or exclude
country_targets[country]stringNCountry
country_actionstringNInclude or exclude
region_targets[region]stringNRegion
region_actionstringNInclude or exclude
domain_list_targets[id]idNDomain List id
domain_list_actionstringNInclude or exclude
member_targets[id]intNMember id
member_targets[action]stringN

Include or exclude
Default: include

device_type_actionstringN

Include or exclude
Default: include

supply_type_targetsarrayNThe type(s) of supply to either include in or exclude from targeting, as defined by the supply_type_action field. Possible values: "web", "mobile_web", "mobile_app", "facebook_sidebar".
device_type_targetsarrayNThe types of devices to either include in or exclude from your targeting, as defined by the device_type_action field. Possible values: "phone", "tablet", "other devices".
supply_type_actionstringN

Include or exclude
Default: include

truststringNIndicates the level of audit which inventory must meet in order to be eligible. Possible values: "appnexus" or "seller". If this field is set to "appnexus", the allow_unaudited field must be set to false.
Default: seller
allow_unauditedbooleanNDefault: false or if trust is set to 'appnexus'
use_inventory_attribute_targetsbooleanNIf true, the profile restricts to inventory that has only the allowed attributes in "inventory_attribute_targets".
inventory_attribute_targets[id]intNThe IDs of inventory attributes to target for this profile.
position_targets[allow_unknown]booleanNDefault: false
position_targets[positions]arrayNposition: top
line_item_idintNSee Line Item Service


Service

/campaign

Method

PUT

Parameters

The same parameters as the POST method, except the id.

NameTypeRequiredDescription
idintYThe campaign Id.


Service

/campaign

Method

DELETE

Parameters

NameTypeRequiredDescription
 idintY The campaign Id.