I want to create a cart via API, but this endpoint has no API reference. Only for Add To Cart which provides the API structure to add a product to an existing cart id. How do I create this cart id in a headless e-commerce architecture?
For some context, I’m using a chatbot to ask for the products and quantities the consumer wants. Then, it should add the products to a cart, in Wix eCommerce, and then answer with a link, pointing directly to the cart. So, the consumer has just to checkout. All over APIs.
I’m using Wix Studio to build the site and do product management.
Instead of Wix REST APIs you should use Velo APIs to interact with Wix Stores especially if you are using Wix Editors (classic or studio doesn’t matter).
And the feature you are looking for is “creating checkout” not cart. Into that checkout you can add required product as you want including custom products etc.
You can start reading and exploring the APIs from here for Velo:
You can also use Wix REST APIs but it’s not what you need if you are already inside the Wix’s backend. It’s more useful when you go outside of Wix. And you can also find same APIs in REST too.
Let me know if you have any questions. If this is the solution don’t forget to mark the answer as solution.
After reading a lot… I found this page the best to overall the authorization + calling sample. Then, using the REST API Checkout reference I was able to create a checkout using this endpoint: