You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to get all closed deals from the api, so we are fetching /ver1/deals?limit=1000&offset=0&order_direction=asc&scope=finished&order=closed_at.
We are incrementing the offset as long as there are deals coming back (0, 1000, 2000, 3000, ...). To avoid fetching the same deals again and again (reduce number of api-calls, resources), we save the last offset. So the next day our call might be /ver1/deals?limit=1000&offset=5000&order_direction=asc&scope=finished&order=closed_at. This works as long as the number of deals is not reduced (then we got no deals back, even if there were newer deals), which happens sometimes. We guess, that for example removing an account removes all corresponding deals. In that case, we manually need to find the problem why there are no new deals coming back, reset the offset back to 0 and fetch all deals again.
The only way we see to avoid that completly is to always fetch all deals (which leads to more api-calls and more database-traffic).
Do you see any solution for that problem with the current api?
The best option resource-wise would be the following:
Adding a new parameter to /ver1/deals, similar to the from-option, but for the closed_at-field. Then we could save the date of the newest deal and take that for the next fetch.
The text was updated successfully, but these errors were encountered:
We want to get all closed deals from the api, so we are fetching
/ver1/deals?limit=1000&offset=0&order_direction=asc&scope=finished&order=closed_at
.We are incrementing the offset as long as there are deals coming back (0, 1000, 2000, 3000, ...). To avoid fetching the same deals again and again (reduce number of api-calls, resources), we save the last offset. So the next day our call might be
/ver1/deals?limit=1000&offset=5000&order_direction=asc&scope=finished&order=closed_at
. This works as long as the number of deals is not reduced (then we got no deals back, even if there were newer deals), which happens sometimes. We guess, that for example removing an account removes all corresponding deals. In that case, we manually need to find the problem why there are no new deals coming back, reset the offset back to 0 and fetch all deals again.The only way we see to avoid that completly is to always fetch all deals (which leads to more api-calls and more database-traffic).
Do you see any solution for that problem with the current api?
The best option resource-wise would be the following:
Adding a new parameter to
/ver1/deals
, similar to the from-option, but for the closed_at-field. Then we could save the date of the newest deal and take that for the next fetch.The text was updated successfully, but these errors were encountered: