Duplicate Fields Between - id/createdAt/updatedAt and properties

Hi,

When I fetch an entities, say a contact, I receive back a response along the lines of:

{
 "id": "1",
 "properties": {
 "createdate": "2021-05-06T13:22:48.122Z",
 "email": "joe@example.com",
 "firstname": "Joe",
 "hs_object_id": "1",
 "lastmodifieddate": "2022-02-16T23:38:15.901Z",
 "lastname": "Smith"
 },
 "createdAt": "2021-05-06T13:22:48.122Z",
 "updatedAt": "2022-02-16T23:38:15.901Z",
 "archived": false
}

The top level fields id, createdAt and updatedAt appear to be exact duplicates of properties.hs_object_id, properties.createdate and properties.lastmodifieddate.

Per https://community.hubspot.com/t5/APIs-Integrations/contact-ID-vs-hs-object-id-in-Zapier/m-p/380534, I understand that id should be used instead of properties.hs_object_id (the latter field should instead be ignored).

What about the create and update dates? Can I safely use either the top-level fields (createdAt and updatedAt) or those in properties (properties.createdat and properties.lastmodifieddate)? Should I only look at these two top-level fields and ignore the two under properties?

Thank you,

Ben

Hey @IntegrationDev

createdAt vs properties.createDate. The first is when the creation of the record was triggered and the second is when the creatioin process has completed. This would be relevant for a form submission which might have some lag. I do not believe there is any difference between the updatedAt and props.lastmodifieddate

I would stick to what is within the props object

Thank you very much, @dennisedson!