Getting deal stage from endpoint

Hello,

We are setting up our first API call and just need a starting point. We have developed an existing solution on a php based site. We are looking at pulling the stage of the deal on the website so that users have an idea of where they are in the workflow we have.

Any direction for a starting point would be a great start for us.

Thanks in advance.

Hi @shaunhaage,

:wave:t4: Welcome to the Pipedrive Developers Community!

To pull the stage of a deal, I would think a good start would be using these 2 endpoints:

  1. Get all stages - GET/v1/stages
  2. Get deals in a stage - GET/v1/stages/{id}/deals

The first endpoint will enable you to get the stage id of the particular stage(s) where the deals you want are. You can then use the id in the second endpoint to retrieve all the deals in that particular stage.

I hope this helps? Please let me know if you have further questions. :blush:

Thanks @Nicole_Tan this is perfect.

I am unfamiliar with the endpoint relationships and was hoping for a little clarification, we would like to search for the deal stage by query the api by last name field and a custom invoice field, I have scanned through all the endpoints available on the api, but am unable to determine if this is at all possible.

Hi @shaunhaage,

If you’d like to understand more about how the Pipedrive API works, we have entity-relationship diagrams on our About the Pipedrive API documentation page that could help with that.

As for searching the deal stage by querying our API with the last name field and a custom invoice field, perhaps you might want to try out the ItemSearch endpoints?

I hope this helps. Please let me know if you have further questions. :blush:

2 Likes