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

# Analytics dashboard

> Retrieve aggregated review and Q&A analytics for a merchant including rating distribution, sentiment breakdown, and time-series trends.

`GET {BASE_URL}/analytics/dashboard/{merchantId}`

## Query parameters

<ParamField query="range" type="string">`7d` · `14d` · `30d` (default) · `90d` · `all`</ParamField>
<ParamField query="startDate" type="string">ISO date `YYYY-MM-DD`. Use with `endDate` for custom range.</ParamField>
<ParamField query="endDate" type="string">ISO date `YYYY-MM-DD`.</ParamField>

## Response

```json theme={null}
{
  "success": true,
  "data": {
    "totalReviews": 4821,
    "totalQuestions": 312,
    "averageRating": 4.6,
    "starDistribution": [
      { "rating": 5, "count": 3200, "percentage": 66.4 }
    ],
    "sentimentAnalysis": { "positive": 71.2, "neutral": 18.5, "negative": 10.3 },
    "deviceSegmentation": { "desktop": 42, "mobile": 51, "tablet": 7 },
    "reviewSources": { "widget": 68, "email": 29, "import": 3 },
    "conversionMetrics": { "requestOpenRate": 38.4, "reviewConversionRate": 14.2 },
    "questionStatus": { "pending": 18, "approved": 276, "rejected": 18 }
  }
}
```

<Note>`sentimentAnalysis` is Growth/Enterprise only. Standard plan returns basic word-match data.</Note>

<Note>`questionStatus` provides a breakdown of questions by moderation status. This is an additive field — existing integrations are not affected.</Note>


## OpenAPI

````yaml openapi.yaml GET /analytics/dashboard/{merchantId}
openapi: 3.0.0
info:
  title: ReviewFlow API
  description: >-
    ReviewFlow is a fully managed ratings, reviews, and UGC platform by
    Tailoredd. This API covers batch reviews, product reviews, Q&A, media
    management, webhooks, tokens, analytics, incentives, and CSV export
    endpoints.
  version: 2.3.0
servers:
  - url: https://cdn.tailoredd.com/apiV2
    description: Production Gen 2 API front door
security: []
tags:
  - name: Batch Reviews
    description: Fetch rating summaries for multiple products in a single request.
  - name: Webhooks
    description: Receive post-purchase order events to trigger review request flows.
  - name: Tokens
    description: Validate and revoke review request tokens sent to customers.
  - name: CSV Export
    description: Asynchronous export of reviews or questions as CSV files.
  - name: Health
    description: Service availability and version check.
  - name: Cloudinary Media
    description: Upload, retrieve, and delete media assets attached to reviews.
  - name: Reviews & Ratings
    description: Create, read, moderate, and interact with product reviews.
  - name: Featured Reviews
    description: Feature or unfeature reviews for prominent display.
  - name: Questions & Answers
    description: Product Q&A with moderation and merchant answers.
  - name: Admin Dashboard
    description: Admin analytics and dashboard aggregation endpoints.
  - name: Custom Attributes (Growth+/Enterprise)
    description: Manage custom review form attributes like fit, quality, etc.
  - name: Incentive Claims
    description: Track and fulfill review incentive coupon claims.
  - name: Sentiment Analysis
    description: Filter reviews by NLP-derived sentiment labels.
  - name: Google Shopping Feed
    description: Generate and check eligibility for Google product reviews XML feed.
paths:
  /analytics/dashboard/{merchantId}:
    get:
      tags:
        - Sentiment Analysis
      summary: Get Sentiment Distribution (Analytics)
      description: >-
        Get analytics dashboard including sentiment distribution, star ratings,
        device breakdown, review sources, conversion metrics, and question
        status breakdown.


        Canonical contract: GET /analytics/dashboard/:merchantId


        Returns { success: true, data: { sentimentAnalysis, starDistribution,
        questionStatus, ... } }


        The `questionStatus` object contains `pending`, `approved`, and
        `rejected` counts.


        Plan Requirements: Growth or Enterprise
      operationId: getSentimentDistribution
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearer your-admin-token
        - name: X-Merchant-Id
          in: header
          schema:
            type: string
          example: your-merchant-id
        - name: X-API-Key
          in: header
          schema:
            type: string
          example: tr_your-api-key
        - name: startDate
          in: query
          schema:
            type: string
          description: ISO date string (e.g., 2026-01-01)
          example: '2026-01-01T00:00:00.000Z'
        - name: endDate
          in: query
          schema:
            type: string
          description: ISO date string (e.g., 2026-12-31)
          example: '2026-01-31T00:00:00.000Z'
        - name: merchantId
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '400':
          description: Bad Request / Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
      required:
        - success
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              example: VALIDATION_ERROR
            message:
              type: string
              example: Rating must be between 1 and 5
      required:
        - success
        - error

````