Product Recommendations API
Recommendations API
The client calls the Optimizely Recommendations API which, primarily, returns product recommendations or content. The client sends the API a request containing information about the user and the order.
Request header
Place authentication information (such as site and siteToken, and channel) in the request header (rather than the JSON payload defined in the subsequent sections). site – Optimizely client site code.
Recs only endpoint
The requester needs to supply the following information as JSON. Example If no user information is sent in the request, the response contains non-personalized product recommendations, such as best sellers.
Offline order tracking endpoint
The order information contains information about the customer and the products they have just purchased offline. The API expects the following format for the JSON payload.
Response message
The response has a property called status with value OK for successful requests, fail when an error occurs, or warning when some errors are found but a useful result can be returned. If a fail status is returned, a fatal error occurred and the request could not be fulfilled; as a consequence, no product recommendations are included in the response.
Product recommendations response
The Optimizely Recommendations API returns a list of product recommendations in the message. The contents are returned in the smartRecs element at the root of the response JSON.