Skip to content

Base filters

The default filter model is a base model that can be used to create more specific filter models.

PropertyTypeRequiredDescription
operatorone of the enums belowYesThe operator to apply to the filter value
valueanyYesThe value to use for the filter operation

A JSON example of this field is:

{
"operator": "eq",
"value": "example"
}

Operators that filter a field based on an exact match to a value. Supported value types include:

  • string
  • number
  • boolean
  • date
  • money
OperatorDescriptionPropertyTrue valueFalse value
eqEqual to a value"foo""foo""bar"
neqNot equal to a value"foo""bar""foo"

A JSON example of this field is:

"eq"

Operators that filter a field based on a comparison to a value. Supported value types include:

  • number
  • date
  • money
OperatorDescriptionPropertyTrue valueFalse value
gtGreater than a value10155
gteGreater than or equal to a value10109
ltLess than a value10515
lteLess than or equal to a value101011

A JSON example of this field is:

"gt"

Operators that filter a field based on a string value.

OperatorDescriptionPropertyTrue valueFalse value
likeLike"hello""hell""world"
not_likeNot like"hello""world""hell"

A JSON example of this field is:

"like"

Operators that filter a field based on an array of values. Supported value types include:

  • string
  • number
OperatorDescriptionPropertyTrue valueFalse value
inIn an array of values"A"["A", "B"]["B", "C"]
not_inNot in an array of values"A"["B", "C"]["A", "B"]

A JSON example of this field is:

"in"

Operators that filter a field based on a range of values. Supported value types include:

  • number
  • date
  • money
OperatorDescriptionPropertyTrue valueFalse value
betweenThe value must be between the two values5{"min": 1, "max": 10}{"min": 10, "max": 20}
outsideThe value must be outside the two values5{"min": 10, "max": 20}{"min": 1, "max": 10}

A JSON example of this field is:

"between"