APIs & Integrations

yeti_t
メンバー

How can I return all contact properties with a value?

解決

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件の承認済みベストアンサー
malcolm1
解決策
メンバー | Gold Partner
メンバー | Gold Partner

How can I return all contact properties with a value?

解決

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. 

元の投稿で解決策を見る

5件の返信
SKumar4547
メンバー

How can I return all contact properties with a value?

解決

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 いいね!
dennisedson
HubSpot製品開発チーム
HubSpot製品開発チーム

How can I return all contact properties with a value?

解決

@SKumar4547 

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

0 いいね!
dennisedson
HubSpot製品開発チーム
HubSpot製品開発チーム

How can I return all contact properties with a value?

解決

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

malcolm1
解決策
メンバー | Gold Partner
メンバー | Gold Partner

How can I return all contact properties with a value?

解決

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
コミュニティーマネージャー
コミュニティーマネージャー

How can I return all contact properties with a value?

解決

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