Get Banner UI

Retrieve the required attributes to render the banner UI

API

(GET) https://mobile-data.onetrust.io/cfw/cmp/v1/banner

API Reference: https://developer.onetrust.com/onetrust/reference/get_banner

Request headers

KeyValueDescriptionRequired?
OT-CDN-LocationstringCDN locationYes
OT-App-IdstringApp IDYes
OT-SDK-VersionstringAPI version to fetchYes
OT-Device-TypestringType of the device e.g. mobile, ctvYes
OT-Consent-StringstringBase 64 encoded consent string. Should be empty for the very first call and passed in the header on subsequent calls to persist user consent data from one session to the next.Yes, after the first API call
OT-IdentifierstringData Subject IDOnly when using cross device OR if passing in your own identifier
OT-Sync-Profile-AuthstringJWT auth token (generated using the public keys saved in OneTrust portal)Only when using cross device
OT-Fetch-TypestringDetermines if the data download should include profile data or not. By default if no fetch type is passed, we use APP_DATA_ONLY. If cross device is in scope, pass in APP_DATA_AND_SYNC_PROFILEOnly when using cross device
OT-LanguagestringLanguage to display the UINo
OT-Country-CodestringCountry code of end userNo
OT-Region-CodestringRegion code of end userNo
OT-Force-FetchstringReturn banner data regardless of shouldShowBanner status. By default, this is false. Set to true to force the return of banner dataNo

πŸ“˜

Note

Banner details are not returned if the banner is not configured to be shown in your geolocation rule.

Sample response (success):

{
    "errors": [],
    "appConfig": {
        "showBanner": true,
        "bannerReason": "Hundred percent sync has not happened for cross device sync enabled scenario.",
        "bannerReasonCode": 107,
        "templateType": "IAB2V2"
    },
    "bannerUIData": {
        "general": {
            "backgroundColor": "#FFFFFF",
            "backgroundColorDark": "#2F2F2F",
            "additionalDescriptionPlacement": "AfterDescription",
            "layoutHeight": "full"
        },
        "logo": {
            "url": "https://cookie-cdn.1trust.app/logos/static/ot_company_logo.png",
            "logoVoiceOverText": "Banner Logo"
        },
        "summary": {
            "title": {
                "fontSize": "22",
                "text": "We Care About Your Privacy",
                "textAlign": "center",
                "textColor": "#696969",
                "textColorDark": "#FFFFFF"
            },
            "description": {
                "fontSize": "16",
                "text": "We and our 794 partners store and/or access information on a device, such as unique IDs in cookies to process personal data. You may accept or manage your choices by clicking below or at any time in the privacy policy page. These choices will be signaled to our partners and will not affect browsing data.",
                "textAlign": "center",
                "textColor": "#696969",
                "textColorDark": "#FFFFFF"
            },
            "dpdTitle": {
                "fontSize": "22",
                "text": "We and our partners process data to provide:",
                "textAlign": "center",
                "textColor": "#696969",
                "textColorDark": "#FFFFFF"
            },
            "dpdDescription": {
                "fontSize": "16",
                "text": "Use precise geolocation data. Actively scan device characteristics for identification. Store and/or access information on a device. Personalised advertising and content, advertising and content measurement, audience research and services development. ",
                "textAlign": "center",
                "textColor": "#696969",
                "textColorDark": "#FFFFFF"
            }
        },
        "buttons": {
            "closeButton": {
                "color": "#2F2F2F",
                "colorDark": "#FFFFFF",
                "showAsLink": true,
                "borderRadius": "0",
                "fontSize": "12",
                "showText": true,
                "text": "Continue without Accepting",
                "textColor": "#696969",
                "textColorDark": "#FFFFFF",
                "interactionType": "BANNER_CLOSE"
            },
            "acceptAll": {
                "borderRadius": "",
                "color": "#346E4A",
                "colorDark": "#6CC04A",
                "fontSize": "17",
                "text": "I Accept",
                "textColor": "#FFFFFF",
                "textColorDark": "#FFFFFF",
                "interactionType": "BANNER_ALLOW_ALL"
            },
            "rejectAll": {
                "borderRadius": "",
                "color": "#346E4A",
                "colorDark": "#6CC04A",
                "fontSize": "17",
                "text": "Reject All",
                "textColor": "#FFFFFF",
                "textColorDark": "#FFFFFF"
                "interactionType": "BANNER_REJECT_ALL"
            },
            "showPreferences": {
                "borderRadius": "",
                "color": "#FFFFFF",
                "colorDark": "#FFFFFF",
                "fontSize": "17",
                "showAsLink": false,
                "text": "Show Purposes",
                "textColor": "#346E4A",
                "textColorDark": "#6CC04A"
            },
            "vendorList": {
                "text": "List of Partners (vendors)",
                "textColor": "#3860BE",
                "textColorDark": "#3860BE"
            }
        },
        "links": {}
    },
    "storageKeys": {
        "IABUSPrivacy_String": "",
        "IABTCF_AddtlConsent": "",
        "IABTCF_TCString": "CP68pYAP68pYAAcABBENAKEsAP_gAEPgAChQg1NX_H__bW9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4AuABcgC6AF2gLvgXkBeYC-gF_gMEAYMAw0BiADFgGPAMhgZGBkkDJgMnAZUAywBmYDOQGeANEgaMBo4DTQGpgNVgauBrIDXgG0ANsgbcBt8DcgN1AcEA4sBx4Dk4HLAcuA50Bz4DrAHigPHgeSB5QD2gHxQPkA-UB9cD7QPugfsB-4D-wH_AQBAgIBAwCB4EEQIJgQYAg3BMwEzgJqATYgm2CbkE3gTfAnDBOUE5gJ0gTrgnaCdwE8AJ5hBqAEEAAQBlDgAQCdAG2EAAQAuQDTlAAICdA.f_wACHwAAAAA",
        "IABTCF_CmpSdkID": 28,
        "IABTCF_CmpSdkVersion": 1,
        "IABTCF_PolicyVersion": 4,
        "IABTCF_gdprApplies": true,
        "IABTCF_PublisherCC": "UK",
        "IABTCF_PurposeOneTreatment": false,
        "IABTCF_UseNonStandardTexts": false,
        "IABTCF_VendorConsents": "11010101111111110001111111111111110110110101101111011000111111000101111010111101010110100111111011011101000111100110001101010011111111011111011000111110111010111011100100001100010000011000010111110010010001001111101110000001011100100010111011110101101111110010011100000101111100011101100001001100010011010000001101111110101010011010100010000010101001100100010010000001001011101101110110110000010010000100000001011001010001110010000001110101000100110101001000101000000110101010001000000101011010111100100001110011000110101001000101100011001000010100110011010010100010011110100000011001001000100001010011000100010011001101100111010110000000100001011110011011111001100110001001010000111111100100000010100110001110011111111010011111010111011101110111011100011101100000111111101011011111110111011011111111001101110111011100111100101100111111001101010001111001111101110111111110011111111101100111101101000111100010110000100111010100001110011111001011010000110111111011111111010110110100010011100110111111101111010010000011010111011111111110111111001011111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101001111101111011111110111110111110111111110111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
        "IABTCF_VendorLegitimateInterests": "00000001011001100001101000010101000100000000010111011000000100100001001000010001011010000011100001000101000000100000000001010100000101011000010000000100010000000010100000000000000000000000000100100000011010001000000010000000000100100000011000000101001110110000001100000000100101110101100001001000100000000001000000000010100000000000000110000010000000000100000000000000001010001100100000000000010000000000000000000000010000000000001000010001000000000001001000000000010100000010000000000000000010000000010000001010000000000000000100000000000000000000010000000010000000000000100000011000000000000000010000000000010110000000100000000100000000000000001000000011101000000110001000010000000100000000000010100000010110000100000010010001100100010001000100001010011000000100001000010100000010010000010000000100101101100101000000100000100100000001011000001000001010111000010000000001000101100111100000000000010000000010001000100110000010100000000000010000000000000000000000001010110000000000000001000000010110000010110000000110001001001001000000010010101000010010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011100000100010011011010001100101011010010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
        "IABTCF_PurposeConsents": "11111111111",
        "IABTCF_PurposeLegitimateInterests": "01000011111",
        "IABTCF_SpecialFeaturesOptIns": "11",
        "IABTCF_PublisherRestrictions": {
            "4": "_________________________________________________________________________________________________________________________________________________________________________________________________________0__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________",
            "7": "___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________0_______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________0",
            "8": "________________________________________________________________________________________________________________________________________________________________________________________0_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________0_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________",
            "10": "___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________0________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________"
        },
        "IABTCF_PublisherConsent": "11111111111",
        "IABTCF_PublisherLegitimateInterests": "01000011111",
        "IABTCF_PublisherCustomPurposesConsents": "",
        "IABTCF_PublisherCustomPurposesLegitimateInterests": ""
    },
    "otConsentString": "eyJMYXN0TGF1bmNoRGF0ZSI6MTcwNTA2Njk3MzI3NSwiU2hvdWxkU2hvd0Jhbm5lciI6MSwiTGFzdENvbnNlbnREYXRlIjoiMTcwMzY3NjY4MTIzOCIsIkRTSUQiOiJzdXAtbmV3bGtnYiJ9"
}

