Get ALL Deals stages history

I am trying to get the deals’ stages’ history: datetime of each stage changes.
I’ve found this endpoint:
https://mycomp.pipedrive.com/v1/deals/{id}/flow
gives me what I need for a single deal (if I look at field_key = “stage_id”, I can see old value, new value and log_datetime).
But it only works for a single deal.
I have more than 30000 deals, I am afraid I’ll hit API restriction if I call one-by-one.
How can I get ALL my deals stage_id field values changes history log at once?
Thanks!

Hi @Michael_Shparber,

Would the GET /v1/deals/timeline endpoint be what you are looking for? This endpoint returns open and won deals, grouped by defined interval of time set in a date-type dealField ( field_key ).

Hi @Nicole_Tan
I’ve played with /v1/deals/timeline endpoint a bit.
As I understand, it groups the CURRENT version of the deals to timeline buckets based on a specific date field.
This is not what I need, I need to see all the stage changes IN HISTORY of all the deals.
For example, if a certain deal was in stage X in January and the stage changed to Y in March, I need to see 2 records for this deal - one for each change.
But maybe I misunderstood how /v1/deals/timeline works.
Or there is another way to do it?
Please help,
Thanks

Hi @Michael_Shparber,

I’ve double-checked with the developers who handle Deals endpoints. Unfortunately, we currently don’t have an endpoint to get updates from multiple Deals at once.

The only option is to do what you have been doing, which is to use the GET /v1/deals/{id}/flow endpoint.

I’ve since sent your feedback to the relevant team.

1 Like