ReviewSense AI Documentation

User Guide

1. Uploading Reviews

There are two ways to upload reviews for analysis:

1.1 Through the Dashboard

  • Access the "Reviews" section in the dashboard
  • Click on "Upload Reviews"
  • Upload a CSV or JSON file with the specified format

1.2 File Formats

CSV Format:

product_id,product_title,review,author,date,stars

Where:

  • product_id: Your product ID
  • product_title: The product title
  • review: The review text
  • author: The author of the review
  • date: The date of the review (YYYY-MM-DD)
  • stars: The rating of the review

JSON Format:

{
  "products": [
    {
      "id": "product_id",
      "title": "product_title",
      "reviews": [
        {
          "review": "review",
          "author": "author",
          "date": "date",
          "stars": stars
        }
      ]
    }
  ]
}

Where:

  • product_id: Your product ID
  • product_title: The product title
  • review: The review text
  • author: The author of the review
  • date: The date of the review (YYYY-MM-DD)
  • stars: The rating of the review

Summarization API

1. Authentication

All API requests must include your API key in the header:

x-api-key: your-api-key

2. Endpoints

2.1 Summarize Reviews

POST /api/summarize

Request Body:

{
  "products": [
    {
      "id": "string",
      "title": "string",
      "reviews": [
        {
          "review": "string",
          "author": "string",
          "date": "YYYY-MM-DD",
          "stars": number
        }
      ]
    }
  ]
}

Response:

{
  "results": [
    {
      "id": "string",
      "title": "string",
      "create_date": "YYYY-MM-DD",
      "summarized_reviews_count": number,
      "total_reviews_count": number,
      "summary": "string",
      "average_rating": number,
      "sentiment": "positive" | "negative" | "neutral",
      "top_features": [
        {
          "feature": "string",
          "mentions": number,
          "sentiment": "positive" | "negative" | "neutral"
        }
      ]
    }
  ],
  "errors": [
    {
      "id": "string",
      "error": "string"
    }
  ]
}

2.2 Get Latest Summary

GET /api/summarize/last?productId=PRODUCT_ID

Parameters:

  • productId (required): The external ID of the product

Response:

{
  "results": [
    {
      "id": "string",
      "title": "string",
      "create_date": "YYYY-MM-DD",
      "summarized_reviews_count": number,
      "total_reviews_count": number,
      "summary": "string",
      "average_rating": number,
      "sentiment": "positive" | "negative" | "neutral",
      "top_features": [
        {
          "feature": "string",
          "mentions": number,
          "sentiment": "positive" | "negative" | "neutral"
        }
      ]
    }
  ]
}

Error Responses:

  • 400: Product ID is required
  • 401: Unauthorized (missing or invalid API key)
  • 403: Subscription expired or inactive
  • 404: Product not found or no summarization available
  • 500: Internal server error

3. Limits and Quotas

  • Requests are limited according to your subscription plan
  • Small Business plan allows up to 150 reviews per month
  • Medium Business plan allows up to 500 reviews per month
  • Unused reviews do not carry over to the next month

4. Error Handling

The API may return the following error codes:

  • 401: Invalid or missing API key
  • 403: Subscription limit exceeded or inactive subscription
  • 400: Invalid data format
  • 500: Internal server error