younifyd
Menu

Suggestions v2

Suggestions v2

GET/v2/search/suggestions

Use it in a workflow

  1. Add a step and choose the SCAYLE Storefront connector.
  2. Pick the Suggestions v2 action (under search-v2).
  3. Fill in the fields below, then reference the result from later steps as {{suggestionsV2.response.data}}.

Request

Query parameters

termstringrequired

The `term` parameter specifies the search term.

witharray<string>

The `with` parameter can be applied to include related resources, for example, the attributes of a product can be attached using `with=product.attributes`. It is also possible to filter product attributes by key `with=product.attributes:key(plusSize)`, by type `with=product.attributes:type(material_care)` or exclude specific keys `with=product.attributes:exclude(plusSize)`. Nested includes can also be attached when available `with=product.variants.attributes` and multiple combinations are likewise accepted `with=product.siblings,product.variants,category.children`. When using `with=category.children`, you can provide `categoryDepth` parameter to increase child depth. In the following table, there is more information about possible includes. Include | includes | Available Filters ------------ | ------------- | ------------- `category.parents` | | `category.children` | | `category.properties` | | `name` `category.productSorting` | Includes the product sorting configuration of the category, which defines how products are ordered within the category. Reflects the customer segment of the shopper identified by `X-Customer-Token`. | `category.seo` | Includes the SEO metadata for the category (meta title, meta description, SEO headline, SEO description, canonical URL, and search engine indexing flag). | `category.countryLevelCustomData` | | `key` `category.shopLevelCustomData` | | `key` `navigationItem.customData` | | `key` `navigationItem.category` | | `navigationItem.category.properties` | | `name` `navigationItem.category.productSorting` | Includes the product sorting configuration of the category, which defines how products are ordered within the category. Reflects the customer segment of the shopper identified by `X-Customer-Token`. | `navigationItem.category.seo` | Includes the SEO metadata for the category (meta title, meta description, SEO headline, SEO description, canonical URL, and search engine indexing flag). | `navigationItem.category.countryLevelCustomData` | | `key` `navigationItem.category.shopLevelCustomData` | | `key` `product.attributes` | | `key`, `type`, `exclude` `product.advancedAttributes` | | `key`, `type`, `exclude` `product.images` (default) | `images.attributes` | `product.videos` | Include videos of the product. | `product.videos.attributes` | | `key`, `type`, `exclude` `product.videos.customData` | | `key` `product.categories` | | `hidden(true)` `product.categories.categoryProperties` | | `name` `product.categories.countryLevelCustomData` | | `key` `product.categories.shopLevelCustomData` | | `key` `product.customData` | | `key` `product.definingAttributes` | | `product.siblings` | Include available siblings products and apply the same filters, and other properties such as `product.siblings.variants, ..., product.siblings.categories.shopLevelCustomData`. | `product.siblings.attributes` | | `key`, `type`, `exclude` `product.siblings.advancedAttributes` | | `key`, `type`, `exclude` `product.siblings.variants.attributes` | | `key`, `type`, `exclude` `product.siblings.variants.advancedAttributes` | | `key`, `type`, `exclude` `product.siblings.customData` | | `key` `product.siblings.categories.countryLevelCustomData` | | `key` `product.siblings.categories.shopLevelCustomData` | | `key` `product.siblings.variants.customData` | | `key` `product.siblings.variants.price.customData` | Include custom data of sibling product variant prices. | `key` `product.siblings.priceRange.customData` | Include custom data of the sibling product price range. | `key` `product.siblings.reductionRange.customData` | Include custom data of the sibling product reduction range. | `key` `product.variants` | See available includes for variants at variants endpoint | `product.variants.customData` | | `key` `product.variants.price.customData` | Include custom data of product variant prices. | `key` `product.variants.merchant` | Include merchant data | `product.variants.merchant.customData` | Include custom data of the variant merchant | `key` `product.variants.merchant.customData:key()` | Include the merchant custom data as an empty object | `product.variants.merchant.customData:key(keyA\|...)` | Include the merchant custom data, filtered by the provided key(s) | `product.variants.relatedVariants` | Include the resolved components of a composite product variant. Always an array once requested, even if the variant isn't composite. | `product.variants.relatedVariants.attributes` | Include attributes of related-variant components | `key`, `type`, `exclude` `product.variants.relatedVariants.advancedAttributes` | Include advanced attributes of related-variant components | `key`, `type`, `exclude` `product.variants.relatedVariants.lowestPriorPrice` | Include the lowest prior price of related-variant components | `product.variants.relatedVariants.customData` | Include custom data of related-variant components | `key` `product.variants.relatedVariants.price.customData` | Include custom data of related-variant component prices | `key` `product.priceRange` | | `product.priceRange.customData` | Include custom data of the product price range. | `key` `product.reductionRange` | | `product.reductionRange.customData` | Include custom data of the product reduction range. | `key` `product.lowestPriorPrice` | | `product.searchCategoryIds` | | `product.baseCategories` (deprecated) | | `product.masterCategories` | |

