Skip to main content

Endpoint

GET /api/v1/product-reviews/{id}
Retrieve detailed information about a specific product review.

Path Parameters

id
integer
required
The unique identifier of the product review

Response

Returns a product review object.
id
integer
required
Unique identifier for the review
productId
integer
required
ID of the product being reviewed
userId
integer
required
ID of the user who created the review
rating
integer
required
Rating given to the product (typically 1-5)
comment
string
Text comment or review description
createdAt
string
Timestamp when the review was created (ISO 8601 format)

Status Codes

200
OK
Successfully retrieved the product review
404
Not Found
Product review not found

Example Request

curl -X GET "https://api.example.com/api/v1/product-reviews/1"

Example Response

{
  "id": 1,
  "productId": 101,
  "userId": 501,
  "rating": 5,
  "comment": "Excellent quality sofa! Very comfortable and looks great in my living room.",
  "createdAt": "2024-01-15T10:30:00"
}

Error Response

When a product review is not found:
{
  "status": 404,
  "error": "Not Found",
  "message": "Product review not found with id: 999"
}

Build docs developers (and LLMs) love