REST Resource: advertisers.campaigns

Stay organized with collections Save and categorize content based on your preferences.

Resource: Campaign

A single campaign.

JSON representation
{
  "name": string,
  "advertiserId": string,
  "campaignId": string,
  "displayName": string,
  "entityStatus": enum (EntityStatus),
  "updateTime": string,
  "campaignGoal": {
    object (CampaignGoal)
  },
  "campaignFlight": {
    object (CampaignFlight)
  },
  "frequencyCap": {
    object (FrequencyCap)
  },
  "campaignBudgets": [
    {
      object (CampaignBudget)
    }
  ]
}
Fields
name

string

Output only. The resource name of the campaign.

advertiserId

string (int64 format)

Output only. The unique ID of the advertiser the campaign belongs to.

campaignId

string (int64 format)

Output only. The unique ID of the campaign. Assigned by the system.

displayName

string

Required. The display name of the campaign.

Must be UTF-8 encoded with a maximum size of 240 bytes.

entityStatus

enum (EntityStatus)

Required. Controls whether or not the insertion orders under this campaign can spend their budgets and bid on inventory.

  • Accepted values are ENTITY_STATUS_ACTIVE, ENTITY_STATUS_ARCHIVED, and ENTITY_STATUS_PAUSED.
  • For campaigns.create method, ENTITY_STATUS_ARCHIVED is not allowed.
updateTime

string (Timestamp format)

Output only. The timestamp when the campaign was last updated. Assigned by the system.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

campaignGoal

object (CampaignGoal)

Required. The goal of the campaign.

campaignFlight

object (CampaignFlight)

Required. The planned spend and duration of the campaign.

frequencyCap

object (FrequencyCap)

Required. The frequency cap setting of the campaign.

campaignBudgets[]

object (CampaignBudget)

The list of budgets available to this campaign.

If this field is not set, the campaign uses an unlimited budget.

CampaignGoal

Settings that control the goal of a campaign.

JSON representation
{
  "campaignGoalType": enum (CampaignGoalType),
  "performanceGoal": {
    object (PerformanceGoal)
  }
}
Fields
campaignGoalType

enum (CampaignGoalType)

Required. The type of the campaign goal.

performanceGoal

object (PerformanceGoal)

Required. The performance goal of the campaign.

Acceptable values for performanceGoalType are:

  • PERFORMANCE_GOAL_TYPE_CPM
  • PERFORMANCE_GOAL_TYPE_CPC
  • PERFORMANCE_GOAL_TYPE_CPA
  • PERFORMANCE_GOAL_TYPE_CPIAVC
  • PERFORMANCE_GOAL_TYPE_CTR
  • PERFORMANCE_GOAL_TYPE_VIEWABILITY
  • PERFORMANCE_GOAL_TYPE_OTHER

CampaignGoalType

Possible types of campaign goals.

Enums
CAMPAIGN_GOAL_TYPE_UNSPECIFIED Goal value is not specified or unknown in this version.
CAMPAIGN_GOAL_TYPE_APP_INSTALL Drive app installs or engagements.
CAMPAIGN_GOAL_TYPE_BRAND_AWARENESS Raise awareness of a brand or product.
CAMPAIGN_GOAL_TYPE_OFFLINE_ACTION Drive offline or in-store sales.
CAMPAIGN_GOAL_TYPE_ONLINE_ACTION Drive online action or visits.

CampaignFlight

Settings that track the planned spend and duration of a campaign.

JSON representation
{
  "plannedSpendAmountMicros": string,
  "plannedDates": {
    object (DateRange)
  }
}
Fields
plannedSpendAmountMicros

string (int64 format)

The amount the campaign is expected to spend for its given plannedDates. This will not limit serving, but will be used for tracking spend in the DV360 UI.

The amount is in micros. Must be greater than or equal to 0. For example, 500000000 represents 500 standard units of the currency.

plannedDates

object (DateRange)

Required. The dates that the campaign is expected to run. They are resolved relative to the parent advertiser's time zone.

  • The dates specified here will not affect serving. They are used to generate alerts and warnings. For example, if the flight date of any child insertion order is outside the range of these dates, the user interface will show a warning.
  • startDate is required and must be the current date or later.
  • endDate is optional. If specified, it must be the startDate or later.
  • Any specified date must be before the year 2037.

