Hello, I am looking to reduce the number of times that I call on the hubspot api to retrieve email data.
Goal: I would like to display emails’ subject lines and clicks performance somewhere else.
Current Approach: I am currently calling the endpoint:
https://api.hubapi.com/email/public/v1/campaigns/
From here I get a list of the ids for each email sent out
Then I am iterating through and make separate calls to the same endpoint:
https://api.hubapi.com/email/public/v1/campaigns/{id}
You can see where the issue comes in. If I want to display this information then every time the page refreshes it makes (internal call + per email = total calls) a lot of calls.
This can be mitigated by storing the data in a separate place but then the information won’t be the newest.
Is there a better way to get the subject line and clicks for each email without making soo many calls?