Skip to content

Move Wishlist Item to Cart

About

The moveWishlistToCart mutation moves a product from the customer's wishlist directly into their shopping cart. Use this mutation to:

  • Implement "Move to Cart" buttons on the wishlist page
  • Convert saved-for-later items into active cart items
  • Streamline the purchase flow from wishlist to checkout

The item is removed from the wishlist after it is successfully added to the cart.

Note: wishlistItemId is the numeric _id of the wishlist item (not the IRI). The quantity field defaults to 1 if omitted.

Authentication

This mutation requires customer authentication:

  • Authenticated customers: Provide a valid customer authentication token in the Authorization header. Obtain this token via the Customer Login API.
Authorization: Bearer <accessToken>

Arguments

ArgumentTypeDescription
wishlistItemIdInt!The numeric _id of the wishlist item to move (not the IRI).
quantityIntNumber of units to add to cart. Defaults to 1 if omitted.
clientMutationIdStringOptional client-side mutation identifier for tracking.

Possible Returns

FieldTypeDescription
wishlistToCart.messageString!Success message confirming the item was moved.

Released under the MIT License.