Sample response (error)

{
    "errors": [
        {
            "code": "ERROR_CODE_MISSING_REQUIRED_HEADER",
            "message": "Request header OT-Device-Type should not be null"
        }
    ]
}

Banner reason code

Status CodeBanner ReasonShould Show Banner Status
101Show banner enabled in geo rule and is first launchtrue
102SDK data has been published with reconsenttrue
103Consent has expiredtrue
104TC String has expiredtrue
105Reconsent triggered for an authenticated usertrue
107100% sync not achieved for cross device sync enabled scenariotrue
109The template type is updated to IABtrue
150Show banner not enabled in geo rulefalse
151Banner will not be shown as consent validity holds truefalse
152Banner will not be shown as 100% cross device sync is achievedfalse

Response errors

ScenarioOT Custom Error CodeHTTP Error CodeError Message
All generic server errorsERROR_CODE_GENERIC_ERROR500 (Internal Server Error)Something went wrong
All required headers missingERROR_CODE_NO_ACCESS403 (Forbidden)No access to this resource
Invalid API routeERROR_CODE_TEXT_RESOURCE_NOT_FOUND404 (Not Found)Not Found
Invalid OT-Consent-String headerERROR_CODE_INVALID_OT_CONSENT_STRING400 (Bad Request)Invalid OT consent string
Invalid OT-Country-Code or OT-Region-Code headerERROR_CODE_INVALID_COUNTRY_OR_REGION400 (Bad Request)Invalid country code or region code
Invalid OT-CDN-Location or OT-App-Id headerERROR_CODE_BLOB_LOCATIONS_UNAVAILABLE400 (Bad Request)Unable to fetch data for the specified Application ID. Please check your configurations
Invalid OT-Fetch-Type headerERROR_CODE_INVALID_FETCH_TYPE400 (Bad Request)Invalid Fetch type
Invalid OT-Device-Type headerERROR_CODE_INVALID_DEVICE_TYPE400 (Bad Request)Invalid Device Type
Missing required headers e.g. OT-Device-Type, OT-CDN-Location etcERROR_CODE_MISSING_REQUIRED_HEADER400 (Bad Request)Request header {{header}} should not be null