Tickets & Conversations

NMetnik
Member

Tickets with associated records

SOLVE

Hello,


Using the api, I'm trying to make one call to return all tickets in a date range and include the associated customerid and assigned userid.


Thank you!

 

Nick

0 Upvotes
1 Accepted solution
Jaycee_Lewis
Solution
Community Manager
Community Manager

Tickets with associated records

SOLVE

Hey @NMetnik 👋 You are not missing an additional option. Using the REST API endpoints, we cannot do this in a single unified request. You'll need to either:

  • make multiple calls and process the data externally
  • use our GraphQL endpoint, which allows you to one-shot these requests in the manner you want

Unfortunately, I do not have a third option for this challenge, as the Search API is powerful but won't return associations the way you need it to for this project.

 

Best,

Jaycee







HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.


Learn More.





Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !

View solution in original post

7 Replies 7
Nhal
Member

Tickets with associated records

SOLVE

Gotcha! API docs can be a bit much.

Are you trying to build a report or pull this into something like Sheets or a dashboard?

Here’s the quick win:
Use the /tickets/search endpoint with a date filter on createdate, and include associations for contacts, companies, and owners. That’ll give you ticket data plus the contact ID, owner ID, and company ID in one go.

You’d still need to make follow-up calls if you want names instead of just IDs. I usually batch those in a script when I need more detail. Want help with that part?

0 Upvotes
JWingate2
Guide | Elite Partner
Guide | Elite Partner

Tickets with associated records

SOLVE

Hi @NMetnik , 

I'm not sure, but @Anton might be able to help. I am not sure, I understand why you are doing an API call to collect this data. I believe you should be able to create a report and get this data, but I might be missing something as well.

0 Upvotes
NMetnik
Member

Tickets with associated records

SOLVE

IMG_8656.jpeg

Hello JWingate2,

 

Thank you. Yes. I need the Company Id and Name from the Company association and I need the Contact Id of the Ticket owner which it appears comes from the Contacts association. See attached. 

0 Upvotes
NMetnik
Member

Tickets with associated records

SOLVE

Again I'm calling the api but previous screenshot was to demonstrate what fields I need to include. I'm also using. c# but can adapt any code response. 

0 Upvotes
Jaycee_Lewis
Solution
Community Manager
Community Manager

Tickets with associated records

SOLVE

Hey @NMetnik 👋 You are not missing an additional option. Using the REST API endpoints, we cannot do this in a single unified request. You'll need to either:

  • make multiple calls and process the data externally
  • use our GraphQL endpoint, which allows you to one-shot these requests in the manner you want

Unfortunately, I do not have a third option for this challenge, as the Search API is powerful but won't return associations the way you need it to for this project.

 

Best,

Jaycee







HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.


Learn More.





Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
NMetnik
Member

Tickets with associated records

SOLVE

Thank you Jaycee.  Bummer, but I'll run in this direction and I appreciate you letting me know it's not possible.

0 Upvotes
JWingate2
Guide | Elite Partner
Guide | Elite Partner

Tickets with associated records

SOLVE

Hi @NMetnik , 

 

Would you mind sharing the purpose of this call? I would love to have more context to ensure I am providing you with the correct solution.

 

Thank you!

0 Upvotes