Default []

category.depthinteger

Defines the number of nested child categories to include in the response.

Default null

category.showHiddenboolean

Include hidden categories in the children of returned categories.

Default false

categoryIdinteger

The categoryId parameter is used to filter the results and limit the returned data to items that belong to the specified category or its child categories.

Default null

shopIdinteger

The numeric ID of the shop to resolve the request against. Every shop in a multi-shop setup has a unique `shopId`. **Priority:** `shopId` (or the `X-Shop-Id` header) takes precedence over all other shop identification parameters. When `shopId` is present, `shopKey`, `countryCode`, and `locale` are ignored entirely. **Alternative:** If neither `shopId` nor `X-Shop-Id` is provided, you must supply all three of `shopKey`, `countryCode`, and `locale` together to identify the shop.

shopKeystring

The unique string key identifying the shop (e.g. `sa`, `de`). **Must be provided together with `countryCode` and `locale`** as a query-parameter alternative to `shopId`. All three parameters are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `shopId` or the `X-Shop-Id` header is present.

countryCodestring

The ISO 3166-1 alpha-2 country code of the shop (e.g. `DE`, `AT`). Automatically normalised to uppercase. **Must be provided together with `shopKey` and `locale`** as a query-parameter alternative to `shopId`. All three parameters are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `shopId` or the `X-Shop-Id` header is present.

localestring

The locale of the shop (e.g. `en_GB`, `de_DE`). Used to validate that the resolved shop's locale matches the requested locale. **Must be provided together with `shopKey` and `countryCode`** as a query-parameter alternative to `shopId`. All three parameters are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `shopId` or the `X-Shop-Id` header is present.

Headers

X-Shop-Idinteger

The numeric ID of the shop to resolve the request against. Every shop in a multi-shop setup has a unique shop ID. **Priority:** `X-Shop-Id` (or the `shopId` query parameter) takes precedence over all other shop identification parameters. When this header is present, `X-Shop-Key`, `X-Country-Code`, and `X-Locale` are ignored entirely. **Alternative:** If neither `X-Shop-Id` nor `shopId` is provided, you must supply all three of `X-Shop-Key`, `X-Country-Code`, and `X-Locale` together to identify the shop.

Default null

X-Shop-Keystring

The unique string key identifying the shop (e.g. `sa`, `de`). **Must be provided together with `X-Country-Code` and `X-Locale`** as a header-based alternative to `X-Shop-Id`. All three headers are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `X-Shop-Id` or the `shopId` query parameter is present.

X-Country-Codestring

The ISO 3166-1 alpha-2 country code of the shop (e.g. `DE`, `AT`). Automatically normalised to uppercase. **Must be provided together with `X-Shop-Key` and `X-Locale`** as a header-based alternative to `X-Shop-Id`. All three headers are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `X-Shop-Id` or the `shopId` query parameter is present.

X-Localestring

The locale of the shop (e.g. `en_GB`, `de_DE`). Used to validate that the resolved shop's locale matches the requested locale. **Must be provided together with `X-Shop-Key` and `X-Country-Code`** as a header-based alternative to `X-Shop-Id`. All three headers are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `X-Shop-Id` or the `shopId` query parameter is present.

X-Customer-Tokenstring

A JWT identifying the customer. When `category.productSorting` or `navigationItem.category.productSorting` is included and the customer belongs to a customer segment with its own sorting for a category, `productSorting` returns that segment's keys, the same keys `GET /v1/products` applies. Without it, or with an invalid or expired token, the default keys are returned and the request does not fail.

Response

Returns 200 with an object. Read it in later steps with {{suggestionsV2.response.data.<field>}}.

suggestionsarray<oneOf>
json
{
  "suggestions": [
    null
  ]
}

Need more? See the SCAYLE Storefront guide for connection setup and behaviour shared by every action.