# Server-render rich snippets

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

Breadcrumb: Storefront API › Rich snippets · Updated: 2026-10-19
Docs index: https://docs.cevoid.com/developers/llms.txt

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](https://docs.cevoid.com/developers/storefront-api/authentication.md) as a bearer token:

```http
Authorization: Bearer cev_pk_example
```

## Render a rich snippet

1. Call the [rich snippet endpoint](https://docs.cevoid.com/developers/storefront-api/storefront-rendering/render-a-product-rich-snippet.md) 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.

```bash
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.

```html
<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.

---

Canonical: https://docs.cevoid.com/developers/storefront-api/rich-snippets
