Basic WhiteLabel
9 min
introduction the basic whitelabel is the integration method to use klavi's services with the least development effort for your company klavi will create one or more partner applications docid 4j4kp7kbvkq4c1pqpyu5z , each with its own set of configurations and a corresponding static whitelabel url the basic whitelabel url will provide to your end user access to klavi's whitelabel consent journey so you can start collecting data sharing consents obtain your basic whitelabel urls the whitelabel urls for each app can be obtained through klavi console https //console klavi ai/ , following the path below login into your console account in the menu sidebar, select 'integração' 'configurar endereços' select the desired environment copy the 'basic whitelabel url' of the desired application if you have any issues, contact klavi through suporte\@klavi ai basic whitelabel url example your basic whitelabel url will follow the structure below https //open sandbox klavi ai/data/v1/basic links/yourappid https //open sandbox klavi ai/data/v1/basic links/yourappid how to use your basic whitelabel urls integration & delivery the basic whitelabel url is ready to use and can be integrated into your application or sent to your end users through messaging solutions the url can be opened using webview or directly in the device browser supported path parameters the basic whitelabel url supports path parameters, whose functions vary from data input automation ( personal tax id , phone , e mail ), user redirection ( redirect url , app link ) and more all supported path parameters must be used with type = string parameter name description personal tax id automatically fills the user's cpf in the consent journey business tax id automatically fills the business cnpj in the consent journey email automatically fills the user/business e mail in the consent journey phone automatically fills the user/business phone in the consent journey institution code pre determines the institution from which data will be shared skips institution selection page redirect url the url klavi will redirect your end user once the consent journey is completed it's value must be processed in encodeuricomponent() function as below, for example “%3a” replaces “ ” “%2f” replaces “/” “%3f” replaces “?” “%3d” replaces “=” products callback url set one or more product callback urls has higher priority than the receival address configured in klavi console it's value must be processed in encodeuricomponent() function as below, for example “%3a” replaces “ ” “%2f” replaces “/” “%3f” replaces “?” “%3d” replaces “=” external info used for p artners to transmit information, which will be carried in reports sent to partners customization of the consent journey ui, more details below it's value must be processed in encodeuricomponent() function as below, for example “%3a” replaces “ ” “%2f” replaces “/” “%3f” replaces “?” “%3d” replaces “=” app link used when the partner wants to display the lgpd step inside their own app (via webview) after the open finance authorization step is completed in the bank environment, the end user is redirected to the url provided in the app link parameter (typically a deep link or universal link of the partner’s app) the redirect includes a query parameter whose name is defined by app redirect url key the value of this parameter is the klavi hosted lgpd url, which the partner’s app must open in a webview app redirect url key defines the name of the query parameter that klavi will add to the app link url this parameter will contain the klavi hosted lgpd step url as its value the partner’s application must read this parameter and open its value inside a webview the above parameters are similar to the create a link docid\ vormonrlpfxwuzduijl9t api parameters, except for changing from a camelcase to snake case since basic whitelabel supports path parameters parameters details redirect url since redirect url must be filled with an url, it is mandatory to encode https //developer mozilla org/en us/docs/web/javascript/reference/global objects/encodeuricomponent it console log(`?x=${encodeuricomponent('https //mydomain com?uuid=22222')}`); output \> "?x=https%3a%2f%2fmydomain com%3fuuid%3d22222" products callback url & external info products callback url and external info are object type in the /links docid\ mz5jywmwvljrezzqpd30s api, if you want to use these parameters, remember to stringify https //developer mozilla org/en us/docs/web/javascript/reference/global objects/json/stringify and encode https //developer mozilla org/en us/docs/web/javascript/reference/global objects/encodeuricomponent them external info=encodeuricomponent(json stringify({ 'uuid' 'xxx 122 333 111','customization' {'institutions' \[ '001', '033' ],'landingtitle' 'welcome!','landingsubtitle' 'welcome!'}})) external info the external info parameter has 2 different purposes transmit relevant information to the partner the data filled in this parameter will be included in corresponding api events docid\ l2p6pw11adwvumkns6pkc and product reports docid\ xkr8lrggfj7yfng1vaydd inside the externalinfo object allow consent journey ui customization, using the customization key inside external info object institutions determines which institutions will be displayed in the institution selection list landingtitle determines the landing page title text landingsubtitle determines the landing page subtitle text external info with customization object external info = {'customization' {'institutions' \[ '001', '033' ], 'landingtitle' 'welcome!', 'landingsubtitle' 'welcome!'}) app link & app redirect url key these parameters must be used together when the partner prefers to display the lgpd authorisation page inside his own application using webview the app link must be filled with the url to which the end user will be redirected to once the open finance authorisation in the bank environment is completed the app redirect url key is a query parameter name defined by the partner its value will be the url of the klavi hosted lgpd page after the user is redirected to the app link , the partner’s app must read this parameter and open its value in a webview 2\ fetch product data you can use web or webview to open the link url, make subsequent selection of institutions, redirect to that institution for authentication, and return to the final result web page klavi backend will send you the results through event webhook(even if it is a failed state), after the status change to authorised , you can send the specific report generation request you want based on the end user type(personal or business, their endpoints are different) command curl location 'https //api sandbox klavi ai/data/personal/institution data' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'authorization bearer jhbgcioijfuzi1niis qtyjayoc1hn2zhmwfjzgrjzjkilcj0 nltqpazheq4p2xfd' \\ \ data '{"taxid" "string","institutionid" "string","linkid" "string","consentid" "array","products" "array","productscallbackurl" "object"}' expected response { "requestid" "1325412e e566 4f4e ac5b 2f4471586b89", "message" "ok" } after you submit a request to generate specific or all report(the report you want to purchase has already been limited by klavi backend), klavi randomly starts retrieving data from the institution and processing it to generate the corresponding report, which will be sent to you through the report webhook klavi also supports not having to actively call this endpoint after you move to production, klavi can proactively send all the reports to your webhook, or send them to klavi's storage space you can download them at any time through the klavi console https //console klavi ai


