Data fetching

Once the user has synchronized his bank account with the Bridge Connect you will be able to fetch his bank data.

📘

At the end of the funnel, you will have access to at least 7 days of data. The synchronization of the entire history will need few more minutes. Depending on the bank, the history of the account can vary from 2 to 24 months.

Use our Webhooks to be call when the item is created and refreshed. The field full_refresh of the ITEM_REFRESHED webhook event indicates you if we fetched the item's full history or not.

The easiest way to use the data from our API is to store all the information you fetch from the users, the items, the accounts and the transactions at each refresh. If you do that:

  • your data structure will remain updated if a user opens or closes a new account.
  • the data fetching will be incremental and optimized.

❗️

All the data you will receive from Bridge is sensitive. It’s your responsibility to protect them with a high level of security.

That’s why we advise you to fetch the transactions with List updated transactions or List updated transactions by account calls when you receive an ACCOUNT_UPDATED webhook event. It lets you to only get the new or updated transactions.

curl 'https://api.bridgeapi.io/v2/transactions/updated?since=2019-06-21T18:44:09.523Z&limit=12' \
    -X GET \
    -H 'Bridge-Version: 2021-06-01' \
    -H 'Client-Id: MY_CLIENT_ID' \
    -H 'Client-Secret: MY_CLIENT_SECRET' \
    -H 'Authorization: Bearer TOP_SECRET_ACCESS_TOKEN'
{
  "resources": [
    {
      "id": 1000013123932,
      "clean_description": "Prelevement Spotify SA",
      "bank_description": "Prlv 1512 Spotify SA",
      "amount": -4.99,
      "date": "2019-04-06",
      "updated_at": "2019-04-06T09:19:14Z",
      "currency_code": "EUR",
      "is_deleted": false,
      "category_id": 1,
      "account_id": 2341498,
      "is_future": false,
      "show_client_side": true
    },
    //...
  ],
  "pagination": {
    "next_uri": "/v2/transactions?after=MjAxNS0xMS0xNjo0NTU3ODE1Mg%3D%3D&limit=12&until=2016-04-06"
  }
}

For that, store the last “updated_at” from the transactions you already have fetched and use it as "since" parameter.

If you don’t have any transactions and your "since" is null, you will receive all the transactions already synchronized.

All the accounts are automatically refresh once or twice a day. You can fetch the data whenever you want during the day.

📘

For some ressources more static, as the accounts, you can use the pagination to know if the user has opened or closed one.


What’s Next