Creates a cart.
When an app or a Wix user creates a cart, specify customerInfo.memberId or customerInfo.visitorId to make that member or visitor the cart's owner. These fields are read-only after the cart is created.
When a site member or site visitor calls Create Cart directly, the caller always owns the cart. Create Cart ignores any owner ID or customerInfo.openAccess value in the request.
For a customer who isn't identified yet, specify customerInfo.openAccess as true. The cart then has no owner, and the first site visitor, site member, or Wix user who accesses it becomes its owner.
If you specify neither an owner ID nor customerInfo.openAccess as true, a calling Wix user becomes the owner. A cart that an app creates is open access, unless the app calls with a site visitor's or site member's identity. That visitor or member then becomes the owner.
When an app or a Wix user creates a cart, specifying customerInfo.contactId associates the cart with an existing contact. It doesn't make that contact the cart's owner, and it doesn't stop the cart from becoming open access. When a site member or site visitor calls Create Cart directly, Create Cart ignores customerInfo.contactId.
The contact ID can change later, when the cart's owner changes or when Update Cart changes the customer's email or phone.
A member-owned cart never changes owner. If a member owns a cart, any other site member, site visitor, or Wix user who tries to access it gets a permission error.
Any site visitor, site member, or Wix user can access a visitor-owned cart, and the first site member who accesses it becomes its owner. To tie a cart to a single customer for the whole purchase flow, make a member its owner rather than a visitor.
There are 9 errors with this status code.
There are 9 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.