GET specific information

Hi Team,

Could you please help in this problem statement,
Case : Do we have any parameter for these APIs that allows us to fetch only specific records after a certain time? For example, suppose my HubSpot account has 10 records, and we fetch these 10 records on May 21, 2024, at 01:00 PM. After that, we add 2 new records and modify 1 of the existing 10 records. When we hit the API on May 22, 2024, at 01:00 PM, we want to receive only the 2 new records and the 1 modified record.
API’s

Please let me know if you need any further details or clarification.

Thank you!

Hey, @devphoenix :waving_hand: The Search API will be your best bet. It allows for search operators like GT, GTE, LT, LTE, and BETWEEN. The CRM endpoints you linked to do not allow for filtering and using search operators.

Best,

Jaycee

Could you please help here, my below CURL is not working
curl --location ‘https://api.hubapi.com/crm/v3/objects/companies/search’ \
--header ‘Content-Type: application/json’ \
--header ‘Accept: application/json’ \
--header ‘Authorization: Bearer NOPE’ \
--data ‘{
“filters”: [
{
“propertyName”: “updatedAt”,
“operator”: “EQ”,
“value”: “2024-06-04T14:25:53.231Z”
}
]
}’

Thanks in advance

Hey @devphoenix :waving_hand: One issue I see is that `updatedAt` is not a property itself. `updatedAt` is a value that is part of the response for other properties. Essentially, each property can have metadata like `updatedAt` that shows when the property was last updated, but you can’t use `updatedAt` directly as a property in your API calls. We can verify this by making a request to the Properties API:

Request

curl --request GET \
 --url 'https://api.hubapi.com/crm/v3/properties/company/updatedAt?archived=false' \
 --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

Response

HTTP 404

{
 "status": "error",
 "message": "No property named 'updatedAt' exists.",
 "correlationId": "b9983aa0-b4cd-4a69-86d9-12ea5b5028b7",
 "context": {
 "name": [
 "updatedAt"
 ]
 },
 "category": "OBJECT_NOT_FOUND",
 "subCategory": "Properties.PROPERTY_NOT_FOUND"
}

Have you tried using the `hs_lastmodifieddate` property? This property updates any time any property on an object record is changed, reflecting the most recent update timestamp. You can leverage `hs_lastmodifieddate` to filter or sort your search results based on when records were last modified.

I hope this helps get you moving forward! — Jaycee
PS, you included your Private App key in your reply. I removed it, but you should consider rotating it to be safe.

Thanks :grinning_face:

Hi @Jaycee_Lewis

GET {{baseUrl}}/crm/v3/objects/companies ?properties=company_name&properties=industry &propertiesWithHistory=annual_revenue&propertiesWithHistory=num_employees &associations=contacts&associations=deals &archived=false&filter=hs_lastmodifieddate eq 2024-06-10T14:25:53.231Z
with this filter=hs_lastmodifieddate eq 2024-06-10T14:25:53.231Z is not working, could you please help here!! I don’t want to use

/search

Thanks