In response to your questions (to the best of my knowledge):
Yes, you can always assume that "id" and "hs_object_id" will be the same value for all object types.
This depends on the object type you're working with. For Contacts and Companies, the value for the "createdate" property and the "createdAt" 'attribute' should be the same, because "createdate" is read-only for these object types. However, the "createdate" property is not read-only for at least some object types, including Tickets, Deals, Products and Line Items. To check whether or not a property is read-only, you can use the Properties API (look for modificationMetadata.readOnlyValue). Note also that there's a separate property on all object types, "hs_createdate". This is always read-only, so it should always match the "createdAt" attribute.
Yes, you can always assume "updatedAt" will match "hs_lastmodifieddate".
Please note, there may be subtleties that I'm not aware, so please take this with a pinch of salt. Regardless, I hope this proves helpful. Please let me know if you have any follow-up questions.
All the best,
Zach
--
Zach Klein HubSpot Integrations & App Developer Meanjin / Brisbane, Australia
In response to your questions (to the best of my knowledge):
Yes, you can always assume that "id" and "hs_object_id" will be the same value for all object types.
This depends on the object type you're working with. For Contacts and Companies, the value for the "createdate" property and the "createdAt" 'attribute' should be the same, because "createdate" is read-only for these object types. However, the "createdate" property is not read-only for at least some object types, including Tickets, Deals, Products and Line Items. To check whether or not a property is read-only, you can use the Properties API (look for modificationMetadata.readOnlyValue). Note also that there's a separate property on all object types, "hs_createdate". This is always read-only, so it should always match the "createdAt" attribute.
Yes, you can always assume "updatedAt" will match "hs_lastmodifieddate".
Please note, there may be subtleties that I'm not aware, so please take this with a pinch of salt. Regardless, I hope this proves helpful. Please let me know if you have any follow-up questions.
All the best,
Zach
--
Zach Klein HubSpot Integrations & App Developer Meanjin / Brisbane, Australia
difference between hs_object_id and id in the get endpoint response
SOLVE
@akshayMore - confusing, isn't it! I am pretty sure you can assume that these examples of 'id' and 'hs_object_id' demonstrate that the record ID values will always be the same - just represented differently due to the history of the API development over time.