How to get all stage a Deal has been through?

deals

#1

Hi there. How can get all stages that a particular Deal has been through? This would help understand, for instance, the path for lost deals. I can see that in the interface, but I have to go one by one, which is not what I am looking for. I need an aggregate analysis.
thanks
daniel


#2

Hi @Daniel_Piret_ITM_Pla

If you’re pulling all of your deals using the API, you can use the propertiesWithHistory= parameter to get the data for a property and include all of the previous versions of that property.

https://api.hubapi.com/deals/v1/deal/paged?hapikey=demo&includeAssociations=true&limit=2&propertiesWithHistory=dealstage


#3

Hello dadams,
Thank you very much for your reply. It looks like it doesn’t work or we are not understanding the results:


#4

The propertiesWithHistory must use a deal property name. It can’t be used to filter records with specific values, so you’d need to pull all of your deals, include the propertiesWithHistory=dealstage to make sure that the returned deals have the data for the dealstage property, and then do any analysis or filtering on your side.


#5

I got it!. Thank you very much!


#6

Hi - I’ve given this a try with the following request curl https://api.hubapi.com/deals/v1/deal/paged?hapikey={{ api key }}f&includeAssociations=true&properties=dealname

I’m not seeing any properties in the response … manually verified a dealid for a dealname

The API documentation seems to be consistent with the thread here … but I wanted to verify whether there’s something I may be missing.


#7

@dadams do you have any insight here? or is there any additional context i can provide? still not able to use these query parameters using my api key as described.


#8

Hmmm – is anyone there?


#9

Hi @Jasdeep_Garcha,

Looks like there’s an f in between the api key and the &includeAssociations parameter. Can you post the response you’re getting with that request?


#10

Hi @Derek_Gervais - that’s a typo. It’s part of my actual API key.


#11

Hi @Jasdeep_Garcha,

Could you send me a direct message with the exact request URL you’re using, and the full response you get?