Is there a way to pass multiple stage ids to the /stages API endpoint?
It would be very useful for that endpoint to accept an array of IDs and to return all deals that were in any of those stages. At the moment it seems as though the only way to do this is to make multiple calls, and then assemble the deals through our own code.
Answers
-
Hi @Andy Burnett , in that case I believe you would need to use
/deals
and not/stages
since you are looking for a list of deals. If you haven't tried so yet, you can useGET /deals
with a specific stage ID. You can find more details in the documentation here.0 -
Hi @Manuel Oliveira thanks for the response. The problem with using /deals is that it also only accepts a single value for stages. According to the documentation:
stage_id - If supplied, only deals within the given stage will be returned
I was looking for an efficient way in which the server could return a list of deals that were in in stage 1 | stage 2 | stage n
This would allow me to make a single request to retrieve all deals that were e.g. in the any of the stages prior to the client signing the agreement.
It seems as though this is not specifically possible via the api. So, I have written a wrapper that makes multiple calls, and aggregates the data. This isn't a major problem, but it might be worth considering when you next review the api. Allowing stages to accept an array of integers, rather than a single integer, would be helpful
1