Get Images By Variant (Admin)
Get all images for a specific product variant for admin.
Endpoint
Authentication
Required (Admin role)
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | Variant ID |
product_id |
integer | Yes | Product ID |
Response
Success (200 OK)
{
"product_variant_images": [
{
"id": 1,
"order_image": 1,
"path": "https://...",
"created": "2025-01-15T10:30:00Z"
},
{
"id": 2,
"order_image": 2,
"path": "https://...",
"created": "2025-01-15T10:30:00Z"
}
],
"product_variant": {
"id": 1,
"product_id": 5,
"product": {...},
"name_az": "Məhsul Adı",
"name_en": "Product Name",
"sku": "SKU-001",
"stock_quantity": 100,
"price": 29.99,
"attributes": [...],
"images": [...],
"created": "2025-01-15T10:30:00Z"
}
}
Error Responses
Product Not Found (404)
Variant Not Found (404)
Example Request
curl -X GET "https://api.luxmart.site/v1/products/variant/image/admin/get-by/?id=1&product_id=5" \
-H "Authorization: Token your_access_token"
Notes
- Variant must belong to the specified product
- Only returns non-deleted images
- Images are ordered by
order_imageascending - Includes full product variant information