I want to get deals with
/deals from last quarter and I know that there are more than 500 items. How to get to know what is the total count of deals to set correct “start” value?
Also I think you should change
start desctiption in
/deals API Ref.
Pagination in my opinion suggest number of page to start with and API read this as an “offset” and this is a huge difference when comes to request.
To get the deals from last quarter you can actually use the
searchResults endpoint like I described in this post, with one call per month. If you only need open and won deals, you can also use /deals/timeline.
About the pagination, I see your point with the possible confusion between “Pagination start” and “Offset”. Maybe we can change the description to “Pagination start (offset)”. What do you say?
Offset will be sufficient. Short and clear, quite popular key in other APIs.
Pagination suggest next page numbers like 1, 2, 3 and on and on…
About request. I want all types of deals just like I get in Pipedrive. It’s a little bit uncomfortable when I dont know how many times should I make a request to get all needed deals (in my case least 3 times). Maybe is there a chance to add some key to API response like
total with number of supposed returns from query. When I get a limitation I will know how many items left to get all results. Do you think is it possible?
We probably can’t rename the parameter “start” everywhere, because it’s also in the pagination object itself (the one returned by the API). But we can definitely specify it better to clear any possible confusion…
Riin, that does the trick! Thanks. I didn’t look on
additional_data, my bad!