Update Images (Admin)
Delete images for a 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 |
Request Body
Content-Type: multipart/form-data
Form Fields
| Field | Type | Required | Description |
|---|---|---|---|
delete_images |
string | No | Comma-separated image IDs to delete |
Response
Success (200 OK)
Error Responses
Product Not Found (404)
Variant Not Found (404)
Example Request
curl -X PUT "https://api.luxmart.site/v1/products/variant/image/admin/?id=1&product_id=5" \
-H "Authorization: Token your_access_token" \
-F "delete_images=3,4"
Notes
- Variant must belong to the specified product
- Images are soft deleted (sets
is_deleted: true) - Deleted images cannot be retrieved
- Admin can delete images from variants in any store