API REFERENCE
Link
Create a Link
7 min
name links method post url https api sandbox klavi ai data v1 links description create a link by accesstoken tab examples examples languages id squhpcbelt0jkpfkovluy language curl code curl location https api sandbox klavi ai data v1 links n header accept application json n header content type application json n data personaltaxid string businesstaxid string email string phone string institutioncode string redirecturl string productscallbackurl object externalinfo object connectionkey string customlabel selectedlanguageid squhpcbelt0jkpfkovluy results languages id v0f3xdkikgpjnb3dy14d2 language 200 customlabel code n linkid 4437b139 8a16 11ee b636 487b6bad036a n linkurl https conecte sandbox klavi ai path?v ahbgcioijfuzi1niis ctyjayoc1hn2zhmwfjzgrjzjkilcj0 ultqpazheq4p2xfd n linktoken ahbgcioijfuzi1niis ctyjayoc1hn2zhmwfjzgrjzjkilcj0 ultqpazheq4p2xfd n expirein 1800 n selectedlanguageid v0f3xdkikgpjnb3dy14d2 request pathparameters queryparameters headerparameters name authorization kind required type string description bearer access token it returned by the auth children bodydataparameters name personaltaxid kind optional type string description the cpf of the end user for personal accounts only children name businesstaxid kind optional type string description the cnpj of the company for business accounts only children name email kind optional type string description end user s email compliance needs children name phone kind optional type string description end user s phone compliance needs children name institutioncode kind optional type string description pre set parameters the purpose is to avoid users choosing specific institutions children name redirecturl kind optional type string description the url for redirection upon successful link initialization children name productscallbackurl kind optional type object description report products callback url for open finance only children name externalinfo kind optional type object description used for partners to transmit information which will be carried in reports sent to partners n children name connectionkey kind optional type string description connection key the connectionkey has been sent to the partner in the report for open data update case only children name applink kind optional type string description after the institution authorization is completed it will jump to this applink with the appredirecturlkey parameter children name appredirecturlkey kind optional type string description partners can customize this parameter according to your actual situation nif parameter applink exists this parameter must be exist children formdataparameters currentnewparameter label body parameter value bodydataparameters response name linkid kind optional type string description unique identifier for the created link name linktoken kind optional type string description the token of the created link nyou can think that the backend system will use accesstoken generated by auth while the front end system will use this linktoken nonly api get institutions and post consents will use this linktoken for authentication children name linkurl kind optional type string description the whitelabel application url generated by klavi for the partner it can be opened as long as the partner s front end requests this url children name expirein kind optional type string description the expiration time of the linktoken the default expiration duration is 30 minutes children if you were a klavi customer before 22/11/2024, you may be able to use the links according to the old nomenclature, then, the linkurl response may look like https //open sandbox klavi ai/path?v=ahbgcioijfuzi1niis ctyjayoc1hn2zhmwfjzgrjzjkilcj0 ultqpazheq4p2xfd parameter redirecturl the end user completes authorization and returns to the client's page url from the lgdp page if authorization succeeds, the klavi backend returns the redirecturl with the link id and external info parameters if authorization fails, the klavi backend returns the redirecturl with the link id , external info , error and error description parameters productscallbackurl with this parameter, you can submit specific or all reports generated sending addresses to klavi backend 1 specific reports example { "productscallbackurl" { "pf checking account" "https //www yourdomain com/checking/yourpath", "pf credit card" "https //www yourdomain com/creditcard/yourpath" } } after the report is generated, the klavi backend will send the report pf checking account to https //www yourdomain com/checking/yourendpoint and send the report pf credit card to https //www yourdomain com/creditcard/yourpath 2 specific and other reports example { "productscallbackurl" { "pf checking account" "https //www yourdomain com/checking/yourpath", "other" "https //www yourdomain com/yourpath" } } in this case, the klavi backend will send the report pf checking account to https //www yourdomain com/checking/yourendpoint and send the other report to https //www yourdomain com/yourpath 3 all reports example { "productscallbackurl" { "all" "https //www yourdomain com/yourpath" } } after the report is generated, the klavi backend will send all reports(you selected it when you onborading) to https //www yourdomain com/yourpath please note that the parameter all is mutually exclusive with the parameters other and specific and cannot exist simultaneously if it exists, the system will return an error externalinfo you can submit any content you want with this parameter, and klavi will temporarily save it after the report is generated, it will be returned to you in the externalinfo data node of the report for example { "externalinfo" { "mytraceid" "yourtraceid", "myuuid" "youruuid", "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( crie\@klavi ai mailto\ crie\@klavi ai )