Direct Campaign Workflow
1. Login
To log in - the general login API is used. Example - Login API
this step is for getting a Token to add to the request header for Authentication reasons.
2. Create Ad Source:
Request URL:
https://manage.aniview.com/api/adserver/adsource?format=json
Request Method:
POST
Headers:
{ Content-Type: application/json,
X-Bamboo-Token: "<your_Auth_Token>" }
body:
CTV denamd source, Without any targeting or budgeting.
{
"cpm": 0,
"playerSettings": {
"tagTimeout": null,
"optimizedTimeout": null,
"maxRPM": null,
"maxParallelBid": null
},
"description": null,
"flight": {
"isScheduled": false,
"startDate": 1723134222,
"endDate": 1723134222,
"pViewValue": {
"startDate": "2024-08-08T13:23:42.782Z",
"endDate": "2024-08-08T13:23:42.782Z"
}
},
"impressionCap": {
"frequency": 4,
"sum": 0,
"totalCompleted": 0,
"dailyCompleted": 0,
"monthlyCompleted": 0
},
"completionCap": {
"frequency": 4,
"sum": 0,
"totalCompleted": 0,
"dailyCompleted": 0,
"monthlyCompleted": 0,
"servingMode": 1
},
"revenueCap": {
"frequency": 4,
"sum": 0,
"totalCompleted": 0,
"dailyCompleted": 0,
"monthlyCompleted": 0,
"servingMode": 1
},
"supplyImpressionCap": {
"frequency": 4,
"sum": 0,
"totalCompleted": 0,
"dailyCompleted": 0,
"monthlyCompleted": 0,
"servingMode": 1
},
"supplyCompletionCap": {
"frequency": 4,
"sum": 0,
"totalCompleted": 0,
"dailyCompleted": 0,
"monthlyCompleted": 0,
"servingMode": 1
},
"supplyRevenueCap": {
"frequency": 4,
"sum": 0,
"totalCompleted": 0,
"dailyCompleted": 0,
"monthlyCompleted": 0,
"servingMode": 1
},
"supplyRequestsPerDay": {
"limit": 0,
"hasLimit": false
},
"frequencyCap": {
"sum": 0,
"frequency": 4,
"servingMode": 1
},
"supplyFrequencyCap": {
"sum": 0,
"frequency": 4,
"servingMode": 1,
"propagateToDemand": true
},
"cappings": {
"impression": {
"enabled": false,
"rules": [],
"totalCompleted": 0,
"dailyCompleted": 0
},
"completion": {
"enabled": false,
"rules": [],
"totalCompleted": 0,
"dailyCompleted": 0
},
"revenue": {
"enabled": false,
"rules": [],
"totalCompleted": 0,
"dailyCompleted": 0
},
"request": {
"enabled": false,
"rules": [],
"totalCompleted": 0,
"dailyCompleted": 0
},
"frequency": {
"enabled": false,
"rules": [],
"totalCompleted": 0
}
},
"optimizationSettings": {
"limit": 0,
"minFr": 0.5,
"timeFrame": 3,
"hasLimit": false
},
"name": "Streamr.ai test",
"provider": 999,
"requestsPerDay": {
"limit": 0,
"hasLimit": false,
"servingMode": 1
},
"servingMode": 1,
"source": {
"type": 9,
"url": "https://www.example.com",
"clickThroughUrl": null,
"mime": null,
"bidder": null,
"protocols": null,
"at": null,
"test": null,
"timeout": null,
"rtb": {},
"tmax": null,
"mimes": null,
"frameworks": null,
"placement": null,
"floorPriceType": 1,
"prioritizeFP": false,
"prioritizeConnFP": false,
"cookieSync": {
"provider": "#null#"
}
},
"status": 1,
"targeting": {
"bot": true,
"customTargeting": [],
"content": {},
"geography": {
"isCountryView": true,
"inclusion": true,
"excludeUnknownGeo": false,
"list": []
},
"geographyCoor": {
"inclusion": true,
"list": []
},
"geographyZip": {
"inclusion": true,
"list": []
},
"placement": {
"inclusion": true,
"excludeUnknown": false
},
"dow": null,
"adtxt": null,
"domain": {
"list": [],
"inclusion": true
},
"device": null,
"os": null,
"deviceType": null,
"tag": null,
"playerSize": null,
"targetPlatform": null,
"idfa": {},
"slot": null
},
"type": 1,
"accounting": {
"type": 1,
"value": 0.7
},
"ivt": {},
"publisherId": null,
"origin": null,
"platformLink": {
"environment": 1,
"platformID": null
},
"dTargeting": {},
"trackers": [],
"dTrackers": [],
"fts": {
"fta": []
},
"bo": {
"frFloorOpt": {}
},
"creativeType": 1,
"tpp": {
"provider": null,
"tppAsid": null,
"tppRecordId": null,
"tppChildNetwork": null
},
"ignoreNetworkConnectionFloorPrice": false,
"ignorePartnerConnectionFloorPrice": false,
"useAdvertiserTargeting": true,
"thirdPartyCost": {
"type": 0,
"subtractionType": 1,
"value": 70
},
"priceException": {
"type": 0,
"value": 70,
"cutModel": 1
},
"ownerType": 1
}
Response:
200 OK
Here you get the entire adsource object and the id in
_id
for other calls later.
{
"data": {
"id": null,
"_id": {
"$oid": "66b4c855efa3f0e54d032025"
},
"createdAt": 1723123797,
"updatedAt": 1723123797,
"iUpdatedAt": 1723123797,
"createdBy": "xxx@aniview.com",
"updatedBy": "xxx@aniview.com",
"status": 1,
"name": "Streamr.ai test",
"description": null,
"publisherId": "565c56d3181f46bd608b459a",
"restoreFrom": null,
"lastAuditTrailId": null,
"cpm": 0,
"useMappedValues": null,
"useMappedCPM": null,
"floorKey": null,
"averageCpm": null,
"cpr": null,
"optimizedCpmSync": null,
"fpOptimization": null,
"haCpm": null,
"flight": {
"isScheduled": false,
"startDate": 1723134222,
"endDate": 1723134222,
"pViewValue": {
"startDate": "2024-08-08T13:23:42.782Z",
"endDate": "2024-08-08T13:23:42.782Z"
}
},
"servingMode": 1,
"requestsPerDay": {
"limit": 0,
"hasLimit": false,
"servingMode": 1,
"frequency": null,
"totalSent": 0,
"lastDailyUpdate": 1723123798,
"lastDailyInit": 1723123798,
"advancedCappingRules": null
},
"optimizationSettings": {
"hasLimit": false,
"minFr": 0.5,
"limit": 0,
"timeFrame": 3,
"denyRatio": null
},
"impressionCap": {
"frequency": 4,
"servingMode": null,
"sum": 0,
"lastDailyUpdate": 1723123798,
"lastMonthlyUpdate": 1723123798,
"lastDailyInit": 1723123798,
"lastMonthlyInit": 1723123798,
"totalCompleted": 0,
"dailyCompleted": 0,
"monthlyCompleted": 0,
"advancedCappingRules": null,
"propagateToDemand": null
},
"completionCap": {
"sum": 0,
"frequency": 4,
"servingMode": 1,
"totalCompleted": 0,
"monthlyCompleted": 0,
"dailyCompleted": 0,
"advancedCappingRules": {
"conditions": [],
"conditionType": null
}
},
"revenueCap": {
"sum": 0,
"frequency": 4,
"servingMode": 1,
"totalCompleted": 0,
"monthlyCompleted": 0,
"dailyCompleted": 0,
"advancedCappingRules": {
"conditions": [],
"conditionType": null
}
},
"targeting": {
"domain": {
"inclusion": true,
"list": [],
"excludeEmptyDomain": false
},
"geography": {
"inclusion": true,
"list": [],
"isCountryView": true,
"excludeUnknownGeo": false
},
"geographyZip": {
"inclusion": true,
"list": [],
"isCountryView": false,
"excludeUnknownGeo": false
},
"geographyCoor": {
"inclusion": true,
"list": [],
"isCountryView": false,
"excludeUnknownGeo": false
},
"device": null,
"os": null,
"deviceType": null,
"tag": null,
"playerSize": null,
"targetPlatform": null,
"dow": null,
"adtxt": null,
"customRules": null,
"idfa": [],
"euConsent": null,
"ccpa": null,
"buyeruid": null,
"euConsentRtb": null,
"slot": null,
"placement": {
"inclusion": true,
"excludeUnknown": false
},
"customTargeting": null,
"bot": true,
"content": {
"excludeSensitive": null
}
},
"source": {
"type": 9,
"url": "https:\/\/www.example.com",
"clickThroughUrl": null,
"platform": null,
"platformId": null,
"mode": null,
"videos": null,
"environment": null,
"mimes": null,
"frameworks": null,
"bidder": null,
"protocols": null,
"at": null,
"test": null,
"tmax": null,
"protoVersion": null,
"placement": null,
"iapd": null,
"prebid": null,
"prebidServer": null,
"platformLink": null,
"rtb": {
"maxbitrate": null,
"instl": null,
"skip": null,
"dnt": null,
"pos": null,
"rtbGap": null,
"siteId": null,
"tagId": null,
"zoneId": null,
"accountId": null,
"sizeId": null,
"playbackMethod": null,
"provider": null,
"providerPubId": null,
"providerPubId2": null,
"cookieSyncId": null,
"tokens": null,
"groupId": null,
"custom": null,
"privateAuction": null,
"proxyRequest": null,
"deals": null,
"inventoryId": null,
"maxDuration": null,
"ext": null,
"publisher": null,
"rwdd": null
},
"plover": null,
"cookieSync": null,
"floorPriceType": 1,
"prioritizeFP": false,
"prioritizeConnFP": false,
"useAppSiteTitle": null,
"adomain": null,
"replace": null,
"addAVKV": null,
"gamParams": null
},
"provider": 999,
"advertiserId": null,
"ownerPublisherId": null,
"useAdvertiserTargeting": true,
"debug": null,
"accountingFeeId": null,
"type": 1,
"fr": null,
"playerSettings": {
"loop": null,
"optimizedTimeout": null,
"realACpm": null,
"fp": null,
"tagTimeout": null,
"maxRPM": null,
"gamMaxRPM": null,
"vpp": null,
"mips": null,
"mrqs": null,
"wsec": null,
"noSsl": null,
"vi": null,
"frvi": null,
"nc": null,
"sdk4": null,
"ops": null,
"impCountOn": null,
"vit": null,
"vibd": null,
"vitd": null,
"prvi": null,
"vpm": null,
"cycleFreq": null,
"timeSpan": null,
"completionRate": null,
"noCb": null,
"viewabilityThreshold": null,
"impwt": null,
"impwc": null,
"impwr": null,
"dealKV": null,
"dealVi": null,
"lidr": null,
"maxParallelBid": null,
"fply": null,
"pxsec": null,
"flidr": null,
"gl": null,
"skipMode": null,
"skipTimer": null,
"oPlcmt": null,
"oMute": null
},
"trackers": [],
"flags": null,
"ivt": {
"prebid": null,
"postbids": []
},
"environment": null,
"optData": null,
"dailyData": null,
"frequencyCap": {
"frequency": 4,
"servingMode": 1,
"sum": 0,
"lastDailyUpdate": null,
"lastMonthlyUpdate": null,
"lastDailyInit": null,
"lastMonthlyInit": null,
"totalCompleted": null,
"dailyCompleted": null,
"monthlyCompleted": null,
"advancedCappingRules": null,
"propagateToDemand": null
},
"tpp": {
"tppId": null,
"provider": null,
"sync": null,
"tppAsid": null,
"tppRecordId": "",
"lastSync": null,
"status": null,
"errorReason": null,
"tppChildNetwork": null,
"thirdPublisherId": null
},
"priceException": {
"type": 0,
"enabled": null,
"value": 70,
"max": null,
"cutModel": 1
},
"isOno": null,
"ownerType": 1,
"thirdPartyCost": {
"type": 0,
"enabled": null,
"value": 70,
"subtractionType": 1
},
"pm": null,
"bo": {
"s": null,
"h": null,
"l": null,
"sv": null,
"hv": null,
"lv": null,
"opd": null,
"frFloorOpt": {
"pad": null
}
},
"ignoreNetworkConnectionFloorPrice": false,
"ignoreFP": null,
"ignorePartnerConnectionFloorPrice": false,
"blockingAttributes": null,
"prp": null,
"fts": {
"fta": [],
"overOpt": null,
"en": null
},
"cur": null,
"sapr": null,
"cappings": {
"impression": {
"enabled": false,
"totalCompleted": 0,
"dailyCompleted": 0,
"rules": []
},
"completion": {
"enabled": false,
"totalCompleted": 0,
"dailyCompleted": 0,
"rules": []
},
"revenue": {
"enabled": false,
"totalCompleted": 0,
"dailyCompleted": 0,
"rules": []
},
"request": {
"enabled": false,
"totalCompleted": 0,
"dailyCompleted": 0,
"rules": []
},
"frequency": {
"enabled": false,
"rules": []
}
},
"creativeType": 1,
"originId": "66b4c855efa3f0e54d032025",
"operationType": 1,
"private": false
}
}
CTV denamd source with budgeting.
if you want to add budgeting it is in the “cappings” object:
AdSource API: for more information about the capping object you can see it here: Ad Source API | 3.3. Create Ad Source
body:
3. Edit Ad Source:
Request URL:
https://manage.aniview.com/api/adserver/adsource/66b49e7dcaf21a06fd0e17d7?format=json
Request Method:
PUT
Status Code:
200 OK
Headers:
AdSource API: if you want more information about the targeting object you can see it here: Ad Source API | 3.3. Create Ad Source
body:
4. Create Channel:
Request URL:
https://manage.aniview.com/api/adserver/adsource?format=json
Request Method:
POST
Headers:
body:
response:
200 OK
5. Associate Ad Source with Channel:
Request URL:
https://manage.aniview.com/api/adserver/channel/66b47928e5f3ab42e003c5b4?format=json
Request Method:
PUT
Headers:
body:
inside the adSources
object you will add the id you got from the create ad source response
Response:
200 OK
6. Pull VAST:
Use this template to get the VAST for testing.
In the AV_PUBLISHERID
query parameter you will your Aniview Account ID.
In the AV_CHANNELID
query parameter please put the channel id from the channel call response in step 4/5.
Template for web:
https://gov.aniview.com/api/adserver/vast3/?AV_PUBLISHERID={publisher_id}&AV_CHANNELID={channel_id}&AV_URL=[URL_MACRO]&cb=[TIMESTAMP_MACRO]&AV_WIDTH=[WIDTH_MACRO]&AV_HEIGHT=[HEIGHT_MACRO]&AV_CCPA=[CCPA_MACRO]&AV_GDPR=[GDPR_MACRO]&AV_CONSENT=[CONSENT_MACRO]&s2s=1Template for In-App:
https://gov.aniview.com/api/adserver/vast3/?AV_PUBLISHERID={publisher_id}&AV_CHANNELID={channel_id}&cb=[TIMESTAMP_MACRO]&AV_WIDTH=[WIDTH_MACRO]&AV_HEIGHT=[HEIGHT_MACRO]&AV_APPNAME=[APPNAME_MACRO]&AV_APPSTOREURL=[APPSTOREURL_MACRO]&AV_APPPKGNAME=[BUNDLE_ID_MACRO]&AV_IDFA=[IDFA_MACRO]&AV_LATITUDE=[LATITUDE_MACRO]&AV_LONGITUDE=[LONGITUDE_MACRO]&AV_CCPA=[CCPA_MACRO]&AV_GDPR=[GDPR_MACRO]&AV_CONSENT=[CONSENT_MACRO]&AV_CONTENT_URL=[CONTENT_URL]&AV_CONTENT_TITLE=[TITLE]&AV_CONTENT_EPISODE=[EPISODE]&AV_CONTENT_SERIES=[SERIES]&AV_CONTENT_SEASON=[SEASON]&AV_CONTENT_CAT=[CONTENT_CATEGORY]&AV_CONTENT_KEYWORDS=[KEYWORDS]&AV_CONTENT_NETWORK=[NETWORK]&AV_CONTENT_ID=[CONTENT_ID]&AV_CONTENT_CHANNEL=[CONTENT_CHANNEL]&AV_CONTENT_CONTEXT=[CONTENT_CONTEXT]&AV_CONTENT_GENRE=[GENRE]&AV_CONTENT_LENGTH=[LENGTH]&AV_CONTENT_LANGUAGE=[LANGUAGE]&AV_CONTENT_RATING=[RATING]&s2s=1Template for In-App server:
https://gov.aniview.com/api/adserver/vast3/?AV_PUBLISHERID={publisher_id}&AV_CHANNELID={channel_id}&cb=[TIMESTAMP_MACRO]&AV_WIDTH=[WIDTH_MACRO]&AV_HEIGHT=[HEIGHT_MACRO]&AV_APPNAME=[APPNAME_MACRO]&AV_APPSTOREURL=[APPSTOREURL_MACRO]&AV_APPPKGNAME=[BUNDLE_ID_MACRO]&AV_IDFA=[IDFA_MACRO]&AV_LATITUDE=[LATITUDE_MACRO]&AV_LONGITUDE=[LONGITUDE_MACRO]&AV_CCPA=[CCPA_MACRO]&AV_GDPR=[GDPR_MACRO]&AV_CONSENT=[CONSENT_MACRO]&AV_CONTENT_URL=[CONTENT_URL]&AV_CONTENT_TITLE=[TITLE]&AV_CONTENT_EPISODE=[EPISODE]&AV_CONTENT_SERIES=[SERIES]&AV_CONTENT_SEASON=[SEASON]&AV_CONTENT_CAT=[CONTENT_CATEGORY]&AV_CONTENT_KEYWORDS=[KEYWORDS]&AV_CONTENT_NETWORK=[NETWORK]&AV_CONTENT_ID=[CONTENT_ID]&AV_CONTENT_CHANNEL=[CONTENT_CHANNEL]&AV_CONTENT_CONTEXT=[CONTENT_CONTEXT]&AV_CONTENT_GENRE=[GENRE]&AV_CONTENT_LENGTH=[LENGTH]&AV_CONTENT_LANGUAGE=[LANGUAGE]&AV_CONTENT_RATING=[RATING]&s2s=1Template for ssai:
https://gov.aniview.com/api/adserver/vast3/?AV_PUBLISHERID={publisher_id}&AV_CHANNELID={channel_id}&cb=[TIMESTAMP_MACRO]&AV_WIDTH=[WIDTH_MACRO]&AV_HEIGHT=[HEIGHT_MACRO]&AV_APPNAME=[APPNAME_MACRO]&AV_APPSTOREURL=[APPSTOREURL_MACRO]&AV_APPPKGNAME=[BUNDLE_ID_MACRO]&AV_IDFA=[IDFA_MACRO]&AV_IFA_TYPE=[IFA_TYPE]&AV_LATITUDE=[LATITUDE_MACRO]&AV_LONGITUDE=[LONGITUDE_MACRO]&AV_CCPA=[CCPA_MACRO]&AV_GDPR=[GDPR_MACRO]&AV_CONSENT=[CONSENT_MACRO]&AV_CONTENT_URL=[CONTENT_URL]&AV_CONTENT_TITLE=[TITLE]&AV_CONTENT_EPISODE=[EPISODE]&AV_CONTENT_SERIES=[SERIES]&AV_CONTENT_SEASON=[SEASON]&AV_CONTENT_CAT=[CONTENT_CATEGORY]&AV_CONTENT_KEYWORDS=[KEYWORDS]&AV_CONTENT_NETWORK=[NETWORK]&AV_CONTENT_ID=[CONTENT_ID]&AV_CONTENT_CHANNEL=[CONTENT_CHANNEL]&AV_CONTENT_CONTEXT=[CONTENT_CONTEXT]&AV_CONTENT_GENRE=[GENRE]&AV_CONTENT_LENGTH=[LENGTH]&AV_CONTENT_LANGUAGE=[LANGUAGE]&AV_CONTENT_RATING=[RATING]&AV_UPAL=[NONCEID]&ssai=1
7. Generate a report for the Campaign :
Request URL:
startDate: Required - Linux date, UNIX Timestamp, of the start time of the report The following link can be used for the date conversion - https://www.epochconverter.com/
endDate: Required - Linux date, UNIX Timestamp, of the end time of the report
The following link can be used for the date conversion - https://www.epochconverter.com/tzo: Optional - Time zone offset in hours from UTC. Reports are generated in UTC timezone.
dimensions: list of dimensions separated with an encoded comma (“,”) - you can use an encoder like https://meyerweb.com/eric/tools/dencoder/
metrics: list of metrics separated with an encoded comma (“,”) - you can use an encoder like https://meyerweb.com/eric/tools/dencoder/
format: json
query: HTML encoded query filter - you can use an encoder like https://meyerweb.com/eric/tools/dencoder/
Sample query (before encoding): &query={"ncid":{"$in":[Vb9fea5181f46d4388b5555"]}}
In this sample, it filters the report to include data only from the specified network channel
Request Method:
GET
Headers:
Response:
200 OK
Use the link in
reportUrl
to download the csv report file.