Skip to content

Store API cart


id: woocommerce-woo-storeapi-cart owner: woocommerce method: GET path: /wp-json/headlesswp/v1/store/wc/cart title: Store API cart usedBySite: true

GET /wp-json/headlesswp/v1/store/wc/cart

Returns the current Woo Store API cart via the HWP Store API bridge.

Auth + CSRF

  • Auth: public.
  • Proxy nonce required: no.
  • CSRF: exempt at the site proxy boundary.

Request schema

  • No query parameters.
  • No request body.
  • Optional request header: Cart-Token for cart continuity.

Response schema

HWP response envelope:

{
  "data": {
    "totals": {
      "currency_code": "USD",
      "total_price": "3900",
      "total_discount": "0"
    }
  },
  "meta": {
    "tokens": {
      "cartToken": "...",
      "nonce": "..."
    }
  }
}
  • data is a Woo Store API cart payload pass-through.
  • meta.tokens.cartToken and meta.tokens.nonce are present when provided by HWP.

Error codes

  • UPSTREAM_UNAVAILABLE
  • DEPENDENCY_MISSING