Skip to content

Logical and comparison operators are used inside $filter expressions.

Operators

OperatorMeaningExample
eqEqual tocat_ref eq 'ABC'
neNot equal tocat_ref ne 'ABC'
gtGreater thancreatedOn gt '2025-01-01'
ltLess thancreatedOn lt '2025-01-01'
geGreater than or equal tocreatedOn ge '2025-01-01'
leLess than or equal tocreatedOn le '2025-01-01'
andBoth conditions must matchcat_ref eq 'A' and cat_title eq 'Products'
orEither condition may matchcat_ref eq 'A' or cat_ref eq 'B'
inValue is in a listcat_ref in ('A','B')

Syntax

$filter=PROPERTY_NAME operator VALUE

Examples

GET https://api2.saleslayer.com/catalog/Categories?$filter=cat_title eq 'Products' or cat_ref eq 'LPG'
GET https://api2.saleslayer.com/dam/images?$filter=status eq 'Ok'

Notes

  • Use operators with fields whose data type supports the comparison.
  • Use metadata and the OpenAPI reference to confirm available fields.
  • Parentheses can make complex expressions easier to read and safer to maintain.