GET Information
  • 01 Sep 2022
  • 2 Minutes to read
  • Contributors
  • Dark
    Light

GET Information

  • Dark
    Light

To get the current status of the JENTIS Consent Engine you have to use the following functions.

Use this function to get the consent status for a single vendor. You have to provide the Vendor-ID to get a meaningful result.

Input Parameter

  • String: Id of the Vendor you want to get the status of.

Return

Bool: true if the consent for the given vendor is given, false if there exists no such vendor or consent is denied.

Example


var bGoogleConsent = jentis.consent.engine.getVendorConsent("ga");

Use this function to get all consent status for all vendors.

Input Parameter

none

Return

Object of Vendor-Ids and bool per vendor: true if the consent for the given vendor is given, false if there exists no consent.


{
  "ga"    : true,
  "adw"   : false,
  "fb"    : true
}

Example


var aAllConsent = jentis.consent.engine.getAllConsents();


Use this function to get the custom data from the JENTIS system internal consent object on page scope. This provides a method to read conset document data that was pushed recently on this client, it will not provide a full history for this consent document but only the current state.

Input Parameter

none

Return

Object - representation of all custom data added to the JENTIS system internal consent document on this page scope.

Use this function to get the current consent-id of a user.

Input Parameter

none

Return

String The current used user-consent-id or false, if no consent yet decided.

Example


var sConsentId = jentis.consent.engine.getConsentId();

Use this function to get all information about the vendors in your wanted language.

Input Parameter

none

Return

Object of vendor-ids followed by an object with the following structure and properties.

  • vendor
    • id
    • name
    • street
    • zip
    • country
      • iso
      • name
  • purpose
    • id
    • name
  • justification
    • id
    • name
  • description

{
  "ga" : {
    "status"  : true,
    "vendor" : {
      "id"      : "ga",
      "name"    : "Google Analytics",
      "street"  : "Google Street 1",
      "zip"     : "114011",
      "country" : {
        "iso"   : "us",
        "name"  : "United States of America"
      }
    },
    "purpose" : {
      "id"    : "stat",
      "name"  : "statistic"
    },
    "justification" : {
      "id"    : "consent",
      "name"  : "consent"
    },
    "description" : "bla bla bla bla bla"
  },
  "fb"  : {...}
}

Most of the fields are self explaining. The status key contains, if you are allowed to send data to the vendor (true) or not (false). In case of justification “consent” true means the user has given a consent for this vendor. If there is another justification then “consent” the status will be true without having a consent from the user.

Example


oVendorInfo = jentis.consent.engine.getVendorFullData();

Use this function to get the timestamp of the last Update from the user.

Input Parameter

none

Return

The timestamp (UNIX Timestamp in microseconds) of the last consent update from the user.

Example


var iLastUpdate = jentis.consent.engine.getLastUpdateTime();

Get the configuration data the administrator has stored for the template.

Input Parameter

none

Return

Each template defines its own configuration data structure. This structure will be returned filled with the stored data.

Here is an example:


{
        consenext     : "text bla bla bla",
        contact            : "contact bla bla",
        buttonagree        : "Alle akzeptieren",
        buttondeny        : "Ablehnen",
        buttonsettings    : "Einstellungen",
        importantlinks    : {
            "Impressum"        : "/impressum",
            "Datenschutz"    : "/datenschutz"
        }
}

Example


var oConf = jentis.consent.engine.getTemplateConfig();

Was this article helpful?

What's Next