Investment portfolios

Reference information for our Investment portfolios webhook events.

Historical update

As soon as a banking recurrent link, which contains investment portfolios, is created, we asynchronously load the Investment portfolios available. You will receive a historical_update notification whenever the investment portfolios list is available for you to access.

{
   "webhook_id":"03d1ca0d62db4f769488265d141047b7",
   "webhook_type":"INVESTMENTS_PORTFOLIOS", 
   "webhook_code":"historical_update", 
   "link_id":"2f5d361d-dad6-45d4-a0bf-26d479766067",
   "request_id": "4363b08b-51eb-4350-9c74-5df5ac92a7f6",
   "external_id": "your_external_id",
   "data":{
      "total_portfolios":1 // Total number of investment portfolios found
   }
}

Once you receive the notification, you can get further details by making the following request:

curl --request GET 'https://api.belvo.com/investments/portfolios/?link={id}' \
-u [Secret Key ID]:[Secret Key PASSWORD]
client.investmentsPortfolios.list({
  filters: {
    link: "{id}"
  }
})
client.InvestmentsPortfolios.list(link="{id}")
client.investments_portfolio.list(params: {
  link: "{id}"
})

Where:

  • {id} is the link_id you receive in your historical_update notification.

New investment portfolios available

You can receive a new_investment_potfolios_available notification whenever new investment portfolios are available for a banking recurrent link.

Once you receive the notification, you can query the Investment portfolios resource to pull the details of these new investment portfolios. For example, if you receive the following webhook:

{
  "webhook_id": "aadf41a1fc8e4f79a49f7f04027ac999",
  "webhook_type": "INVESTMENTS_PORTFOLIOS",
  "webhook_code": "new_investments_portfolios_available",
  "link_id": "16f68516-bcbc-4cf7-b815-c500d4204e28",
  "request_id": "4363b08b-51eb-4350-9c74-5df5ac92a7f6",
  "external_id": "your_external_id",
  "data": {
    "new_portfolios": 8 // Number of new investment portfolios found since last event
  }
}

You can request more information about the investment portfolios with the following query to the Investment portfolios endpoint using the created_at filter:

curl --request GET 'https://api.belvo.com/investments/portfolios/?link={id}&created_at__range={date1},{date2}' \
-u [Secret Key ID]:[Secret Key PASSWORD]
client.investmentsPortfolios.list({
  filters: {
    link: "{id}",
    created_at__range: "{date1},{date2}"
  }
})
client.InvestmentsPortfolios.list(link="{id}",created_at__range="{date1},{date2}")
client.investments_portfolio.list(params: {
  link: "{id}",
  created_at__range: "{date1},{date2}"
})

Where:

  • {id} is the link_id you received in the notification
  • {date1} is the date when you previously received a notification, in YYYY-MM-DD format.
  • {date2} is the date you received the latest notification, in YYYY-MM-DD format.