REST Resource: networks.creativeTemplates

Resource: CreativeTemplate

A template that can be used to create a [TemplateCreative][].

JSON representation
{
  "name": string,
  "variables": [
    {
      object (CreativeTemplateVariable)
    }
  ],
  "displayName": string,
  "description": string,
  "snippet": string,
  "status": enum (CreativeTemplateStatus),
  "type": enum (CreativeTemplateType),
  "interstitial": boolean,
  "nativeEligible": boolean,
  "nativeVideoEligible": boolean,
  "safeFrameCompatible": boolean
}
Fields
name

string

Identifier. The resource name of the creative template. Format: networks/{networkCode}/creativeTemplates/{creative_template_id}

variables[]

object (CreativeTemplateVariable)

Required. The list of creative template variables.

displayName

string

Required. The display name of the creative template. This has a maximum length of 255 characters.

description

string

Optional. The description of the creative template.

snippet

string

Required. The code snippet of the creative template, with placeholders for the associated variables.

status

enum (CreativeTemplateStatus)

Output only. The status of the creative template. This attribute is assigned by Google.

type

enum (CreativeTemplateType)

Optional. The type of the creative template. Users can only create or update CreativeTemplateType.CUSTOM templates.

interstitial

boolean

Optional. True if this creative template produces out-of-page creatives. Creative templates with this setting enabled must include the viewed impression macro.

nativeEligible

boolean

Optional. True if this creative template produces native-eligible creatives.

nativeVideoEligible

boolean

Optional. True if this creative template produces native video-eligible creatives.

safeFrameCompatible

boolean

Optional. Whether the Creative produced is compatible for SafeFrame rendering. This attribute defaults to True.

CreativeTemplateStatus

Describes status of the creative template

Enums
CREATIVE_TEMPLATE_STATUS_UNSPECIFIED Default value. This value is unused.
ACTIVE The CreativeTemplate is active
DELETED The CreativeTemplate is deleted. Creatives created from this CreativeTemplate can no longer serve.
INACTIVE The CreativeTemplate is inactive. Users cannot create new creatives from this template, but existing ones can be edited and continue to serve

CreativeTemplateType

Describes type of the creative template.

Enums
CREATIVE_TEMPLATE_TYPE_UNSPECIFIED Default value. This value is unused.
STANDARD Creative templates that are included in Ad Manager by default.
CUSTOM Creative templates created by an administrator or other user in the network.

CreativeTemplateVariable

Represents a variable defined in a creative template.

JSON representation
{

  // Union field SubType can be only one of the following:
  "assetVariable": {
    object (AssetCreativeTemplateVariable)
  },
  "listStringVariable": {
    object (ListStringCreativeTemplateVariable)
  },
  "longVariable": {
    object (LongCreativeTemplateVariable)
  },
  "stringVariable": {
    object (StringCreativeTemplateVariable)
  },
  "urlVariable": {
    object (UrlCreativeTemplateVariable)
  }
  // End of list of possible types for union field SubType.
  "label": string,
  "uniqueDisplayName": string,
  "description": string,
  "required": boolean
}
Fields
Union field SubType. The specific type of variable represented by this CreativeTemplateVariable. Exactly one must be set. SubType can be only one of the following:
assetVariable

object (AssetCreativeTemplateVariable)

Optional. Represents a file asset variable defined in a creative template.

listStringVariable

object (ListStringCreativeTemplateVariable)

Optional. Represents a list variable defined in a creative template.

longVariable

object (LongCreativeTemplateVariable)

Optional. Represents a long variable defined in a creative template.

stringVariable

object (StringCreativeTemplateVariable)

Optional. Represents a string variable defined in a creative template.

urlVariable

object (UrlCreativeTemplateVariable)

Optional. Represents a url variable defined in a creative template.

label

string

Required. Label that is displayed to users when creating from the creative template. This has a maximum length of 127 characters.

uniqueDisplayName

string

Output only. Unique name used to identify the variable. This attribute is assigned by Google when a creative template variable is created.

description

string

Required. A descriptive help text that is displayed to users along with the label. This attribute has a maximum length of 255 characters.

required

boolean

Optional. True if this variable is required to be filled in by users when creating a creative from the creative template.

AssetCreativeTemplateVariable

