I can’t seem to retrieve any company associations when using the contact read endpoint despite requesting them in the query params.
request:
https://api.hubapi.com/crm/v3/objects/contacts/\?associations%5B0%5D=companies
I know my contact has an association as it shows it belongs to a company in the dashboard and when calling the explicit associations endpoint, it returns an association for this contact-id:
https://api.hubapi.com/crm/v3/associations/contacts/companies/batch/read
Can anyone else verify or explain what I’m doing wrong?
Hi @isabelareid,
I think the issue is to do with the format of your request. Specifically the “%5B0%5D” character. That when decoded translates to “[0]” so from HubSpots perspective your request looks like this which won’t return associations:
https://api.hubspot.com/crm/v3/objects/contacts/101?properties=email&associations[0]=companies
Omitting the “%5B0%5D” works fine on my end. In short it appears that your code is doing something when creating the request URL and because of the url encoding it’s creating the issue.
Thank you! It looks like the ruby docs were just incorrect. Accounts Dashboard | HubSpot Thank you once again!