Zum Inhalt

Domain API / General API

With the domain-specific API, you can integrate consent and event data per domain into other systems via a secure SSL interface.

API Key

You can find the API key itself in the screen below. With the button "Create new API key" the key is reset and then appears directly in the mask.

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

screenshot-2020.12.17-13_59_55-1608209995197.jpg

The call is generally made with your API key as GET-parameter apiKey - without this the call is not successful. Each key is only valid for one account.

The call is generally made via a simple GET call in the browser, curl or any other way of calling up web data.

Test API

You can perform a test call. Use the following API-endpoint for this:

GET /api/test

The system should respond as follows.

{
    "username": "your_username",
    "apiKey": "IHR_API_KEY"
}

List all domains of the account

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

GET /api/domains

The response should be as follows:

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

The domId is the most important information - you can use it to retrieve further information about the domain.

Get 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 taken into account. Please replace {domainId} in the url with a domain-ID from the query above.

GET /api/domains/{domainId}/consents

The answer 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
    }
]

The consents are listed as follows:

  • consent: true / false - a consent was granted
  • ucid: an individual Consent ID of a visitor
  • timestamp: timestamp of the consent
  • purposes: Which category the consent belongs to
  • embeddings: Which embeddings or cookies the visitor has consented to
  • manipulationPrevention: true / false - whether attempts at manipulation have been prevented. I.e. not that there were any, but only that the suppression-mechanism was active.

You can then use the ucId to filter out an entry.

Find an entry and read out data

With this API-endpoint, the log entries can be filtered by Consent-ID. This can either be entered in full or as a substring starting from the beginning of the Consent-ID. In the following example, the entries can also be found with the value 387f1 for the parameter {consentId}.

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

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

This call then shows the entire Consent-history of this key - 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.