Update Cross-sell
Sparse-update a cross-sell. Only the keys you send are changed. discount: null
clears the discount. parent_id: null roots the offer.
validity_minutes: null clears the timer. Sending amount or currency
returns 422. Unknown keys return 422.
Live writes return 409 when the owner product has has_draft: true. Draft
writes require draft_version.
Request
Live:
PATCH /cross-sells/{id}
Draft:
PATCH /products/{productId}/draft/cross-sells/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
productId | string | Draft only | Owner product UUID. |
id | string | Yes | Cross-sell UUID. |
Request Body
All fields optional. Draft writes also require draft_version.
| Parameter | Type | Required | Description |
|---|---|---|---|
product_id | string | No | Offered product UUID. |
variant_id | string | No | Offered variant UUID. |
parent_id | string | No | Parent cross-sell UUID. null roots. |
title | string | No | Offer headline. null clears it. |
main_description | string | No | Thank-you body. null clears it. |
description | string | No | Stored override description. null clears it. |
button_text | string | No | Call-to-action label. null clears it. |
discount | object | No | Nested discount. null clears it. See Discount. |
validity_minutes | integer | No | Thank-you window in minutes. null clears the timer. Minimum 1 when set. |
one_purchase | boolean | No | When true, the signed checkout can be used once. |
send_offer | boolean | No | Include this offer in the confirmation email. |
active | boolean | No | false hides at thank-you without deleting. |
draft_version | integer | Draft only | Current overlay version. Minimum 1. |
Example Request
curl -X PATCH "https://cart.easy.tools/api/v1/cross-sells/37643a70-be0f-4f09-ae36-c36e3ddb35dc" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"button_text": "Yes, add it"
}'
Draft update adds "draft_version": 15 to the body and uses the
/products/{productId}/draft/cross-sells/{id} path.
Response
Success Response (200)
Returns the updated Cross-sell Object. Draft
updates also include draft_version and preview_url.
{
"id": "37643a70-be0f-4f09-ae36-c36e3ddb35dc",
"product_id": "70dbd819-fac2-4dcf-b655-fb925e24410b",
"variant_id": "5272bfcf-4e92-458d-b513-80ca474a16e4",
"parent_id": null,
"title": "Add the workbook",
"main_description": null,
"description": null,
"button_text": "Yes, add it",
"amount": 4900,
"currency": "usd",
"discount": null,
"validity_minutes": 15,
"one_purchase": true,
"send_offer": true,
"active": true
}
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)
Same field rules as Create Cross-sell.
Sending amount or currency also returns 422. Named-field failures use
{ message, errors }; failures that do not belong to one field use a flat
{ message }.
{
"message": "The given data was invalid.",
"errors": {
"currency": ["The currency field is not allowed."]
}
}
Unauthorized Error (401)
{
"message": "Unauthenticated."
}
Forbidden Error (403)
{
"message": "You do not have API access to the requested store."
}