APIs & Integrations

ppat12
Membre

Get all deals using API in python

Résolue

Hi I am a beginner in  HubSpot. 

I have few doubts.
 

I currently have a google app script that fetches all deals data from HubSpot using api.

I want to recreate the same output using python. 


  # GS 
 var response = UrlFetchApp.fetch('https://api.hubapi.com/crm/v3/objects/deals/search?hapikey=my_apli_key'options);
 

 

Problems:

1. I went through API doc on Hubspot, I could only get limited help.

    I used the template to fetch some deals but these deals have only 6-7.

2 . Paging association, how to use that? I am only able to get 100 deals at a time. But I have more than 1000 deals. 

 

If anyone could help with resources for the same, that would be great.

 

# python GET code# python GET code# properties in Deals API response# properties in Deals API response

 

Thanks in advance.

0 Votes
2 Solutions acceptées
dennisedson
Solution
Équipe de développement de HubSpot
Équipe de développement de HubSpot

Get all deals using API in python

Résolue

@JBeatty , @Venky1 , either of you all able to help here? 😀

Voir la solution dans l'envoi d'origine

0 Votes
HedgeDolph
Solution
Membre

Get all deals using API in python

Résolue

 A few things, can you not just change the limit amount in your params? also your commented out print statment should be 

print(response.json())
 
if you cant do more then 100 at a time, do a while loop and change the index each time 

Voir la solution dans l'envoi d'origine

2 Réponses
HedgeDolph
Solution
Membre

Get all deals using API in python

Résolue

 A few things, can you not just change the limit amount in your params? also your commented out print statment should be 

print(response.json())
 
if you cant do more then 100 at a time, do a while loop and change the index each time 
dennisedson
Solution
Équipe de développement de HubSpot
Équipe de développement de HubSpot

Get all deals using API in python

Résolue

@JBeatty , @Venky1 , either of you all able to help here? 😀

0 Votes