go-hubspot icon indicating copy to clipboard operation
go-hubspot copied to clipboard

Add ability to list company associations

Open joidegn opened this issue 1 year ago • 2 comments

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

joidegn avatar Dec 18 '23 10:12 joidegn

Sorry it took so long. I think I have revised the PR as you proposed.

joidegn avatar Jan 18 '24 15:01 joidegn

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?

kk-no avatar Feb 01 '24 02:02 kk-no

Is this going to make it in?

andrewrynhard avatar Dec 13 '24 23:12 andrewrynhard

@joidegn How about after that? We are considering closing PR and then implementing the feature on our end.

kk-no avatar Jan 21 '25 02:01 kk-no