Dec 15, 202011:54 AM - edited Dec 15, 202011:54 AM
Member
How can I return all contact properties with a value?
SOLVE
I am using the CRM APIto fetch a contact. I would like to get the contact returned with all properties (including non-default properties) that have a value set.
If you perform GET /crm/v3/objects/contacts/{contactId}, it says to "Control what is returned via the properties query param" but this means I need to know what properties exist on the contact.
If you don't pass the properties query param, you end up getting back first/last name and email, but you don't get all properties that have a value.
Anyone in here know if you can accomplish what I want?
How can I return all contact properties with a value?
SOLVE
The API is designed to return the properties that you specify. You can experiment with the query on this page: https://developers.hubspot.com/docs/api/crm/contacts. From the Endpoints selector menu, choose READ. That will scroll down to that part of the page. You can look at the "parameters" section of the notes for "properties". In that section play with the "Add test Value" tool. Notice that the example request gets modified to reflect the additions that you've made. The tool generates code for cURL, Python, PHP, etc, so select the code type that you want and you'll get a working example.
How can I return all contact properties with a value?
SOLVE
Hey @malcolm1 , what if there are custom fields. How would I access them? As per my requirements, I have to connect with multiple HubSpot accounts and I don't know the exact property name(customer field). My end user will map the exact property. Is it not possible to list down all the properties with values?
How can I return all contact properties with a value?
SOLVE
The API is designed to return the properties that you specify. You can experiment with the query on this page: https://developers.hubspot.com/docs/api/crm/contacts. From the Endpoints selector menu, choose READ. That will scroll down to that part of the page. You can look at the "parameters" section of the notes for "properties". In that section play with the "Add test Value" tool. Notice that the example request gets modified to reflect the additions that you've made. The tool generates code for cURL, Python, PHP, etc, so select the code type that you want and you'll get a working example.