Caution: You are viewing documentation for the API's REST interface. Most of our official client libraries use gRPC. See the REST Introduction for details.

REST Resource: customers.assets

Resource: Asset

Asset is a part of an ad which can be shared across multiple ads. It can be an image (ImageAsset), a video (YoutubeVideoAsset), etc. Assets are immutable and cannot be removed. To stop an asset from serving, remove the asset from the entity that is using it.

JSON representation
{
  "resourceName": string,
  "type": enum (AssetType),
  "finalUrls": [
    string
  ],
  "finalMobileUrls": [
    string
  ],
  "urlCustomParameters": [
    {
      object (CustomParameter)
    }
  ],
  "policySummary": {
    object (AssetPolicySummary)
  },
  "id": string,
  "name": string,
  "trackingUrlTemplate": string,
  "finalUrlSuffix": string,

  // Union field asset_data can be only one of the following:
  "youtubeVideoAsset": {
    object (YoutubeVideoAsset)
  },
  "mediaBundleAsset": {
    object (MediaBundleAsset)
  },
  "imageAsset": {
    object (ImageAsset)
  },
  "textAsset": {
    object (TextAsset)
  },
  "leadFormAsset": {
    object (LeadFormAsset)
  },
  "bookOnGoogleAsset": {
    object (BookOnGoogleAsset)
  },
  "promotionAsset": {
    object (PromotionAsset)
  },
  "calloutAsset": {
    object (CalloutAsset)
  },
  "structuredSnippetAsset": {
    object (StructuredSnippetAsset)
  },
  "sitelinkAsset": {
    object (SitelinkAsset)
  }
  // End of list of possible types for union field asset_data.
}
Fields
resourceName

string

Immutable. The resource name of the asset. Asset resource names have the form:

customers/{customerId}/assets/{asset_id}

type

enum (AssetType)

Output only. Type of the asset.

finalUrls[]

string

A list of possible final URLs after all cross domain redirects.

finalMobileUrls[]

string

A list of possible final mobile URLs after all cross domain redirects.

urlCustomParameters[]

object (CustomParameter)

A list of mappings to be used for substituting URL custom parameter tags in the trackingUrlTemplate, finalUrls, and/or finalMobileUrls.

policySummary

object (AssetPolicySummary)

Output only. Policy information for the asset.

id

string (int64 format)

Output only. The ID of the asset.

name

string

Optional name of the asset.

trackingUrlTemplate

string

URL template for constructing a tracking URL.

finalUrlSuffix

string

URL template for appending params to landing page URLs served with parallel tracking.

Union field asset_data. The specific type of the asset. asset_data can be only one of the following:
youtubeVideoAsset

object (YoutubeVideoAsset)

Immutable. A YouTube video asset.

mediaBundleAsset

object (MediaBundleAsset)

Immutable. A media bundle asset.

imageAsset

object (ImageAsset)

Output only. An image asset.

textAsset

object (TextAsset)

Output only. A text asset.

leadFormAsset

object (LeadFormAsset)

A lead form asset.

bookOnGoogleAsset

object (BookOnGoogleAsset)

A book on google asset.

promotionAsset

object (PromotionAsset)

A promotion asset.

calloutAsset

object (CalloutAsset)

A callout asset.

structuredSnippetAsset

object (StructuredSnippetAsset)

A structured snippet asset.

AssetType

Enum describing possible types of asset.

Enums
UNSPECIFIED Not specified.
UNKNOWN Used for return value only. Represents value unknown in this version.
YOUTUBE_VIDEO YouTube video asset.
MEDIA_BUNDLE Media bundle asset.
IMAGE Image asset.
TEXT Text asset.
LEAD_FORM Lead form asset.
BOOK_ON_GOOGLE Book on Google asset.
PROMOTION Promotion asset.
CALLOUT Callout asset.
STRUCTURED_SNIPPET Structured Snippet asset.

AssetPolicySummary

Contains policy information for an asset.

JSON representation
{
  "policyTopicEntries": [
    {
      object (PolicyTopicEntry)
    }
  ],
  "reviewStatus": enum (PolicyReviewStatus),
  "approvalStatus": enum (PolicyApprovalStatus)
}
Fields
policyTopicEntries[]

object (PolicyTopicEntry)

Output only. The list of policy findings for this asset.

reviewStatus

enum (PolicyReviewStatus)

Output only. Where in the review process this asset is.

