API REFERENCE
...
Business
User-level report
7 min
name user data method post url https api sandbox klavi ai data v1 business user data description get user level data by end user s taxid nthis endpoint is a notification api after the end user completes authorization on the bank side the klavi backend will return the user s authorization information through webhook then partners can send the data products required by the partners based on the authorization information through this notification endpoint nwhen klavi receives this request from partner klavi backend immediately retrieves the data through open finance and processes it into specific data products which is then sent to the partner through webhook nproducts may be requested by different applications disregarding the original application to which the user gave consent tab examples examples languages id qq0then aksnyozglyhve language curl code curl location https api sandbox klavi ai data v1 business user data n header accept application json n header content type application json n data taxid string linkid string consentids array products array productscallbackurl object externalinfo object customlabel selectedlanguageid qq0then aksnyozglyhve results languages id pzug6ex zkadhcxpvoryd language 200 customlabel code n requestid xxxsssaa n message ok n selectedlanguageid pzug6ex zkadhcxpvoryd request pathparameters queryparameters headerparameters name authorization kind required type string description bearer access token it returned by the auth children bodydataparameters name taxid kind required type string description the cnpj of the company for business accounts only children name linkid kind optional type string description linkid it returned by the links children name consentids kind optional type array description consentid list it returned by the consents children name products kind required type array description product list name productscallbackurl kind optional type object description report products callback url npriority highest children name externalinfo kind optional type object description used for partner to transmit information which will be carried in reports sent to partner children formdataparameters currentnewparameter label body parameter value bodydataparameters parameter products all all overview docid\ xkr8lrggfj7yfng1vaydd selected by partners during onboarding; product list one or more overview docid\ xkr8lrggfj7yfng1vaydd (can only be products within the product range selected by the partner during onboarding) 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 report generation logic the klavi backend will determine the data range for generating reports based on the parameters you submit taxid if you only submit this parameter, the klavi backend system will aggregate all consents data ranges of all links around the taxid for report calculation and generation linkid if you submit this parameter and taxid (required), the klavi backend system will aggregate this linkid data ranges of the taxid for report calculation and generation consentid if you submit this parameter and taxid (required), the klavi backend system will aggregate this consentid data ranges of the taxid for report calculation and generation 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" } }