Email Recommendations Widget APIs



For detailed information on the Email Recommendations feature and its use-cases, go through its feature guide.

What are the Email Recommendations APIs?

The Email Recommendations APIs are same as the Recommendations and Pathways API v2, for all the 5 widget types, except that each API can now be either a Proxy API or an Image API.
The response formats of the Email Recommendations APIs are different from the Recommendations APIs. Unlike the latter, where we get a JSON response containing details of multiple products in that widget, the Email Recommendations APIs' response is a redirect (HTTP 302) to either a Product Description Page or an Image of a single product.


Proxy and Image APIs

The Proxy APIs redirect to the Product Description Page of the product and Image APIs redirect to the Image of the product.

The email should have a template defined, which can then be integrated with different Email Service Providers.

Here is a sample email template:


<h2> Sale going on!!! </h2>

<a href=""/>
<img src="" width="200" height="300"/>

<a href=""/>
<img src=""width="200" height="300"/>

<a href=""/>
<img src=""width="200" height="300"/>


In this template, we first decide the number of desired image slots, let's say, 3. For each slot, we have to define a hyperlink HTML tag (<a>) and an image HTML tag (<img>). The hyperlink tag will point to the Proxy API call and Image tag will point to the Image API call defined above.

For each image slot, the API calls are the same, except that we update the start parameter. start=0 denotes the first product of the recall set, start=1 denotes the second product of the recall set, and so on.


Proxy API:{widget type}/{widget_id}
Image API:{widget type}/{widget_id}

Proxy API:{widget type}/{widget_id}
Image API:{widget type}/{widget_id}