Skip to main content

Reorder Order Bumps

Rewrite the display order of every complete order bump on the owner product. The body must list every bump exactly once — including inactive ones. order is 1-based and must be a permutation of 1 through N. Array position is ignored — order is what counts.

The order bump object has no order field. List Order Bumps returns this display order. Incomplete items are omitted, matching GET — see Incomplete items.

Live writes return 409 when the product has has_draft: true. Draft writes require draft_version.

Request

Live:

  • POST /products/{productId}/order-bumps/reorder

Draft:

  • POST /products/{productId}/draft/order-bumps/reorder

Path Parameters

ParameterTypeRequiredDescription
productIdstringYesOwner product UUID.

Request Body

ParameterTypeRequiredDescription
draft_versionintegerDraft onlyCurrent overlay version from Get Product Draft. Minimum 1. A mismatch returns 409.
itemsarrayYesOne entry per complete bump. Extra, missing, or duplicate ids return 422.

Items Object

ParameterTypeRequiredDescription
idstringYesOrder bump UUID.
orderintegerYes1-based display position. Must be a permutation of 1 through N.

Unknown keys on the body or on an item return 422.

Example Request

curl -X POST "https://cart.easy.tools/api/v1/products/0632bef5-c308-42cd-9cba-89a7a4f722bb/order-bumps/reorder" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"items": [
{ "id": "8c3a91f2-6d4e-4b18-a7c5-2e9f0b1d4a63", "order": 1 },
{ "id": "4eebbd13-ee35-4d66-bfec-a9988b63ef75", "order": 2 }
]
}'

Draft reorder adds "draft_version": 15 to the body and uses the /draft/order-bumps/reorder path.

Response

Success Response (200)

Live returns { items } in display order, with no pagination. Draft returns { items, draft_version, preview_url }. See Draft preview.

{
"items": [
{
"id": "8c3a91f2-6d4e-4b18-a7c5-2e9f0b1d4a63",
"product_id": "70dbd819-fac2-4dcf-b655-fb925e24410b",
"variant_id": "d91c65aa-b221-4aa4-b626-cf0d8a198749",
"name": null,
"title": "Workbook",
"description": null,
"amount": null,
"currency": "usd",
"display_type": "compact",
"validity_minutes": null,
"active": true
},
{
"id": "4eebbd13-ee35-4d66-bfec-a9988b63ef75",
"product_id": "70dbd819-fac2-4dcf-b655-fb925e24410b",
"variant_id": "5272bfcf-4e92-458d-b513-80ca474a16e4",
"name": "Backup recording",
"title": "Add the recording",
"description": "Keep the session afterwards.",
"amount": 4900,
"currency": "usd",
"display_type": "large_thumbnail",
"validity_minutes": null,
"active": true
}
]
}

Each entry has the Order Bump Object shape. draft_version and preview_url sit on the draft envelope, not on each item.

Response Fields

FieldTypeNullableDescription
itemsarrayNoComplete order bumps in display order. Inactive stay.
draft_versionintegerNoDraft only. New overlay version after this write.
preview_urlstringNoDraft only. Temporary signed checkout preview. Always reminted. Expires after about one hour.

Error Responses

Bad Request (400)

{
"message": "Invalid product ID"
}

Not Found Error (404)

{
"message": "Product with ID 0632bef5-c308-42cd-9cba-89a7a4f722bb 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)

Returned when draft_version is missing on a draft write, items is not an exact permutation of the complete set, order is not 1 through N, or an unknown key is sent.

{
"message": "The given data was invalid.",
"errors": {
"items": [
"The items list must include every order bump of this product exactly once."
]
}
}

Unauthorized Error (401)

{
"message": "Unauthenticated."
}

Forbidden Error (403)

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