How to get filled Properties from Contacts through API?


#1

Hi,

We have around 900+ Contact Properties and 90K+ Contacts. We need to fetch the contact details through API, so we added all properties in the URL and call API, but we are not get response. Then we reduced the properties and called API and it works. So we have any option in API to get contact details which property contains value.

Example: Some contacts may filled 10 properties, and another may 12, same like each contact filled with some properties. So any option to get the filled properties of the contact in the below API?
https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=demo&count=250

In the below API we got the Expected Result, but we need the same concept for above API
https://api.hubapi.com/contacts/v1/contact/email/testingapis@hubspot.com/profile?hapikey=demo

Regards
Udhay


#2

Hi @udhay,

For performance reasons, it's not possible to get all of the same information from the batch get endpoint (i.e. /contacts/v1/lists/all/contacts/all) as you would get from the single get endpoint (i.e. /contacts/v1/contact/email/:email/profile). The only way to get more than the default few properties from the batch get endpoint is to specify each of them with a property=xxx query parameter.

Keep in mind that contacts only store data for properties with a value, so records with no value for a property will not include that property, even if the property is specified in the request URL.