I am using CRM objects GET API endpoint for example, Retrieve companies
I get a response such:
“results”: [
{
“archived”: false,
“createdAt”: “2023-03-03T11:59:25.795Z”,
“id”: “7777”,
“properties”: {
“createdate”: “2023-03-03T11:59:25.795Z”,
“domain”: “xyz.com”,
“hs_lastmodifieddate”: “2023-05-15T12:40:31.237Z”,
“hs_object_id”: “7777”,
“name”: “xyz”
},
“updatedAt”: “2023-05-15T12:40:31.237Z”
},
{
“archived”: false,
“createdAt”: “2023-03-07T12:10:04.817Z”,
“id”: “6666”,
“properties”: {
“createdate”: “2023-03-07T12:10:04.817Z”,
“domain”: “abc.com”,
“hs_lastmodifieddate”: “2025-02-04T13:19:43.104Z”,
“hs_object_id”: “6666”,
“name”: “abc”
},
“updatedAt”: “2025-02-04T13:19:43.104Z”
}
]
My questions:
- Can I assume that id and hs_object_id same always for a given objects such as company, deals, products?
- Can I also assume createdAt and createdate Same?
- Similarily, Can I also assume hs_lastmodifieddate and updatedAt Same?
I would like to know how values differ? as far as I can see the data in above keys have same value in my data
@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.
Steve
Hi @akshayMore 
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.
Thanks a lot for the quick response! helpful!