Delete Custom Field
Remove a custom field by name, then reindex remaining order values to
0..n-1. A second call for the same name returns 404.
Delete is not hide — use enabled: false to keep the definition. Historical
buyer answers stored under this name are orphaned.
Live writes return 409 when the product has has_draft: true. Draft deletes
require draft_version in the JSON body and return 204 with no body.
After the last variant field is deleted, the stored array is empty — the variant inherits the product checkout fields again. See Collections.
Request
Live:
DELETE /products/{productId}/custom-fields/{name}DELETE /products/{productId}/waitlist-custom-fields/{name}DELETE /product-variants/{id}/custom-fields/{name}
Draft:
DELETE /products/{productId}/draft/custom-fields/{name}DELETE /products/{productId}/draft/waitlist-custom-fields/{name}DELETE /products/{productId}/draft/variants/{id}/custom-fields/{name}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
productId | string | Yes | Product UUID (product-nested paths). |
id | string | Yes | Variant UUID (variant-nested paths). |
name | string | Yes | Field identity slug. |
Request Body
Live deletes have no body. Draft deletes require:
| Parameter | Type | Required | Description |
|---|---|---|---|
draft_version | integer | Draft only | Current overlay version. Minimum 1. A mismatch returns 409. |
Example Request
curl -X DELETE "https://cart.easy.tools/api/v1/products/0632bef5-c308-42cd-9cba-89a7a4f722bb/custom-fields/size" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Draft:
curl -X DELETE "https://cart.easy.tools/api/v1/products/0632bef5-c308-42cd-9cba-89a7a4f722bb/draft/custom-fields/size" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"draft_version": 8
}'
Response
Success Response (204)
Empty body.
Error Responses
Bad Request (400)
{
"message": "Invalid product ID"
}
Not Found Error (404)
{
"message": "Custom field with name size not found"
}
Conflict Error (409 — Unpublished Draft)
Live write while has_draft is true:
{
"message": "This product has an unpublished draft. Publish, unpublish, or delete the draft before making live changes."
}
Conflict Error (409 — Stale Draft Version)
Draft write when draft_version does not match:
{
"message": "The draft was edited elsewhere. GET the draft and retry with the current draft_version."
}
Validation Error (422 Unprocessable Entity)
Draft delete missing draft_version:
{
"message": "The given data was invalid.",
"errors": {
"draft_version": ["The draft version field is required."]
}
}
Unauthorized Error (401)
{
"message": "Unauthenticated."
}
Forbidden Error (403)
{
"message": "This action is unauthorized."
}