Discard Product Draft
Drop the unpublished overlay for a product. The live product is unchanged, and
draft_version does not roll back.
If no overlay exists, the call is a no-op and still returns 204. After a discard,
Get Product Draft is the live product with has_draft: false
and draft_updated_at: null.
Request
DELETE /products/{id}/draft
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Product UUID |
Example Request
curl -X DELETE "https://cart.easy.tools/api/v1/products/0632bef5-c308-42cd-9cba-89a7a4f722bb/draft" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Response
Success Response (204)
Empty body. Repeating the request also returns 204.
Error Responses
Bad Request (400)
{
"message": "Invalid product ID"
}
Product Not Found (404)
Returned when the UUID does not exist, belongs to another store, or points at an archived product.
{
"message": "Product with ID 0632bef5-c308-42cd-9cba-89a7a4f722bb not found"
}