APIs & Integrations

D_Sheerin
Miembro

Find all offsets for deals API

resolver

I've been using the hubspot deals api to construct a data set. currently i've been making multiple separate queries and merging the end results but i realize this approach isnt at all future proof. From the hubspot resource i have a total of 924 separate deals and while i've been able to call subsequent queries using the "offset" value given initial with each request this approach is difficult to automate. I considered calling for each deals using a api url with a incrementally increasing "offset" portion but there doesnt seem to be a logical order to how the offset increases. despite being limited to 250 deals the offset value seems to vary greatly. Is there anyway i can specifically call for the offset values at a 250 increment without just making deal requests?

0 Me gusta
1 Soluciones aceptada
cbarley
Solución
Exmiembro de HubSpot
Exmiembro de HubSpot

Find all offsets for deals API

resolver

Hi @D_Sheerin , the way the offset works is that it returns the last deal ID that was given back. This acts as a pointer to when you're querying the records, and doesn't give you really any relational information (how far away from the first or last record you are). You'll need to pull all deals and query from there each time when your data set changes (i.e. deals are deleted or added).

Ver la solución en mensaje original publicado

1 Respuesta 1
cbarley
Solución
Exmiembro de HubSpot
Exmiembro de HubSpot

Find all offsets for deals API

resolver

Hi @D_Sheerin , the way the offset works is that it returns the last deal ID that was given back. This acts as a pointer to when you're querying the records, and doesn't give you really any relational information (how far away from the first or last record you are). You'll need to pull all deals and query from there each time when your data set changes (i.e. deals are deleted or added).