Zum Inhalt

Domain API / General API

The domain-specific API allows you to integrate consent and event data for each domain into other systems via a secure SSL interface.

API Key

You can find the API key itself in the form below. Clicking the "Create New API Key" button resets the key, which then appears directly in the form.

Please note that any existing queries may no longer work after this step, as the old key is no longer valid.

screenshot-2020.12.17-13_59_55-1608209995197.jpg

The request is generally made using your API key as the GET-parameter apiKey—without it, the request will fail. Each key is always valid for only one account.

The request is generally made via a simple GET request in a browser, using curl, or any other method for retrieving web data.

Testing the API

You can perform a test request. To do so, use the following API-endpoint:

GET /api/test

The system should respond as follows:

{
    "username": "Your_Username",
    "apiKey": "YOUR_API_KEY"
}

List All Domains in the Account

To list all domains in your account, please use the following API endpoint:-.

GET /api/domains

The response should look like this:

[
    {
        "id": "b61cd4a",
        "name": "https:\/\/www.test-xy.de",
        "whiteLabel": false,
        "viewCount": 0
    },
    {
        "id": "1ed845d",
        "name": "test-12.de",
        "whiteLabel": false,
        "viewCount": 0
    }
]

The domId is the most important piece of information—it allows you to retrieve additional information about the domain.

Retrieve All Consents from the Log

Use the following API endpoint-to retrieve all consents from the current data block of the log. Log entries that have already been archived are not included. Please replace {domainId} in the URL with a domain-ID from the query above.

GET /api/domains/{domainId}/consents

The response is as follows:

[
    {
        "consent": true,
        "ucid": "387f1d311b2e7ba1f67722ac08bfdaf56aad3ecab6f11309d0c829f4e255af12",
        "timestamp": 1608208345,
        "purposes": {
            "41ba25c": "Technically necessary"
        },
        "embeddings": {
            "16bd7f0": "Papoo CMS session management"
        },
        "manipulationPrevention": true
    },
    {
        "consent": true,
        "ucid": "387f1d311b2e7ba1f67722ac08bfdaf56aad3ecab6f11309d0c829f4e255af12",
        "timestamp": 1608208338,
        "purposes": {
            "41ba25c": "Technically necessary"
        },
        "embeddings": {
            "16bd7f0": "Papoo CMS session management"
        },
        "manipulationPrevention": true
    },
    {
        "consent": true,
        "ucid": "cba4803da92a9b39ffa82cc93aecbe00bc3f695530ebd3f7e67326404073bdbd",
        "timestamp": 1608131136,
        "purposes": {
            "41ba25c": "Technically necessary"
        },
        "embeddings": {
            "16bd7f0": "Papoo CMS session management"
        },
        "manipulationPrevention": true
    }
]

Consents are listed as follows:

  • consent: boolean – were consent settings-configured
  • ucid: the visitor’s unique consent-ID
  • timestamp: timestamp of the consent
  • purposes: the category to which the consent belongs
  • embeddings: which embeds or cookies the visitor has consented to
  • manipulationPrevention: boolean – whether attempts at manipulation were prevented. This does not mean that such attempts occurred, but only that the suppression mechanism-was active.

You can use the ucid to filter entries by visitor.

Finding an Entry and Retrieving Data

Using this API endpoint-, you can filter log entries by Consent-ID. You can either specify the full ID or a substring starting from the beginning of the Consent-ID. In the following example, entries can also be found using the value 387f1 for the {consentId} parameter.

The only important thing to note is that there is only one Consent-ID that begins with 387f1. In case of collisions, the request returns an empty list.

GET /api/domains/{domainId}/consents/{consentId}

This call then displays the entire consent-history for this key—here’s an example

[
    {
        "consent": true,
        "ucid": "387f1d311b2e7ba1f67722ac08bfdaf56aad3ecab6f11309d0c829f4e255af12",
        "timestamp": 1608208345,
        "purposes": {
            "41ba25c": "Technically necessary"
        },
        "embeddings": {
            "16bd7f0": "Papoo CMS session management"
        },
        "manipulationPrevention": true
    },
    {
        "consent": true,
        "ucid": "387f1d311b2e7ba1f67722ac08bfdaf56aad3ecab6f11309d0c829f4e255af12",
        "timestamp": 1608208338,
        "purposes": {
            "41ba25c": "Technically necessary"
        },
        "embeddings": {
            "16bd7f0": "Papoo CMS session management"
        },
        "manipulationPrevention": true
    }
]

As you can see, the ucid is identical in each case, and the consents have different timestamps.


Retrieving Statistics-Data

Using the following API endpoint-, you can retrieve all statistics-data for the last 30 days for a specific domain. Please replace {domainId} in the URL with a domain-ID from the query above.

GET /api/domains/{domainId}/statistics

The following data is returned for each day:

  • x → Date
  • Calls → Script calls
  • Banner views → Banner-impressions
  • acceptAll → Number of clicks on "Accept All"
  • decline → Number of clicks on "Decline All"
  • leave → Bounce