Skip to content
Get API key (opens in a new tab)

Server-render rich snippets

Add product rating HTML and JSON-LD to the initial page response.

Use the rich snippets endpoint to add a visible product rating and matching Product JSON-LD to non-Shopify storefronts. Call it from your storefront server so search engines receive both values in the initial response.

Prerequisites

Rich snippets carry review ratings, so your workspace's plan must include Reviews. Before you start, collect:

  • your workspace publishable key
  • a product reference
  • the product page language

A market is optional when the request includes the product page URL as the referrer.

Authenticate requests

Send your publishable key as a bearer token:

Authorization: Bearer cev_pk_example

Render a rich snippet

  1. Call the rich snippet endpoint before returning the product page.
  2. Pass a Cevoid product ID, variant ID, external product reference, or product slug as productRef.
  3. Pass the page language. Pass a market when you know it, or send the product page URL so Cevoid can select the market.
  4. Insert html where the rating should appear.
  5. Serialize jsonLd into the same initial HTML response.
curl "https://api.widget.cevoid.com/v1/products/prd_example/rich-snippet?market=mar_sweden&language=sv" \
  --header "Authorization: Bearer cev_pk_example"

Use productRef=auto only when you also send the product page URL in the referer query parameter or Referer header. A stable product reference is more predictable for server integrations.

Keep one rendering snapshot

Use html and jsonLd from the same response so the visible rating matches the structured data.

Keep data-cevoid-rich-snippet="ssr" on the JSON-LD script so Cevoid does not add duplicate structured data when its client script loads.

<script type="application/ld+json" data-cevoid-rich-snippet="ssr">
  {"@context":"https://schema.org","@type":"Product"}
</script>

If the endpoint returns 404, omit both outputs. No published rating is available for the request.

If it returns 403 with the message "Reviews is not included in this workspace plan", your workspace's plan does not include Reviews. Omit both outputs here too.