APIs & Integrations

Abishek-d
Member

How to get the associations of a particulat ticketId?

SOLVE

Can you please share the API to get all the associations information of a particulat ticketId

also please share v3 equivalent of the below api legacy API

"/crm-associations/v1/associations/{ObjectId}/HUBSPOT_DEFINED/{associateTypeId}"
0 Upvotes
1 Accepted solution
Teun
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

How to get the associations of a particulat ticketId?

SOLVE

Hi @Abishek-d ,

 

You can retrieve the associated objects of a ticket by making a GET request to https://api.hubapi.com/crm/v3/objects/tickets/{ticketId}?associations=contacts as explained in the docs.

This will include the ID's of the associated objects in the response.

This will return 



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


View solution in original post

0 Upvotes
2 Replies 2
Teun
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

How to get the associations of a particulat ticketId?

SOLVE

Hi @Abishek-d ,

 

You can retrieve the associated objects of a ticket by making a GET request to https://api.hubapi.com/crm/v3/objects/tickets/{ticketId}?associations=contacts as explained in the docs.

This will include the ID's of the associated objects in the response.

This will return 



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes
AHernández60
Contributor | Diamond Partner
Contributor | Diamond Partner

How to get the associations of a particulat ticketId?

SOLVE

Hello @Abishek-d 

 

Using the v3 associations API, you can retrieve all Contact from a ticket with something like this:

 

 

var client = new RestClient("https://api.hubapi.com/crm/v3/associations/ticket/contact/batch/read");

 

var request = new RestRequest(Method.POST);

request.AddHeader("accept", "application/json");

request.AddHeader("content-type", "application/json");

request.AddHeader("authorization", "Bearer YOUR_ACCESS_TOKEN");

request.AddParameter("application/json", "{\"inputs\":[{\"id\":\"12345\"}]}", ParameterType.RequestBody);

IRestResponse response = client.Execute(request);

 

I hope this can help you as a solution.

Let me know if I you need a more detailed solution.

 

Regards

0 Upvotes