DEVELOPER GUIDE
How to integrate Link
Basic WhiteLabel
4 min
1\ generate a link url the basic whitelabel is the easiest way to use klavi services when you lack technical development resources you just need to contact the business personnel( mailto\ crie\@klavi ai ) to request a pre generated url from klavi for you you can integrate this url into your service and directly send it to your users the generated url is similar to this https //conecte sandbox klavi ai/data/v1/basic links/yourappid https //conecte sandbox klavi ai/data/v1/basic links/yourappid if you were a klavi customer before 22/11/2024, you may be able to use the links according to the old nomenclature, then, it should be similar to this https //open sandbox klavi ai/data/v1/basic links/yourappid https //open sandbox klavi ai/data/v1/basic links/yourappid supported path parameters according to your business needs, if you want to lock end users or prevent users from entering cpf again, you can add personal tax id to the above url, similar to this https //conecte sandbox klavi ai/data/v1/basic links/yourappid?personal tax id=76109277673 https //conecte sandbox klavi ai/data/v1/basic links/yourappid?personal tax id=76109277673 if you were a klavi customer before 22/11/2024, you may be able to use the links according to the old nomenclature, then, it should be similar to this https //open sandbox klavi ai/data/v1/basic links/yourappid?personal tax id=76109277673 https //open sandbox klavi ai/data/v1/basic links/yourappid?personal tax id=76109277673 as mentioned above, the path parameter supports the following parameters true 186 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type perhaps you have noticed that the above parameters similar to the docid\ mz5jywmwvljrezzqpd30s api parameters except for changing from a camelcase to snake case that's right, it's like this because these parameters are in the body of the api when docid\ mz5jywmwvljrezzqpd30s , so camelcase is used however, if you want to use path parameters to pass, it's best to use a snake case another very important point 1 redirect url to being a url, if you want to use this parameters, remember to https //developer mozilla org/en us/docs/web/javascript/reference/global objects/encodeuricomponent them console log(`?x=${encodeuricomponent('https //mydomain com?uuid=22222')}`); output \> "?x=https%3a%2f%2fmydomain com%3fuuid%3d22222" 2 products callback url and external info is object type in docid\ mz5jywmwvljrezzqpd30s api, if you want to use these parameters, remember to https //developer mozilla org/en us/docs/web/javascript/reference/global objects/json/stringify and 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!'}})) there is an exception, the object with key customization can be used by partners to customize some content of whitelabel for specific customized content, please contact the operations personnel( mailto\ crie\@klavi ai ) 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 https //console klavi ai
