I would like to ask if it is possible to obtain the owner of a contact by calling the contacts API.
client.crm.contacts.basic_api.get_page()
I saw in the past you could by adding "hubspot_owner_id" into properties, some people recommended to cross Apis with Owner, but I couldn't find a clear way either.
I would like to ask if there is any way to get the list of properties that I can add to the request.
Likewise, specific property values can be retrieved when requesting lists or batches of Contacts via the API.
As @dennisedson mentioned, you can use the Get All Properties endpoint to inspect all available properties relevant to record ownership. Here are some I found that might be of interest (descriptions for each can be found in the API response):
hubspot_owner_id
hubspot_owner_assigneddate
hs_all_owner_ids
hs_user_ids_of_all_owners
hubspot_team_id
hs_all_team_ids
owneremail (marked as legacy, returned null for me)
ownername (marked as legacy, returned null for me)
Relating to your follow up question in this thread --> yes, it is possible to use the CRM Search API endpoint to retrieve a list of Contact records based on when they were last modified. For example:
For anyone not overly familiar with the CRM Search API --> "GTE" is the endpoint's "greater than or equal to" operator, and "1635435000000" reflects the example target datetime in Unix epoch time (milliseconds). I generally use EpochConverter for generating test timestamps like this.
Finally, the Contact property being searched on in the above example is "lastmodifieddate", not to be confused with "hs_lastmodifieddate". The latter is a hidden property which, based on some very quick testing, cannot be used within CRM Search API filters.
Likewise, specific property values can be retrieved when requesting lists or batches of Contacts via the API.
As @dennisedson mentioned, you can use the Get All Properties endpoint to inspect all available properties relevant to record ownership. Here are some I found that might be of interest (descriptions for each can be found in the API response):
hubspot_owner_id
hubspot_owner_assigneddate
hs_all_owner_ids
hs_user_ids_of_all_owners
hubspot_team_id
hs_all_team_ids
owneremail (marked as legacy, returned null for me)
ownername (marked as legacy, returned null for me)
Relating to your follow up question in this thread --> yes, it is possible to use the CRM Search API endpoint to retrieve a list of Contact records based on when they were last modified. For example:
For anyone not overly familiar with the CRM Search API --> "GTE" is the endpoint's "greater than or equal to" operator, and "1635435000000" reflects the example target datetime in Unix epoch time (milliseconds). I generally use EpochConverter for generating test timestamps like this.
Finally, the Contact property being searched on in the above example is "lastmodifieddate", not to be confused with "hs_lastmodifieddate". The latter is a hidden property which, based on some very quick testing, cannot be used within CRM Search API filters.
Thank you for your answer @dennisedson. I would just like to filter the API call by some timestamp in order to don't have to bulk all the data every time.
Having the infrastructure to deal with a Webhook is a bit more complex, but if this is the best practices you recommend. I can work on it.