/api/campaign/v5 endpoint. A successful call to this API will return a list of currently active Campaigns. The response contains data that can then be used to generate VAST URLs that can in turn be used by the video player in order to display ads to the end user.
/api/campaign/v5
Below is an example of a proper request for fetching all active campaigns of types inStreamVideo and inVideoOverlay for an Organization with a contentType of VOD:
/api/campaign/v5?action=getActiveCampaigns&organizationId=:org&contentType=1&campaignType=inStreamVideo,inVideoOverlay
After you have fetched the list of active Campaigns using the
API, you need to configure the player to display the ads. How this is
done of course depends on the player being used. This document will give
an example using Radiant Media Player, but be aware that other players most likely initiate ads differently.
Once you have received a list of campaigns from the API, you will need to generate a VAST URL for the advert.
How a VAST URL is configured differs slightly depending on whether you are generating a VAST URL to be used in a LIVE player or a VOD player:
/api/vast?type=vod&campaignIds=<COMMA SEPARETED LIST OF
CAMPAIGN IDS>&assetId=<ID OF THE SUITE ASSET BEING
WATCHED>&organizationId=<SUITE ORGANIZATION
ID>&applicationId=1&applicationTypeId=1&deviceId=<DEVICE
ID GENERATED FOR ANALYTICS>
/api/vast?type=live&campaignIds=<COMMA SEPARATED LIST OF
CAMPAIGN IDS>&channelId=<ID OF THE SUITE CHANNEL BEING
WATCHED>&organizationId=<SUITE ORGANIZATION
ID>&adProfileType=<AD PROFILE TYPE>&deviceId=<DEVICE
ID GENERATED FOR ANALYTICS>
This document will focus on campaigns of type inStreamVideo and inVideoOverlay, as those are the types of Campaigns that are intended for web use.
Campaigns of type inStreamVideo are video ads that can include either preroll (0), midroll (2) or postroll (3) ad profiles.
These campaigns include an adProfile object, such as this:
From the adProfile object, you can see the type of the ad profile.
How you set them up in the player depends on the type of the ad profile:
displayInterval value inside the adProfile object. This value tells you that the midroll ad should be displayed every X seconds where X is the value of displayInterval. This needs to be configured on the player, how this is done depends on the player being used.displayInterval valuePOSTROLL ADS SHOULD ONLY BE USED WITH VOD CONTENT
In this example we will make the following assumptions: Suite organization ID is 2631609, ID of the asset being watched is 54321, and the generated device ID for analytics is this-is-just-an-example.
Say you have the following response from the Campaign API:
The above response contains three different ad types: preroll, midroll and postroll.
First generate the VAST URLs for each campaign returned:
First campaign:
Make sure to note that the profileType of the adProfile of this Campaign is 0, which means that it is a preroll ad
VAST URL for this campaign will look like this when we assume that the Suite Organization ID is 2631609 and the Suite asset ID is 54321:
https://api.icareus.com/api/vast?type=vod&campaignIds=7154601&assetId=54321&organizationId=2631609&applicationId=1&applicationTypeId=1&deviceId=this-is-just-an-example
Second campaign
Make sure to note that the profileType of the adProfile of this Campaign is 2, which means that it is a midroll ad.
Also make sure to note that the displayInterval of this adProfile is 60 (seconds).
VAST URL for this campaign will look like this when we assume that the Suite Organization ID is 2631609 and the Suite asset ID is 54321:
https://api.icareus.com/api/vast?type=vod&campaignIds=10796301&assetId=54321&organizationId=2631609&applicationId=1&applicationTypeId=1&deviceId=this-is-just-an-example
Third campaign
Make sure to note that the profileType of the adProfile of this Campaign is 3, which means that it is a postroll ad.
VAST URL for this campaign will look like this when we assume that the Suite Organization ID is 2631609 and the Suite asset ID is 54321:
https://api.icareus.com/api/vast?type=vod&campaignIds=10796301&assetId=54321&organizationId=2631609&applicationId=1&applicationTypeId=1&deviceId=this-is-just-an-example
Once you have generated the VAST URL for all the campaigns for which one needs to be generated, it is time to configure the AD SCHEDULE for Radiant Media Player.
Documentation for ad scheduling for Radiant Media Player can be found here: https://www.radiantmediaplayer.com/docs/latest/custom-ad-scheduling.html
You now have 3 different VAST URLS generated:
Campaigns of type inVideoOverlay contain overlay ad profiles, meaning ads that display an image banner instead of video ads.
These campaigns only include an adProfileId:
Generate a VAST URL using the adProfileId and set up the ad in the player as a preroll ad