DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsReviewsSubmit Review
Introduction
Getting Started
Authentication
Products
Categories
Cart
Checkout
Blog
Reviews
Get Product ReviewsSubmit Review
Webhooks
Customers
Orders
Inventory
Shipping
Discounts
Affiliates
Email
Media & Files
Analytics & Tracking
Locations
Tax
Global Data
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
Site Keys & Client Sites
Use Cases
Operations

Submit Review

Allow customers to submit product reviews.

Updated March 29, 2026

On this page
  • Overview
  • SDK Usage
  • Review Form Example
  • REST API
  • Next Steps

Overview

Allow customers to submit reviews for products they have purchased.

SDK Usage

typescript
import dash from "@/lib/dash"

const { review } = await dash.products.submitReview("blue-dream", {
  rating: 5,                          // 1-5, required
  author_name: "John D.",             // required
  author_email: "john@example.com",   // optional
  title: "Amazing quality",           // optional
  body: "Best product I've tried!",   // optional
  variation_slug: "blue-dream",       // optional: which variation was reviewed
  media_urls: ["https://..."],        // optional: photo URLs
})

Review Form Example

typescript
"use client"
import { useState } from "react"
import dash from "@/lib/dash"

export function ReviewForm({ productSlug }: { productSlug: string }) {
  const [rating, setRating] = useState(5)
  const [title, setTitle] = useState("")
  const [body, setBody] = useState("")
  const [name, setName] = useState("")
  const [submitted, setSubmitted] = useState(false)

  async function handleSubmit(e) {
    e.preventDefault()
    await dash.products.submitReview(productSlug, {
      rating,
      author_name: name,
      title,
      body,
    })
    setSubmitted(true)
  }

  if (submitted) return <p>Thank you for your review!</p>

  return (
    <form onSubmit={handleSubmit}>
      <div>
        {[1, 2, 3, 4, 5].map(star => (
          <button key={star} type="button" onClick={() => setRating(star)}>
            {star <= rating ? "★" : "☆"}
          </button>
        ))}
      </div>
      <input value={name} onChange={e => setName(e.target.value)}
             placeholder="Your name" required />
      <input value={title} onChange={e => setTitle(e.target.value)}
             placeholder="Review title" />
      <textarea value={body} onChange={e => setBody(e.target.value)}
                placeholder="Write your review..." />
      <button type="submit">Submit Review</button>
    </form>
  )
}
Moderation: Reviews are held for approval by default. They won't appear publicly until approved in the dashboard.

REST API

shell
POST /storefront/products/blue-dream/reviews
X-API-Key: pk_live_your_key
Content-Type: application/json

{
  "rating": 5,
  "author_name": "John D.",
  "title": "Amazing quality",
  "body": "Best product I've tried!"
}

Next Steps

  • Get Product Reviews — Displaying reviews
  • Get Product by Slug — Full product page with reviews
PreviousGet Product ReviewsNextOverview

On this page

  • Overview
  • SDK Usage
  • Review Form Example
  • REST API
  • Next Steps