Data fetching

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

📘

Data availabilty

Upon completing the 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 0 to 36 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: each time you receive an item.account.updated webhook event, fetch the transactions on our API using the since parameter. This approach allows you to retrieve only new or updated transactions.

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

curl --request GET \
     --url 'https://api.bridgeapi.io/v3/aggregation/transactions?since=2024-11-19T18:44:09.523Z' \
     --header 'Bridge-Version: BRIDGE-VERSION' \
     --header 'accept: application/json'
     --header 'Authorization: Bearer TOP_SECRET_ACCESS_TOKEN'

The response will include a list of updated transactions:

{
  "resources": [
    {
      "id": 33000191035700,
      "clean_description": "CB Mad Cours Marjane M.m G",
      "provider_description": "PAIEMENT PAR CARTE 09/11/2024 73.6 MAD COURS 0.09402 MARJANE M.M G",
      "amount": -6.92,
      "date": "2024-11-09",
      "booking_date": "2024-11-09",
      "transaction_date": "2024-11-09",
      "value_date": "2024-11-09",
      "updated_at": "2024-11-09T18:10:10.143Z",
      "currency_code": "EUR",
      "deleted": false,
      "category_id": 249,
      "operation_type": "card",
      "account_id": 48178050,
      "future": false
    },
    {
      "id": 33000191035701,
      "clean_description": "CB Idfs G",
      "provider_description": "PAIEMENT PAR CARTE 25/11/2024 IDFS T2 G",
      "amount": -194,
      "date": "2024-11-25",
      "booking_date": "2024-11-25",
      "transaction_date": "2024-11-25",
      "value_date": "2024-11-25",
      "updated_at": "2024-11-25T16:10:10.144Z",
      "currency_code": "EUR",
      "deleted": false,
      "category_id": 247,
      "operation_type": "card",
      "account_id": 48178050,
      "future": false
    }
  ],
  "generated_at": "2024-11-25T16:41:18.533Z",
  "pagination": {
    "next_uri": "/v3/aggregation/transactions?after=MTczMjExOTAxMDE0MjozMzAwMDE5MTAzNTY5OQ&limit=50"
  }
}

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.

See the Manage your transactions section for more details.