Skip to content

Filter Products

Request

Filters and returns a paginated collection of Product resources using OData query options.

Authentication

Requires a valid API key in the X-API-KEY header.

Headers

Accept-Language

Indicates the preferred natural language and locale for localized content.

  • omitted / null: content in the tenant's default culture.
  • culture-code (e.g. en-US, es): content localized in the specified culture.
  • * and q-factor weighting are currently not supported.

OData Query Support

$select

Comma-separated list of root-resource property names to include in the response. See /Products/$metadata for the available properties. Selecting properties of embedded resources is not supported.

Example: $select=prod_description,prod_tags

$expand

Comma-separated list of related collections to count. $expand does not embed the related resources: each returned Product gets one extra property per expanded collection, holding the number of related items. Nothing is added by default.

  • Variants — the product's variants (deleted variants are not counted) → property Variants@count.
  • Categories — the categories the product belongs to → property Categories@count.

Any other value is rejected with 400 Bad Request. To read the variants themselves, use GET /Products({productIdentifier})/Variants; to read the product's categories, select cat_id or cat_ref.

Example: $expand=Variants → { "prod_id": 1, "prod_ref": "SKU-001", "Variants@count": 2 }

$filter

OData v4.01 URI conventions. Filtering is restricted to properties of the root resource (Product).

Comparison operators: eq, ne, gt, ge, lt, le

Logical operators: and, or, not

Set operator: in

String functions: contains, startswith, endswith

Dates: a date attribute is a date and time with no time zone, returned and compared as written: $filter=prod_date ge 2026-10-21T16:22:00. A value with Z or a negative offset (-03:00) is compared at its date and time in Spain (Europe/Madrid). System dates (prod_creation, prod_modify) are UTC, with Z: $filter=prod_modify gt 2026-10-21T14:22:00Z.

Examples:

  • $filter=prod_ref eq 'SKU-001'
  • $filter=contains(prod_description, 'pro')
  • $filter=prod_id in (1, 2, 3)
  • $filter=prod_id gt 100 and contains(prod_description, 'pro')

$orderby

Single property, ascending by default. Multi-property ordering and ordering on embedded properties are not supported.

Examples:

  • $orderby=prod_description (asc by default)
  • $orderby=prod_description asc
  • $orderby=prod_ref desc

Pagination — $top, $skip, $skipToken

  • $top — maximum number of items returned.
  • $skip — number of items to skip (offset paging).
  • $skipToken — continuation-token paging. Recommended when no $orderby is applied (faster than offset paging).

Paging applies only to the root resource (Product), never to embedded collections.

Response

200 OK — CollectionRepresentation with the matching Product resources, pagination metadata (Count, Skip, Top, HasNext, continuation token) and the cultures echoed from Accept-Language.

Error Responses

  • 400 Bad Request — Invalid OData expression or unsupported $orderby/$filter field (returns ValidationFailureRepresentation).
  • 401 Unauthorized — Missing or invalid API key. Returned by the API gateway as { "message": "Unauthorized", "request_id": "d8aafa5b8f3e400b60bea0123dd33317" }.
  • 404 Not Found — No product matches the query: an empty result is answered 404, not an empty collection.
  • 500 Internal Server Error — Unexpected technical error.

Example

Request:

GET /Products?$filter=contains(prod_description,'pro')&$orderby=prod_description asc&$top=20 HTTP/1.1
X-API-KEY: your-api-key-here
Accept-Language: en-US

Response:

HTTP/1.1 200 OK
Content-Type: application/json
Query
$filterstring
$orderbystring
$skipinteger, (int64), >= 0

OData $skip offset, 0 or greater

$skipTokenstring
$topinteger, (int64), [ 1 .. 100 ]

OData $top page size, from 1 to 100 (default 100)

$selectstring
$expandstring
Headers
X-API-KEYstring

Tenant's API key (required)

Accept-Languagestring

Preferred localization culture (Accept-Language header)

curl -i -X GET \
  'https://api2.saleslayer.com/catalog/Products?%24filter=string&%24orderby=string&%24skip=0&%24skipToken=string&%24top=1&%24select=string&%24expand=string' \
  -H 'Accept-Language: string' \
  -H 'X-API-KEY: string'

Responses

OK

Bodyapplication/json
@contextstring or null
valueany or null
@countinteger or null, (int64)
Response
{ "@readLink": "string", "@nextLink": "string", "@deltaLink": "string", "@context": "string", "value": null, "@count": 0 }