Retrieve the Reviews Payload in HTML



app_keystringYour Yotpo account API key
methods[method]stringAn array of widget types (methods) and an hash of the parameters for each method
methods[params]objectThe specific parameters for the method
is_mobileboolean falseDefines if the response should be for a mobile device or a desktop


Reviews Widget

In order for the Reviews Widget to appear on product pages, be sure to add the HTML below to your product page template. Replace each data element with the appropriate values of your website and product attributes. Note that the data-product-id attribute only supports alphanumeric (a...z, A...Z, 0...9) and "_" and "-" symbols. 👇

<div class="yotpo yotpo-main-widget"
data-price="Product Price"
data-currency="Price Currency"
data-name="Product Title"
data-url="The url to the page where the product is (url escaped)"
data-image-url="The product image url. Url escaped">

Batch Payload Types

MethodsParametersBatch Result
main_widgetpid - The product SKU for which to bring the main reviews widget.

page (optional) -
The page number of the reviews page as applied by the Reviews Widget.
The current reviews page will be passed as a query param called yoReviewsPage
Full HTML of a reviews widget which belongs to a specific product
bottomlinepid - The product SKU for which to bring the bottom line widget.

skip_average_score - Boolean value to show or hide the average score in the bottom line.

format - The format to return the result
HTML (default)
Star rating widget that belongs to the same specific product
testimonialsdata-product-readonly - A flag to enable or disable the ability to write new reviews (false if not specified)Reviews tab that opens the site and product reviews pop-up
embeddedper_page - Number of reviews per page

view - Customizations for the embedded widget. Refer to your Yotpo Admin page as well.
Embedded widget
badgeNone ("params" : {})The Yotpo badge
questions_bottomlinepid- The product SKU for which to bring the questions and answersA summary of the number of questions and answers per product


  "methods": [{
      "params": {
        "pid": "334342199",
      "params": {
        "pid": "334342199"
  "format": "json"
  "methods": [{

Result Format

		"result":"<div class="yotpo-display-wrapper yotpo-no-reviews" style="visibility: hidden;">    <div class="yotpo-label yotpo-small-box "> ....... // HTML is cut for brevity"},
	{	"method":"bottomline",
	"result":"<span class="yotpo-display-wrapper" style="visibility: hidden;">  <div class="standalone-bottomline"> .... // HTML is cut for brevity"

The methods parameter is an array of methods. Each method is a hash containing the method and parameters, which is a hash of the parameters for the method.


Please note:

Include the empty params attribute - "params" : {} - for the badge method.


Please note:

The pid parameter is mandatory.
The pid parameter cannot contain the "/" symbol.



It is highly recommended to develop a cache mechanism to save the payload locally and to refresh it periodically. The purpose of this caching is to avoid long loading times every time the widget loads.