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
Cartresource — the difference is just who is authenticated and which scope they get.
Cart operations
| Method | Endpoint | Operation |
|---|---|---|
POST | /vc/{connectionId}/cart/recover | Recover cart from email link |
POST | /vc/{connectionId}/cart | Create cart |
GET | /vc/{connectionId}/cart/session/{sessionToken} | Get cart by session |
POST | /vc/{connectionId}/cart/merge | Merge carts |
GET | /vc/{connectionId}/cart/{cartId} | Get cart |
DELETE | /vc/{connectionId}/cart/{cartId} | Clear cart |
POST | /vc/{connectionId}/cart/{cartId}/items | Add 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}/link | Link cart to customer |
POST | /vc/{connectionId}/cart/{cartId}/coupon | Apply coupon |
DELETE | /vc/{connectionId}/cart/{cartId}/coupon | Remove coupon |
POST | /vc/{connectionId}/cart/{cartId}/recalculate | Recalculate cart |
POST | /vc/{connectionId}/cart/{cartId}/refresh-snapshots | Refresh cart snapshots |
GET | /vc/{connectionId}/cart/{cartId}/nudges | List cart nudges |
GET | /vc/{connectionId}/cart/{cartId}/recommendations | List cart recommendations |
GET | /vc/{connectionId}/cart/{cartId}/bundles | List cart bundles |
POST | /vc/{connectionId}/cart/{cartId}/bundle | Add bundle item |
DELETE | /vc/{connectionId}/cart/{cartId}/bundle/{bundleOfferId} | Remove bundle item |
GET | /vc/{connectionId}/cart/{cartId}/upgrades | List cart upgrades |
POST | /vc/{connectionId}/cart/{cartId}/bump | Add order bump |
DELETE | /vc/{connectionId}/cart/{cartId}/bump/{bumpConfigId} | Remove order bump |
POST | /v1/cart | Create 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}/items | Add 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}/items | Clear all items from cart |
POST | /v1/cart/{cartId}/coupon | Apply coupon to cart |
DELETE | /v1/cart/{cartId}/coupon | Remove coupon from cart |
POST | /v1/cart/merge | Merge guest cart into customer cart |
GET | /vc/{connectionId}/customers/me/cart | Get customer cart |
Delete a customer address
Delete a customer address. DELETE /v1/customers/{id}/addresses/{addressId} in the Brainerce API.
Recover cart from email link
Trades the one-time code carried in the URL fragment of an abandoned-cart email link (brainercerecover=<code) for the guest cart, including its sessionT...