Common Worksflows
This page descibes some default API workflows that are used with Account Insights. It can be seen as a high level overview and introduction to the steps required to work with the API. The detailed requests can be found on the linked pages.
First time data acquisition
This workflow is acquiring the data of a consumer once and a report is generated directly afterwards.
- Create a Session.
- Provide at least an
{}
in theconsent_scope.insights_refresh
property.
- Provide at least an
- Start an Insights-Refresh flow.
- Use the received
client_token
to start the XS2A App so the consumer can provide the required bank authentication data. - Wait for the javascript finished event.
- Call the Flow-Information endpoint to receive the flow result state and the generated
insights_consumer_id
. - The data are now available in the data storages and the
insights_consumer_id
can be used to generate Reports.
Refreshing consumer data
This workflow describes how data for returning consumers can be refreshed. It is very similar to the first time data acquisition.
- Create a Session.
- Provide at least an
{}
in theconsent_scope.insights_refresh
property.
- Provide at least an
- Start an Insights-Refresh flow with the
insights_consumer_id
of the returning consumer. - Use the received
client_token
to start the XS2A App so the consumer can provide the required bank authentication data. - Wait for the javascript finished event.
- Call the Flow-Information endpoint to receive the flow result state and the generated
insights_consumer_id
. - The data are now available in the data storages and the
insights_consumer_id
can be used to generate Reports.
First time data acquisition and refreshing with a stored consent
This workflow describes how data can be refreshed with a stored consent so that the consumer doesn't need to reauthenticate with their bank for each refresh.
- Create a Session.
- Provide at least an
{}
in theconsent_scope.insights_refresh
property.
- Provide at least an
- Start an Insights-Refresh flow.
- Set the
store_consent
flag toREQUIRED
- Set the
- Use the received
client_token
to start the XS2A App so the consumer can provide the required bank authentication data. - Wait for the javascript finished event.
- Call the Flow-Information endpoint to receive the flow result state and the generated
insights_consumer_id
.- If the consumer selected a bank that doesn't support consents the
data.state
will be an error state.
- If the consumer selected a bank that doesn't support consents the
- To refresh the consumer data with the stored consent call the Consent-Refresh endpoint with the consumers
insights_consumer_id
. - Poll the Refresh-Status endpoint every few seconds until the refresh state is not
PROCESSING
.
Automatic consumer data refresh
This workflow describes how consumer data can be refreshed automatically without a consumer being present.
- Create a Session.
- Provide at least an
{}
in theconsent_scope.insights_refresh
property.
- Provide at least an
- Start an Insights-Refresh flow.
- Set the
store_consent
flag toREQUIRED
- Set the
- Use the received
client_token
to start the XS2A App so the consumer can provide the required bank authentication data. - Wait for the javascript finished event.
- Call the Flow-Information endpoint to receive the flow result state and the generated
insights_consumer_id
.- If the consumer selected a bank that doesn't support consents the
data.state
will be an error state.
- If the consumer selected a bank that doesn't support consents the
- Call the Schedule Automatic Refresh endpoint with the received
insights_consumer_id
to schedule regular, automatic refreshes of the consumer data.
Use Accoung Insights without the bank data acquisition
This workflow describes how to generate Account Insights Reports with data from other sources. To do this the data need to be put into the Storage to be available by the report engine.
- Call the Create Account endpoint to provide the account data.
- Call the Create Transactions endpoint to provide the transaction data.
- The data are now available in the data storages and the
insights_consumer_id
can be used to generate Reports.