> ## Documentation Index
> Fetch the complete documentation index at: https://docs-loja.usecorvex.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Review

> Avaliações públicas da loja e do produto.

Uma avaliação mapeada por `mapReview`. O cliente não filtra `status`. O que a rota pública devolver entra na lista.

## Disponível em

* ✅ `storefront.reviews.list()` / `summary()`
* ✅ Contexto PDP com `data: ['reviews', 'product']`
* ✅ `reviews_summary` no layout da PDP
* ✅ Action `storefront.reviews.create()` (cliente envia review)

## Review

| Campo | Tipo | Descrição |
| - | - | - |
| `id` | `string` | UUID |
| `authorName` | `string` | Nome exibido |
| `authorAvatarUrl` | `string \| null` | Avatar |
| `rating` | `number` | 1–5 |
| `title` | `string \| null` | Título curto |
| `body` | `string \| null` | Texto da avaliação |
| `mediaUrls` | `string[]` | Fotos/vídeos |
| `isVerifiedPurchase` | `boolean` | Compra verificada |
| `productId` | `string \| null` | `null` = review da loja |
| `createdAt` | `string` | ISO |
| `publishedAt` | `string \| null` | ISO |

## ReviewsSummary

| Campo | Tipo |
| - | - |
| `averageRating` | `number` |
| `totalReviews` | `number` |
| `distribution` | `{ "1": n, "2": n, … "5": n }` |
| `verifiedCount` | `number` |

## productId na API pública

| Valor | Comportamento |
| - | - |
| omitido | Reviews da **loja** (`product_id = null`) |
| UUID / slug | Reviews do **produto** |
| `'all'` / `scope: 'all'` | Loja + todos os produtos |

## Exemplo — listagem

```js theme={"theme":{"light":"github-light","dark":"github-dark"}}
const { reviews, summary } = await storefront.reviews.list({
  product: page.product,
  first: 10,
  sort: 'recent',
});

reviews.nodes.map((review) => (
  <article key={review.id}>
    <strong>{review.authorName}</strong>
    <span>{'★'.repeat(review.rating)}</span>
    <p>{review.body}</p>
  </article>
));
```

## Exemplo — resumo (layout PDP)

```js theme={"theme":{"light":"github-light","dark":"github-dark"}}
const reviews_summary = await storefront.reviews.summary({
  product: page.product,
});

// reviews_summary.averageRating, .totalReviews
```

## Relacionado

Veja [reviews.list](https://docs-loja.usecorvex.com.br/data/queries/reviews-list.md), [Product Reviews Cookbook](https://docs-loja.usecorvex.com.br/cookbook/product-reviews.md) e [Mapa de dados](https://docs-loja.usecorvex.com.br/data/scope-data-map.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.