Skip to content

Filter

Use $filter to narrow the resources returned by an API request.

The current OpenAPI specifications document $filter for:

  • DAM list operations: GET /dam/images and GET /dam/files
  • Catalog list and changelog operations, such as GET /catalog/Products

Syntax

$filter=PROPERTY_NAME operator VALUE

Example:

GET https://api2.saleslayer.com/catalog/Products?$filter=contains(prod_title,'EC')

Supported expressions

Filtering can use comparison operators, logical operators, and string functions where supported by the endpoint.

Examples:

prod_ref eq 'ABC-001'
contains(prod_title,'EC')
cat_ref eq 'LPG' or cat_title eq 'Products'

Supported properties

For Catalog resources, use metadata endpoints to confirm the fields available for filtering.

For DAM images and files, use the DAM endpoint reference for supported query fields and examples.

Date filters

DAM createdOn and modifiedOn values are UTC timestamps in ISO 8601 format with a Z suffix. Date values in $filter must use the same format. For example:

curl --get 'https://api2.saleslayer.com/dam/files' \
  --data-urlencode '$filter=modifiedOn gt 2026-10-01T08:00:00Z' \
  -H 'X-API-KEY: YOUR_API_KEY'

The same expression works on /dam/images. Convert local times to UTC before building the filter. Date comparisons use UTC instants; a value without a time zone is not the documented DAM format.

Catalog date and date-time fields (*_creation, *_modify, and custom date fields) are also returned in UTC with a Z suffix. Date comparisons in $filter and sorting in $orderby use UTC instants. Confirm the field name and type using the resource metadata before building a Catalog date filter.

Limitations

Based on the migrated documentation and the current API descriptions:

  • Filters apply to the root resource being requested.
  • Filtering nested resource properties is not documented as supported.
  • Property names, operators, and value formats must match the resource metadata and API reference.

Example with $select

GET https://api2.saleslayer.com/catalog/Products?$select=prod_ref,prod_title&$filter=contains(prod_title,'EC')

Notes

  • Use URL encoding when filter values contain spaces, quotes, or special characters.
  • Combine multiple conditions with and or or when supported.
  • Test filters with small page sizes before running large synchronization jobs.