Get Site Product By ID
Get a specific product with all its variants for public display. Public endpoint.
Endpoint
Authentication
Not required (public endpoint)
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | Variant ID |
currency_id |
integer | No | Currency ID for price conversion |
Response
Success (200 OK)
{
"product": {
"id": 5,
"store_id": 3,
"store": {...},
"category_id": 2,
"category": {...},
"brand_id": 1,
"brand": {...},
"currency_id": 1,
"currency": {...},
"created": "2025-01-15T10:30:00Z"
},
"product_variant_list": [
{
"id": 1,
"product_id": 5,
"name_az": "Məhsul Adı",
"name_en": "Product Name",
"sku": "SKU-001",
"stock_quantity": 100,
"price": 29.99,
"discount_percent": 10.0,
"discount_price": 26.99,
"currency_name": "AZN",
"attributes": [
{
"id": 1,
"attribute_id": 1,
"attribute_name": "Capacity",
"attribute_name_az": "Tutum",
"attribute_name_en": "Capacity",
"attribute_name_es": "Capacidad",
"attribute_name_de": "Kapazität",
"attribute_type": "text",
"value": "360 L",
"value_az": "360 L",
"value_en": "360 L",
"value_es": "360 L",
"value_de": "360 L",
"is_filter": true,
"is_view": true
}
],
"images": [...],
"is_wish": false,
"created": "2025-01-15T10:30:00Z"
}
]
}
Error Responses
Variant Not Found (404)
Missing ID Parameter (400)
Example Request
Notes
- Returns the product and all its variants
- Only returns non-deleted variants
is_wishindicates if the product is in the user's wishlist (requires authentication header)- Price is converted to specified currency if
currency_idis provided discount_percentis the discount percentage (0 if no discount)discount_priceis the final price after discount (calculated from converted price ifcurrency_idis provided)- This is a public endpoint, no authentication required
- Attribute names and values include translations for all supported languages (
attribute_name_az,attribute_name_en,attribute_name_es,attribute_name_de,value_az,value_en,value_es,value_de) - Base fields (
attribute_name,value) are kept for backward compatibility