Skip to main content

getWishlistSimilarByProductIds

Get "similar to wishlist" products by an explicit list of productIds.

Description

This method returns products similar to an explicit list of product identifiers passed in the request body (instead of using the wishlist from context). It returns a Promise that resolves to an array of IProductsEntity objects.

Blocks.getWishlistSimilarByProductIds(

marker*, body*

);

Parameters schema

Schema

marker(required): string
Block marker
example: "wishlist_similar_block"

body(required): IBlockProductsLookup
Lookup body
example:

{
"productIds": [
1,
2
],
"langCode": "en_US"
}

body.productIds(required): number[]
Product identifiers to look up.
example: [1, 2, 3]

body.langCode: string
Language code. Default: "en_US".

body.limit: number
Max number of products to return.
example: 10

body.signPrice: string
Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.

💲 signPrice locks the returned price for a limited time — set it to your order storage marker. See Fixing the price (signPrice).

Examples

Minimal example

const response = await Blocks.getWishlistSimilarByProductIds('wishlist_similar_block', {
productIds: [1, 2, 3],
});

Example with attributes

const response = await Blocks.getWishlistSimilarByProductIds('wishlist_similar_block', {
productIds: [1, 2, 3],
langCode: 'en_US',
limit: 10,
});

Example response

{
"items": [
{
"id": 2954,
"localizeInfos": {
"title": "Box"
},
"statusIdentifier": "sale",
"statusLocalizeInfos": {
"title": "Sale"
},
"attributeSetIdentifier": "products",
"position": 1,
"templateIdentifier": null,
"shortDescTemplateIdentifier": "product_preview",
"price": 51,
"additional": {
"prices": {
"min": 51,
"max": 180
}
},
"sku": null,
"isSync": true,
"attributeValues": {
"product-name": {
"type": "string",
"value": "product-name",
"isIcon": false,
"position": 0,
"additionalFields": {},
"isProductPreview": false
},
"price": {
"type": "integer",
"value": 51,
"isIcon": false,
"position": 1,
"additionalFields": {},
"isProductPreview": false
},
"currency_products": {
"type": "string",
"value": "usd",
"isIcon": false,
"position": 2,
"additionalFields": {},
"isProductPreview": false
},
"img": {
"type": "image",
"value": [
{
"size": 742690,
"filename": "files/project/product/2954/image/48853cbf-4462-42c6-8b99-d14f721c21a2.jpeg",
"contentType": "image/jpeg",
"previewLink": {
"default": [
"data:image/webp;base64,UklGRmwAAABXRUJQVlA4IGAAAADQAQCdASoQABAABUB8JbACdACZZ3P8AAD+wGsUXBs/r069WpdrcuaTNfVxqWIetuaIdIvOMkSp9iJRxE+KhA2YHbrVehhMRj/j5+DUdjWn1v5YtZ7vw0IgPi9R5vkAAAA=",
"https://your-project.oneentry.cloud/cloud-static/files/project/product/2954/image/48853cbf-4462-42c6-8b99-d14f721c21a2.preview.default.jpeg"
]
},
"downloadLink": "https://your-project.oneentry.cloud/cloud-static/files/project/product/2954/image/48853cbf-4462-42c6-8b99-d14f721c21a2.jpeg",
"defaultPreview": "default"
}
],
"isIcon": false,
"position": 3,
"additionalFields": {},
"isProductPreview": true
}
},
"categories": [
"catalog"
],
"rating": {},
"isVisible": true,
"moduleFormConfigs": [
{
"id": 12,
"formIdentifier": "review",
"moduleIdentifier": "catalog",
"isGlobal": false,
"isClosed": false,
"isModerate": false,
"viewOnlyMyData": false,
"commentOnlyMyData": false,
"entityIdentifiers": [
{
"id": "catalog",
"isNested": true
}
],
"formDataCount": 582,
"ratingCalculation": "average",
"allowHalfRatings": null,
"maxRatingScale": null,
"isAnonymous": null,
"allowRerating": null,
"isRating": null,
"entityFormDataCount": {
"2954": 582
},
"nestedEntityIdentifiers": [
"catalog"
],
"exceptionIds": []
}
],
"discountConfig": {}
},
{
"id": 2957,
"localizeInfos": {
"title": "Cosmo"
},
"statusIdentifier": "sale",
"statusLocalizeInfos": {
"title": "Sale"
},
"attributeSetIdentifier": "products",
"position": 2,
"templateIdentifier": null,
"shortDescTemplateIdentifier": null,
"price": 150,
"additional": {
"prices": {
"min": 51,
"max": 180
}
},
"sku": null,
"isSync": true,
"attributeValues": {
"product-name": {
"type": "string",
"value": "Cosmo",
"isIcon": false,
"position": 0,
"additionalFields": {},
"isProductPreview": false
},
"price": {
"type": "integer",
"value": 150,
"isIcon": false,
"position": 1,
"additionalFields": {},
"isProductPreview": false
},
"currency_products": {
"type": "string",
"value": "USD",
"isIcon": false,
"position": 2,
"additionalFields": {},
"isProductPreview": false
},
"img": {
"type": "image",
"value": "",
"isIcon": false,
"position": 3,
"additionalFields": {},
"isProductPreview": true
}
},
"categories": [
"catalog"
],
"rating": {},
"isVisible": true,
"moduleFormConfigs": [
{
"id": 12,
"formIdentifier": "review",
"moduleIdentifier": "catalog",
"isGlobal": false,
"isClosed": false,
"isModerate": false,
"viewOnlyMyData": false,
"commentOnlyMyData": false,
"entityIdentifiers": [
{
"id": "catalog",
"isNested": true
}
],
"formDataCount": 582,
"ratingCalculation": "average",
"allowHalfRatings": null,
"maxRatingScale": null,
"isAnonymous": null,
"allowRerating": null,
"isRating": null,
"entityFormDataCount": {
"2954": 582
},
"nestedEntityIdentifiers": [
"catalog"
],
"exceptionIds": []
}
],
"discountConfig": {}
},
{
"id": 2960,
"localizeInfos": {
"title": "Percent split"
},
"statusIdentifier": "sale",
"statusLocalizeInfos": {
"title": "Sale"
},
"attributeSetIdentifier": "percent_split",
"position": 5,
"templateIdentifier": null,
"shortDescTemplateIdentifier": "product_preview",
"price": 180,
"additional": {
"prices": {
"min": 51,
"max": 180
}
},
"sku": null,
"isSync": true,
"attributeValues": {
"s0": {
"type": "float",
"value": 180,
"isIcon": false,
"position": 0,
"additionalFields": {},
"isProductPreview": false
},
"s1": {
"type": "float",
"value": 60,
"isIcon": false,
"position": 1,
"additionalFields": {},
"isProductPreview": false
},
"s2": {
"type": "float",
"value": 40,
"isIcon": false,
"position": 2,
"additionalFields": {},
"isProductPreview": false
},
"currency": {
"type": "string",
"value": "",
"isIcon": false,
"position": 3,
"additionalFields": {},
"isProductPreview": false
}
},
"categories": [
"catalog"
],
"rating": {},
"isVisible": true,
"moduleFormConfigs": [
{
"id": 12,
"formIdentifier": "review",
"moduleIdentifier": "catalog",
"isGlobal": false,
"isClosed": false,
"isModerate": false,
"viewOnlyMyData": false,
"commentOnlyMyData": false,
"entityIdentifiers": [
{
"id": "catalog",
"isNested": true
}
],
"formDataCount": 538,
"ratingCalculation": "average",
"allowHalfRatings": null,
"maxRatingScale": null,
"isAnonymous": null,
"allowRerating": null,
"isRating": null,
"entityFormDataCount": {
"2954": 538
},
"nestedEntityIdentifiers": [
"catalog"
],
"exceptionIds": []
}
],
"discountConfig": {}
},
"..."
],
"total": 5
}

