REST Resource: ads

PlacementAssignment

Placement Assignment.

JSON representation
{
  "placementId": string,
  "active": boolean,
  "sslRequired": boolean,
  "placementIdDimensionValue": {
    object (DimensionValue)
  }
}
Fields
placementId

string (int64 format)

ID of the placement to be assigned. This is a required field.

active

boolean

Whether this placement assignment is active. When true, the placement will be included in the ad's rotation.

sslRequired

boolean

Whether the placement to be assigned requires SSL. This is a read-only field that is auto-generated when the ad is inserted or updated.

placementIdDimensionValue

object (DimensionValue)

Dimension value for the ID of the placement. This is a read-only, auto-generated field.

Type

Enums
AD_SERVING_STANDARD_AD
AD_SERVING_DEFAULT_AD
AD_SERVING_CLICK_TRACKER
AD_SERVING_TRACKING
AD_SERVING_BRAND_SAFE_AD

DeliverySchedule

Delivery Schedule.

JSON representation
{
  "hardCutoff": boolean,
  "priority": enum (Priority),
  "impressionRatio": string,
  "frequencyCap": {
    object (FrequencyCap)
  }
}
Fields
hardCutoff

boolean

Whether or not hard cutoff is enabled. If true, the ad will not serve after the end date and time. Otherwise the ad will continue to be served until it has reached its delivery goals.

priority

enum (Priority)

Serving priority of an ad, with respect to other ads. The lower the priority number, the greater the priority with which it is served.

impressionRatio

string (int64 format)

Impression ratio for this ad. This ratio determines how often each ad is served relative to the others. For example, if ad A has an impression ratio of 1 and ad B has an impression ratio of 3, then Campaign Manager will serve ad B three times as often as ad A. Acceptable values are

1

to

10

, inclusive.

frequencyCap

object (FrequencyCap)

Limit on the number of times an individual user can be served the ad within a specified period of time.

Priority

Enums
AD_PRIORITY_01
AD_PRIORITY_02
AD_PRIORITY_03
AD_PRIORITY_04
AD_PRIORITY_05
AD_PRIORITY_06
AD_PRIORITY_07
AD_PRIORITY_08
AD_PRIORITY_09
AD_PRIORITY_10
AD_PRIORITY_11
AD_PRIORITY_12
AD_PRIORITY_13
AD_PRIORITY_14
AD_PRIORITY_15
AD_PRIORITY_16

FrequencyCap

Frequency Cap.

JSON representation
{
  "impressions": string,
  "duration": string
}
Fields
impressions

string (int64 format)

Number of times an individual user can be served the ad within the specified duration. Acceptable values are

1

to

15

, inclusive.

duration

string (int64 format)

Duration of time, in seconds, for this frequency cap. The maximum duration is 90 days. Acceptable values are

1

to

7776000

, inclusive.

CreativeRotation

Creative Rotation.

JSON representation
{
  "type": enum (Type),
  "weightCalculationStrategy": enum (WeightCalculationStrategy),
  "creativeOptimizationConfigurationId": string,
  "creativeAssignments": [
    {
      object (CreativeAssignment)
    }
  ]
}
Fields
type

enum (Type)

Type of creative rotation. Can be used to specify whether to use sequential or random rotation.

weightCalculationStrategy

enum (WeightCalculationStrategy)

Strategy for calculating weights. Used with

CREATIVE_ROTATION_TYPE_RANDOM

.

creativeOptimizationConfigurationId

string (int64 format)

Creative optimization configuration that is used by this ad. It should refer to one of the existing optimization configurations in the ad's campaign. If it is unset or set to 0, then the campaign's default optimization configuration will be used for this ad.

creativeAssignments[]

object (CreativeAssignment)

Creative assignments in this creative rotation.

Type

Enums
CREATIVE_ROTATION_TYPE_SEQUENTIAL
CREATIVE_ROTATION_TYPE_RANDOM

WeightCalculationStrategy

Enums
WEIGHT_STRATEGY_EQUAL
WEIGHT_STRATEGY_CUSTOM
WEIGHT_STRATEGY_HIGHEST_CTR
WEIGHT_STRATEGY_OPTIMIZED

CreativeAssignment

Creative Assignment.

JSON representation
{
  "creativeId": string,
  "active": boolean,
  "weight": integer,
  "startTime": string,
  "endTime": string,
  "sequence": integer,
  "clickThroughUrl": {
    object (ClickThroughUrl)
  },
  "creativeGroupAssignments": [
    {
      object (CreativeGroupAssignment)
    }
  ],
  "richMediaExitOverrides": [
    {
      object (RichMediaExitOverride)
    }
  ],
  "companionCreativeOverrides": [
    {
      object (CompanionClickThroughOverride)
    }
  ],
  "applyEventTags": boolean,
  "sslCompliant": boolean,
  "creativeIdDimensionValue": {
    object (DimensionValue)
  }
}
Fields
creativeId

string (int64 format)

