How to retrieve Financial Transactions
When and End User has successfully completed the connection process for a financial account, it is possible to retrieve the list of transaction related to that account.
Here is an overview of the whole process:
-
Authenticate
into the platform to obtain a JWT token
curl --request POST https://common-sandbox.api.acubeapi.com/login \ -H 'Content-Type: application/json' -H 'Accept: application/json' \ --data-raw '{"email": "my@email.test", "password": "myPassword"}'
-
Create a new
Business Registry
, i.e. a fiscal entity that owns one or more accounts we want to work with
curl --request POST https://ob-sandbox.api.acubeapi.com/business-registry \ -H 'Content-Type: application/json' -H 'Accept: application/json' \ -H "Authorization: bearer JWT_TOKEN_HERE" \ --data-raw '{"fiscalId": "SOME_ID", "email": "some@email.test", "businessName": "Some Name"}'
-
Start a
Connect Request
, that is the
process
by which a Business Registry express its consent to access data from accounts it owns.
curl --request POST https://ob-sandbox.api.acubeapi.com/business-registry/SOME_ID/connect \ -H 'Content-Type: application/json' -H 'Accept: application/json' \ -H "Authorization: bearer JWT_TOKEN_HERE" \ --data-raw '{"locale": "en"}'
You will get back an URL. Within this mini white-labeled website, the bank accounts owner can proceed with the consent. During this process please remember to check the GDPR consent box. Please note that user needs to explicitly choose which account to enable, as in the following image.
-
As the next step it is possible to retrieve a list of
Accounts
sending a
GET
request to thebusiness-registry/SOME_ID/accounts
endpointcurl --request GET https://ob-sandbox.api.acubeapi.com/business-registry/SOME_ID/accounts \ -H 'Content-Type: application/json' -H 'Accept: application/json' \ -H "Authorization: bearer JWT_TOKEN_HERE"
-
Then you can query the list of
Transactions
related to a particular Business Registry via a
GET
call to this endpoint:business-registry/SOME_ID/transactions
curl --request GET https://ob-sandbox.api.acubeapi.com/business-registry/SOME_ID/transactions \ -H 'Content-Type: application/json' -H 'Accept: application/json' \ -H "Authorization: bearer JWT_TOKEN_HERE"