API to Enable “Add to Cart” for products displayed in Customer Account Extension

Hi everyone,
I’m developing a Shopify app that manages a wishlist. Using a Customer Account Extension, I’ve successfully displayed the wishlist items (product variants) in the customer profile area.

Now, I’d like to add an “Add to Cart” button next to each item.
Which Shopify API or method should I use to implement this functionality?

Any guidance or examples would be greatly appreciated!

Thanks in advance,
Alessandro

Hi Alessandro ,

The Admin API is typically not used for cart operations, if you can access the Storefront API you could use the cartLinesAdd mutation to add items to the cart.

I don’t want to use the Admin API, the extension that I’m writing is a customer account extension that targets the customer page hosted on shopify.com