Data fetching

Once the user has synchronized their bank account using the Bridge Connect, you can begin fetching their bank data to power your application.

๐Ÿ“˜

Data availabilty

Upon completing the Bridge Connect, you will have access to at least 7 days of data. The synchronization of the entire transaction history may take a few more minutes. Depending on the bank, the account history can vary from 2 to 24 months

Using Webhooks

We recommend using our Webhooks to stay informed when an item is created and refreshed. The full_refresh field in the ITEM_REFRESHED webhook event indicates whether we have fetched the item's full history.

Best Practices for Data fetching

To make the most of our API and ensure optimal performance:

  1. Store All Information: Store all the information you fetch from users, items, accounts, and transactions at each refresh. This approach has several benefits:
    • Your data structure stays updated if a user opens or closes a new account.
    • Data fetching becomes incremental and optimized.

โ—๏ธ

Security reminder

All data received from Bridge is sensitive, so it's your responsibility to protect it with a high level of security.

  1. Fetch Transactions Incrementally: To efficiently fetch transactions, consider using the "List updated transactions" or "List updated transactions by account" calls when you receive an ACCOUNT_UPDATED webhook event. This approach allows you to retrieve only new or updated transactions.

Use the following endpoint to request updated transactions since a specific date:

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

The response will include a list of updated transactions:

{
  "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"
  }
}

To implement this, store the updated_at timestamp from the transactions you have already fetched and use it as the since parameter for subsequent requests.

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

Account Data Refresh

All accounts are automatically refreshed once or twice a day. You can fetch the data at any time during the day.

๐Ÿ“˜

For resources that change less frequently, such as accounts, you can use pagination to determine if a user has opened or closed an account.


Whatโ€™s Next