Skip to content

Delete Variant (Admin)

Soft delete a product variant for admin.

Endpoint

DELETE /v1/products/variant/admin/?id={variant_id}&product_id={product_id}

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)

{
  "success": "Product Variant Deleted"
}

Error Responses

Product Not Found (404)

{
  "error": "Product not found"
}

Variant Not Found (404)

{
  "error": "Product Variant not found"
}

Missing ID Parameter (400)

{
  "message": "Param not send!"
}

Example Request

curl -X DELETE "https://api.luxmart.site/v1/products/variant/admin/?id=1&product_id=5" \
  -H "Authorization: Token your_access_token"

Notes

  • Performs a soft delete (sets is_deleted: true)
  • Variant must belong to the specified product
  • Deleted variants cannot be retrieved or purchased
  • Admin can delete variants from any store