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.
Request
- Base URLhttp://localhost:8000/api/shop
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Storefront API Key for authentication. Required for all shop/storefront API requests.
Locale code for localized data (e.g. "en", "fr", "ar"). Defaults to channel's default locale.
Channel code (e.g. "default"). Defaults to the current channel.
Currency code (e.g. "USD", "EUR", "INR"). Defaults to channel's base currency.
Request body
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.