Response schema

Schema: IProductsEntity[]

id: number
The unique identifier.
example: 12345

localizeInfos: ILocalizeInfo
The name of the products, taking into account localization.
example:

{}

statusIdentifier: string | null
Product page status identifiers (may be null).
example: "in_stock"

statusLocalizeInfos: ILocalizeInfo
Localized status name for the product.
example:

{ "title": "Sale" }

attributeSetIdentifier: string | null
Set of attributes id.
example: "set_12345"

position: number
Item number (for sorting).
example: 1

price: number | null
The value of the product page price taken from the index.
example: 150.00

additional: object
Additional value from the index.
example:

{
"prices": {
"min": 5,
"max": 150
}
}

sku: string | null
Product SKU (Stock Keeping Unit), may be null.
example: "SKU_12345"

isSync: boolean
Indication of page indexing.
example: true

attributeValues: IAttributeValues
Array of attribute values from the index, represented.
example:

[
{
"id": "color",
"value": "red"
}
]

categories: string[]
Product categories.
example:

[
1,
2,
3
]

isVisible: boolean
A sign of page visibility.
example: true

moduleFormConfigs: Array<IFormConfig>
Module form configurations (optional).

rating: IRating
Rating data.

isPositionLocked: boolean
Sorting position lock indicator (optional).
example: false

relatedIds: number[]
Ids of related product pages.
example:

[
12345,
67890
]

paymentStages: unknown
Payment stages data (may be null).
example: null

distance: number
Vector (semantic) search relevance distance. Present only in results of vector search.
example: 0.42

discountConfig: Record<string, unknown>
Discount configuration object.
example:

{}

templateIdentifier: string | null
User id of the linked template.
example: "template_12345"

shortDescTemplateIdentifier: string | null
User id of the linked template for a short description.
example: "short_desc_template_12345"

signedPrice: string
The signed price of the product is obtained along with the product data when signPrice is set.
example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

productPages: IProductPageRef[]
Array of product page references linking the product to its pages.
example:

[
{
"id": 16,
"pageId": 4,
"productId": 15,
"positionId": 244,
"categoryPath": "products"
}
]

productPages.id: number
Unique identifier of the product-to-page link record.
example: 16

productPages.pageId: number
Identifier of the page the product is linked to.
example: 4

productPages.productId: number
Identifier of the product.
example: 15

productPages.positionId: number
Sorting position identifier within the page.
example: 244

productPages.categoryPath: string
Category path of the page the product belongs to.
example: "products"

blocks: string[]
Array of block identifiers.
example:

[
"block_12345",
"block_67890"
]

🔒 signedPrice is the signed token that carries the locked price — pass it back when you create an order. See Fixed product price (signedPrice).