I was wondering if there was a way in which I could get the associated contact and company details of a ticket using an API? Or copy the ticket's associated company and contact details into fields on the ticket via a workfllow?
For a little background information... I have an application which currently pulls all tickets within a specific pipeline, using the crm/v3/objects/tickets/searchcrm/v3/objects/tickets/search POST API (https://developers.hubspot.com/docs/api/crm/search). However, I cannot seem to get the associated company and contact details of a ticket using the API. Is there a way to do so?
nov 27, 20206:00 AM - editado nov 27, 20206:40 AM
Miembro
Hubspot pipeline tickets API
Hi Michael,
Thank you for taking the time to reply.
In the end I created two functions, one for getting the ticket's associated contact and the other for getting the company and passed in the ticket's id as a parameter. Within each function I first used the
crm-associations/v1/associations/{$ticketId} GET API and inserted the ticket's id at the end of the url.
I then used the
crm/v3/objects/contacts/search POST API, filtered the request by the object id returned from the GET request and added the properties I wanted to be returned.
From this you can recieve all object ids associated to your ticket and from there get all the properties you need and create a new copy if you want to. You just need to know how to code or get anyone to so for you.