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))