The adEvents JSON array is made of AdEvent objects, and each AdEvent contains one or more Zone objects. The two tables below list every field for each.
AdEvent object fields
Each AdEvent represents one ad break. The eventId is required and should use the corresponding markerpoint macro so ads land at the intended markerpoint; a random eventId can cause ads to play at a random markerpoint. The adBreakIndex is the position label and must be one of preroll, midroll_1 through midroll_5, or postroll. The duration field sets the maximum total duration of ads (in milliseconds) for the break and can be a macro or a static value; if duration, maxAds, and maxDuration are all omitted, the break defaults to 60 seconds (60000 milliseconds). The zones field is a list of AdsWizz zones to request ads from, and when you list more than one zone they act as a waterfall, using the next zone only if the previous zone's ads did not satisfy the duration threshold.
| # | Field | Description |
|---|---|---|
| 1 | eventId (required) | This is the unique identifier for the AdEvent. To ensure ads are delivered to specific markerpoints within the episode, use the corresponding *MarkerpointId macro for this value. If this ID is a random value, the ad(s) may play at any random markerpoint in the episode. |
| 2 | adBreakIndex | The position label. Must be one of: preroll, midroll_1, midroll_2, midroll_3, midroll_4, midroll_5, or postroll. |
| 3 | duration | The maximum total duration (in milliseconds) of ads that can be returned for this ad break. This can be the *Duration macro or a static value. Note: If not provided, and maxAds and maxDuration are also not provided, the default value of 60 seconds (60000 milliseconds) is used. |
| 4 | zones | A list of AdsWizz zones to request ads from for this AdEvent. When multiple zones are specified, they are used as a waterfall: each zone is only used if the preceding zone’s ads did not satisfy the duration threshold. |
Zone object fields
Each Zone object identifies where to request ads for that break. The zoneAlias is required and names the zone alias to request from. The maxAds field caps the number of ads requested from the zone; if both maxAds and maxDuration are missing for a zone alias, maxAds defaults to 1. The maxDuration field caps the total ad duration (in milliseconds) from the zone and can be a macro or a static value; if maxDuration is larger than the top-level duration, the top-level duration takes precedence.
| # | Field | Description |
|---|---|---|
| 1 | zoneAlias (required) | The name of the zone alias to request ads from for this ad break event. |
| 2 | maxAds | The maximum number of ads to request from this zone. Note: If maxAds and maxDuration are both missing for a zone alias, then a default value of 1 will be used for maxAds for this zone alias. |
| 3 | maxDuration | The maximum total duration (in milliseconds) of ads that can be returned from this zone. This can be the *Duration macro or a static value. If maxDuration is larger than the top-level duration, then the top-level duration will take precedence over maxDuration. |
See also: Using AdsWizz Multi-Ad VAST with External Channels · How do I control how many ads are returned? · Which markerpoint and duration macros are supported?