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!
{
"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.
{
"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.