Skip to main content

Delete Cross-sell

Remove a cross-sell by id. Children are promoted to the deleted offer's parent first — they are not deleted. A second call for the same id returns 404. The same id cannot be reused. See Delete.

Delete is not hide — use active: false to keep the offer off the thank-you page without removing it. See Active, one purchase, and send offer.

Live writes return 409 when the owner product has has_draft: true. Draft deletes require draft_version in the JSON body and return 204 with no body.

Request

Live:

  • DELETE /cross-sells/{id}

Draft:

  • DELETE /products/{productId}/draft/cross-sells/{id}

Path Parameters

ParameterTypeRequiredDescription
productIdstringDraft onlyOwner product UUID.
idstringYesCross-sell UUID.

Request Body

Live deletes have no body. Draft deletes require:

ParameterTypeRequiredDescription
draft_versionintegerDraft onlyCurrent overlay version. Minimum 1. A mismatch returns 409.

Example Request

curl -X DELETE "https://cart.easy.tools/api/v1/cross-sells/37643a70-be0f-4f09-ae36-c36e3ddb35dc" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Draft:

curl -X DELETE "https://cart.easy.tools/api/v1/products/0632bef5-c308-42cd-9cba-89a7a4f722bb/draft/cross-sells/37643a70-be0f-4f09-ae36-c36e3ddb35dc" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"draft_version": 15
}'

Response

Success Response (204)

Empty body.

Error Responses

Bad Request (400)

{
"message": "Invalid cross-sell ID"
}

Not Found Error (404)

{
"message": "Cross-sell with ID 37643a70-be0f-4f09-ae36-c36e3ddb35dc 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": ["This field is required."]
}
}

Unauthorized Error (401)

{
"message": "Unauthenticated."
}

Forbidden Error (403)

{
"message": "You do not have API access to the requested store."
}