Skip to content

Filter Categories

Request

Filters the tenant's Categories using OData query options and returns the matching resources as a paginated collection.

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. The available property names are published in /Categories/$metadata. Selecting properties of embedded resources is not supported.

Example: $select=cat_title,cat_description

$expand

Comma-separated list of embedded collections to include. By default, embedded collections are not included. Only embedded collections (not embedded resources) are supported.

Example: $expand=Products

$filter

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

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

Logical operators: and, or, not

Set operator: in

String functions: contains, startswith, endswith

Examples:

  • $filter=cat_title eq 'Outdoor'
  • $filter=contains(cat_title, 'pro')
  • $filter=cat_id in (1, 2, 3)
  • $filter=cat_id gt 100 and contains(cat_title, 'pro')

$orderby

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

Examples:

  • $orderby=cat_title (asc by default)
  • $orderby=cat_title asc
  • $orderby=cat_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 (Category), never to embedded collections.

Response

200 OKCollectionRepresentation with the matching Category 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 — Tenant or model not found.
  • 500 Internal Server Error — Unexpected technical error.

Example

Request:

GET /Categories?$filter=contains(cat_title,'pro')&$orderby=cat_title 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)
$skipTokenstring
$topinteger, (int64)
$selectstring
$expandstring
Headers
X-API-KEYstring

Tenant's API key (required)

Accept-Languagestring

Preferred localization culture (Accept-Language header)

GET
/Categories
curl -i -X GET \
  'https://api2.saleslayer.com/catalog/Categories?%24filter=string&%24orderby=string&%24skip=0&%24skipToken=string&%24top=0&%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 }