Skip to content

Base filters

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

Property Type Required Description
operator one of the enums below Yes The operator to apply to the filter value
value any Yes The value to use for the filter operation

A JSON example of this model.

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

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

  • string
  • number
  • boolean
  • date
  • money
Operator Description Property True value False value
eq Equal to a value "foo" "foo" "bar"
neq Not equal to a value "foo" "bar" "foo"

A JSON example of this model.

"eq"

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

  • number
  • date
  • money
Operator Description Property True value False value
gt Greater than a value 10 15 5
gte Greater than or equal to a value 10 10 9
lt Less than a value 10 5 15
lte Less than or equal to a value 10 10 11

A JSON example of this model.

"gt"

Operators that filter a field based on a string value.

Operator Description Property True value False value
like Like "hello" "hell" "world"
notLike Not like "hello" "world" "hell"

A JSON example of this model.

"like"

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

  • string
  • number
Operator Description Property True value False value
in In an array of values "A" ["A", "B"] ["B", "C"]
notIn Not in an array of values "A" ["B", "C"] ["A", "B"]

A JSON example of this model.

"in"

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

  • number
  • date
  • money
Operator Description Property True value False value
between The value must be between the two values 5 {"min": 1, "max": 10} {"min": 10, "max": 20}
outside The value must be outside the two values 5 {"min": 10, "max": 20} {"min": 1, "max": 10}

A JSON example of this model.

"between"