Create a Link
curl --location 'https://api-sandbox.klavi.ai/data/v1/links' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"personalTaxId":"string","businessTaxId":"string","email":"string","phone":"string","institutionCode":"String","redirectURL":"string","productsCallbackURL":"Object","externalInfo":"Object","connectionKey":"string"}'
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!"
},
"transactionPeriod": 3
}
}- customization: the object can be used by partners to customize some content of whitelabel. For specific customized content, please contact the operations personnel ([email protected]).
- transactionPeriod: The number of complete periods covered by the provided transactions or statement data. For checking accounts, this represents the number of full calendar months spanned by the transactions. For credit card accounts, this represents the number of full billing cycles (statement periods) covered. The valid enumeration values are: [3, 6, 9], if the partner does not pass this parameter, the default value is 12. it only valid for as follow Institution-level product:
- PJ:
- pj_checking_account
- pj_savings_account
- pj_credit_card
- pj_categorized_checking_L2
- pj_categorized_savings_L2
- pj_categorized_creditcard_L2
- pj_categorized_checking_L3
- pj_categorized_savings_L3
- pj_categorized_creditcard_L3
- PF:
- pf_checking_account
- pf_savings_account
- pf_credit_card
- pf_categorized_checking_L2
- pf_categorized_savings_L2
- pf_categorized_creditcard_L2
- pf_categorized_checking_L3
- pf_categorized_savings_L3
- pf_categorized_creditcard_L3