Preparing SPARQUE Desk for Populating a Search Result Page

The Wrapper endpoint /search returns products, redirects, facets and/or sortings and is intended for populating a search result page.

In SPARQUE Desk, several endpoints are involved in this process. This page highlights the main endpoints:

  • search
  • facet_filter
  • facet_options
  • facets

For a comprehensive list, refer to the Required SPARQUE Desk Endpoints.

Endpoint facets

This stacked endpoint outputs all properties from the search results. For each property returned, the facet_options endpoint is called to retrieve the available values for that property. Since this endpoint is stacked on top of the search endpoint, no additional parameters besides locale are required.

OBJ -> facets/p/locale/{STRING} -> OBJ

Example of a SPARQUE request to return all facets based on a search call:

/1/workspace/api/PWA/c/locale/de-DE/c/channel/ish/c/keyword/black/e/search/e/facets/results?config=default

Endpoint facet_options

This stacked endpoint returns all property value objects for a specific property. The property identifier must be provided as a string via the attribute parameter. The output is structured as OBJ,DOUBLE, where OBJ represents the property value and DOUBLE indicates the count of items in the result set.

OBJ -> facet_options/p/attribute/{STRING} -> OBJ,DOUBLE

Example of a SPARQUE request to return options for a color facet:

/1/workspace/api/PWA/c/locale/de-DE/c/channel/ish/c/keyword/black/e/search/e/user_product_catalog/e/facet_options/p/attribute/Colour/results?config=default

Endpoint facet_filter

This stacked endpoint filters the product list to include only those with properties matching the specified name and value. Multiple property values can be provided for filtering.

OBJ -> facet_filter/p/value/{TUPLE_LIST}/p/locale/{STRING}/p/attribute/{STRING} -> OBJ

Example of a SPARQUE request to apply a facet filter additionally to the keyword search:

/1/workspace/api/PWA/c/locale/de-DE/c/channel/ish/c/keyword/black/e/search/e/facet_filter/p/value/1(Gray)/p/attribute/Color/results