Skip to content

Store API cart apply coupon


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

POST /wp-json/headlesswp/v1/store/wc/cart/apply-coupon

Applies a coupon to the Woo Store API cart through the HWP Store API bridge.

Auth + CSRF

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

Request schema

JSON body:

  • code (required, string)

Optional request header:

  • Cart-Token (string)

Response schema

HWP response envelope:

  • data: Woo Store API cart payload pass-through.
  • meta.tokens.cartToken: string when present.
  • meta.tokens.nonce: string when present.

Error codes

  • COUPON_CODE_REQUIRED
  • COUPON_CODE_INVALID
  • COUPON_PROBE_LIMITED
  • COUPON_APPLY_RATE_LIMITED
  • DEPENDENCY_MISSING
  • UPSTREAM_UNAVAILABLE