SPI Product Recommendations
Create Product Recommendations
post /product-recommendationsMake query to create product recommendations for a single product.
ID of the store (Sitoo clients will send the externalid
property of the store object in Sitoo).
ID of the staff (Sitoo clients will send the externalid
property of the user object in Sitoo).
ID of the register.
ID of the request.
The product recommendations object
{ "id": "123e4567-e89b-12d3-a456-426614174000", "sku": "234.788.14", "crm_channel_id": "custom-crm", "customer_id": "123456789"}
{ "id": "123e4567-e89b-12d3-a456-426614174000", "sku": "234.788.14", "recommendations": { "similar": [ "234.788.15", "234.788.16" ], "related": [], "accessories": [ "234.500.01", "234.500.02", "234.500.03" ] }}
HTTP Status Code Summary | |
---|---|
201 | Successful. Returns a ProductRecommendations object. |
400 | Invalid request. Data sent from client is invalid. |
401 | Missing or bad authentication. |
403 | User is not authorized to perform operation. |
500 | Internal Server Error. |
502 | Bad Gateway. |
Objects
ProductRecommendationsobject
The object containing the SKU for the product that should get recommendations. If applicable, user information can also be part of the request object.
An identifier for the product recommendations request (that together with the SKU can be the basis for caching the request). Sitoo POS will send the current cart ID for this field.
Stock Keeping Unit (SKU) for the product that should get recommendations.
The ID for the CRM channel that the customer belongs to.
The ID for the customer associated with the purchase.
Recommendationsobject
Object holding the different types of recommendation arrays
An array of similar products
An array of related products
An array of accessory products
ErrorCodestring
Error code describing the data and depending on value, the error_data
property will contain the following
additional information:
Error code Additional info field-missing field
field-unknown field
field-readonly field
field-type field
field-validation field
version-invalid none condition-failed none other none
ErrorMessageobject
Error object returned when a request is not successful.
ID of request.
The error code returned.
A string map with fields depending on the error_code
. The field message
is always available.