APIs & Integrations

MarkdeLange
トップ投稿者 | Solutions Partner
トップ投稿者 | Solutions Partner

Contact end point

We are developing a custom integration, to optimse the integration will fetch:

- New contacts: if they have been added to a HS list, or based on a custom property value

- Modified contacts: based on the same criteria above.

When a record is created or updated in Hubspot will the data in the end point only contain the updated property values in the JSON as well as the time stamp of the change/creation?

0 いいね!
1件の返信
dennisedson
HubSpot製品開発チーム
HubSpot製品開発チーム

Contact end point

Hello @MarkdeLange , 

Using the contacts API,

you will be able to add some optional parameters to pull in specific data about the properties.  Specifically, the property parameter and the propertyMode parameter.  By setting the property mode to "value_and_history", you will get details on any property that you have explicitly listed in the property parameter.  

If you do not include that property in your request, you will not see the revision history

Here is an example request and a snippet from the returned json

https://api.hubspot.com/contacts/v1/lists/all/contacts/all?property=test_property&property=firstname&propertyMode=value_and_history&hapikey=XXXXXXXXX

firstname:{
value:"Cool",
versions:[
{
value:"Cool",
source-type:"SALESFORCE",
source-id:"Salesforce Connector",
source-label:null,
timestamp:1600184633965 (September 15, 2020, Tue, 11:43:53am UTC-04:00),
selected:false},
{
value:"Cooler",
source-type:"CRM_UI",
source-id:"dedson@hubspot.com",
source-label:null,
timestamp:1600184622363 (September 15, 2020, Tue, 11:43:42am UTC-04:00),
selected:false},
{
value:"Cool",
source-type:"CONTACTS_WEB",
source-id:"sample-contact",
source-label:null,
timestamp:1592917378298 (June 23, 2020, Tue, 9:02:58am UTC-04:00),
selected:false}]},

 

(please note I edited this reply to provide more accurate information!)

Hope this helps you out!

 

0 いいね!