ID of the creative to be assigned. This is a required field.

active

boolean

Whether this creative assignment is active. When true, the creative will be included in the ad's rotation.

weight

integer

Weight of the creative assignment, applicable when the rotation type is

CREATIVE_ROTATION_TYPE_RANDOM

. Value must be greater than or equal to

1

.

startTime

string

Date and time that the assigned creative should start serving.

endTime

string

Date and time that the assigned creative should stop serving. Must be later than the start time.

sequence

integer

Sequence number of the creative assignment, applicable when the rotation type is

CREATIVE_ROTATION_TYPE_SEQUENTIAL

. Acceptable values are

1

to

65535

, inclusive.

clickThroughUrl

object (ClickThroughUrl)

Click-through URL of the creative assignment.

creativeGroupAssignments[]

object (CreativeGroupAssignment)

Creative group assignments for this creative assignment. Only one assignment per creative group number is allowed for a maximum of two assignments.

richMediaExitOverrides[]

object (RichMediaExitOverride)

Rich media exit overrides for this creative assignment.

Applicable when the creative type is any of the following:

  • DISPLAY

  • RICH_MEDIA_INPAGE

  • RICH_MEDIA_INPAGE_FLOATING

  • RICH_MEDIA_IM_EXPAND

  • RICH_MEDIA_EXPANDING

  • RICH_MEDIA_INTERSTITIAL_FLOAT

  • RICH_MEDIA_MOBILE_IN_APP

  • RICH_MEDIA_MULTI_FLOATING

  • RICH_MEDIA_PEEL_DOWN

  • VPAID_LINEAR

  • VPAID_NON_LINEAR

companionCreativeOverrides[]

object (CompanionClickThroughOverride)

Companion creative overrides for this creative assignment. Applicable to video ads.

applyEventTags

boolean

Whether applicable event tags should fire when this creative assignment is rendered. If this value is unset when the ad is inserted or updated, it will default to true for all creative types EXCEPT for

INTERNAL_REDIRECT

,

INTERSTITIAL_INTERNAL_REDIRECT

, and

INSTREAM_VIDEO

.

sslCompliant

boolean

Whether the creative to be assigned is SSL-compliant. This is a read-only field that is auto-generated when the ad is inserted or updated.

creativeIdDimensionValue

object (DimensionValue)

Dimension value for the ID of the creative. This is a read-only, auto-generated field.

ClickThroughUrl

Click-through URL

JSON representation
{
  "defaultLandingPage": boolean,
  "landingPageId": string,
  "customClickThroughUrl": string,
  "computedClickThroughUrl": string
}
Fields
defaultLandingPage

boolean

Whether the campaign default landing page is used.

landingPageId

string (int64 format)

ID of the landing page for the click-through URL. Applicable if the

defaultLandingPage

field is set to false.

customClickThroughUrl

string

Custom click-through URL. Applicable if the

defaultLandingPage

field is set to false and the

landingPageId

field is left unset.

computedClickThroughUrl

string

Read-only convenience field representing the actual URL that will be used for this click-through. The URL is computed as follows:

  • If

    defaultLandingPage

    is enabled then the campaign's default landing page URL is assigned to this field.

  • If

    defaultLandingPage

    is not enabled and a

    landingPageId

    is specified then that landing page's URL is assigned to this field.

  • If neither of the above cases apply, then the

    customClickThroughUrl

    is assigned to this field.

CreativeGroupAssignment

Creative Group Assignment.

JSON representation
{
  "creativeGroupId": string,
  "creativeGroupNumber": enum (CreativeGroupNumber)
}
Fields
creativeGroupId

string (int64 format)

ID of the creative group to be assigned.

creativeGroupNumber

enum (CreativeGroupNumber)

Creative group number of the creative group assignment.

CreativeGroupNumber

Enums
CREATIVE_GROUP_ONE
CREATIVE_GROUP_TWO

RichMediaExitOverride

Rich Media Exit Override.

JSON representation
{
  "exitId": string,
  "enabled": boolean,
  "clickThroughUrl": {
    object (ClickThroughUrl)
  }
}
Fields
exitId

string (int64 format)

ID for the override to refer to a specific exit in the creative.

enabled

boolean

Whether to use the

clickThroughUrl

. If false, the creative-level exit will be used.

clickThroughUrl

object (ClickThroughUrl)

Click-through URL of this rich media exit override. Applicable if the

enabled

field is set to true.

CompanionClickThroughOverride

Companion Click-through override.

JSON representation
{
  "creativeId": string,
  "clickThroughUrl": {
    object (ClickThroughUrl)
  }
}
Fields
creativeId

string (int64 format)

ID of the creative for this companion click-through override.

clickThroughUrl

object (ClickThroughUrl)

Click-through URL of this companion click-through override.

Methods

get

Gets one ad by ID.

insert

Inserts a new ad.

list

Retrieves a list of ads, possibly filtered.

patch

Updates an existing ad.

update

Updates an existing ad.