POST

Get Recommendations


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

This method retrieves an array containing the lists of recommended items returned by each algorithm. Items must be selected from catalogs in Wix apps installed on the site.

If a requested recommendation algorithm's type is RELATED_ITEMS then the items field is included in the request. The response should contain items related to those submitted. How the related items are selected depends on the recommendation algorithms used. For example, items can be in the same category, or can be frequently bought or watched together.

Endpoint
POST
{DEPLOYMENT-URI}/v1/get-recommendations
Body Params
itemsArray <CatalogReference>maxItems 300

The set of items used by algorithms with the RELATED_ITEMS algorithmType to determine related item recommendations.


algorithmIdsArray <string>minItems 1maxItems 10format GUID

List of algorithms used to find recommended items. Items will be returned in a separate object for each algorithm

Response Object
recommendationPerAlgorithmArray <RecommendationForAlgorithm>maxItems 10

Related items returned by each algorithm.

Each object in the array contains an algorithmId and a list of the item recommendations provided by that algorithm.

Get Recommendations Example 1
Request
cURL
curl POST 'www.wixapis.com/stores/recommendations/v1/get-recommendations' \ -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" } ], "algorithmIds": ["4197e48af4324989be1aa691fe37c53a", "09dc98e8-8696-49f7-833a-bab57f516f88"] }'
Response
JSON
{ "recommendationPerAlgorithm": [ { "algorithmId": "4197e48af4324989be1aa691fe37c53a", "recommendedItems": [ { "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" } ] }, { "algorithmId": "09dc98e8-8696-49f7-833a-bab57f516f88", "recommendedItems": [ { "catalogItemId": "bbd4f614-5ca0-26bc-5546-a694a49476e7", "appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970" }, { "catalogItemId": "75826f6b-d3b3-77dc-8aba-b2b42b4ced3a", "appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970" }, { "catalogItemId": "813e1ea2-bf63-48f3-0554-4ae86acb21e5", "appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970" }, { "catalogItemId": "e0071b73-eefc-7477-383e-11f1c94ad360", "appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970" }, { "catalogItemId": "8f43bb22-3e48-dff3-06f4-69ef591a4ee3", "appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970" }, { "catalogItemId": "8fd2d126-1286-84c3-19e9-2ea9bf8e4f3c", "appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970" }, { "catalogItemId": "5695280b-2c36-3f0c-7373-b802c594f364", "appId": "f29c9b39-1090-4d9b-8e3a-a3a681a57970" } ] } ] }
Errors
AlgorithmNotSupportedobjectstatus code: 400
ItemAppIdNotSupportedobjectstatus code: 400
Did this help?