Getting all Contact properties even after adding &property=<my property name> to the url

SOLVE
Highlighted
New Contributor

Hi

Im trying to get one property per contact and using this API call
and yet Im getting all properties in the response.

 

I dont know if that matters - but the property Im looking for is a custome one I added.

 

https://api.hubapi.com/contacts/v1/contact/email/email@email.com/profile?property=thepropertyname&ha......

 

Please advise

Ilan

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
HubSpot Moderator

Hey @Ilanyrozen,

 

The Get a contact by email address endpoint will return most of all the contact properties. There isn't a way to control the returned properties in the response.

 

If you'd like to control the returned properties, you can explore the CRM API | Search.

 

i.e. POST crm/v3/objects/contacts/search

 

Body

{
    "filterGroups":[
      {
        "filters":[
          {
            "propertyName": "email",
            "operator": "EQ",
            "value": "email address"
          }
        ]
      }
    ],
    "properties": [ "propertyname1", "propertyname2" ]
  }
2 Replies 2
Highlighted
HubSpot Moderator

Hey @Ilanyrozen,

 

The Get a contact by email address endpoint will return most of all the contact properties. There isn't a way to control the returned properties in the response.

 

If you'd like to control the returned properties, you can explore the CRM API | Search.

 

i.e. POST crm/v3/objects/contacts/search

 

Body

{
    "filterGroups":[
      {
        "filters":[
          {
            "propertyName": "email",
            "operator": "EQ",
            "value": "email address"
          }
        ]
      }
    ],
    "properties": [ "propertyname1", "propertyname2" ]
  }
Highlighted
New Contributor

Thanks Wnedi
I will look into your CRM API suggestion
It looks like a good solution for my needs

Ilan

Reply
0 Upvotes