Rating

These endpoints are called from a shopper's browser, so they take your publishable key rather than a secret one. Anything specific to one customer also takes a signed email and timestamp: see Identifying the customer for how to produce the signature.

GET /widgets/rating

Get rating summary for products

Query Parameters

apiPublishableKeystringrequired

Your organization's publishable key, from Settings, API keys.

productSlugsstringrequired

Comma-separated product slugs to summarize, one per widget on the page.

Request
curl \
  "https://api.cascade.dev/widgets/rating?apiPublishableKey=pk_YOUR_PUBLISHABLE_KEY&productSlugs=string"
Response
{
  "data": [
    {
      "productSlug": "string",
      "title": "string",
      "imageUrl": "string",
      "totalReviews": 0,
      "averageRating": 0
    }
  ]
}