Install Flinks Connect
Users of this guide should be familiar with the basic mechanics of Flinks data connectivity, including how to Set up Flinks connect. Displaying Investment institutions on Flinks Connect will be enabled automatically in your environment by Flinks. The system filters the list to display only financial institutions from which Investment data can be retrieved. Should a dedicated environment be required for testing this functionality, we can provision a new instance upon request .Make API calls
Anytime you want to access your user’s financial data, you will need to use theLoginId associated with that user’s account to make a request to our API.
Here is a step by step overview of this process:
-
A successful connection redirects the user to the landing page of your choice. At this moment, a
LoginIdis issued and sent from your client-side to your server. - When you initiate an API call, the LoginId is exchanged for a RequestId with the Flinks API and a session is initiated.
- Once a session is active, you can request for data and receive it. If you place a request while a session is loading, it may return an error. If this happens, retry after the session finishes loading.
Pulling back /Investments data with the API Requests Flow
Okay, let’s dig deeper into how exactly you can retrieve financial data from connected accounts. In order to do that, your server needs to perform a series of API requests.1. Initiating a session with the Flinks API
This is the first API request that needs to be executed when you want to retrieve data from a connected account. Flinks API needs to confirm the validity of the request and to know from which account you want to retrieve data. To do so, you will exchange your LoginId for a new RequestId. For that, the/Authorize endpoint needs to be called using a POST method, and it requires a loginId and the parameter MostRecentCached: true.
To make it more concrete, let’s suppose that you are opening a new session to retrieve the data for the LoginId: 5e115eac-1209-4f19-641c-08d6d484e2fe:
Json
Json
LoginId (5e115eac-1209-4f19-641c-08d6d484e2fe) was successfully exchanged for a RequestId (1243c283-e0ca-4fda-a5e4-343068430190). Now that the session is active, we have everything we need to place a call to retrieveInvestmentsdata.
2. Requesting Ready-to-Deliver data
The next step is for your server to send a request for data. This request uses the/Investments endpoint, which also needs to be made using a POST method, and requires the acquired RequestId, the previously used LoginId and the parameter MostRecentCached:true.
Continuing our example using our RequestId (1243c283-e0ca-4fda-a5e4-343068430190), it looks like this:
Json
HTTP 202 FlinksCode: OPERATION_PENDING, meaning that the data you are requesting is still being processed.
Here’s an example of a typical API response for data pending processing:
Json
3. Requesting Pending-to-Deliver data
While you receive the responseHTTP 202 FlinksCode: OPERATION_PENDING, you need to keep calling the /Investments endpoint (with the same parameters above) every 10 seconds for a maximum of 30 minutes.
Once your data is done being processed, the API will respond with an HTTP 200 and a JSON payload containing all the data we collected from the investment account in a standard format. Your app server will be ready to start handling it according to your use-case.
For a full detailed breakdown of the /Investments call and response fields, please refer to the documentation on the /Investments API page.
The /Investments endpoint gives Flinks’ clients the ability to retrieve user-permissioned data on wealth or investment (terms which here can be used interchangeably) holdings across a number of different assets, classes, and institutions.
The product’s architecture is fundamentally based on our retail banking data aggregation response; however, it incorporates several novel concepts unique to this dataset.
Here are some of those key new concepts in action, which will all be explored in depth later in this guide:
- Institution: the financial institution where the investment accounts exist
- Accounts: the places where investment activity occurs
- Positions: a point-in-time snapshot of the investment portfolio
- Securities: the details of the assets within the current or past positions
- Transactions: the historical activities that built the current portfolio