Skip to content

Move Wishlist Item to Cart ​

Move a product from the customer's wishlist directly into their shopping cart. The item is removed from the wishlist once it is successfully added to the cart.

Endpoint ​

POST /api/shop/move-wishlist-to-carts

Request Headers ​

HeaderRequiredDescription
Content-TypeYesapplication/json
X-STOREFRONT-KEYYesYour storefront API key
AuthorizationYesCustomer Bearer token (Bearer <accessToken>)

Request Body ​

json
{
  "wishlistItemId": 77,
  "quantity": 2
}
FieldTypeRequiredDescription
wishlistItemIdintegerYesThe numeric ID of the wishlist item to move.
quantityintegerNoNumber of units to add to the cart. Defaults to 1.

Response ​

201 Created, carrying the whole updated cart — the same object Get Cart returns, plus two fields specific to this action.

FieldTypeDescription
successbooleantrue when the item reached the cart.
messagestringItem moved to cart successfully.

Everything else — id, items, the subtotal / taxAmount / grandTotal family and their formatted* counterparts, billingAddress, shippingAddress, paymentMethod, and the checkout flags — is the standard cart shape documented on Get Cart. The example on this page shows the full payload.

What the Call Does ​

  1. Adds the saved product to the customer's active cart, creating that cart when none exists.
  2. Deletes the wishlist row, so the item is gone from Get Wishlist Items afterwards.
  3. Recalculates the cart totals and returns the result, so no follow-up cart fetch is needed.

Nothing is moved when the call fails — the wishlist row survives a 400 or 404.

Validation ​

RuleFailure
wishlistItemId must be a row owned by the authenticated customer404 — Wishlist item not found, the same answer as an ID that does not exist.
quantity, when sent, must be greater than 0400 — Quantity must be greater than 0.
The product must be addable without option choices400 — Product has missing required options. Please configure it manually.

Use Cases ​

  • "Move to cart" on the wishlist page — one call both adds to the cart and clears the wishlist row, and the response is enough to re-render the mini-cart.
  • Move several items — the endpoint takes one wishlist row per call; loop over the IDs and read the totals off the last response.

Best Practices ​

  • Route configurable and bundled products to their product page instead — a wishlist row stores no option selections, so those types always fail here.
  • Re-render from the response, not from a fresh fetch — the payload is the complete recalculated cart.
  • Treat 404 as "already moved or not yours" — a repeated call after a successful move hits the deleted row and answers 404.

Released under the MIT License.