This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Returns a recommendation object containing a list of items to recommend to the customer.
Get Recommendation determines which items to recommend based on the given recommendation algorithms.
Get Recommendation doesn’t run the algorithms. It calls the installed apps that provide them.
Apps may provide algorithms for use with their own catalogs, or for use with catalogs from other apps. For example, Wix Stores provides algorithms that can only be used on its own catalogs. To run an algorithm, the app providing it must be installed, and an app providing a supported catalog must be installed. For more information and to see which algorithms are available on your site or project, call List Available Algorithms.
Get Recommendation operates as follows:
appId
of the first algorithm in the list of algorithms. It passes that algorithm’s ID and the IDs of any subsequent algorithms in the array for the same app.algorithms
array) that meets the minimum number of recommendations. At that point Get Recommendation stops calling other apps.appId
(an ID of an app that has not yet been called), and repeats the process.algorithms
array recommend at least the minimum recommended items, Get Recommendations returns an empty array.The set of items for which to get recommendations. Required if the algorithmType
is RELATED_ITEMS
.
A list of algorithms checked in a specific order determined by their appID
and their position in the algorithms
array.
See the method description for more information.
If no algorithm is able to return at least minimumRecommendedItems
items, an empty array is returned.
The minimum number of items that must be recommended by the algorithm for those items to be returned in the response.
Max: 100
An object containing a list of items recommended by 1 of the specified algorithms. The recommendation is empty if none of the specified algorithms recommended enough items.
curl POST 'www.wixapis.com/ecom/v1/recommendations/get' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: <AUTH>' \
--data-binary '{
"items": [
{
"catalogItemId": "ec7914e8-208b-0069-5850-1a965643508d",
"appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970"
}
],
"algorithms": [
{
"id": "e33f5e32-d1a2-4944-b38f-d29b7d5ef4ef",
"appId": "72454cb3-90b5-4cef-bbff-cc61aea02584"
},
{
"id": "09dc98e8-8696-49f7-833a-bab57f516f88",
"appId": "b0933968-e643-4835-a403-de8e1eb4d33c"
}
],
"minimumRelatedItems": 1
}'
{
"recommendation": {
"items": [
{
"catalogItemId": "1ce6198f-5fad-5ac9-5b36-ecb2175929ef",
"appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970"
},
{
"catalogItemId": "efd0b233-8f8e-b6b8-b5f3-66903caa8558",
"appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970"
},
{
"catalogItemId": "58a7ab15-5c65-d836-7934-86f78b17996b",
"appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970"
},
{
"catalogItemId": "040528a7-7256-7875-c8e4-8976d949f66b",
"appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970"
},
{
"catalogItemId": "11e2ffb7-2520-3c21-051e-1f05486b9061",
"appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970"
},
{
"catalogItemId": "e8f9c6d5-4ddd-36dd-f595-fe7bfd7891e2",
"appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970"
},
{
"catalogItemId": "16694dd9-ab43-7c5b-974e-e15a4297f235",
"appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970"
},
{
"catalogItemId": "593c5cd0-4996-2a8a-ad34-7669f266c42e",
"appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970"
},
{
"catalogItemId": "51c819a7-9380-1748-d761-b0bb25d175c2",
"appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970"
}
],
"algorithm": {
"id": "e33f5e32-d1a2-4944-b38f-d29b7d5ef4ef",
"appId": "72454cb3-90b5-4cef-bbff-cc61aea02584"
}
}
}
There are 2 errors with this status code.
There is 1 error with this status code.
This method may also return standard errors. Learn more about standard Wix errors.