approvalStatus

enum (PolicyApprovalStatus)

Output only. The overall approval status of this asset, calculated based on the status of its individual policy topic entries.

YoutubeVideoAsset

A YouTube asset.

JSON representation
{
  "youtubeVideoTitle": string,
  "youtubeVideoId": string
}
Fields
youtubeVideoTitle

string

YouTube video title.

youtubeVideoId

string

YouTube video id. This is the 11 character string value used in the YouTube video URL.

MediaBundleAsset

A MediaBundle asset.

JSON representation
{
  "data": string
}
Fields
data

string (bytes format)

Media bundle (ZIP file) asset data. The format of the uploaded ZIP file depends on the ad field where it will be used. For more information on the format, see the documentation of the ad field where you plan on using the MediaBundleAsset. This field is mutate only.

A base64-encoded string.

ImageAsset

An Image asset.

JSON representation
{
  "mimeType": enum (MimeType),
  "fullSize": {
    object (ImageDimension)
  },
  "data": string,
  "fileSize": string
}
Fields
mimeType

enum (MimeType)

MIME type of the image asset.

fullSize

object (ImageDimension)

Metadata for this image at its original size.

data

string (bytes format)

The raw bytes data of an image. This field is mutate only.

A base64-encoded string.

fileSize

string (int64 format)

File size of the image asset in bytes.

ImageDimension

Metadata for an image at a certain size, either original or resized.

JSON representation
{
  "heightPixels": string,
  "widthPixels": string,
  "url": string
}
Fields
heightPixels

string (int64 format)

Height of the image.

widthPixels

string (int64 format)

Width of the image.

url

string

A URL that returns the image with this height and width.

TextAsset

A Text asset.

JSON representation
{
  "text": string
}
Fields
text

string

Text content of the text asset.

LeadFormAsset

A Lead Form asset.

JSON representation
{
  "businessName": string,
  "callToActionType": enum (LeadFormCallToActionType),
  "callToActionDescription": string,
  "headline": string,
  "description": string,
  "privacyPolicyUrl": string,
  "fields": [
    {
      object (LeadFormField)
    }
  ],
  "deliveryMethods": [
    {
      object (LeadFormDeliveryMethod)
    }
  ],
  "postSubmitCallToActionType": enum (LeadFormPostSubmitCallToActionType),
  "desiredIntent": enum (LeadFormDesiredIntent),
  "postSubmitHeadline": string,
  "postSubmitDescription": string,
  "backgroundImageAsset": string,
  "customDisclosure": string
}
Fields
businessName

string

Required. The name of the business being advertised.

callToActionType

enum (LeadFormCallToActionType)

Required. Pre-defined display text that encourages user to expand the form.

callToActionDescription

string

Required. Text giving a clear value proposition of what users expect once they expand the form.

headline

string

Required. Headline of the expanded form to describe what the form is asking for or facilitating.

description

string

Required. Detailed description of the expanded form to describe what the form is asking for or facilitating.

privacyPolicyUrl

string

Required. Link to a page describing the policy on how the collected data is handled by the advertiser/business.

fields[]

object (LeadFormField)

Ordered list of input fields.

deliveryMethods[]

object (LeadFormDeliveryMethod)

Configured methods for collected lead data to be delivered to advertiser. Only one method typed as WebhookDelivery can be configured.

postSubmitCallToActionType

enum (LeadFormPostSubmitCallToActionType)

Pre-defined display text that encourages user action after the form is submitted.

desiredIntent

enum (LeadFormDesiredIntent)

Desired intent for the lead form, e.g. more volume or more qualified.

postSubmitHeadline

string

Headline of text shown after form submission that describes how the advertiser will follow up with the user.

postSubmitDescription

string

Detailed description shown after form submission that describes how the advertiser will follow up with the user.

backgroundImageAsset

string

Asset resource name of the background image. The minimum size is 600x314 and the aspect ratio must be 1.91:1 (+-1%).

customDisclosure

string

Custom disclosure shown along with Google disclaimer on the lead form. Accessible to allowed customers only.

LeadFormCallToActionType

Enum describing the type of call-to-action phrases in a lead form.

