Hi I am trying to write an API to retrvie All contacts using this API https://developers.hubspot.com/docs/methods/contacts/get_contacts , In the hubspot tool I can see hundreads of contact properties where as in respose I am reciving only few can you please help me resolve this.
There are no restrictions that I am aware of. It's worth noting that contacts only store data for properties with a value, so records with no value for a property will not include that property in the response JSON, even if the property is specified in the request URL.
By default, only a few standard properties will be included in the response data. Specifically "firstname", "lastname" and "lastmodifieddate". If you require more properties you can use the optional "property" parameter multiple times in a request. For instance if I wanted to get property A, property B and property C I would make a request like this:
It's also worth noting that if you request properties that a contact has no value for we will not return any data for that property even if it's specified in the URL.
Thanks for the prompt response, it worked for the single word property example :"message", but it is not working for multiple word property example : linkedIn Profile i tried passing "linkedIn+Profile". Can you please let me know If i am missing anything
All Hubspot properties have internal names intended to be used by our APIs. These are what we expect you to pass within the property parameter in the query string. LinkedIn Profile isn't a default property so I'd be unable to tell you exactly what the internal name is. This could be checked by either:
1) Getting all contact properties via API using this endpoint.
2) Navigating to the specific property in app and referencing the internal name from there.
Generally speaking it would be something like "linkedin_profile" but could also be "linkedinProfile". It really depends on how it was setup originally.
I am not overly familiar with python or that specific framework my own background is with PHP. This type of question might be better suited for stack overflow potentially or pycharm support?
Thanks for the support, I have one more Question by using updated Contacts API, will this give if there is any update in contact custom properties and properties imported from sales too.
Is there any restriction on number of Properties that can pe sent as parameters in API request.
During some request I am getting all the properties, During some request I am missing the property. for instance If I am pulling 1,000 contact with 100 contacts each call. call 8 gives me 40 proprties and call 9 gives me 38 not even empty fields for missing properties can you please help me resolve this
There are no restrictions that I am aware of. It's worth noting that contacts only store data for properties with a value, so records with no value for a property will not include that property in the response JSON, even if the property is specified in the request URL.
When using our Contacts API there is an optional parameter you can include in your query string called "formSubmissionMode". This can be set to "all", "none", "newest" or "oldest. If you don't include it then it defaults to "all".
I've just run a test in my own HubSpot portal to retrieve a contact that has 4 form submissions and it's working fine. See below:
You'll notice the "form-type" attribute present in the response. If you could share your HubID I would be able to see in more detail what the problem might be.