APIs & Integrations

MSrivastava1
Member

Missing Contact and Deal Fields in API

SOLVE

I am not able to fetch all the field values for Hubspot contact and deal properties using the API call. Below are the fields which are not getting fetch from the Contact and Deal:

Phone
Jobtitle
Mobilephone
Contact owner

 

Below are the API and details I am using to fetch the data

API: https://api.hubapi.com/crm/v3/objects/contacts/search
Body to filter the data: 
{
"filterGroups": [
{
"filters": [
{
"propertyName": "createdate",
"operator": "GTE",
"value": "2024-03-18T08:37:20Z"
}
]
}
]
}

0 Upvotes
1 Accepted solution
JTBuys
Solution
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

Missing Contact and Deal Fields in API

SOLVE

@MSrivastava1, to include properties that you would like returned with the search, you would add them to the body of your call like below. The Contact Search api documentation that @dsmarion is referencing is very helpful to figure out the structure of your body. You can place the internal property names in the api call builder and the tool will structure the request for you.

The properties you include in this array must reference the internal name of the property. If you're unsure how to find internal property names, you can follow the instructions in this knowledgebase article.

 

 

{
  "properties": [
    "phone",
    "mobilephone",
    "jobtitle",
    "hubspot_owner_id"
  ],
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "createdate",
          "operator": "GTE",
          "value": "2024-03-18T08:37:20Z"
        }
      ]
    }
  ]
}

 

 

View solution in original post

0 Upvotes
4 Replies 4
dsmarion
Top Contributor | Gold Partner
Top Contributor | Gold Partner

Missing Contact and Deal Fields in API

SOLVE

You have to include that in your API call.  Your call right now includes two parameters - filterGroups and filters.  Add another parameter called properties with the properties you want Example: "properties": ["prop1,prop2,prop3"].  Hope this helps...

Scott Marion
Senior Developer @ Thread Connected Marketing
0 Upvotes
dsmarion
Top Contributor | Gold Partner
Top Contributor | Gold Partner

Missing Contact and Deal Fields in API

SOLVE

The API call will only return the standard properties unless you specifically include the properties parameter and give a list of the properties you want returned.  You can do this to return any custom properties you want.  

dsmarion_0-1711542024386.png

 

Scott Marion
Senior Developer @ Thread Connected Marketing
0 Upvotes
MSrivastava1
Member

Missing Contact and Deal Fields in API

SOLVE

Hello,

Thank you for the response.

Where and How I can specifically include the properties parameter ?

Do I have to do it on the HubSpot site ? More details please.

0 Upvotes
JTBuys
Solution
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

Missing Contact and Deal Fields in API

SOLVE

@MSrivastava1, to include properties that you would like returned with the search, you would add them to the body of your call like below. The Contact Search api documentation that @dsmarion is referencing is very helpful to figure out the structure of your body. You can place the internal property names in the api call builder and the tool will structure the request for you.

The properties you include in this array must reference the internal name of the property. If you're unsure how to find internal property names, you can follow the instructions in this knowledgebase article.

 

 

{
  "properties": [
    "phone",
    "mobilephone",
    "jobtitle",
    "hubspot_owner_id"
  ],
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "createdate",
          "operator": "GTE",
          "value": "2024-03-18T08:37:20Z"
        }
      ]
    }
  ]
}

 

 

0 Upvotes