Represents a file asset variable defined in a creative template.

Use [AssetCreativeTemplateVariableValue][] to specify the value for this variable when creating a [TemplateCreative][] from a CreativeTemplate.

JSON representation
{
  "mimeTypes": [
    enum (MimeType)
  ]
}
Fields
mimeTypes[]

enum (MimeType)

Optional. The set of allowed MIME types. If unspecified, all MIME types are allowed.

MimeType

Different MIME types that the asset variable supports.

Enums
MIME_TYPE_UNSPECIFIED Default value. This value is unused.
JPG The image/jpeg MIME type.
PNG The image/png MIME type.
GIF The image/gif MIME type.

ListStringCreativeTemplateVariable

Represents a list variable defined in a creative template. This is similar to StringCreativeTemplateVariable, except that there are possible choices to choose from.

Use [StringCreativeTemplateVariableValue][] to specify the value for this variable when creating a [TemplateCreative][] from a CreativeTemplate.

JSON representation
{
  "choices": [
    {
      object (VariableChoice)
    }
  ],
  "defaultValue": string,
  "sampleValue": string,
  "allowOtherChoice": boolean
}
Fields
choices[]

object (VariableChoice)

Optional. The selectable values that the user can choose from.

defaultValue

string

Optional. Default value to be filled in when creating creatives from the creative template.

sampleValue

string

Optional. Sample value that is used when previewing the template in the UI.

allowOtherChoice

boolean

Optional. True if a user can specify an 'other' value. For example, if a variable called backgroundColor is defined as a list with values: red, green, blue, this boolean can be set to allow a user to enter a value not on the list such as purple.

VariableChoice

Stores variable choices selectable by users.

JSON representation
{
  "label": string,
  "value": string
}
Fields
label

string

Required. A label is displayed to users when creating a [TemplateCreative][]. This attribute is intended to be more descriptive than value. This attribute has a maximum length of 255 characters.

value

string

Required. When creating a [TemplateCreative][], the value in [StringCreativeTemplateVariableValue][] should match this value, if you intend to select this value. This attribute has a maximum length of 255 characters.

LongCreativeTemplateVariable

Represents a long variable defined in a creative template.

Use [LongCreativeTemplateVariableValue][] to specify the value for this variable when creating [TemplateCreative][] from a CreativeTemplate.

JSON representation
{
  "defaultValue": string,
  "sampleValue": string
}
Fields
defaultValue

string (int64 format)

Optional. Default value to be filled in when creating creatives from the creative template.

sampleValue

string (int64 format)

Optional. Sample value that is used when previewing the template in the UI.

StringCreativeTemplateVariable

Represents a string variable defined in a creative template.

Use [StringCreativeTemplateVariableValue][] to specify the value for this variable when creating [TemplateCreative][] from a CreativeTemplate.

JSON representation
{
  "defaultValue": string,
  "sampleValue": string
}
Fields
defaultValue

string

Optional. Default value to be filled in when creating creatives from the creative template.

sampleValue

string

Optional. Sample value that is used when previewing the template in the UI.

UrlCreativeTemplateVariable

Represents a url variable defined in a creative template.

Use [UrlCreativeTemplateVariableValue][] to specify the value for this variable when creating a [TemplateCreative][] from a CreativeTemplate.

JSON representation
{
  "defaultValue": string,
  "sampleValue": string,
  "urlType": enum (CreativeTemplateVariableUrlType)
}
Fields
defaultValue

string

Optional. Default value to be filled in when creating creatives from the creative template.

sampleValue

string

Optional. Sample value that is used when previewing the template in the UI.

urlType

enum (CreativeTemplateVariableUrlType)

Optional. The type of URL that this variable represents. Different types of URLs may be handled differently at rendering time.

CreativeTemplateVariableUrlType

Types of URLs that a UrlCreativeTemplateVariable can represent.

Enums
CREATIVE_TEMPLATE_VARIABLE_URL_TYPE_UNSPECIFIED Default value. This value is unused.
CLICK_TRACKER Click tracking URL.
IMPRESSION_TRACKER Impression tracking URL.
STANDARD_HTTP Standard HTTP URL.

Methods

get

API to retrieve a CreativeTemplate object.

list

API to retrieve a list of CreativeTemplate objects.