Example Usage of the HTTP API

circle-info

We highly recommend using JENTIS’ built-in functions to retrieve values instead of directly accessing cookies or localStorage data. This ensures forward compatibility in case JENTIS changes internal format structures.We highly recommend using our build functions to retrieve values and not directly access cookie or localStorage information in case JENTIS is changing format structures!

Introduction

To use the HTTP API, three mandatory parameters are required:

  • JENTIS User ID

    • Why? Gain access to the JENTIS User Storage.

  • JENTIS Session ID

    • Why? Connect to the same Session.

  • Consent Information

    • Why? You need to respect the consent decision of the user!

Mandatory Data from the Website

JENTIS User ID

The JENTIS User ID is stored in the cookie jts-rw with the following example:

%7B%22u%22%3A%2280791172425362871393019%22%7D

After URL-decoding:

{"u":"80791172425362871393019"}

To access the value via JavaScript, use:

JENTIS Session ID

The JENTIS Session ID is stored in the cookie jctr_sid with the following example:

To access the value via JavaScript, use:

The Consent Information is stored in the localStorage key jentis.consent.data with a structure similar to:

Required Data from the above structure, we only need the vendors property:

To access the vendor consent information safely, use the built-in JENTIS method:

Example Request

Last updated

Was this helpful?