Enums
UNSPECIFIED Not specified.
UNKNOWN Used for return value only. Represents value unknown in this version.
LEARN_MORE Learn more.
GET_QUOTE Get quote.
APPLY_NOW Apply now.
SIGN_UP Sign Up.
CONTACT_US Contact us.
SUBSCRIBE Subscribe.
DOWNLOAD Download.
BOOK_NOW Book now.
GET_OFFER Get offer.
REGISTER Register.
GET_INFO Get info.
REQUEST_DEMO Request a demo.
JOIN_NOW Join now.
GET_STARTED Get started.

LeadFormField

One input field instance within a form.

JSON representation
{
  "inputType": enum (LeadFormFieldUserInputType),
  "singleChoiceAnswers": {
    object (LeadFormSingleChoiceAnswers)
  }
}
Fields
inputType

enum (LeadFormFieldUserInputType)

Describes the input type, which may be a predefined type such as "full name" or a pre-vetted question like "Do you own a car?".

singleChoiceAnswers

object (LeadFormSingleChoiceAnswers)

Answer configuration for a single choice question. Can be set only for pre-vetted question fields. Minimum of 2 answers required and maximum of 12 allowed.

LeadFormFieldUserInputType

Enum describing the input type of a lead form field.

Enums
UNSPECIFIED Not specified.
UNKNOWN Used for return value only. Represents value unknown in this version.
FULL_NAME The user will be asked to fill in their given and family name. This field cannot be set at the same time as GIVEN_NAME or FAMILY_NAME.
GIVEN_NAME The user will be asked to fill in their given name (first name). This field can not be set at the same time as FULL_NAME.
FAMILY_NAME The user will be asked to fill in their family name (last name). This field can not be set at the same time as FULL_NAME.
EMAIL The user will be asked to fill in their email address.
PHONE_NUMBER The user will be asked to fill in their phone number.
POSTAL_CODE The user will be asked to fill in their zip code.
CITY The user will be asked to fill in their city.
REGION The user will be asked to fill in their region part of the address (e.g. state for US, province for Canada).
COUNTRY The user will be asked to fill in their country.
WORK_EMAIL The user will be asked to fill in their work email address.
COMPANY_NAME The user will be asked to fill in their company name.
WORK_PHONE The user will be asked to fill in their work phone.
JOB_TITLE The user will be asked to fill in their job title.
VEHICLE_MODEL Question: "Which model are you interested in?" Category: "Auto"
VEHICLE_TYPE Question: "Which type of vehicle are you interested in?" Category: "Auto"
PREFERRED_DEALERSHIP Question: "What is your preferred dealership?" Category: "Auto"
VEHICLE_PURCHASE_TIMELINE Question: "When do you plan on purchasing a vehicle?" Category: "Auto"
VEHICLE_OWNERSHIP Question: "Do you own a vehicle?" Category: "Auto"
VEHICLE_PAYMENT_TYPE Question: "What vehicle ownership option are you interested in?" Category: "Auto"
VEHICLE_CONDITION Question: "What type of vehicle condition are you interested in?" Category: "Auto"
COMPANY_SIZE Question: "What size is your company?" Category: "Business"
ANNUAL_SALES Question: "What is your annual sales volume?" Category: "Business"
YEARS_IN_BUSINESS Question: "How many years have you been in business?" Category: "Business"
JOB_DEPARTMENT Question: "What is your job department?" Category: "Business"
JOB_ROLE Question: "What is your job role?" Category: "Business"
EDUCATION_PROGRAM Question: "Which program are you interested in?" Category: "Education"
EDUCATION_COURSE Question: "Which course are you interested in?" Category: "Education"
PRODUCT Question: "Which product are you interested in?" Category: "General"
SERVICE Question: "Which service are you interested in?" Category: "General"
OFFER Question: "Which offer are you interested in?" Category: "General"
CATEGORY Question: "Which category are you interested in?" Category: "General"
PREFERRED_CONTACT_METHOD Question: "What is your preferred method of contact?" Category: "General"
PREFERRED_LOCATION Question: "What is your preferred location?" Category: "General"
PREFERRED_CONTACT_TIME Question: "What is the best time to contact you?" Category: "General"
PURCHASE_TIMELINE Question: "When are you looking to make a purchase?" Category: "General"
YEARS_OF_EXPERIENCE Question: "How many years of work experience do you have?" Category: "Jobs"
JOB_INDUSTRY Question: "What industry do you work in?" Category: "Jobs"
LEVEL_OF_EDUCATION Question: "What is your highest level of education?" Category: "Jobs"
PROPERTY_TYPE Question: "What type of property are you looking for?" Category: "Real Estate"
REALTOR_HELP_GOAL Question: "What do you need a realtor's help with?" Category: "Real Estate"
PROPERTY_COMMUNITY Question: "What neighborhood are you interested in?" Category: "Real Estate"
PRICE_RANGE Question: "What price range are you looking for?" Category: "Real Estate"
NUMBER_OF_BEDROOMS Question: "How many bedrooms are you looking for?" Category: "Real Estate"
FURNISHED_PROPERTY Question: "Are you looking for a fully furnished property?" Category: "Real Estate"
PETS_ALLOWED_PROPERTY Question: "Are you looking for properties that allow pets?" Category: "Real Estate"
NEXT_PLANNED_PURCHASE Question: "What is the next product you plan to purchase?" Category: "Retail"
EVENT_SIGNUP_INTEREST Question: "Would you like to sign up for an event?" Category: "Retail"
PREFERRED_SHOPPING_PLACES Question: "Where are you interested in shopping?" Category: "Retail"
FAVORITE_BRAND Question: "What is your favorite brand?" Category: "Retail"
TRANSPORTATION_COMMERCIAL_LICENSE_TYPE Question: "Which type of valid commercial license do you have?" Category: "Transportation"
EVENT_BOOKING_INTEREST Question: "Interested in booking an event?" Category: "Travel"
DESTINATION_COUNTRY Question: "What is your destination country?" Category: "Travel"
DESTINATION_CITY Question: "What is your destination city?" Category: "Travel"
DEPARTURE_COUNTRY Question: "What is your departure country?" Category: "Travel"
DEPARTURE_CITY Question: "What is your departure city?" Category: "Travel"
DEPARTURE_DATE Question: "What is your departure date?" Category: "Travel"
RETURN_DATE Question: "What is your return date?" Category: "Travel"
NUMBER_OF_TRAVELERS Question: "How many people are you traveling with?" Category: "Travel"
TRAVEL_BUDGET Question: "What is your travel budget?" Category: "Travel"
TRAVEL_ACCOMMODATION Question: "Where do you want to stay during your travel?" Category: "Travel"

