View all tickets from a company ID

Hello,

  I am trying to pull all the tickets through the tickets filter endpoint. I've tried using a few queries such as customer_id:${company_id} or company_id:${company_id} or even company_id:${company_id} .

What is the correct way to do this?

const query = `company:${companyId}`;
const path = `/api/v2/search/tickets?query="${query}"&page=${page}`;

Anyone have a solution?

Hello,

As far as I know the only way to get all tickets of a specific Company is to use the List All Tickets API with the parameter company_id like this
/api/v2/tickets?company_id=[id]
Do note that this only returns tickets created in the last 30 days, if you want to cover a larger range you need to set the updated_since parameter as well.

1 Like