post http://staticw2.yotpo.com/batch
Batch Payload Types
Methods | Parameters | Batch Result |
---|---|---|
main_widget | * pid- The product sku for which to bring the main reviews widget. | Full HTML of a reviews widget which belongs to a specific product |
bottomline | pid - 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) * JSON | Star rating widget that belongs to the same specific product |
testimonials | * data-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 |
embedded | per_page - number of reviews per page view - customizations for the embedded widget. Refer to your Yotpo Admin page as well. type layout width headerText transparency headerBackgroundColor bodyBackgroundColor fontSize * fontColor | Embedded widget. |
badge | None ("params" : {}*) | The Yotpo badge |
questions_bottomline | * pid - The product sku for which to bring the questions and answers | A summary of the number of questions and answers per product |
The methods parameter is an array of methods. Each method is a hash containing the method and parameters, which is an hash of the parameters for the method.
Note:
Include the an empty params attribute - "params" : {} - for the badge method.
Note:
The pid parameter is mandatory.
The pid parameter cannot contain the "/" symbol.
Note:
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.