POST

Add To Cart


Adds catalog line items to a cart.

Note: When adding catalog line items to your cart, the lineItems.catalogReference.appId and lineItems.catalogReference.catalogItemId fields are required.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage eCommerce - all permissions
Manage Stores - all permissions
Manage Restaurants - all permissions
Manage eCommerce - Admin Permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/ecom/v1/carts/{id}/add-to-cart

Path Params
idstringRequired

Cart ID.

Body Params
lineItemsArray <LineItem>maxItems 100

Catalog line items.


customLineItemsArray <CustomLineItem>betamaxItems 100

Custom line items. Custom line items don't trigger the Catalog service plugin.

To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". Learn more about permission scopes.


businessLocationIdstringbetaformat GUID

The business location ID associated with the cart. The businessLocationId field cannot be passed if one already exists on the cart. To update a cart's business location ID, use the UpdateCart method. Learn more about the Locations API.

Response Object
cartCart

Updated cart.

Request
cURL
Response
JSON
Errors
428Failed Precondition

There is 1 error with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?