Skip to end of metadata
Go to start of metadata

VAST Extension Template Service

This service provides a template to enter and save custom extensions from a VAST file. Extensions are custom XML snippets added to the VAST file. Video players must be specially programmed to recognize and handle the data provided. Since an extension must be added manually, and to avoid having to add the same extension multiple times, you can use this service and enter the template id.

In addition, custom and impbus macros are supported in the extension templates.

Once you have created an extension, you must then associate it with a creative.

Example Extension XML


REST API

View VAST Extension Templates:

Add a VAST extension template and custom macros :


JSON Fields

Field

Type (Length)

Description

Default

Required On

name

string (1000)

The name of the VAST extension.

 

POST

member_id

int

The member ID of the member associated with this VAST extension.

 

 

contentstringThe XML content to output when rendering the creative's VAST document. POST
created_ontimestampRead-only. The date and time the VAST extension template was created.  
last_activitytimestampRead-only. The date and time the template was last modified.  

macros

array of objects

The custom macros used in the content field. See Custom Macros below for more details. 

 

 

Custom Macros

You must define each custom macro used in the content field.

Field

Type (Length)

Description

Default

Required On

code

string (30)

The macro name exactly as it is used in the content field. For example, if #{BORDER_SIZE} is the macro in the content field, you would pass "BORDER_SIZE" here. 

 

POST

name

string (50)

The user-friendly name for this macro that traffickers will see when they add creatives that use this template via the UI. 

 

POST

type

enum

The type of value that traffickers will provide for this macro when they add creatives that use this template. Possible values: "true/false", "string", "url", "integer", "decimal", "string_list", "select_from_list" and "file".

For example, on the UI, if you set this to "true/false", traffickers will see the macro name followed by a check box.

 

POST

is_required

boolean

If true, traffickers will be required to provide a value for the macro when using this template.

 

POST

default_value

string

If is_required is false, this is the default value that will be used when traffickers do not provide a value for the macro when using this template.

 

POST, if is_required is false

other_data

string

The accepted values for the macro, if type is "string_list" or "select_from_list".

 

 

Examples

 Add a custom VAST extension and associate with a creative

Step 1: Add a custom VAST extension.

 

Step 2: Associate it with a creative

In the video_attribute object for the creative, assign the template id in the vast_extension_template_id field and ensure that you define the macros in the custom_macros object.

 Update a custom VAST extension