Cart

Get cart details (authenticated customer or guest)

Returns the active cart with items, totals, coupons, shipping/payment method, and addresses. Works for both a logged-in customer and a guest; the cart is always identified by the Bearer token (the customer token, or the guest cart token from POST /api/shop/cart-token). A cart id in the body is ignored. It is a POST (not GET) because reading the cart recalculates totals; the GraphQL equivalent is the createReadCart mutation for the same reason. Body may be an empty {} for a logged-in customer.

post/cart

Request

Headers

X-STOREFRONT-KEYstring required

Storefront API Key for authentication. Required for all shop/storefront API requests.

X-Localestring
Example:en

Locale code for localized data (e.g. "en", "fr", "ar"). Defaults to channel's default locale.

X-Channelstring
Example:default

Channel code (e.g. "default"). Defaults to the current channel.

X-Currencystring
Example:USD

Currency code (e.g. "USD", "EUR", "INR"). Defaults to channel's base currency.

Request body

object required

Response

The cart with items, totals, coupon, and selected shipping/payment.

Changes

No recorded changes to this operation across all 13 revisions of this API.