Contact List/Contact API
My end user maintains a list.
This list contains a subset of properties which we need to return for a specific manual workflow.
I have been tasked with creating an app to return the recent contacts from this list with only those specific properties. (The returned properties will not be static. Properties can be added and removed by the end user.)
When I run the service described here:https://developers.hubspot.com/docs/methods/lists/get_list_contacts_recent
I only return three or four of the properties being stored in the list
Property &property=X - Used in the request URL If you include the “property” parameter, then the properties in the “contact” object in the returned data will only include the property or properties that you request.
The above entry would lead me to believe all of the properties would be returned unless explicitly listed.
In other posts I found the following:
“Thanks for the clarification. There isn’t a single endpoint which will give you a single object with all relevant contact properties. What you’d need to do is :
- Get the ID of the list in question from one of the GET endpoints within the Contact Lists API, such as ‘Get dynamic contact lists2’
- Get the list of contacts from the ‘Get contacts in a list’ endpoint
- Call the ‘Get group of contacts by ID1’ endpoint, feeding in the VIDs of the relevant contacts as URL parameters (&vid=xxx&vid=xxx…). You’re also able to stipulate which properties the returned object will contain (&property=x&property=y…), bearing in mind that there will be some default properties regardless of the properties included in the call. Up to 100 contacts can be returned at a time using this endpoint
- At the end of each request to the batch contacts API, add the returned contact objects to your main ‘list’ object
I hope this is of assistance. Let me know if you encounter any issues.”
The workflow would be to use the aforementioned service to return the recent contact’s vids. Then use the contacts service to return all of the properties tied to that contact.
The problem is each contact has quite a few unnecessary properties. How do I limit the property values to only what is being selected by the end user in the list? Is there a way to determine what properties are currently stored inside the list by ID?
Thanks in advance,