How to find the contact (parent) with help of a webhook notification about a bproperty change?

SOLVE
Occasional Contributor

I wonder how I can find a contact in HubSpot when my webhook (application) received a HubSpot notification about a property change.

The notification looks like this:

[
    {
        "objectId": 40351,
        "propertyName": "firstname",
        "propertyValue": "theFirstname",
        "changeSource": "CRM_UI",
        "eventId": 1071452863,
        "subscriptionId": 213854,
        "portalId": 6675564,
        "appId": 209470,
        "occurredAt": 1578314822836,
        "subscriptionType": "contact.propertyChange",
        "attemptNumber": 0
    }
]

So...the only clue seems to be the objectId to get the parent (contact) this property belongs to!?? 
How can I use it to get the contact itself? 

And: 
Will there be one event with this structure for each property modification or is it possible to tell HubSpot to send only ONE notification containing ALL modifications, if, for instance, three properties were changed and then the SAVE button was clicked?

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
HubSpot Moderator

Hi, @du-it.

 

If the webhook notification corresponds to a contact object, the objectId value equals the contact's vid. You can retrieve contact data via vid with Contacts API endpoints like this and this.

 

Your second request is not currently possible. Each property change will trigger a separate propertyChange webhook notification. Updates will not be grouped except roughly by occurredAt timestamp.

Isaac Takushi

HubSpot Developer Support
Reply
0 Upvotes
1 Reply 1
Highlighted
HubSpot Moderator

Hi, @du-it.

 

If the webhook notification corresponds to a contact object, the objectId value equals the contact's vid. You can retrieve contact data via vid with Contacts API endpoints like this and this.

 

Your second request is not currently possible. Each property change will trigger a separate propertyChange webhook notification. Updates will not be grouped except roughly by occurredAt timestamp.

Isaac Takushi

HubSpot Developer Support
Reply
0 Upvotes