submitCredentials
This API does three tasks:
- Verify the credential format of different institution;
Each institution has its own requirements of login information and also the corresponding input format. In order to improve the user experience, partners can verify the format of each user input field by the front-end application before submitting the credential.
Partners can check out all the credentials format in attached table "Institution credentials" in the end of this documentation.
- Is used to generate data collection tasks in Klavi backend;
If the credential format is correct, the Klavi backend will generate a task for this submission, backend will submit this credential to the institution to start to obtain and process the data.
- Send result as callback.
When the task is completed, the result will be callback(See the callback section of this document) to the partner.Therefore, the partner needs to provide a callback URL to receive the result.
In addition, you can also call the checkStatus() API in polling mode to query the task status.
💡 Note:
- Partners can extend the extraParams parameter according to business requirements, which will be transparently written into data reports and transmitted to partners.
- If any one of cpf/agency/account/username/password exists in credential, it needs to be encrypted according to RSA encryption algorithm before submitting, and RSA public key is provided independently.
Java example:
GoLang example:
Request parameter:
Name | Type | Required | Description |
consentId | String | Yes | Consent ID, the value of createConsent() |
cpf | String | No | cpf |
agency | String | No | agency |
account | String | No | User account number |
userName | String | No | User name(current only for Caixa or corporate account) |
password | String | Yes | Password |
institutionCode | String | Yes | Institution code |
cooperativaOption | String | No | Only for Ailos, 13 options in total |
passwordPhrase | String | No | Only for Ailos, "Frase Secreta" phrase |
accountLevel | Number | No | Only for Bradesco, 1st/2nd/3rd account for login |
extraParams | Object | No | Partners can customize additional parameters, such as UUID defined by partners themselves, which will be transparently written into data reports and transmitted to partners. |
Return data:
Name | Type | Description |
traceId | String | The tracking number of the task |
Return to the correct example:
Example of formatting errors: