Get product reviews
const url = 'https://catalog.shopgate.io/v1/merchants/example/products/example/reviews?limit=1000&offset=0';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://catalog.shopgate.io/v1/merchants/example/products/example/reviews?limit=1000&offset=0'Get product reviews
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Locale code to change the language of the name, descriptions, properties and media
The limit of entries of one page
The offset where to start the page
The cursor after which the next entries will be queried; on routes supporting limit/offset and cursor pagination, offset will be ignored when after is set
Sorting of the reviews. Allowed fields are date and rank; directions are asc or desc. Multiple sort fields can be comma separated, e.g. date:desc,rank:asc
Additional data to pass to the sync webhook
Responses
Section titled “Responses”Return the reviews of the product
object
On routes supporting limit/offset and cursor pagination, offset will be ignored when after is set; however, both fields will always be present in the response
object
A base64 string or null if the result is empty
object
object
Human readable code of the entity
Ratings from (1-5). To save fractions of a rating, pass in e.g. 0.5 for a “1/2 star” representation.
Example
{ "meta": { "limit": 1, "offset": 0, "cursors": { "after": "1b" }, "totalItemCount": 2 }, "reviews": [ { "code": 1700123654, "author": "John D.", "date": "2018-12-15T00:00:23.114Z", "rate": 5, "title": "Awesome product.", "review": "I like it because it is good." } ]}Validation error
object
object
object
object
The parameter-field, that failed to validate, like “userId”
The value, that was sent, like “xxx”
Machine readable error code
Human readable error code
object
object
Machine readable error code
Human readable error code
Example
{ "error": { "code": "SCHEMA_VALIDATION_FAILED", "results": { "errors": [ { "code": "MAX_LENGTH", "message": "Name too long", "description": "Property Name is too long", "path": [ "name" ] } ] } }}Merchant not found
object
Example
{ "code": "NotFound", "message": "Merchant not found"}
