Personal
curl --location 'https://api-sandbox.klavi.ai/data/eco-dynamic/v1/personal/report' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"taxId": "String",
"kycVerified": "Boolean"
}'Body parameters
institutionCodes
If partner wants to obtain data from one or more specific institutions for a taxId, partner can use this parameter to pass the code of the corresponding institutions in the form of an array. For example:
"institutionCodes": ["001","033"]If partner want to obtain data for a taxId across all institutions in Klavi, leave it blank. For example:
"institutionCodes": []The institutional code is here.
productsCallbackURL
With this parameter, you can submit specific or all reports generated sending addresses to Klavi backend.
1.Specific reports example
{
"productsCallbackURL":{
"financial_entries_eco":"https://www.yourdomain.com/financial/yourpath",
"credit_risk_eco":"https://www.yourdomain.com/credit_risk/yourpath"
}
}After the report is generated, the Klavi backend will send the report financial_entries_eco to https://www.yourdomain.com/financial/yourendpoint and send the report credit_risk_eco to https://www.yourdomain.com/credit_risk/yourpath.
2.Specific and other reports example
{
"productsCallbackURL":{
"income_eco":"https://www.yourdomain.com/income/yourpath",
"other":"https://www.yourdomain.com/yourpath"
}
}In this case, the Klavi backend will send the report income_eco to https://www.yourdomain.com/income/yourpath 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"
}
}Response
Return code:200
If the taxId has Open Finance authorization and LGPD authorization in Klavi Eco, return:
{
"requestId": "c69e4cd41d360008631c6db1fb47a00c",
"message": "ok"
}The system will immediately process the data and generate a report that you have pre configured. If you pass the productsCallbackURL in the request, the report will be sent to that URL first after it is generated. If this parameter has no value, the system will send the report to the webhook you configured to receive the report in Klavi Console.
Status code: 4008
If the taxId does not have Open Finance authorization and LGPD authorization in Klavi Eco, return:
{
"statusCode": 4008,
"error": "Insufficient authorization info",
"message": "No Open Finance consent available"
}Status code: 4009
If the kycVerified parameter is false, it means that the partner has not completed KYC verification, and the API will directly return a failure.
{
"statusCode": 4009,
"error": "Insufficient authorization info",
"message": "KYC process needed for data inquiry"
}You can call the conecte API to allow the end user to complete Open Finance and LGPD authorizations and obtain the corresponding report data.