Filtering API v3 results

With API v3 you have an option to use filters to get specific results.

Filters for the GET /tickets API to retrieve a list of tickets are especially limited, for more details and all available options please see this article.

Simple filters

Using a simple filter you can filtrate results by searching for a specific column with an exact value:

{"parameter":"value"}

This simple filter allows you to retrieve e.g. tickets with New status:

_filters:{"status":"N"}

You can also combine more conditions in a filter by separating them by a comma, e.g. searching in contacts for all men in a company with a specific ID:

_filters={"gender":"M","company_id":"123abc"}

Using the simple filter, you can search only for a specific value in a parameter, but cannot define operators or use e.g. date ranges. To define operators or search for results within date ranges, use an advanced filter.

Advanced filters

The format of a filter for advanced search requires three values instead of two as in simple filter:

[["parameter","operator","value"]]

As you can see an operator is used in it. With an advanced filter, you can search e.g. for tickets created only this week or all tickets that are not deleted:

_filters=[["date_created","DP","TW"]]
_filters=[["status","NI","X,B"]]

You can also combine more conditions into one filter by separating them by a comma, e.g. searching for all postponed tickets created the last month:

_filters=[["status","E","W"],["date_created","DP","LM"]]

Operators used in advanced search

In all advanced filters you can use the following operators:

Boolean operators
OperatorDescriptionExample use
LLike[["tags","L","3bg4"]]
NLNot like[["field_player_id","NL","007"]]
EEquals[["status","E","N"]]
NENot equals[["field_player_id","NE","007"]]
CYContains any of[["tags","CY","3bg4,9aue"]]
INIs in[["departmentid","IN","8ld2hdk5,klt0srua"]]
NINot in[["departmentid","NI","default,8ld2hdk5"]]
IEIs empty[["company_id","IE",""]]
INEIs not empty[["company_id","INE",""]]
Numerical value operators
OperatorDescriptionExample use
=Number equals[["id","=","209"]]
>Number greater than[["id",">","200"]]
<Number lower than[["id","<","51"]]
>=Number equals or is greater[["id",">=","78"]]
<=Number equals or is lower[["id","<=","3"]]
Date & time operators
OperatorDescriptionExample use
D=Date equals[["date_created","D=","2011-11-11"]]
D>Date greater than[["date_changed","D>","2023-01-01 13:00:00"]]
D<Date lower than[["date_created","D>","2022-12-31"]]
D>=Date equals or is greater[["last_activity","D>=","2023-12-24 7:00:00"]]
D<=Date equals or is lower[["date_resolved","D<=","2022-11-30"]]
T=Time equals 
T>Time greater than 
T<Time lower than 
T>=Time equals or is greater 
T<=Time equals or is lower 
DPDate range[["date_created","DP","TW"]]
Date & time operators' values
ValueDescriptionExample use
TToday[["date_created","DP","T"]]
YYesterday[["date_created","DP","Y"]]
L7DLast 7 days[["date_created","DP","L7D"]]
L30DLast 30 days[["date_created","DP","L30D"]]
L90DLast 90 days[["date_created","DP","L90D"]]
TWThis week[["date_created","DP","TW"]]
LWLast week[["date_created","DP","LW"]]
L2WLast 2 weeks[["date_created","DP","L2W"]]
LWWLast week workdays[["date_created","DP","LWW"]]
TMThis month[["date_created","DP","TM"]]
LMLast month[["date_created","DP","LM"]]
TYThis year[["date_created","DP","TY"]]
LYLast year[["date_created","DP","LY"]]
×