Endpoint
GET /api/v1/products/{id}/
Authentication
This endpoint does not require authentication. It is publicly accessible.
Path Parameters
The unique identifier of the product
Response
Unique product identifier
Category name the product belongs to
Detailed product description
Hyperlink to the store details
Base price of the product (decimal format)
Shipping fee for the product (can be null)
Average customer rating calculated from all reviews (null if no reviews)
Whether the product has variants or is a standalone item
Total available stock quantity across all variants
Total number of units sold across all variants
Current availability status (true if stock_level > 0)
Whether the product is active in the system
ISO 8601 timestamp of product creation
ISO 8601 timestamp of last update
Array of product media objects (images/videos)
Whether this is the primary product image
Type of media: image, video, or unknown
Array of active offers applicable to this product
Array of product variants with different attributes and pricing
Stock Keeping Unit - unique identifier for this variant
Whether this is the default variant for the product
Amount to add to the product’s base price (can be negative)
Available stock quantity for this variant
Number of units sold for this variant
Whether this variant is active
ISO 8601 timestamp of variant creation
ISO 8601 timestamp of last update
Array of variant attributes (e.g., color, size)
Attribute name (e.g., “Color”, “Size”)
Attribute value (e.g., “Red”, “Large”)
Array of customer reviews for this product
Rating value (1-5):
- 1: Very Bad
- 2: Unsatisfied
- 3: Just There
- 4: Satisfied
- 5: Very Satisfied
Analyzed sentiment: POSITIVE, Neutral, or Negative
Numerical sentiment score (can be null)
Whether the review is active/visible
ISO 8601 timestamp of review creation
ISO 8601 timestamp of last update
Array of images attached to the review
Whether this is the primary review image
Request Example
curl -X GET "https://api.example.com/api/v1/products/1/" \
-H "Accept: application/json"
Response Example
{
"id": 1,
"name": "Premium Wireless Headphones",
"category": "Electronics",
"description": "High-quality wireless headphones with active noise cancellation, 30-hour battery life, and premium sound quality. Perfect for music lovers and professionals.",
"store": "https://api.example.com/api/v1/stores/tech-store/",
"base_price": "149.99",
"shipping_fee": "5.99",
"rating": 4.5,
"is_standalone": false,
"total_stock_level": 250,
"total_sold": 1050,
"is_available": true,
"is_active": true,
"created": "2024-01-15T10:30:00Z",
"updated": "2024-03-01T14:22:00Z",
"media": [
{
"id": 1,
"file": "https://cdn.example.com/products/2024/01/headphones-main.jpg",
"is_primary": true,
"file_size": 2.45,
"file_type": "image"
}
],
"product_offers": [
{
"id": 10,
"name": "Spring Sale - 15% Off Electronics",
"discount_type": "percentage",
"discount_value": "15.00"
}
],
"variants": [
{
"id": 1,
"sku": "WH-1000-BLK",
"is_default": true,
"price_adjustment": "0.00",
"stock_level": 100,
"quantity_sold": 450,
"is_active": true,
"created": "2024-01-15T10:30:00Z",
"updated": "2024-03-01T14:22:00Z",
"attributes": [
{
"attribute": "Color",
"value": "Black"
}
]
},
{
"id": 2,
"sku": "WH-1000-WHT",
"is_default": false,
"price_adjustment": "10.00",
"stock_level": 75,
"quantity_sold": 320,
"is_active": true,
"created": "2024-01-15T10:30:00Z",
"updated": "2024-03-01T14:22:00Z",
"attributes": [
{
"attribute": "Color",
"value": "White"
}
]
}
],
"reviews": [
{
"id": 15,
"user": "john_doe",
"review_text": "Excellent sound quality and comfortable for long listening sessions. The noise cancellation is impressive!",
"rating": 5,
"sentiment": "POSITIVE",
"sentiment_score": 0.92,
"is_active": true,
"created": "2024-02-20T15:45:00Z",
"updated": "2024-02-20T15:45:00Z",
"reviewimage_set": [
{
"id": 1,
"image": "https://cdn.example.com/reviews/headphones-review-1.jpg",
"is_primary": true
}
]
}
]
}
Error Responses
Product with the specified ID does not exist{
"detail": "Not found."
}
Notes
- Only active products are returned (products where
is_active=True)
- The rating is automatically calculated from all product reviews
- Stock levels and availability are automatically updated when variants change
- The
price_adjustment on variants is added to the base_price to get the actual variant price
- Standalone products (is_standalone=True) can only have one default variant
- Review sentiment analysis may be automatically performed on review submission