Deal Stages - Need consistent results

Hi,

I need to get the time spent per stage for all deals. I would most likely loop through each deal ID, however, each deal goes through different stages and the results vary per deal. Is there a way to loop through the deals without knowing the exact stages beforehand?

Hi,
The following wiki might be useful to your scenario

https://devcommunity.pipedrive.com/t/retrieving-history-of-changes-on-entities/4958/2

https://devcommunity.pipedrive.com/t/combining-data-of-related-entities-which-happen-to-separate-endpoints/4954/2
Feel free to create a new topic if you still face challenges.