LeadFormSingleChoiceAnswers

Defines possible answers for a single choice question, usually presented as a single-choice drop-down list.

JSON representation
{
  "answers": [
    string
  ]
}
Fields
answers[]

string

List of choices for a single question field. The order of entries defines UI order. Minimum of 2 answers required and maximum of 12 allowed.

LeadFormDeliveryMethod

A configuration of how leads are delivered to the advertiser.

JSON representation
{
  "webhook": {
    object (WebhookDelivery)
  }
}
Fields
webhook

object (WebhookDelivery)

Webhook method of delivery.

WebhookDelivery

Google notifies the advertiser of leads by making HTTP calls to an endpoint they specify. The requests contain JSON matching a schema that Google publishes as part of form ads documentation.

JSON representation
{
  "advertiserWebhookUrl": string,
  "googleSecret": string,
  "payloadSchemaVersion": string
}
Fields
advertiserWebhookUrl

string

Webhook url specified by advertiser to send the lead.

googleSecret

string

Anti-spoofing secret set by the advertiser as part of the webhook payload.

payloadSchemaVersion

string (int64 format)

The schema version that this delivery instance will use.

LeadFormPostSubmitCallToActionType

Enum describing the type of post-submit call-to-action phrases for a lead form.

Enums
UNSPECIFIED Not specified.
UNKNOWN Used for return value only. Represents value unknown in this version.
VISIT_SITE Visit site.
DOWNLOAD Download.
LEARN_MORE Learn more.
SHOP_NOW Shop now.

LeadFormDesiredIntent

Enum describing the desired level of intent of generated leads.

Enums
UNSPECIFIED Not specified.
UNKNOWN Used for return value only. Represents value unknown in this version.
LOW_INTENT Deliver more leads at a potentially lower quality.
HIGH_INTENT Deliver leads that are more qualified.

BookOnGoogleAsset

A Book on Google asset. Used to redirect user to book through Google. Book on Google will change the redirect url to book directly through Google.

PromotionAsset

A Promotion asset.

