# Get Open Tickets Only

**URL:** <https://community.hubspot.com/t/get-open-tickets-only/20556>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [May 4, 2020, 12:56am UTC](https://community.hubspot.com/t/get-open-tickets-only/20556 "2020-05-04T00:56:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SC2019](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sc2019/32/34870_2.png) [@SC2019](https://community.hubspot.com/u/SC2019)\
**Post date:** [May 4, 2020, 12:56am UTC](https://community.hubspot.com/t/get-open-tickets-only/20556/1 "2020-05-04T00:56:41Z")

</div>

Hi all, how do I retrieve all **open tickets only** for a specified contact? Right now I’m using the Associations (Ticket by Contact) endpoint to retrieve all tickets for the contact and looping through all returned tickets and calling the Tickets API for each to find open ones. Hoping there’s a better way!

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [May 5, 2020, 6:11am UTC](https://community.hubspot.com/t/get-open-tickets-only/20556/2 "2020-05-05T06:11:28Z")

</div>

Hey @SC2019,

By open tickets do you mean ticket that doesn’t have status == closed?

If so, you can use the crm v3 search endpoint: [CRM API | Search](https://developers.hubspot.com/docs/api/crm/search)

i.e.

POST `crm/v3/objects/tickets/search`

```auto
{
 "filterGroups":[
 {
 "filters":[
 {
 "propertyName":"associations.contact",
 "operator":"EQ",
 "value":"{{contact id}}"
 },
 {
 "propertyName":"hs_pipeline_stage",
 "operator":"NEQ",
 "value":"{{the pipeline stage id for closed. if you're using the default pipeline, this should be 4}}"
 }
 ]
 }
 ]
}

```

This will search for ticket that are associated to a particular contact ID and doesn’t have a ticket status == closed.

---

<div class="post-metadata">

**Author:** ![SC2019](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sc2019/32/34870_2.png) [@SC2019](https://community.hubspot.com/u/SC2019)\
**Post date:** [May 11, 2020, 12:37am UTC](https://community.hubspot.com/t/get-open-tickets-only/20556/3 "2020-05-11T00:37:00Z")

</div>

Thanks so much Wendy!
