APIs & Integrations

TSaunders9
Participant

API not returning expected contact property

Hi, I'm interested in getting contact information via the API. More specifically, I want to fetch the lifecycle stage for a list of contacts. However, when I query contacts the lifecycle stage is not available in the responses body (on the object's properties) despite it being set and visible in my CRM.

 

Example:
GET https://api.hubapi.com/crm/v3/objects/contacts/2701 

{
    "id": "2701",
    "properties": {
        "createdate": "2022-11-15T14:59:49.954Z",
        "email": "jane.doe@company.com",
        "firstname": "Jane",
        "hs_object_id": "2701",
        "lastmodifieddate": "2023-09-26T09:15:00.304Z",
        "lastname": "Doe"
    },
    "createdAt": "2022-11-15T14:59:49.954Z",
    "updatedAt": "2023-09-26T09:15:00.304Z",
    "archived": false
}



I'm expecting the `lifecyclestage` property to be there but it does not appear

0 Upvotes
2 Replies 2
Mike_Eastwood
Recognized Expert | Gold Partner
Recognized Expert | Gold Partner

API not returning expected contact property

Hi @TSaunders9 

 

You will need to include the "properties" parameter in the URL to get any properties other than the default properties (which you see).

 

For example this will return Lifecycle Stage and Company.

 

https://api.hubapi.com/crm/v3/objects/contacts/?properties=lifecycle&properties=company

Here's more information about the Contacts API.

 

Have fun

Mike

Here to learn more about HubSpot and share my HubSpot Knowledge. I'm the founder of Webalite a HubSpot Partner Agency based in Wellington, New Zealand and the founder of Portal-iQ the world's first automated HubSpot Portal Audit that helps you work smarter with HubSpot.

0 Upvotes
pbeville
Contributor

API not returning expected contact property

This seems to be an example where the docs are just plain wrong!?! If you follow them you do not get the properties you ask for but, instead have to follow the convoluted method you described above (and thanks for that) - Just don't know why they don't fix the call or the docs????

0 Upvotes