APIs & Integrations

JAntonio
Member

Get all tickets and Company ID using Search endpoint

Hello,

 

I have tried to get all Tickets including Company ID information using Search endpoint but it was never successful. Is it possible to use Search endpoint witjh associated information? Is there any way to do so?

 

Thanks in advance!

 

0 Upvotes
3 Replies 3
Jaycee_Lewis
Community Manager
Community Manager

Get all tickets and Company ID using Search endpoint

Hey, @JAntonio 👋 To help us get started, have you already tried using the Tickets API? Specifically

https://api.hubapi.com/crm/v3/objects/tickets?associations=companies

CRM_API___Tickets.png

 

Thanks! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
JAntonio
Member

Get all tickets and Company ID using Search endpoint

HI @Jay, thanks for your answer. 

 

Yes. At first, I have usually used the endpoint you mentioned with associations=companies in order to get a full list of Tickets, and it worked fine. Now, I am implementing an incremental load process so i would like to get just new/changed Tickets. To do so, I understand I should use Tickets search endpoint because then I can apply filters to the request. The problem is that I cannot see how to get associated company ID's if I use the search endpoint. 

 

What would be the best way to request Tickets with filter option including associated company Id's (per each ticket)?

 

Thanks in advance.

 

Regards,

Juan Antonio

CraigBosco
Contributor

Get all tickets and Company ID using Search endpoint

This is exactly the pain point I'm also experiencing. I know that the Tickets-to-Companies association is one-to-many, but could we just get the primary or first association? 

0 Upvotes