ADNUNTIUS
  • Adnuntius Documentation
  • Adnuntius Advertising
    • Overview
    • Getting Started
      • Ad Server for Agencies
      • Ad Server for Publishers
    • User Interface Guide
      • Dashboards
      • Advertising
        • Advertisers
        • Orders
        • Line Items
        • Line Item Templates
        • Creatives
        • Library Creatives
        • Targeting
        • Booking Calendar
        • Reach Analysis
        • Smoothing
      • Inventory
        • Sites
        • Adunits
        • External Ad Units
        • Site Rulesets
        • Blocklists
        • Site Groups
        • Earnings Accounts
        • Ad Tag Generator
      • Reports and Statistics
        • The Statistics Defined
        • The 4 Impression Types
        • Templates and Schedules
        • Report Translations
      • Queries
        • Advertising Queries
        • Publishing Queries
      • Users
        • Users
        • Teams
        • Roles
        • Notification Preferences
        • User Profile
      • Design
        • Layouts and Examples
        • Marketplace Products
        • Products
        • Coupons
      • Admin
        • API Keys
        • CDN Uploads
        • Custom Events
        • Reference Data
        • Email Translations
        • Context Services
        • External Demand Sources
        • Data Exports
        • Tiers
        • Network
    • API Documentation
      • API Requests
      • Targeting object
      • API Filters
      • Endpoints
        • /adunits
        • /adunittags
        • /advertisers
        • /article2
        • /creativesets
        • /assets
        • /authenticate
        • /contextserviceconnections
        • /coupons
        • /creatives
        • /customeventtypes
        • /deliveryestimates
        • /devices
        • /earningsaccounts
        • /librarycreatives
        • /lineitems
        • /location
        • /orders
        • /reachestimate
        • /roles
        • /segments
        • /segments/upload
        • /segments/users/upload
        • /sitegroups
        • /sites
        • /sspconnections
        • /stats
        • /teams
        • /tiers
        • /users
    • Requesting Ads
      • Javascript
        • Requesting an Ad
        • Layout Support
        • Utility Methods
        • Logging Options
        • Prebid
      • HTTP
      • Cookieless Advertising
      • VAST
      • Open RTB
      • Recording Conversions
      • Prebid Server
      • Prebid
      • Android SDK
      • IOS SDK
    • Creative Guide
      • HTML5 Creatives
    • Page
  • Adnuntius Marketplace
    • Overview
    • Getting Started
      • For Network Owners
      • For Media Buyers
        • Marketplace Advertising
          • Advertisers
          • Orders
          • Line Items
          • Line Item Templates
          • Placements (in progress)
          • Creatives
            • High Impact Formats
          • Library Creatives
          • Booking Calendar
          • Reach Analysis
          • Targeting
          • Smoothing
      • For Publishers
        • Marketplace Inventory
          • Sites
          • Adunits
          • Site Groups
          • Rulesets (in progress)
          • Blocklists
          • Ad Tag Generator
        • Design
          • Layouts
          • Marketplace Products
  • Adnuntius Self-Service
    • Overview
    • Getting Started
    • User Interface Guide
    • Marketing Tips (Work in Progress)
  • Adnuntius Data
    • Overview
    • Getting Started
    • User Interface Guide
      • Segmentation
        • Triggers
        • Segments
        • Folders
      • Fields
        • Fields
        • Mappings
      • Queries
      • Admin
        • Users, Teams and Roles
        • Data Exports
        • Network
    • API documentation
      • Javascript API
        • User Profile Updates
        • Page View
        • User Synchronisation
        • Get user segments
      • HTTP API
        • /page
        • /visitor
        • /sync
        • /segment
      • Profile Fields
    • Segment Sharing
  • Adnuntius Connect
    • Integration Guide (Work in Progress)
      • Prebid - Google ad manager
      • Privacy GTM integration
      • Consents API
      • TCF API
    • UI Guide (Work in Progress)
      • Containers and Dashboards
      • Privacy (updates in progress)
      • Variables, Triggers and Tags
      • Integrations (in progress)
      • Prebid Configuration
      • Publish
  • Adnuntius Email Advertising
    • Getting Started
  • Other Useful Information
    • Macros for click tracker
    • Setup Adnuntius via prebid in GAM
    • Identification and Privacy
      • User Identification
      • Permission to use Personal Data (TCF2)
      • Data Collection and Usage
      • Am I Being Tracked?
    • Header bidding implementation
    • Adnuntius Slider
    • Whitelabeling
    • Firewall Access
    • Ad Server Logs
    • Send segments Cxense
    • Setup deals in GAM
    • Render Key Values in ad
    • Parallax for Ad server Clients
  • Troubleshooting
    • FAQs
    • How do I contact support?
    • Adnuntius System Status
  • Adnuntius High Impact
    • Publisher onboarding
    • High Impact configuration
    • Guidelines for High impact creatives
