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: https://aniviewwiki.atlassian.net/wiki/spaces/HELP/pages/2057699370/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: https://aniviewwiki.atlassian.net/wiki/spaces/HELP/pages/2057699370/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.

7. Generate a report for the Campaign :

Request URL:

https://manage.aniview.com/api/adserver/stats/report?format=json&asFile=false&async=true&reportFormat=json&reportJsonSave=true&utcTime=true&reportOrigin=false&id=null&returnReport=false&runAsAsync=false&s=1723122450903&generateOrigin=ui-summary&dimensions=&metrics=inventory,request,bid,impression,revenue,totalCost&query=%7B%7D&startDate=1723075200&endDate=1723161599&tzo=0&collection=false&igq=false&drm=false&cb=false&includeHeaders=true&selectedDb=false&type=1&schedulingType=today&schedulingDateRangeValue=null

  • 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.