APIs & Integrations

umairhabib88
Member

Data retrieval issue with custom objects API

Hi there,

I am trying to use custom objects to achieve my organizational goals. My organization hosts events and parties, So i created a custom object named "Event" to encapsulate all data of an event such as (location, artist, feedback, etc). After creating Events and associating them with contacts I found out that hubspot does not create a property for that association in Contact properties, as it does for associated deals and associated companies. Due to which i cannot create any workflow based on that assocaition and i cannot analyze the data even on very basic levels like ( how many event were attended by a person, which was their first or last event, and since how long they have not attended any event). So, I tried creating an app that will get data of costom objects (EVENTS) and then perform these aforementioned tasks and post that data back into hubspot in custom fields created by me i.e (associated events in contact properties and duration since last event attended) but to my dissapointment the data retrieval of custom objects is not the same as for contacts or deals. I cannot get the values of any properties of custom objects such as (event name or event date) i can only get the schema of that property like (what type it is, what is it's ID or what format it stores value in). I have tried almost everything to achieve such basic tasks, any sort of help would be appreciated. Do let me know if i am doing anything wrong or is there a better way.

Thanks in advance.

Regards

Umair

0 Upvotes
1 Reply 1
dennisedson
HubSpot Product Team
HubSpot Product Team

Data retrieval issue with custom objects API

Hello @umairhabib88 ,

Thanks for the question. 

Wanted to make sure you are using the correct endpoint.  Your request url should look something like:

https://api.hubapi.com/crm/v3/objects/object-id?hapikey=

To get specific properties (as there are no default properties configured for a custom object), you will need to append the query parameter &properties=internal_property_name

Hope this helps!

0 Upvotes