I'm trying to work with some custom objects via the API, and i cannot find an endpoint that will show me all the properties of a specific instance(s) of a custom object.
Pulling my hair out here...how do i find the property values set in the webapp for the custom object?
Partial snip of the schema (can also use the properties api)only 3 of the 54 properties show upThere are 54 different properties that should be here
Hi, @pyrex41👋 Have you already tried using the Search API endpoints? For example, you can set up your request to include all the properties you want returned — Specify returned properties.
You can include additional properties in the query param, but be aware there is a character limit. For example, 'https://api.hubapi.com/crm/v3/objects//?properties=test1%2C%20test2%2C%20test3&archived=false' Dealing with this character limit is where the Search API is handy.
Based on the API response you've posted, you're making requests related to the object schema, opposed to specific object instances as it seems you're trying to. I'm going to link you to another post I replied on where I describe using the search endpoint to find records matching specified criteria. Link HERE
It provides a bit more detail around the exact route @Jaycee_Lewis is encouraging you to take.
Instead of going to the "Object schema" tab of the documentation, choose the "Objects" tab in the middle. Screenshot below with the correct tab highlighted.
You could also use the read endpoints found in that same tab, if you have the ID(s) of the records you're searching for.
I would echo this approach. We use a similar approach when we need to retrieve custom object (or even standard) object data from HubSpot.
As par of our integrations, we pull all properties to a local SQL Server table once a day (can obviously be more frequent, depending on how often you add new properties). When a call is made to the /search endpoint, we first make a call to that table and retrieve a comma separated list of all the properties for that object. That value is then included in the search payload.
Another approach to ensure you get all available data for an object is to implemente webhooks in a HubSpot workflow. You can define whatever enrollment trigger works for your scenario and then set up an endpoint to accept the incoming data from the webhook. By default, the webhook will send all data for all applicable properties on that object. We found this especially helpful - not only do we not have to poll the HubSpot APIs looking for data changes, but we don't have to specific the properties we want - the webhook sends everything that's populated for that specific record.
Based on the API response you've posted, you're making requests related to the object schema, opposed to specific object instances as it seems you're trying to. I'm going to link you to another post I replied on where I describe using the search endpoint to find records matching specified criteria. Link HERE
It provides a bit more detail around the exact route @Jaycee_Lewis is encouraging you to take.
Instead of going to the "Object schema" tab of the documentation, choose the "Objects" tab in the middle. Screenshot below with the correct tab highlighted.
You could also use the read endpoints found in that same tab, if you have the ID(s) of the records you're searching for.
Hi, @pyrex41👋 Have you already tried using the Search API endpoints? For example, you can set up your request to include all the properties you want returned — Specify returned properties.
You can include additional properties in the query param, but be aware there is a character limit. For example, 'https://api.hubapi.com/crm/v3/objects//?properties=test1%2C%20test2%2C%20test3&archived=false' Dealing with this character limit is where the Search API is handy.
Thank you all, it looks the issue was that I did not specify the properties i wanted in the search query (`?properties=prop1, prop2, prop3`). What I was getting was only the default parameters (I'm assuming; I can't find anywhwere that specifies what the default parameters for custom objects are). The documentation says "Control what is returned via the properties query param." -- I understood this to mean you could *limit* the properties returned, but that no specification would return all properties.
I would echo this approach. We use a similar approach when we need to retrieve custom object (or even standard) object data from HubSpot.
As par of our integrations, we pull all properties to a local SQL Server table once a day (can obviously be more frequent, depending on how often you add new properties). When a call is made to the /search endpoint, we first make a call to that table and retrieve a comma separated list of all the properties for that object. That value is then included in the search payload.
Another approach to ensure you get all available data for an object is to implemente webhooks in a HubSpot workflow. You can define whatever enrollment trigger works for your scenario and then set up an endpoint to accept the incoming data from the webhook. By default, the webhook will send all data for all applicable properties on that object. We found this especially helpful - not only do we not have to poll the HubSpot APIs looking for data changes, but we don't have to specific the properties we want - the webhook sends everything that's populated for that specific record.