APIs & Integrations

AWhyBravo
Participant

CRM > Calls > Basic API > Get Page - Problem with "after"

SOLVE

Hi there,

 

Since there is no Webhook for the Engagements, I need to set up polling to find any new Calls. For this, I am connecting to the GET/crm/v3/objects/callsendpoint. I feel that this is really poorly done, but I am hoping that I am misunderstanding something.


For paging on the endpoint, I can set an $after property, which is the ID of the NEXT hubspot call. If I am polling, I will never know this and must use the last one that I have saved, which then includes that last one. So, it is always duplicate. But... that's fine.

The bigger issue is that the IDs are not sequential. I created a Call and noticed that the ID, if taken as an integer, is less than the latest ID that I had created previously. Therefore, when using $after with the previously created call, I will never get the newer call. This seems to be a big mistake.

 

I was looking through the forum, and it seems like the V1 API had an endpoint where I could see the recent engagements. (https://community.hubspot.com/t5/APIs-Integrations/Web-hook-trigger-for-Engagement-events-like-Meeti...

Is that still available? I can't find it in the latest API documentation.

Can you clarify the issue with $after? And, is there any way that I can use a date instead of the call ID when looking at pagination?


Thanks

0 Upvotes
1 Accepted solution
AliFawadHassan
Solution
Member

CRM > Calls > Basic API > Get Page - Problem with "after"

SOLVE

Hi @AWhyBravo 

You can use search endpoint ( https://developers.hubspot.com/docs/api/crm/search ) that helps you to get the calls with their proeprties and also you can sort them on the behalf of date easily.

View solution in original post

1 Reply 1
AliFawadHassan
Solution
Member

CRM > Calls > Basic API > Get Page - Problem with "after"

SOLVE

Hi @AWhyBravo 

You can use search endpoint ( https://developers.hubspot.com/docs/api/crm/search ) that helps you to get the calls with their proeprties and also you can sort them on the behalf of date easily.