I am developing a Shopify app with the Remix template. My app provides a theme app extension with an input form.
Then a user submit some date through that form. Based on submitted data from the app backend I am calling Admin API to get products. Now I want to create a cart for the user.
From what I understood in the Docs:
I cannot use Storefront API to make a cart because it is not a custom storefront, I just get a request from a Shopify store. It is all happening inside the Shopify.
As well I cannot use Ajax API, because I make the API call for products from the App Backend. While Ajax API is to extend themes, not for Apps.
So only Admin API is left to make a cart.
In Admin API Docs for Cart object I see only “cartTransformCreate” mutation. Which involves using Function API.
Is there an example anywhere how to just create a cart using “cartTransformCreate” mutation (without product bundles)?
Is using “cartTransformCreate” mutation right way to create a cart? Or there is another easier way?