Skip to main content

Discard Product Draft

Drop the unpublished overlay for a product. Product fields stored only on the draft are dropped, and draft_version does not roll back. A course connect or disconnect stored by Update Product Draft is dropped with the draft and does not change the live product. A thank-you redirect stored only on the draft is dropped with the overlay.

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​

ParameterTypeRequiredDescription
idstringYesProduct 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"
}

Not Found Error (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"
}