CampaignBudget

Settings that control how the campaign budget is allocated.

JSON representation
{
  "budgetId": string,
  "displayName": string,
  "budgetUnit": enum (BudgetUnit),
  "budgetAmountMicros": string,
  "dateRange": {
    object (DateRange)
  },
  "externalBudgetSource": enum (ExternalBudgetSource),
  "externalBudgetId": string,
  "invoiceGroupingId": string,
  "prismaConfig": {
    object (PrismaConfig)
  }
}
Fields
budgetId

string (int64 format)

The unique ID of the campaign budget. Assigned by the system. Do not set for new budgets.

Must be included when updating or adding budgets to campaignBudgets. Otherwise, a new ID will be generated and assigned.

displayName

string

Required. The display name of the budget.

Must be UTF-8 encoded with a maximum size of 240 bytes.

budgetUnit

enum (BudgetUnit)

Required. Immutable. Specifies whether the budget is measured in currency or impressions.

budgetAmountMicros

string (int64 format)

Required. The total amount the linked insertion order segments can budget.

The amount is in micros. Must be greater than 0. For example, 500000000 represents 500 standard units of the currency.

dateRange

object (DateRange)

Required. The date range for the campaign budget. Linked budget segments may have a different date range. They are resolved relative to the parent advertiser's time zone.

Both startDate and endDate must be before the year 2037.

externalBudgetSource

enum (ExternalBudgetSource)

Required. The external source of the budget.

externalBudgetId

string

Immutable. The ID identifying this budget to the external source.

If this field is set and the invoice detail level of the corresponding billing profile is set to "Budget level PO", all impressions served against this budget will include this ID on the invoice.

Must be unique under the campaign.

invoiceGroupingId

string

Immutable. The ID used to group budgets to be included the same invoice.

If this field is set and the invoice level of the corresponding billing profile is set to "Budget invoice grouping ID", all externalBudgetId sharing the same invoiceGroupingId will be grouped in the same invoice.

prismaConfig

object (PrismaConfig)

Additional metadata for use by the Mediaocean Prisma tool.

Required for Mediaocean budgets.

Only applicable to prismaEnabled advertisers.

ExternalBudgetSource

External source for a campaign budget segment.

Enums
EXTERNAL_BUDGET_SOURCE_UNSPECIFIED External budget source value is not specified or unknown in this version.
EXTERNAL_BUDGET_SOURCE_NONE Budget has no external source.
EXTERNAL_BUDGET_SOURCE_MEDIA_OCEAN Budget source is Mediaocean.

PrismaConfig

Settings specific to the Mediaocean Prisma tool.

JSON representation
{
  "prismaType": enum (PrismaType),
  "prismaCpeCode": {
    object (PrismaCpeCode)
  },
  "supplier": string
}
Fields
prismaType

enum (PrismaType)

Required. The Prisma type.

prismaCpeCode

object (PrismaCpeCode)

Required. Relevant client, product, and estimate codes from the Mediaocean Prisma tool.

supplier

string

Required. The entity allocated this budget (DSP, site, etc.).

PrismaType

Possible types for a Prisma budget.

Enums
PRISMA_TYPE_UNSPECIFIED Type is not specified or unknown in this version.
PRISMA_TYPE_DISPLAY Display type.
PRISMA_TYPE_VIDEO Video type.
PRISMA_TYPE_AUDIO Audio type.
PRISMA_TYPE_SOCIAL Social type.
PRISMA_TYPE_FEE Fee type.

PrismaCpeCode

Google Payments Center supports searching and filtering on the component fields of this code.

JSON representation
{
  "prismaClientCode": string,
  "prismaProductCode": string,
  "prismaEstimateCode": string
}
Fields
prismaClientCode

string

The Prisma client code.

prismaProductCode

string

The Prisma product code.

prismaEstimateCode

string

The Prisma estimate code.

Methods

bulkListCampaignAssignedTargetingOptions

Lists assigned targeting options of a campaign across targeting types.

create

Creates a new campaign.

delete

Permanently deletes a campaign.

get

Gets a campaign.

list

Lists campaigns in an advertiser.

patch

Updates an existing campaign.