Fetching data

Once you have an entity_id you can now make calls to the identity and accounts endpoints. The identity endpoint provided identity details about the person that has provided consent in the SDK. The accounts endpoint provides the list of accounts the user has consented to share for an entity.

To understand how to make calls to each of these endpoints please review the API reference (Accounts and Identity)

📘

When a user is redirected to their bank during the connection stage of the bank account, they will be able to select which accounts within their bank account they want to share (e.g.: they might have a current and savings account but only share their current). The accounts endpoint will only return the accounts the user has decided to share with you.

After making an /accounts call you should save the account_id field from the response, as this will be used to make API calls on the associated accounts for all the other resources. Once you have the account_id for a specific account, you can now also make calls to all the remaining resources: identities, scheduled payments, direct debits, balances, transactions, beneficiaries, standing_orders. Please refer to the Data API reference to understand the requests and responses for these resources.

Lean's Data APIs

Once the customer is connected to his bank, you will be able to query a list of Financial Data & Insights APIs, analyze & utilize them accordingly:

Data fields

  • All mandatory fields are marked as such in the response for each API in the Data API reference
  • All fields where the data type is enum, can take the value UNSUPPORTED to accommodate for when the bank returns a field that is not supported in the KSA Open Banking standard