Powered by GitBook
On this page
  • Usage
  • GET Requests
  • Post Requests
  • Examples
  • GET request
  • POST request
  • Targeting Parameters
  1. Adnuntius Advertising
  2. Requesting Ads

HTTP

We provide an HTTP API for requesting ads from our delivery server. This API may be used, for example, to enable server-side fetching of ads.

Usage

GET Requests

GET https://delivery.adnuntius.com/i{{params}}
Parameter
Required?
Example value(s)
Default Value
Description

auId

Yes, unless making a POST request (see below)

ab123456789 (string)

None

The Tag ID for the Ad Unit to fetch ads from

tzo

No

-120 (number)

0

Timezone, offset from UTC in minutes

userId

No

ab123456789 (string)

If not provided, this value will be read from the Adnuntius cookie

Identifies a unique user; used for segment targeting, rate limiting, and unique user counting

siteId

No

ab123456789 (string)

None

A unique identifier for the site where the ad will be shown. This will be used, if required by your DMP, for segment targeting

tt

No

composed, multi, vast2

None

The Tag Type. The composed and multi tag-types can only be used with a POST request (see below)

format

No

html, xml, json, image, email (string)

html

Specifies the format of the returned ads

Post Requests

POST https://delivery.adnuntius.com/i{{params}}

The parameters listed above in the Get Requests section are also supported on POST requests.

POST Body

Parameter
Example value
Description

adUnits

-

An array of objects for the adunits that you wish to request.

auId

ab123456789 (string)

The ad unit tag id in question.

targetId

adn-123456789 (string)

The id of the HTML element you wish your ad to be placed in.

metaData

{"network!usi": "aaaa", "i": "0AAAAAZa9gZwGAQAAAACEPAA="}

Pass in meta-data (such as frequency capping data) returned by a previous request.

Example POST Body:

{
    "adUnits":[
        {
            "auId":"abc123",
            "targetId":"adn-abc123"
        },
        {
            "auId":"xyz987",
            "targetId":"adn-xyz987"
        }
    ],
    "metaData": {
        "i": "0AAAAAZa9gZwGAQAAAACEPAA=",
        "network!usi": "aaaa"
    }
}

Examples

GET request

Request

GET http://delivery.adnuntius.com/i?tzo=-120&auId=abc123&userId=xyz987

Response

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <style type="text/css" media="all">
        html, body, #responseCtr {
            margin: 0;
            padding: 0;
            outline: 0;
            border: 0;
            overflow: hidden;
        }
        #responseCtr {
            display: inline-block;
            line-height: 0;
            vertical-align: top;
        }
        #responseCtr a {
            line-height: 0;
        }
        #responseCtr *, #responseCtr a * {
            line-height: normal;
        }
        #responseCtr .adWrapper {
            margin: 0;
            padding: 0;
            outline: 0;
            border: 0;
            display: inline-block;
            line-height: 0;
        }
        a img {
            border: none;
            outline: none;
        }
        img {
            margin: 0;
            padding: 0;
        }
        /* need this displayNone class to ensure images are preloaded for smooth transition */
        img.displayNone {
            position: absolute;
            top: -99999px;
            left: -99999px;
        }
    </style>
    <script type="text/javascript" src="https://cdn.adnuntius.com/adn.js"></script>
</head>
<body>
<div id="responseCtr" class="responseCtr">
<div class="adWrapper" id="adn-id-387286962" data-line-item-id="xxxxxxx" data-creative-id="xxxxxx" data-response-token="yyyyy"><a rel="nofollow" target="_top" href="https://delivery.adnuntius.com/c/yyyyy?ct&#x3D;2501&amp;r&#x3D;http%3A%2F%2Fadnuntius.com" style="width: 100%">
<img src="//assets.adnuntius.com/creative.jpg" style="width: 100%; max-width: 980px; margin: 0 auto; display: block;" alt=""/>
</a>

<script>
    adn.util.forEach(document.getElementsByClassName("adWrapper"), function(el) {
        el.style.width = "100%";
    });
    var iframeId = adn.inIframe.getIframeId();
    var container = document.getElementById('responseCtr')
    container.style.width = "100%"
    var responsiveIframe = function(){
        adn.inIframe.updateAd({
            ifrH: container.offsetHeight,
            ifrStyle:{width: '100%', 'min-width':'100%', '*width':'100%' },
            ifrId: iframeId
        });
    }
  adn.inIframe.getAdRequestInfo({
    onInfoReceived: function(data) {
        console.log("onData", data);
    }
});
    window.onresize = function(){ responsiveIframe() }
    window.onload = function(){ responsiveIframe() }
    adn.inIframe.blockResizeToContent();
