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 Fields (200 OK)

The response is the updated cart. Key fields include:

FieldTypeDescription
idintegerCart ID
itemsCountintegerNumber of distinct items in the cart
itemsQtyintegerTotal quantity across all cart items
subtotaldecimalItems subtotal
grandTotaldecimalCart grand total
formattedGrandTotalstringLocalised grand total
couponCodestringApplied coupon code (if any)
successbooleantrue when the move succeeded
messagestringConfirmation message

TIP

The cart payload mirrors the standard cart response shape. See Get Cart for the full field set; confirm exact values against the live endpoint for your installation.

Validation

  • wishlistItemId must reference a wishlist item owned by the authenticated customer.
  • quantity must be a positive integer.
  • Configurable products may require their options to be selected.

Use Cases

  • "Move to Cart" buttons on the wishlist page
  • Convert saved-for-later items into active cart items

Released under the MIT License.