APIs & Integrations

yeti_t
Membro

How can I return all contact properties with a value?

resolver

am using the CRM API to 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?

1 Solução aceita
malcolm1
Solução
Membro | Parceiro Ouro
Membro | Parceiro Ouro

How can I return all contact properties with a value?

resolver

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. 

Exibir solução no post original

5 Respostas 5
SKumar4547
Membro

How can I return all contact properties with a value?

resolver

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?

0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

How can I return all contact properties with a value?

resolver

@SKumar4547 

You will query the properties endpoint as I mentioned above to get comprehensive list of all available properties

0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

How can I return all contact properties with a value?

resolver

@yeti_t , If you need a list of all available properties, you can also hit this endpoint

malcolm1
Solução
Membro | Parceiro Ouro
Membro | Parceiro Ouro

How can I return all contact properties with a value?

resolver

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. 

natsumimori
Gerente da Comunidade
Gerente da Comunidade

How can I return all contact properties with a value?

resolver

Hi @MatthewShepherd and @malcolm1 , do you have experience in this topic??