APIs & Integrations

ganken
Miembro

API Get All Deals with Lead Source

Is there a way for me to get all deals with the lead source property for the deals? The API is returning the lead source when I get a single lead but not in a batch. I tried a few different options but nothing worked. 

 

The below just returns an empty property array. 

https://api.hubapi.com/deals/v1/deal/paged?hapikey= <key> &limit=100&includePropertyVersions=true&properties=lead_source

 

Any help will be much appreciated. 

0 Me gusta
2 Respuestas 2
JBeatty
Guía | Partner nivel Diamond
Guía | Partner nivel Diamond

API Get All Deals with Lead Source

Hi @ganken,

 

First, I am going to assume "lead source" is a custom property? as it is not one of HubSpot's default deal properties., if you are talking about "original source" instead, make sure that you have the correct internal name for that property which would be "hs_analytics_source_data_1".

 

If it is a custom property, make sure to have the correct internal value for its name, because in my testing with another property, your exact call worked for me in displaying the property, both in a single deal and in a batch of deals.

 

Also, depending on how much information you need, it is also worth checking out the v3 deals API, which has a smaller response size and in my opinion easier pagination. With the v3 API this same call would like this:

https://api.hubapi.com/crm/v3/objects/deals?limit=100&properties=hs_analytics_source_data_1&archived=false&hapikey={HAPIKEY_GOES_HERE}

 

✔️ Was I able to help answer your question? Help the community by marking it as a solution.

Joshua Beatty
Software Developer with Pearagon

Still have questions? Let's Talk

TiphaineCuisset
Administrador de la comunidad
Administrador de la comunidad

API Get All Deals with Lead Source

Hi @ganken 

 

Thank you for reaching out.

 

I want to tag some of our experts on this - @Bryantworks @JBeatty do you have any thoughts for @ganken on this? 

 

Thank you!

Best

Tiphaine


Saviez vous que la Communauté est disponible en français?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres !

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !


0 Me gusta