Skip to main content
After a customer connects their bank account through Flinks Connect, you retrieve their financial data by calling the /GetAccountsDetail endpoint. This page explains the full data retrieval flow.

Prerequisites

Before calling /GetAccountsDetail, you need a valid RequestId. To obtain one:
  1. Retrieve the loginId from the Flinks Connect event listener or redirect URL.
  2. Call /Authorize with the loginId to get a RequestId.
Store the loginId on your server. The loginId does not expire and is required for future data retrieval. The RequestId is session-scoped and expires.

Call /GetAccountsDetail

Send a POST request to /GetAccountsDetail with the RequestId in the body. The endpoint returns account data including personal information, account details, and transaction history. See the API reference for the full list of returned fields.

Handle the response

/GetAccountsDetail returns one of two responses:
  • 200 — Data is ready. The response contains the full account payload.
  • 202 — Data is still processing. You must poll /GetAccountsDetailAsync to retrieve the data when it’s ready.
A 202 response is expected on the initial call. Most requests finish processing within a few seconds.

Poll /GetAccountsDetailAsync on 202

When you receive a 202 from /GetAccountsDetail:
  1. Call /GetAccountsDetailAsync with the same RequestId as a path parameter. This is a GET request.
  2. If the response is 202, the data is still processing. Wait 10 seconds, then call /GetAccountsDetailAsync again.
  3. Repeat until you receive a 200 response. The 200 response contains the same payload as a 200 from /GetAccountsDetail.
  4. Set a maximum timeout of 30 minutes to avoid infinite polling loops.
/GetAccountsDetailAsync is not a separate data endpoint. It is the polling mechanism for /GetAccountsDetail. You only call it after receiving a 202 from /GetAccountsDetail.

Refresh account data

To fetch fresh data for an already-connected user, call /Authorize with MostRecentCached set to false. This triggers a live re-authorization with the financial institution instead of returning cached data.
curl --request POST \
  --url https://yourinstance-api.private.fin.ag/v3/{customerId}/BankingServices/Authorize \
  --header 'Content-Type: application/json' \
  --header 'flinks-auth-key: {authorize_token}' \
  --data '{
    "LoginId": "your-login-id",
    "MostRecentCached": false,
    "Save": true
  }'
The response determines your next step:
  • 200 — Re-authorization succeeded without MFA. Use the returned RequestId to call /GetAccountsDetail with polling, same as the initial retrieval flow.
  • 203 — MFA is required. The user must answer security questions before fresh data can be retrieved.

Handle 203 MFA during refresh

When /Authorize returns 203 during a refresh, the user needs to complete MFA. How you handle this depends on your frontend: With Flinks Connect (iframe): Relaunch the Flinks Connect iframe with the requestId from the 203 response and a fresh authorizeToken. Flinks Connect will present the MFA challenge to the user automatically.
https://yourinstance-iframe.private.fin.ag/v2/?requestId={requestId}&authorizeToken={freshToken}
After the user answers MFA, Flinks Connect fires a REDIRECT event with the loginId. Use the loginId to call /Authorize with MostRecentCached: true, then proceed to /GetAccountsDetail. With direct API integration: Extract the SecurityChallenges from the 203 response, present them to the user, and call /Authorize again with the RequestId and SecurityResponses. See the /Authorize API reference for the full request format.
Generate a fresh authorize token before relaunching Flinks Connect for MFA. The original token used for the /Authorize call has already been consumed — authorize tokens are single-use.

Alternative: use webhooks

Instead of polling /GetAccountsDetailAsync, you can configure a webhook to receive the data automatically when processing completes. With webhooks, Flinks sends a POST callback to your endpoint containing the same payload as a /GetAccountsDetail 200 response. This eliminates the need for polling logic. Webhook setup requires a ticket via Flinks Support Portal. Webhooks cannot be tested in sandbox environments. For more details, see the Webhooks documentation.