Menu
Get similar product recommendations
Get similar product recommendations
/v1/recommendations/similar/{productId}Use it in a workflow
- Add a step and choose the SCAYLE Storefront connector.
- Pick the Get similar product recommendations action (under recommendations).
- Fill in the fields below, then reference the result from later steps as
{{getSimilarProductRecommendations.response.data}}.
Request
Path parameters
productIdintegerrequiredThe numeric ID of the product for which to retrieve similar product recommendations.
Query parameters
shopIdintegerThe 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.
shopKeystringThe 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.
countryCodestringThe 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.
localestringThe 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.
limitintegerThe maximum number of similar products to return. _Note: The maximum allowed value is 20._
ignoreSameMasterKeybooleanWhen set to `true`, products with the same master key as the source product will be excluded from the recommendations. This is useful to avoid recommending color variants of the same product.
Default false
campaignKeystringAdjust prices based on the specified `campaignKey`. If provided campaign doesn't exist, the default price is returned. Please note, that campaign prices are stored in advance and available earlier than the campaign starts.
Default null
pricePromotionKeystringAdjust variant price based on the specified `pricePromotionKey`. If the variant does not have a matching price promotion, the default price is returned.
Default null
witharray<string>Include additional data in the response for each recommended product. The following table describes all the possible parameters that can be used: Parameter | Description --- | --- attributes | Include product attributes. attributes:key(keyA\|...) | Include only specific product attributes. attributes:exclude(keyA\|...) | Include all product attributes except specified keys. Combined with key(...)/type(...) the excluded keys are subtracted from the selection. advancedAttributes | Include product advanced attributes. advancedAttributes:key(keyA\|...) | Include only specific product advanced attributes. advancedAttributes:exclude(keyA\|...) | Include all product advanced attributes except specified keys. Combined with key(...)/type(...) the excluded keys are subtracted from the selection. variants | Include product variants. variants.attributes | Include variant attributes. variants.attributes:key(keyA\|...) | Include only specific variant attributes. variants.attributes:exclude(keyA\|...) | Include all variant attributes except specified keys. Combined with key(...)/type(...) the excluded keys are subtracted from the selection. variants.advancedAttributes | Include variant advanced attributes. variants.advancedAttributes:key(keyA\|...) | Include only specific variant advanced attributes. variants.advancedAttributes:exclude(keyA\|...) | Include all variant advanced attributes except specified keys. Combined with key(...)/type(...) the excluded keys are subtracted from the selection. variants.price.customData | Include custom data of product variant prices. variants.price.customData:key(keyA\|...) | Include only specific product variant price custom data keys. variants.relatedVariants | Include the resolved components of a composite product variant. Always an array once requested, even if the variant isn't composite. variants.relatedVariants.attributes | Include attributes of related-variant components. variants.relatedVariants.attributes:key(keyA\|...) | Include only specific related-variant component attributes. variants.relatedVariants.attributes:exclude(keyA\|...) | Include all related-variant component attributes except specified keys. Combined with key(...)/type(...) the excluded keys are subtracted from the selection. variants.relatedVariants.advancedAttributes | Include advanced attributes of related-variant components. variants.relatedVariants.advancedAttributes:key(keyA\|...) | Include only specific related-variant component advanced attributes. variants.relatedVariants.advancedAttributes:exclude(keyA\|...) | Include all related-variant component advanced attributes except specified keys. Combined with key(...)/type(...) the excluded keys are subtracted from the selection. variants.relatedVariants.lowestPriorPrice | Include the lowest prior price of related-variant components. variants.relatedVariants.customData | Include custom data of related-variant components. variants.relatedVariants.customData:key(keyA\|...) | Include only specific related-variant component custom data keys. variants.relatedVariants.price.customData | Include custom data of related-variant component prices. variants.relatedVariants.price.customData:key(keyA\|...) | Include only specific related-variant component price custom data keys. images | Include product images. images.attributes | Include image attributes. images.attributes:key(keyA\|...) | Include only specific image attributes. images.attributes:exclude(keyA\|...) | Include all image attributes except specified keys. Combined with key(...)/type(...) the excluded keys are subtracted from the selection. videos | Include product videos. videos.attributes | Include video attributes. videos.attributes:key(keyA\|...) | Include only specific video attributes. videos.attributes:exclude(keyA\|...) | Include all video attributes except specified keys. Combined with key(...)/type(...) the excluded keys are subtracted from the selection. videos.customData | Include video custom data. categories | Include product categories. siblings | Include product siblings. siblings.attributes | Include sibling product attributes. siblings.attributes:key(keyA\|...) | Include only specific sibling product attributes. siblings.attributes:exclude(keyA\|...) | Include all sibling product attributes except specified keys. Combined with key(...)/type(...) the excluded keys are subtracted from the selection. siblings.attributes:type(typeA\|...) | Include only specific sibling product attributes with specified types. siblings.advancedAttributes | Include sibling product advanced attributes. siblings.advancedAttributes:key(keyA\|...) | Include only specific sibling product advanced attributes. siblings.advancedAttributes:exclude(keyA\|...) | Include all sibling product advanced attributes except specified keys. Combined with key(...)/type(...) the excluded keys are subtracted from the selection. siblings.advancedAttributes:type(typeA\|...) | Include only specific sibling product advanced attributes with specified types. siblings.images.attributes | Include sibling product image attributes. siblings.images.attributes:key(keyA\|...) | Include only specific sibling product image attributes. siblings.images.attributes:exclude(keyA\|...) | Include all sibling product image attributes except specified keys. Combined with key(...)/type(...) the excluded keys are subtracted from the selection. siblings.images.attributes:type(typeA\|...) | Include only specific sibling product image attributes with specified types. siblings.variants.attributes | Include sibling product variant attributes. siblings.variants.attributes:key(keyA\|...) | Include only specific sibling product variant attributes. siblings.variants.attributes:exclude(keyA\|...) | Include all sibling product variant attributes except specified keys. Combined with key(...)/type(...) the excluded keys are subtracted from the selection. siblings.variants.attributes:type(typeA\|...) | Include only specific sibling product variant attributes with specified types. siblings.variants.advancedAttributes | Include sibling product variant advanced attributes. siblings.variants.advancedAttributes:key(keyA\|...) | Include only specific sibling product variant advanced attributes. siblings.variants.advancedAttributes:exclude(keyA\|...) | Include all sibling product variant advanced attributes except specified keys. Combined with key(...)/type(...) the excluded keys are subtracted from the selection. siblings.variants.advancedAttributes:type(typeA\|...) | Include only specific sibling product variant advanced attributes with specified types. priceRange | Include product price range. priceRange.customData | Include custom data of the product price range. priceRange.customData:key(keyA\|...) | Include only specific product price range custom data keys. reductionRange | Include product reduction range. reductionRange.customData | Include custom data of the product reduction range. reductionRange.customData:key(keyA\|...) | Include only specific product reduction range custom data keys. customData | Include product custom data. customData:key(keyA\|...) | Include only specific custom data keys. sellableWithoutStock | Include sellable without stock information.
filters[category]array<integer>Filter the products which belong to a specific category.
Default []
filters[brand]integerFilter results to only include products from the specified brand. The value must be a valid brand ID.
filters[sale]booleanOnly include results based on a products' `sale` state. Products are considered as `sale` when: * Any of its variants is on sale. * There is an active campaign and the `campaignKey={campaignKey}` is given.
Default null
filters[sellableAt]stringRetrieve products sellable within a specific timeframe. __Note__: The provided value shall be datetime in the RFC3339 format: "2020-10-13T00:00:00Z"
Default null
filters[minPrice]integerOnly include results with a price greater than or equal to `minPrice`. __Note__: The value is passed in a currency's fractional monetary unit (for example, 990 cents for 9,90 EUR).
Default null
filters[maxPrice]integerOnly include results with a price less than or equal to `maxPrice`. __Note__: The value is passed in a currency's fractional monetary unit (for example, 990 cents for 9,90 EUR).
Default null
filters:not[category]stringExclude products in the specified category from results. The value must be a valid category ID or category path.
filters:not[brand]integerExclude products from the specified brand from results. The value must be a valid brand ID.
Headers
X-Shop-IdintegerThe 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-KeystringThe 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-CodestringThe 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-LocalestringThe 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.
Response
Returns 200 with an object. Read it in later steps with {{getSimilarProductRecommendations.response.data.<field>}}.
recommendationsarray<object>List of similar product recommendations, ordered by similarity score (highest first).
imageConfidenceScoreinteger | nullrequiredA score from 0 to 100 indicating the confidence of image similarity between the source product and this recommendation. A higher score indicates greater visual similarity. The value is `null` if image similarity was not calculated for this recommendation.
productobjectrequired27 fields{
"recommendations": [
{
"imageConfidenceScore": 85,
"product": {
"id": 0,
"images": [
{
"attributes": {},
"customData": {},
"hash": "string",
"name": "string",
"url": "string"
}
],
"customData": {},
"isActive": false,
"isNew": false,
"isSoldOut": false,
"masterKey": "480306626-1",
"firstLiveAt": "2023-01-26T09:30:15Z",
"referenceKey": "abc123",
"createdAt": "2023-01-26T09:30:15Z",
"updatedAt": "2023-01-26T09:30:15Z",
"indexedAt": "2023-01-26T09:30:15Z"
}
}
]
}
Need more? See the SCAYLE Storefront guide for connection setup and behaviour shared by every action.