</script>
<div style="clear: both"></div></div>
</div>
<iframe src="https://delivery.adnuntius.com/b/yyyyyy.html" scrolling="no" frameborder="0" width="1" height="1" style="position:absolute;top:-10000px;left:-100000px;"></iframe>
<script type="text/javascript">
//<![CDATA[
(function() { adn.inIframe.processAdResponse({ matchedAdCount: 1 }); })();
//]]>
</script>
</body>
</html>

POST request

Request

POST http://delivery.adnuntius.com/i?tzo=-120&userId=xyz987&tt=composed

POST Body:

{
    "adUnits":[
        {
            "auId":"abc123",
            "targetId":"adn-abc123"
        },
    {
            "auId":"xyz987",
            "targetId":"adn-xyz987"
        }
    ],
    "metaData": {
        "network!usi": "aaaa",
        "i": "0AAAAAZa9gZwGAQAAAACEPAA="
    }
}

Response

{
    "adUnits": [
        {
            "auId": "abc123",
            "targetId": "adn-abc123",
            "html": "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"utf-8\">\n    <style type=\"text/css\" media=\"all\">\n        html, body, #responseCtr {\n            margin: 0;\n            padding: 0;\n            outline: 0;\n            border: 0;\n            overflow: hidden;\n        }\n\n        #responseCtr {\n            display: inline-block;\n            line-height: 0;\n            vertical-align: top;\n        }\n\n        #responseCtr a {\n            line-height: 0;\n        }\n\n        #responseCtr *, #responseCtr a * {\n            line-height: normal;\n        }\n\n        #responseCtr .adWrapper {\n            margin: 0;\n            padding: 0;\n            outline: 0;\n            border: 0;\n            display: inline-block;\n            line-height: 0;\n        }\n\n        a img {\n            border: none;\n            outline: none;\n        }\n\n        img {\n            margin: 0;\n            padding: 0;\n        }\n\n        /* need this displayNone class to ensure images are preloaded for smooth transition */\n        img.displayNone {\n            position: absolute;\n            top: -99999px;\n            left: -99999px;\n        }\n    </style>\n\n    <script type=\"text/javascript\" src=\"https://cdn.adnuntius.com/adn.js\"></script>\n</head>\n<body>\n<div id=\"responseCtr\" class=\"responseCtr\">\n<div class=\"adWrapper\" id=\"adn-id-xxxx\" data-line-item-id=\"xxxxx\" data-creative-id=\"aaaaa\" data-response-token=\"yyyyyy\"><a rel=\"nofollow\" target=\"_top\" href=\"https://delivery.adnuntius.com/c/yyyyy?ct&#x3D;2501&amp;r&#x3D;http%3A%2F%2Fadnuntius.com\" style=\"width: 100%\">\n<img src=\"//assets.adnuntius.com/creative.jpg\" style=\"width: 100%; max-width: 980px; margin: 0 auto; display: block;\" alt=\"\"/>\n</a>\n\n<script>\n\tadn.util.forEach(document.getElementsByClassName(\"adWrapper\"), function(el) {\n    \tel.style.width = \"100%\";\n    });\n\tvar iframeId = adn.inIframe.getIframeId();\n\tvar container = document.getElementById('responseCtr')\n    container.style.width = \"100%\"\n\tvar responsiveIframe = function(){\n        adn.inIframe.updateAd({\n        \tifrH: container.offsetHeight,\n            ifrStyle:{width: '100%', 'min-width':'100%', '*width':'100%' },\n            ifrId: iframeId\n        });\n\t}\n    \n  adn.inIframe.getAdRequestInfo({\n    onInfoReceived: function(data) {\n        console.log(\"onData\", data);\n    }\n});\n\n\n\n\twindow.onresize = function(){ responsiveIframe() }\n\twindow.onload = function(){ responsiveIframe() }\n    adn.inIframe.blockResizeToContent();\n</script>\n\n<div style=\"clear: both\"></div></div>\n</div>\n\n    \n        \n        \n        \n            \n<iframe src=\"https://delivery.adnuntius.com/b/yyyyy.html\" scrolling=\"no\" frameborder=\"0\" width=\"1\" height=\"1\" style=\"position:absolute;top:-10000px;left:-100000px;\"></iframe>\n            \n        \n<script type=\"text/javascript\">\n//<![CDATA[\n(function() { adn.inIframe.processAdResponse({ matchedAdCount: 1 }); })();\n//]]>\n</script>\n\n    \n\n</body>\n</html>",
            "matchedAdCount": 1,
            "rts": [
                "yyyyyy"
            ]
        }
        {
            "auId": "xyz987",
            "targetId": "adn-xyz987",
            "html": "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"utf-8\">\n    <style type=\"text/css\" media=\"all\">\n        html, body, #responseCtr {\n            margin: 0;\n            padding: 0;\n            outline: 0;\n            border: 0;\n            overflow: hidden;\n        }\n\n        #responseCtr {\n            display: inline-block;\n            line-height: 0;\n            vertical-align: top;\n        }\n\n        #responseCtr a {\n            line-height: 0;\n        }\n\n        #responseCtr *, #responseCtr a * {\n            line-height: normal;\n        }\n\n        #responseCtr .adWrapper {\n            margin: 0;\n            padding: 0;\n            outline: 0;\n            border: 0;\n            display: inline-block;\n            line-height: 0;\n        }\n\n        a img {\n            border: none;\n            outline: none;\n        }\n\n        img {\n            margin: 0;\n            padding: 0;\n        }\n\n        /* need this displayNone class to ensure images are preloaded for smooth transition */\n        img.displayNone {\n            position: absolute;\n            top: -99999px;\n            left: -99999px;\n        }\n    </style>\n\n    <script type=\"text/javascript\" src=\"https://cdn.adnuntius.com/adn.js\"></script>\n</head>\n<body>\n<div id=\"responseCtr\" class=\"responseCtr\">\n<div class=\"adWrapper\" id=\"adn-id-xxxx\" data-line-item-id=\"xxxxx\" data-creative-id=\"aaaaa\" data-response-token=\"yyyyyy\"><a rel=\"nofollow\" target=\"_top\" href=\"https://delivery.adnuntius.com/c/yyyyy?ct&#x3D;2501&amp;r&#x3D;http%3A%2F%2Fadnuntius.com\" style=\"width: 100%\">\n<img src=\"//assets.adnuntius.com/creative.jpg\" style=\"width: 100%; max-width: 980px; margin: 0 auto; display: block;\" alt=\"\"/>\n</a>\n\n<script>\n\tadn.util.forEach(document.getElementsByClassName(\"adWrapper\"), function(el) {\n    \tel.style.width = \"100%\";\n    });\n\tvar iframeId = adn.inIframe.getIframeId();\n\tvar container = document.getElementById('responseCtr')\n    container.style.width = \"100%\"\n\tvar responsiveIframe = function(){\n        adn.inIframe.updateAd({\n        \tifrH: container.offsetHeight,\n            ifrStyle:{width: '100%', 'min-width':'100%', '*width':'100%' },\n            ifrId: iframeId\n        });\n\t}\n    \n  adn.inIframe.getAdRequestInfo({\n    onInfoReceived: function(data) {\n        console.log(\"onData\", data);\n    }\n});\n\n\n\n\twindow.onresize = function(){ responsiveIframe() }\n\twindow.onload = function(){ responsiveIframe() }\n    adn.inIframe.blockResizeToContent();\n</script>\n\n<div style=\"clear: both\"></div></div>\n</div>\n\n    \n        \n        \n        \n            \n<iframe src=\"https://delivery.adnuntius.com/b/yyyyy.html\" scrolling=\"no\" frameborder=\"0\" width=\"1\" height=\"1\" style=\"position:absolute;top:-10000px;left:-100000px;\"></iframe>\n            \n        \n<script type=\"text/javascript\">\n//<![CDATA[\n(function() { adn.inIframe.processAdResponse({ matchedAdCount: 1 }); })();\n//]]>\n</script>\n\n    \n\n</body>\n</html>",
            "matchedAdCount": 1,
            "rts": [
                "zzzzzz"
            ]
        }
    ],
    "metaData": {
        "network!usi": "aaaa",
        "network!sessionId": "bbbb",
        "i": "0AAAAAZa9gZwGAQAAAACEPAA="
    },
    "duplicateFilter": "ccccc",
    "segments": [],
    "keywords": []
}

Targeting Parameters

You can include targeting information with the HTTP request to the ad server that can control which line items or creatives match your request.

Key-value targeting

Key values can be sent to the ad server through HTTP like this:

http://delivery.adnuntius.com/i?tzo=-120&auId=00000000000481f7&kv=%5B%7B%22myKey%22%3A%5B%22myValue1%22%2C%22myValue2%22%5D%7D%5D

The kv= will be a URL encoded Json of what you wish to send. In the above case it's this:

kv: [{'myKey': ['myValue1', 'myValue2']}]

Category Targeting

Category targeting can be sent to the adserver using the c= parameter.

&c=category1&c=sport%2Fbasketball&c=politics

Woud be the equivalent of sending this in the ad request:

c: ['category1', 'sport/basketball', 'politics']

the content of the category should be URL encoded.

Last updated 2 years ago