APIs & Integrations

yellalingh
Participant

Contact properties

SOLVE

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.  

0 Upvotes
2 Accepted solutions
jackcoldrick
Solution
HubSpot Employee
HubSpot Employee

Contact properties

SOLVE

Hi @yellalingh,

 

The update contact API will allow you to update any of the editable properties of a contact in the HubSpot CRM. Whether they are standard default properties provided by HubSpot or custom properties created by users.

 

Of course some of our default properties are used by our system and whilst surfaced in app they're read only and will not be editable via the API. 

 

Regards,

Jack

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn

View solution in original post

jackcoldrick
Solution
HubSpot Employee
HubSpot Employee

Contact properties

SOLVE

Hi @yellalingh,

 

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. 

 

Best,

Jack

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn

View solution in original post

13 Replies 13
jackcoldrick
HubSpot Employee
HubSpot Employee

Contact properties

SOLVE

Hi @yellalingh,

 

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:

 

https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=demo&property=propertyA&property=propertyB&property=propertyC&property=whateverOtherPropertyYouWant

 

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. 

 

Regards,

Jack

 

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn
MQureshi10
Member

Contact properties

SOLVE

Hi, so when I do this, I get a has-more key error? Anything I can do to remedy that?

0 Upvotes
yellalingh
Participant

Contact properties

SOLVE

Hi @jackcoldrick 

 

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

0 Upvotes
jackcoldrick
HubSpot Employee
HubSpot Employee

Contact properties

SOLVE

Hi @yellalingh,

 

No problem at all. 

 

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.

 

Regards,

Jack

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn
0 Upvotes
yellalingh
Participant

Contact properties

SOLVE

Thanks @jackcoldrick  It works. I am facing one more issue when i pass two properties only one is being passed in tht request.

{'hapikey': hapikey,  'property':'linkedin_profile__c','property':'jobtitle','count':count} 

I can generate request such as this 


https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=*******&property=jobtitle&count=100

 I am using python 3.7.4, with pycharm frame work, I tried passing it as Object as well as array

0 Upvotes
jackcoldrick
HubSpot Employee
HubSpot Employee

Contact properties

SOLVE

Hi @yellalingh,

 

Thats good news!

 

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

 

Regards,

Jack

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn
yellalingh
Participant

Contact properties

SOLVE

Hi @jackcoldrick 

 

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.

0 Upvotes
jackcoldrick
Solution
HubSpot Employee
HubSpot Employee

Contact properties

SOLVE

Hi @yellalingh,

 

The update contact API will allow you to update any of the editable properties of a contact in the HubSpot CRM. Whether they are standard default properties provided by HubSpot or custom properties created by users.

 

Of course some of our default properties are used by our system and whilst surfaced in app they're read only and will not be editable via the API. 

 

Regards,

Jack

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn
yellalingh
Participant

Contact properties

SOLVE

HI @jackcoldrick  

 

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

0 Upvotes
jackcoldrick
Solution
HubSpot Employee
HubSpot Employee

Contact properties

SOLVE

Hi @yellalingh,

 

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. 

 

Best,

Jack

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn
yellalingh
Participant

Contact properties

SOLVE

Thanks @jackcoldrick 

 

I am running into one more problem, by using contacts API 

https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=*****

 I am getting only one form submission latest, even if the contact has more than 1 submission, where as by using 

https://api.hubapi.com/contacts/v1/contact/vid/26664920/profile?hapikey=********

I am getting 4 submissions, contact VID  i have tested is " 26664920". I can see 4 submissions in the hubspot. Can you help me resolve this 

0 Upvotes
jackcoldrick
HubSpot Employee
HubSpot Employee

Contact properties

SOLVE

Hi @yellalingh,

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:

 

https://api.hubapi.com/contacts/v1/contact/vid/275751/profile?hapikey={{apikey}}

 

Returns:

 

 {
 	"conversion-id": "ae2d19e4-7c58-4a33-9d29-338453d0ab4f",
 	"timestamp": 1574760656353,
 	"form-id": "a528fd3f-6713-4ba1-90b7-a87bc0a720b8",
 	"portal-id": 2990812,
 	"page-url": "http://dev.jackcoldrick/forms-v3",
 	"page-title": "Forms v3 Example",
 	"title": "Forms API v3 - Legal Consent",
 	"form-type": "HUBSPOT",
 	"contact-associated-by": [
                "VISITOR"
            ],
 	"meta-data": []
 }, {
 	"conversion-id": "4191cacc-e218-4276-9f20-3192fbf69726",
 	"timestamp": 1574760638365,
 	"form-id": "a528fd3f-6713-4ba1-90b7-a87bc0a720b8",
 	"portal-id": 2990812,
 	"page-url": "http://dev.jackcoldrick/forms-v3",
 	"page-title": "Forms v3 Example",
 	"title": "Forms API v3 - Legal Consent",
 	"form-type": "HUBSPOT",
 	"contact-associated-by": [
                "EMAIL"
            ],
 	"meta-data": []
 }, {
 	"conversion-id": "f7f7b1f3-0b4a-4adb-84aa-54b432d43621",
 	"timestamp": 1574760636402,
 	"form-id": "a528fd3f-6713-4ba1-90b7-a87bc0a720b8",
 	"portal-id": 2990812,
 	"page-url": "http://dev.jackcoldrick/forms-v3",
 	"page-title": "Forms v3 Example",
 	"title": "Forms API v3 - Legal Consent",
 	"form-type": "HUBSPOT",
 	"contact-associated-by": [
                "VISITOR"
            ],
 	"meta-data": []
 }, {
 	"conversion-id": "88c4ea3c-5337-423d-a88e-65f322572895",
 	"timestamp": 1574686963180,
 	"form-id": "c45df6c5-85c3-4a8b-86b8-0129bb5d5fef",
 	"portal-id": 2990812,
 	"page-url": "https://www.jackcoldrick.com/meetings/jcoldrick",
 	"title": "Meetings Link: jcoldrick",
 	"form-type": "MEETING",
 	"contact-associated-by": [
                "EMAIL"
            ],
 	"meta-data": []
 }

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.

 

best,

Jack

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn
0 Upvotes
yellalingh
Participant

Contact properties

SOLVE

Thanks a Lot @jackcoldrick  it works after passing "formSubmissionMode"

0 Upvotes