Currently, we are developing an integration that needs to get all the associated files with the HubSpot object (Deal/Contact/Company) and send them to our server. But I couldn’t find any batch read endpoint for files that we can filter files by attachment ids.
With the current enpoints of files API
GET/files/v3/files/search will return all the files (no option to filter more than one file by file ids)
and GET/files/v3/files/{fileId} will return only one file.
So this means I have to make multiple API cals to get the all files attached to the deal if deal has more than one attachment.
I also tried this with hubspot search API but didn’t work.
I hope this helps get you moving in the right direction. I understand it’s likely not a 100% solution, and I wanted to share one approach I’ve found using these endpoints.
This uses the pseudo-association “associations.contact” for my test, but you can use “associations.deal” in the same manner.
Here I want to get the url value of all the attachemnts of hubspot object. But I couldn’t find any batch read end point to get all files filter by file ids or all attachments urls associated with hubspot object(DEAL/CONTACT/COMPANY).
Currently I have to use multiple API calls to do this.
Is there any way to do this with a single API call?