API ReferenceEndpointsCartCart

Cart

Brainerce API reference: every cart operation, with its method, path and a page of its own.

A cart holds line items, applied coupons, bundles, and order bumps before the shopper commits to a checkout. Carts can be guest (session-token) or customer-owned, and can be merged on login. Cart endpoints recalculate totals on every change.

Two auth surfaces on this page.

  • Storefront (/vc/{connectionId}/cart/*) — sales-channel scope, the public surface vibe-coded sites call from the browser.
  • Public API (/v1/cart/*) — Authorization: Bearer brainerce_* api-key, for server-to-server integrations that manage carts directly.

Both surfaces operate on the same Cart resource — the difference is just who is authenticated and which scope they get.

Cart operations

MethodEndpointOperation
POST/vc/{connectionId}/cart/recoverRecover cart from email link
POST/vc/{connectionId}/cartCreate cart
GET/vc/{connectionId}/cart/session/{sessionToken}Get cart by session
POST/vc/{connectionId}/cart/mergeMerge carts
GET/vc/{connectionId}/cart/{cartId}Get cart
DELETE/vc/{connectionId}/cart/{cartId}Clear cart
POST/vc/{connectionId}/cart/{cartId}/itemsAdd to cart
PATCH/vc/{connectionId}/cart/{cartId}/items/{itemId}Update cart item (Storefront)
DELETE/vc/{connectionId}/cart/{cartId}/items/{itemId}Remove cart item
POST/vc/{connectionId}/cart/{cartId}/linkLink cart to customer
POST/vc/{connectionId}/cart/{cartId}/couponApply coupon
DELETE/vc/{connectionId}/cart/{cartId}/couponRemove coupon
POST/vc/{connectionId}/cart/{cartId}/recalculateRecalculate cart
POST/vc/{connectionId}/cart/{cartId}/refresh-snapshotsRefresh cart snapshots
GET/vc/{connectionId}/cart/{cartId}/nudgesList cart nudges
GET/vc/{connectionId}/cart/{cartId}/recommendationsList cart recommendations
GET/vc/{connectionId}/cart/{cartId}/bundlesList cart bundles
POST/vc/{connectionId}/cart/{cartId}/bundleAdd bundle item
DELETE/vc/{connectionId}/cart/{cartId}/bundle/{bundleOfferId}Remove bundle item
GET/vc/{connectionId}/cart/{cartId}/upgradesList cart upgrades
POST/vc/{connectionId}/cart/{cartId}/bumpAdd order bump
DELETE/vc/{connectionId}/cart/{cartId}/bump/{bumpConfigId}Remove order bump
POST/v1/cartCreate a new cart
GET/v1/cart/{cartId}Get cart by ID
GET/v1/cart/session/{sessionToken}Get cart by session token
GET/v1/cart/customer/{customerId}Get cart by customer ID
POST/v1/cart/{cartId}/itemsAdd item to cart
PATCH/v1/cart/{cartId}/items/{itemId}Update cart item (Public API)
DELETE/v1/cart/{cartId}/items/{itemId}Remove item from cart
DELETE/v1/cart/{cartId}/itemsClear all items from cart
POST/v1/cart/{cartId}/couponApply coupon to cart
DELETE/v1/cart/{cartId}/couponRemove coupon from cart
POST/v1/cart/mergeMerge guest cart into customer cart
GET/vc/{connectionId}/customers/me/cartGet customer cart

On this page