This article documents the Product Rating API and its parameters.


The Product Ratings API returns a list of all of the merchant's products with their average ratings calculated over a defined period, the default being the last five years' worth of data.


For example:


https://api.feefo.com/api/20/products/ratings?merchant_identifier=example-retail-merchant

Where:


version is the version of the API associated with the URL. The current version number for Reviews API can be found in API Versions. Unless otherwise noted in the parameter/value descriptions, all parameters and values documented are supported in this version.


merchant_identifier is the merchant’s unique Feefo identifier, which in this example is example-retail-merchant. Your merchantidentifier can be found in the Feefo Hub.


This example returns data similar to the following format:


{"products": [
{"rating":3.5,"vendor_ref":"SKU187098864792156"},   {"rating":4.2,"vendor_ref":"SKU1870981878808479"}, {"rating":4.5,"vendor_ref":"ERPKIPEAPTG6M9H9Y1WZ"} ]
}


Optional parameters are:


ParameterDescription

review_count

review_count determines if the data returned includes the number of reviews over which the average is calculated. Default = false. If set to true, review_count is included with the product rating data.

since_period

since_period defines the period over which the average rating is calculated. Default = year.

Values are:

24_hours

week

month

year

all

parent_product_sku

parent_product_sku returns only products with the corresponding parent_product_sku.

product_sku

product_sku is a filter for product reviews assigned to the specified product search code. More than one product_sku can be provided in one request with each product_sku separated by a comma. The value of the product_sku is case insensitive and supports the use of an asterisk (*) as a wildcard character at the beginning and/or end of the supplied parameter to support partial matching for related/variant products.


page_size

page_size defines the number of reviews to return per page, the default is 20 and the maximum value is 100.

page

page defines the page number to return reviews for, the default is 1.



For example:


https://api.feefo.com/api/version/products/ratings?merchant_identifier=example-retail-merchant&since_period=month&review_count=true


This returns data similar to:


{"products": [
{"rating":3.0,"sku":"SKU187098864792156","review_count":1},      {"rating":4.1,"sku":"SKU1870981878808479","review_count":5},        {"rating":4.8,"sku":"ERPKIPEAPTG6M9H9Y1WZ","review_count":7} ]
}