/
Campaigns [DEPRECATED]
Campaigns [DEPRECATED]
Service
/campaign
Method
GET
Parameters
Name | Type | Required | Description |
---|---|---|---|
line_item_id | int | N | If this is set, the service will return the line items with corresponding campaigns. |
Service
/campaign
Method
POST
Parameters
Name | Type | Required | Description |
---|---|---|---|
name | string | Y | The name of the campaign. |
state | string | N | Default: active |
start_date | string | N | Default: null, corresponds to "immediately". |
end_date | string | N | Default: null, corresponds to "immediately". Example: 2014-08-31 22:30:00 |
run_indefinitely | boolean | N | Default: false if true, end_date is set to null |
lifetime_budget | double | N | The lifetime budget in dollars (media cost). Null corresponds to "unlimited" |
daily_budget | double | N | The daily budget in dollars (media cost). Null corresponds to "unlimited". |
segment_targets[id] | int | N | Segment Id |
segment_targets[code] | string | N | Code |
segment_targets[action] | string | N | include/exclude |
cpm_bid_type | string | N | Possible values: "base", "average", "clearing", "predicted", "margin", or "none". Default: base |
base_bid | double | N | Required when cpm_bid_type is base. |
min_bid | double | N | Set a minimum bid that will apply to variable pricing models. |
max_bid | double | N | Set a maximum bid that will apply to variable pricing models. |
bid_margin | double | N | If cpm_bid_type is margin, the bid_margin is set to 0. Default: 0 |
cpc_goal | double | N | If cpm_bid_type is base, this value is set to null. |
pixels[id] | int | N | Pixel id |
pixels[state] | string | N | Active, inactive |
pixels[roi_click_goal] | double | N | If 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] | double | N | If paying on a per-impression (CPM) basis and optimizing to a predicted CPA goal, set this field to the view goal. |
inventory_type | string | N | The type of inventory targeted by this campaign. Possible values: "real_time", "direct", or "both". "Real-time" Default: real_time |
cadence_type | string | N | The level at which the cadence modifier is applied. Possible values: "advertiser" or "creative". Default: advertiser |
enable_pacing | boolean | N | 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] | string | N | The 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] | string | N | The 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] | string | N | The 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] | string | N | From zip |
zip_targets[to_zip] | string | N | To zip |
location_target_latitude | int | N | Latitude |
location_target_longitude | int | N | Longitude |
location_target_radius | int | N | Length in meters |
max_lifetime_imps | int | N | The maximum number of impressions per person. Default: null (unlimited) |
max_day_imps | int | N | The maximum number of impressions per person per day. |
min_minutes_per_imp | int | N | The minimum number of minutes between impressions per person. Default: 0 |
content_category_targets[id] | int | N | Id |
content_category_targets[action] | string | N | Include or exclude |
country_targets[country] | string | N | Country |
country_action | string | N | Include or exclude |
region_targets[region] | string | N | Region |
region_action | string | N | Include or exclude |
domain_list_targets[id] | id | N | Domain List id |
domain_list_action | string | N | Include or exclude |
member_targets[id] | int | N | Member id |
member_targets[action] | string | N | Include or exclude |
device_type_action | string | N | Include or exclude |
supply_type_targets | array | N | The 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_targets | array | N | The 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_action | string | N | Include or exclude |
trust | string | N | Indicates 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_unaudited | boolean | N | Default: false or if trust is set to 'appnexus' |
use_inventory_attribute_targets | boolean | N | If true, the profile restricts to inventory that has only the allowed attributes in "inventory_attribute_targets". |
inventory_attribute_targets[id] | int | N | The IDs of inventory attributes to target for this profile. |
position_targets[allow_unknown] | boolean | N | Default: false |
position_targets[positions] | array | N | position: top |
line_item_id | int | N | See Line Item Service |
Service
/campaign
Method
PUT
Parameters
The same parameters as the POST method, except the id.
Name | Type | Required | Description |
---|---|---|---|
id | int | Y | The campaign Id. |
Service
/campaign
Method
DELETE
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | int | Y | The campaign Id. |