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:

  1. Authenticate into the platform to obtain a JWT token
    Copy
    Copied
    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"}'
  2. Create a new Business Registry , i.e. a fiscal entity that owns one or more accounts we want to work with
    Copy
    Copied
    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"}'
  3. Start a Connect Request , that is the process by which a Business Registry express its consent to access data from accounts it owns.
    Copy
    Copied
    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.

enabling_accounts

  1. As the next step it is possible to retrieve a list of Accounts sending a GET request to the business-registry/SOME_ID/accounts endpoint
    Copy
    Copied
    curl --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"
  2. 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
    Copy
    Copied
    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"