GET all Deals from specific Stage (python)

We are trying to get all the Deals from a specific Stage. We confirm the Stage ID and we confirm via UI that there are Deals in that Stage, however, we are not getting any Deals data.

Here is our current python script:

import requests, json

pipedrive_api_key = “MyKey”

pipedrive_domain = “MyDomainNameHere”

burl = f"https://{pipedrive_domain}.pipedrive.com/api/v1"

#IDENTIFY ALL STAGES

r= requests.get(f’{burl}/stages?api_token={pipedrive_api_key}’)

stages = r.json().get(‘data’)

print(json.dumps(r.json(),indent=4))

#SET QUALIFEID STAGE ID

stage_id = 54

#GET ALL DEALS FOR QUALIFIED STAGE

r = requests.get(f’{burl}/stages/{stage_id}/deals?api_token={pipedrive_api_key}’)

print(json.dumps(r.json(),indent=4))

It seems the API keys can access different Deals data by Stage.

We have two users with their own key and they are able to pull different deals data with the same script.

How can we get an API key that can pull all deals for all stages?

I figured it out. We have to apply the variable everyone=1

stages/54/deals?everyone=1&api_token

1 Like

Thanks for sharing the solution with the community @avillons :slight_smile: :clap: