Hello guys, how are you? I am carrying out an API integration and associated a company with an event
(1 event (which is a customObject) can have several companies)
The association worked correctly and I can view it through Hubspot, but I am not able to search for this data in the API, when I click on the list of associations it only returns the ID’s of the associated data, I need you to bring me all the company and event data, how do I do it? that?
Use the company id you get back to call the Read endpoint for the company. Accounts Dashboard | HubSpot
You can also read in batches to get more than one back with a single call
Hi @PMalaquias ,
If I understood correctly, you want to retrieve the event and all of it’s associated companies including it’s properties.
This isn’t possible using the regular API. If you make a GET request to `/crm/v3/objects/<object>/{recordId}?associations=companies` you can retrieve the ID’s of the associated companies, when you have those, you can retrieve those companies through a second API call.
If you use GraphQL, you can retrieve all that information in a single API call.
I’m trying to use GraphQL but I keep getting the following error:
Status code 403 {“status”:“error”,“message”:“This app hasn’t been granted all required scopes to make this call. Read more about required scopes here: https://developers.hubspot.com/scopes.",“correlationId”:“0f925c51-9062-415c-81e3-a39fd21c2044”,“errors”:\[{“message”:"All of the following scopes are required.”,“context”:{“requiredScopes”:[“collector.graphql_query.execute”]}}],“links”:{“scopes”:“https://developers.hubspot.com/scopes"},“category”:"MISSING\_SCOPES”}
However, I have already added this scope to my key and it continues to display the error.

