Start Integration
This is a quick start guide to quickly generate a Credit Decisioning analysis assuming that you are able to provide the Open Banking data yourself.
1. Generate an access token
Generate an access token using the client_id
and client_secret
provided in the Console. The returned access token gives you access to our APIs.
curl --request POST \
--url https://api.algoan.com/v1/oauth/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data client_id=your_client_id \
--data client_secret=your_client_secret
Congratulations 🥳 You are now authenticated and ready to begin the integration.
Store the access_token
securely, for example, as an environment variable, as this token will be required for future API requests.
2. Create a customer
Once you have stored the access_token
securely, use it to create a Customer with a custom identifier that matches your system's unique identifier.
curl --request POST \
--url https://api.algoan.com/v2/customers \
--header 'Authorization: Bearer access_token' \
--header 'Content-Type: application/json' \
--data '{
"customIdentifier": "your_custom_identifier"
}'
Each customer is unique per customIdentifier
. If you try to create a customer with the same identifier, a 422 HTTP error will be returned.
3. Create an analysis - Account and Transactions upload
Now that the Customer has been created, it is time to upload their bank accounts and transactions to start the analysis.
ACCOUNTS=$(curl https://raw.githubusercontent.com/algoan/fake-open-banking-data/main/samples/fr/harry_potter.json)
curl --request POST \
--url https://api.algoan.com/v2/customers/${customerId}/analyses \
--header 'Authorization: Bearer access_token' \
--header 'Content-Type: application/json' \
--data $ACCOUNTS
You can find open banking data samples in the table below or on GitHub:
Once the analysis is created, the API will return a 202 HTTP response, meaning that the analysis has started.
4. Get results
The last step consists of retrieving Score and Credit Insights results.
To get the result of the analysis, you can proceed to perform a short polling. Request the given analysis until the status is COMPLETED
curl --request GET \
--url https://api.algoan.com/v2/customers/${customerId}/analyses/${analysisId} \
--header 'Authorization: Bearer access_token'
Once the analysis is finished, you should see scores
and creditInsights
defined 🏆
You can also be notified when the analysis completed. Refer to the Webhooks section to configure your own webhook.