Create Product Images
Upload images for one or more product variants.
Endpoint
Authentication
Required (Store role)
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
product_id |
integer | Yes | Product ID |
Request Body
Content-Type: multipart/form-data
Form Fields
| Field | Type | Required | Description |
|---|---|---|---|
variant_ids |
string | Yes | Comma-separated variant IDs (e.g., "1,2,3") |
images |
file[] | Yes | Image files (multiple files allowed) |
Response
Success (200 OK)
Error Responses
Product Not Found (404)
Example Request
curl -X POST "https://api.luxmart.site/v1/products/variant/image/store/?product_id=5" \
-H "Authorization: Token your_access_token" \
-F "variant_ids=1,2,3" \
-F "images=@/path/to/image1.jpg" \
-F "images=@/path/to/image2.jpg"
Notes
- Product must belong to the authenticated store
- Images are uploaded to S3
- Each image is added to all specified variants
- Image order is automatically assigned based on existing images
- Images are assigned incrementally (1, 2, 3, etc.)