Preparing SPARQUE Desk for Populating a Category Page
The Wrapper endpoint /products returns products, redirects, facets and/or sortings and is intended for populating a category page.
In SPARQUE Desk, several endpoints are involved in this process. This page highlights the main endpoints:
- products
- category:FILTER
- facets
- facet_options
- facet_filter
For a comprehensive list, refer to the Required SPARQUE Desk Endpoints.
Endpoint products
This endpoint returns all products. Filters are often applied to show only products that are online.
products/p/user/{STRING}/p/channel/{STRING}/p/cartId/{TUPLE_LIST} -> OBJ
Example of a SPARQUE request:
/1/workspace/api/PWA/c/channel/ish/e/products/results
Endpoint category:FILTER
This stacked endpoint filters the list of products by the specified category. One or more category identifiers can be provided as a tuple list to refine the results.
OBJ -> category:FILTER/p/value/{TUPLE_LIST} -> OBJ
Example of a SPARQUE request with a category filter:
/1/workspace/api/PWA/c/channel/ish/e/products/e/category:FILTER/p/value/1(categoryName)/results
Endpoint facets
This stacked endpoint outputs all properties from the search results. For each property returned, the facet_options endpoint will be called to retrieve the available values for that property. Since this endpoint is stacked on top of the search endpoint, no additional parameters besides the locale
are required.
OBJ -> facets/p/locale/{STRING} -> OBJ
Example of a SPARQUE request to return all facets based on a products call:
/1/intershop-project-base-v2-team2/api/PWA/c/locale/de-DE/c/channel/ish/e/products/e/category:FILTER/p/value/1(206)/e/facets/results
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/intershop-project-base-v2-team2/api/PWA/c/locale/de-DE/c/channel/ish/e/products/e/category:FILTER/p/value/1(206)/e/facet_options/p/attribute/Colour/results
Endpoint facet_filter
This stacked endpoint filters the product list to include only those with properties that match 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 in addition to the keyword search:
/1/intershop-project-base-v2-team2/api/PWA/c/locale/de-DE/c/channel/ish/e/products/e/category:FILTER/p/value/1(206)/e/facet_filter/p/value/1(Gray)/p/attribute/Color/results
Useful Guides
- For sorting options, refer to:
Defining Sorting Options in a Lister or Search Result Page - For redirects, refer to:
Setting Up Redirects for the SPARQUE Wrapper - To show masters, variants and/or products, refer to:
Working with Master and Variation Products - For search personalization, refer to:
Settings Through SPARQUE Hub | Search Personalization