go-hubspot
go-hubspot copied to clipboard
Add ability to list company associations
What to do
Adds the ability to GET company associations
https://developers.hubspot.com/docs/api/crm/associations
Example curl:
curl "https://api.hubapi.com/crm/v3/objects/company/<company-id>/associations/company" \
-H 'Authorization: Bearer <token-here>'
{"results":[{"id":"8616142197","type":"parent_to_child_company"},{"id":"8921827721","type":"parent_to_child_company"},{"id":"5593726386","type":"child_to_parent_company"},{"id":"5593726386","type":"company_to_company"},{"id":"8616142197","type":"company_to_company"},{"id":"8921827721","type":"company_to_company"}]}%
This PR is stacked on top of #26
Background
This uses the (I think undocumented) GET /crm/v3/objects/{object-type}/{object-ID}/associations/{to-object-type} endpoint
Acceptance criteria
The user can GET company associations with other objects
Sorry it took so long. I think I have revised the PR as you proposed.
Hi, @joidegn ! We plan to create a new version next week. I would like to include this PR if possible, but did you check the PR comments?
Is this going to make it in?
@joidegn How about after that? We are considering closing PR and then implementing the feature on our end.