APIs & Integrations

Johannes-mue
Member

Contacts with missing firstname

Hi,

 

In the example here: https://developers.hubspot.com/docs/methods/contacts/get_batch_by_vid

The contacts returned by GET /contacts/v1/contact/vids/batch/ have a firstname, and lastname attribute. However, if you create a new contact in Hubspot without filling in these attributes, then the attributes are missing from the API response.

In contrast to this, if I remove the firstname from an existing contact, the API response defaults the value to an empty string.

Could you please add these default values for the first case, as well?

Otherwise it would would be great to mention in the documentation that these properties in the response are optional.

 

Regards,

Johannes M.

0 Upvotes
3 Replies 3
WendyGoh
HubSpot Employee
HubSpot Employee

Contacts with missing firstname

Hi @Johannes-mue,

 

I hope all is well with you 😄

 

When looking at the documentation here: Get a batch of contacts by vid, it does state that:

By default, the endpoint returns all valued properties for a contact.

 

and so I would expect that if a contact who doesn't have a firstname or lastname, this two attributes wouldn't show up in the API response. 

 

Additionally, based on our testing we know that if a contact who previously had these attributes filled up and remove later on, these attributes would also show up in the response body even though there's no value. I agree that this can be documentated to prevent any future confusion. For this, I'll work with our team!

 

0 Upvotes
Johannes-mue
Member

Contacts with missing firstname

Hi Wendy,

 

Thanks that would be great.

As a side note, if you want to make the documentation perfectly clear, 'valued properties' means 'properties that are considered important' and not 'properties with a value attribute'.

 

Regards,

Johannes M.

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

Contacts with missing firstname

Hi @Johannes-mue,

 

Thank you for that note.

 

Definitely, we will look into having a clearer documentation to prevent future confusion. Again, thank you for bringing this up!

0 Upvotes