JSON representation
{
  "promotionTarget": string,
  "discountModifier": enum (PromotionExtensionDiscountModifier),
  "redemptionStartDate": string,
  "redemptionEndDate": string,
  "occasion": enum (PromotionExtensionOccasion),
  "languageCode": string,
  "startDate": string,
  "endDate": string,
  "adScheduleTargets": [
    {
      object (AdScheduleInfo)
    }
  ],

  // Union field discount_type can be only one of the following:
  "percentOff": string,
  "moneyAmountOff": {
    object (Money)
  }
  // End of list of possible types for union field discount_type.

  // Union field promotion_trigger can be only one of the following:
  "promotionCode": string,
  "ordersOverAmount": {
    object (Money)
  }
  // End of list of possible types for union field promotion_trigger.
}
Fields
promotionTarget

string

Required. A freeform description of what the promotion is targeting.

discountModifier

enum (PromotionExtensionDiscountModifier)

A modifier for qualification of the discount.

redemptionStartDate

string

Start date of when the promotion is eligible to be redeemed, in yyyy-MM-dd format.

redemptionEndDate

string

Last date of when the promotion is eligible to be redeemed, in yyyy-MM-dd format.

occasion

enum (PromotionExtensionOccasion)

The occasion the promotion was intended for. If an occasion is set, the redemption window will need to fall within the date range associated with the occasion.

languageCode

string

The language of the promotion. Represented as BCP 47 language tag.

startDate

string

Start date of when this asset is effective and can begin serving, in yyyy-MM-dd format.

endDate

string

Last date of when this asset is effective and still serving, in yyyy-MM-dd format.

adScheduleTargets[]

object (AdScheduleInfo)

List of non-overlapping schedules specifying all time intervals for which the asset may serve. There can be a maximum of 6 schedules per day, 42 in total.

Union field discount_type. Discount type, can be percentage off or amount off. discount_type can be only one of the following:
percentOff

string (int64 format)

Percentage off discount in the promotion. 1,000,000 = 100%. Either this or moneyAmountOff is required.

moneyAmountOff

object (Money)

Money amount off for discount in the promotion. Either this or percentOff is required.

Union field promotion_trigger. Promotion trigger. Can be by promotion code or promo by eligible order amount. promotion_trigger can be only one of the following:
promotionCode

string

A code the user should use in order to be eligible for the promotion.

ordersOverAmount

object (Money)

The amount the total order needs to be for the user to be eligible for the promotion.

CalloutAsset

A Callout asset.

JSON representation
{
  "calloutText": string,
  "startDate": string,
  "endDate": string,
  "adScheduleTargets": [
    {
      object (AdScheduleInfo)
    }
  ]
}
Fields
calloutText

string

Required. The callout text. The length of this string should be between 1 and 25, inclusive.

startDate

string

Start date of when this asset is effective and can begin serving, in yyyy-MM-dd format.

endDate

string

Last date of when this asset is effective and still serving, in yyyy-MM-dd format.

adScheduleTargets[]

object (AdScheduleInfo)

List of non-overlapping schedules specifying all time intervals for which the asset may serve. There can be a maximum of 6 schedules per day, 42 in total.

StructuredSnippetAsset

A Structured Snippet asset.

JSON representation
{
  "header": string,
  "values": [
    string
  ]
}
Fields
header

string

Required. The header of the snippet. This string should be one of the predefined values at https://developers.google.com/google-ads/api/reference/data/structured-snippet-headers

values[]

string

Required. The values in the snippet. The size of this collection should be between 3 and 10, inclusive. The length of each value should be between 1 and 25 characters, inclusive.

SitelinkAsset

A Sitelink asset.

JSON representation
{
  "linkText": string,
  "description1": string,
  "description2": string,
  "startDate": string,
  "endDate": string,
  "adScheduleTargets": [
    {
      object (AdScheduleInfo)
    }
  ]
}
Fields
description1

string

First line of the description for the sitelink. If set, the length should be between 1 and 35, inclusive, and description2 must also be set.

description2

string

Second line of the description for the sitelink. If set, the length should be between 1 and 35, inclusive, and description1 must also be set.

startDate

string

Start date of when this asset is effective and can begin serving, in yyyy-MM-dd format.

endDate

string

Last date of when this asset is effective and still serving, in yyyy-MM-dd format.

adScheduleTargets[]

object (AdScheduleInfo)

List of non-overlapping schedules specifying all time intervals for which the asset may serve. There can be a maximum of 6 schedules per day, 42 in total.

Methods

get

Returns the requested asset in full detail.

mutate

Creates assets.