Technical documentation: libraries for wholesalers

Description

On this page you will find the technical descriptions of how a library can be integrated for wholesale. Here you will also find descriptions of requirements and example integrations. On the other sub-pages you will then find the technical documentation on the specific integrations of documents, deep search and much more. You can find an overview of this content here:

Specific widget integration

An overview of the contents of this page can be found in the following table of contents:

Contents

What is a widget?

A widget is a “custom element” provided by ITEK Technologie GmbH to integrate functions into your existing system. These elements are based on the Web Components standard Web Components - https://developer.mozilla.org/en-US/docs/Web/API/Web_components and are supported by all current browsers.

fa4c4ccb-8060-492b-b42e-4279627e1024.png

Source: https://v17.angular.io/guide/elements

Prerequisites for running the PHP example code:

  • PHP Installed

  • CURL installed in PHP

Requirements on the requesting system (CORS)

Store embedding URL in .htaccess

Before embedding, the .htaccess file in the /home/sportal/www folder must be adjusted on the relevant system. The URL of the page under which the customer wants to embed the widget must be added under Access-Control-Allow-Origin. To do this, the <IfModule mod_headers.c> section is expanded. If the entries Header add Access-Control-Allow-Methods and Header add Access-Control-Allow-Headers are missing, these must also be added. In the following example, the widget is embedded on the domain http://test.deepsearch.itek.de

Bildschirmfoto 2024-09-11 um 11.28.43.png

OAuth2 request

This request must be made as a POST in the format “x-www-form-urlencoded” before the HTML page is served.

Url

Parameter

Answer

Sample code (PHP)

Further or example code: https://oauth.net/code/

Integration of the “xs-loader” widgets

Funktionsweise “xs-loader”

  1. Requesting the widget version on the target system

  2. Integrating the code (JS) & the styles (CSS)

  3. Registering the widget in the browser

  4. Rendering the target widget by the browser

Parameters General or “xs-loader”

To integrate the widgets, the following parameters will be available for each widget.

Parameter

Pflicht

Beschreibung

Beispielwert

Parameter

Pflicht

Beschreibung

Beispielwert

accesstoken

Ja

OAuth2 Zugriffstoken für das Zielsystem. Dieses Token muss zuvor vom Integrierenden System am Zielsystem angefragt werden.

 

refreshtoken

Ja

OAuth2 Refresktoken für das Zielsystem. Dieses Token muss zuvor vom Integrierenden System am Zielsystem angefragt werden.

 

targeturl

Ja

URL des Zielsystems mit HTTPS.

 

z.B:

https://2.0.open-datacheck.de

widget

Ja

Code für die Funktion die verwendet werden soll.

  • xs-deepsearch

  • xs-documents

  • xs-articledocuments

z.B. xs-deepsearch

widgetmode

Ja

Gibt an ob die “targeturl” als Basis-URL für die Anfragen an den Server verwendet werden soll. Wenn die Domain in der das Widget die gleich Domain wie das Zielsystem besitzt, wird der Widgetmode mit “false” angegeben. Ansonsten mit dem Wert “true” angeben.

true

language

Ja

Sprachkürzel nach ISO 639-1. Die Anzahl und möglichen Sprachkürzel sind Systemabhängig. Deutsch und Englisch stehen auf jedem System zur Verfügung.

  • de

  • en

  • pt

  • ….

de

parameter

Ja

Base64 encodiertes JSON Objekt mit den widgetspezifischen Parametern. Details sind aus den Beschreibungstabellen zu entnehmen.

 

Ausgang

loadfinished

ja

Dieses Event nach dem Anfragen des Systems ausgegeben. Sobald diese Event “true” geliefert hat, das HTML Element des zu ladenden Widgets zur Verfügung. Ab diesem Zeitpunkt kann ein EventListener registriert werden.

  • true

    • Wenn das Laden erfolgreich war, und das Widget im DOM angelegt wurde.

  • false

    • Wird bei Problemen ausgegeben

 

Example integration

Embed the following code snippet into the HTML DOM.

Integration widget loader version 1.x.x

targeturl = https://2.0.open-datacheck.de

Integration widget loader version 2.x.x

targeturl = https://2.0.open-datacheck.de