idProperty only accepts email in new API when getting a contact
I am using the new API and I am running into a weird error.
When using
GET
/crm/v3/objects/contacts/{contactId}
We can give an idProperty, which the new API docs describe like so : "The name of a property whose values are unique for this object type".
I have create a new custom property and marked it as being unique, but when I try to search using this new custom property I get the following error response:
"Contacts may only be looked up by 'email' as part of a unique property value request.".
Is the documentation wrong or am I misunderstanding the error response? Seems like I can only really search for the internal hubspot ID or email but it would very useful to search for a custom ID, and the documentation seems to indicate that you can so I would like some guidance on this.
idProperty only accepts email in new API when getting a contact
I have create a new custom property and marked it as being unique,
Where in the UI do you mark a custom attribute as unique? When I create a custom contact property via the UI as below, I don't have such option, I can only set name and input field type (i.e. single line).
If you have an Enterprise subscription, for text-input field types, select the Allow users to search for information entered to this field checkbox and number field types to allow text or a numeric value in the property to be searchable across objects in the global search bar
Does it mean, it only works with the API in an Enterprise subscription and not with a Starter Plan as well?
When I try to get a contact by custom property, it still fails with that error as in the original post.
I'm still checking this with the team. I believe for the time being, this function is still currently work in progress but I'll keep you all updated on this forum thread once I have the confirmation.
idProperty only accepts email in new API when getting a contact
Hey Wendy.
I worked around by using the search functionality, but it just seems like a practical idea that would be great to have. (Or at least clarify the documentation if this wont be possible).