Search Engine and Product List

Introduction

DJUST provides a robust search engine integrated into our SaaS platform, designed to enhance the user experience by helping customers quickly and efficiently find the products they're looking to purchase online.

This page introduces the Search feature and its main use cases. The Search feature can be used in two ways:

  • through the JavaScript Core SDK action this.$core.useShop.getFiltredProductListv2();
  • directly through the Search API endpoint PRODUCT-552.

Search with the JavaScript SDK

The main action used is this.$core.useShop.getFiltredProductListv2().

This action accepts 3 parameters, which can be combined to refine the search results:

parameterdescription
categoryIdsNavigation category external IDs, used to display the product list of a specific category page.
paramsSearch and filtering options (keyword, attributes, brands…) — see the Params section below.
aggregationGrouping level of the search results (PRODUCT or VARIANT) — see the Aggregation section below.

Params

params is an object which can contain:

namedescription
filter_attributeArray of key|value for each product attribute.
filter_customFieldArray of key|value for each offer customField.
filter_supplierArray of supplier name
filter_brandArray of brand Name
keywordString
sizenb product per page
pagepage number

Aggregation

The aggregation parameter defines the grouping level of the search results. It is available both as the third argument of the SDK action and as a query parameter of the API endpoint.

valuedescription
PRODUCT (default)One result per master product. The variant displayed on the thumbnail (image, price) is the one carrying the best offer of the product — selected by offer type first, then by ascending price — regardless of the variant that matched the search.
VARIANTOne result per variant. Each matching variant is returned with its own offer.
⚠️

Warning: In PRODUCT mode, it is not possible to display the variant that specifically matched the search instead of the one carrying the best offer: the grouping by product always selects the best offer. If the searched variant must be displayed with its own offer, use the VARIANT aggregation instead.

Search with a direct API call

You can also use the Search feature directly with the endpoint PRODUCT-552:

GET /v2/shop/search

Main request parameters

parameterlocationrequireddescription
localequeryyesLocale of the front office. Locales follow the IETF standard (e.g. fr-FR).
dj-clientheaderyesClient type making the request: OPERATOR, ACCOUNT or SUPPLIER. In the front office, the client will always be ACCOUNT.
dj-api-keyheaderyesAPI key required for authentication. Must be valid and linked to the requesting user.
dj-store-viewheadernoStore view ID in multi-store environments.
📘

Note: The full list of parameters (filters, sorting, pagination, facets…) is available in the PRODUCT-552 API reference.


Did this page help you?