How to Perform Filtered Search for Events in Custom Objects?
Greetings, everyone,
I am working on an API integration between my app and HubSpot, where HubSpot serves as the database. I created a custom object called "Events," which is associated with a standard object "Company."
I would like to perform a filtered search for all events of a specific company associated with this event.
For this filter, when both objects are standard, the call should be:
However, in the case of custom objects, I found the following information:
I cannot find in the documentation how to perform this search for custom objects. I would like to know where I am going wrong or how I should make the correct call in this case.
How to Perform Filtered Search for Events in Custom Objects?
Hey, @Fred4👋 Welcome to the community. To clarify, you are not missing an option with the Search API. You'll need to use the Associations API to return the objects IDs. The thing to note here is that the Associations API doesn't offer filtering or search operators. If you need to utilize those, you have to look at making multiple requests. One to the Search API to use filters and search operators on your Custom Object, and then one to use those IDs and use the Associations API to get the related company IDs. The other option is to look into GraphQL if you have a Content Hub — Professional or Enterprise subscription.
I made a quick example of what the response will look like using the Associations API with a Custom Object.