Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE-REVERT]: Support for Hubspot associations API #540

Open
cmdrGuyson opened this issue Apr 8, 2024 · 10 comments · May be fixed by #552
Open

[ISSUE-REVERT]: Support for Hubspot associations API #540

cmdrGuyson opened this issue Apr 8, 2024 · 10 comments · May be fixed by #552
Assignees
Labels
💎 Bounty enhancement New feature or request help wanted Extra attention is needed 💰 Rewarded

Comments

@cmdrGuyson
Copy link

Describe the feature
Currently there is no way to access associations between different hubspot data objects.

For example given a deal entity identify all contacts associated with that deal.

Accessing associations in bulk (batches) would also be useful as it is a common use case to get associations of multiple objects in one API call.

Additional context
Hubspot Associations API documentation - https://developers.hubspot.com/docs/api/crm/associations

@cmdrGuyson cmdrGuyson added the enhancement New feature or request label Apr 8, 2024
@cmdrGuyson
Copy link
Author

cmdrGuyson commented Apr 9, 2024

A functionality that will be really useful would be coupling the associations api with the CRM GET apis. For example, while using the /crm/deals GET endpoint, being able to pass another query param called associations containing string of comma separated objects to be associated with the primary object.

curl -G https://api.revert.dev/crm/deals \
     -H "x-revert-api-token: string" \
     -H "x-revert-t-id: string" \
     -H "x-api-version: string" \
     -d fields=string \
     -d associations="contacts" \
     -d pageSize=string 

which will give a response like below,

{
  "status": "ok",
  "results": [
    {
      "amount": 0,
      "createdTimestamp": {},
      "expectedCloseDate": {},
      "id": "string",
      "isWon": true,
      "name": "string",
      "probability": 0,
      "remoteId": "string",
      "stage": "string",
      "updatedTimestamp": {},
      "additional": {},
      "priority": "string"
      "contacts": [...list of contacts associated with deal]
    }
  ],
  "next": "string",
  "previous": "string"
}

@jatinsandilya jatinsandilya added the help wanted Extra attention is needed label Apr 22, 2024
Copy link

algora-pbc bot commented Apr 22, 2024

💎 $40 bounty created by revertinc
🙋 If you start working on this, comment /attempt #540 along with your implementation plan
👉 To claim this bounty, submit a pull request that includes the text /claim #540 somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to revertinc/revert!

👉 Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @majjikishore007 Apr 27, 2024, 5:29:27 AM WIP
🟢 @ashutoshdhande Apr 30, 2024, 2:22:26 AM WIP
🟢 @bibhuty-did-this May 6, 2024, 11:32:28 AM WIP
🟢 @manish-singh-bisht #548

@majjikishore007
Copy link
Contributor

majjikishore007 commented Apr 27, 2024

/attempt #540

@ashutoshdhande
Copy link
Contributor

ashutoshdhande commented Apr 30, 2024

/attempt #540

@majjikishore007 majjikishore007 linked a pull request May 1, 2024 that will close this issue
9 tasks
@jatinsandilya
Copy link
Contributor

jatinsandilya commented May 1, 2024

@majjikishore007

Here the request can contain the association parameter with a comma seperated set of fields such as contacts,companies or only one contacts.

The API response should have the associated contacts or companies or another association data in the additional block like this:

{
  "additional" : {
    "associations" : {
	"contacts: '{...}'
   }
  }
}

For multiple associations requested the response should look like this:

{
  "additional" : {
    "associations" : {
          "contacts": '{...}',
	  "companies: '{...}',
    }
  }
}

If the request does not have associations in the request query the response should look like this:

{
  "additional" : {}
}

Please follow this request & response structure for the PR, thanks!

@majjikishore007
Copy link
Contributor

got it @jatinsandilya will update the pr accordingly thanks

Copy link

algora-pbc bot commented May 6, 2024

🎉🎈 @manish-singh-bisht has been awarded $40! 🎈🎊

@manish-singh-bisht
Copy link
Contributor

this bounty awarded is not for this issue, it was for different issue.

the bounty for this issue is still valid.

🎉🎈 @manish-singh-bisht has been awarded $40! 🎈🎊

* [Share on socials](https://console.algora.io/awards/clvurv8iy0002me09kpvkl1yy)

* [Give feedback](https://console.algora.io/claims/clvurv8iy0002me09kpvkl1yy)

@bibhuty-did-this
Copy link

bibhuty-did-this commented May 6, 2024

/attempt #540

@majjikishore007
Copy link
Contributor

@jatinsandilya here is the sample response given in the docs for a batch read request

{
  "completedAt": "2024-05-10T14:16:40.773Z",
  "requestedAt": "2024-05-10T14:16:40.773Z",
  "startedAt": "2024-05-10T14:16:40.773Z",
  "links": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "results": [
    {
      "from": {
        "id": "37295"
      },
      "to": {
        "id": "37295"
      },
      "type": "contact_to_company"
    }
  ],
  "status": "PENDING"
}

could you please specify how the final response should look, as you mentioned you need the actual data of contacts and companies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Bounty enhancement New feature or request help wanted Extra attention is needed 💰 Rewarded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants