Getting lead status for contacts

MBowyer
Member

I'm trying to get the lead status as shown below on the left, in my call on a private app.

Screenshot 2022-09-29 at 13.40.08.png

 

I'm currently calling the below which gets me all my contacts but doesn't return the lead status.

hubspotClient.crm.contacts.getAll()
 
Anyone that knows how to add lead status to the contacts I return or any other way that would be great appreciated.
0 Upvotes
1 Reply 1
Jaycee_Lewis
Thought Leader

Hey, @MBowyer 👋 I feel like I don't have the full answer, but I can get us closer. 

 

The property Marketing Contact Status has an internal label (value) of 

hs_marketable_status

You can include this as a Query param in your request. Example:

GET /crm/v3/objects/contacts/{contactId}
curl --request GET \
  --url 'https://api.hubapi.com/crm/v3/objects/contacts/101?properties=hs_marketable_status&archived=false' \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

Which returns:

HTTP 200

{
  "id": "101",
  "properties": {
    "createdate": "2022-06-30T04:07:35.653Z",
    "hs_marketable_status": "true",
    "hs_object_id": "101",
    "lastmodifieddate": "2022-08-02T17:50:32.092Z"
  },
  "createdAt": "2022-06-30T04:07:35.653Z",
  "updatedAt": "2022-08-02T17:50:32.092Z",
  "archived": false
}

 

Have fun building! — Jaycee





loop


Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.

Learn More




0 Upvotes