Aug 4, 2021 11:19 PM
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.
Aug 5, 2021 4:32 AM
Thank you for reaching out.
Aug 5, 2021 11:06 AM
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: