Store API cart add item
id: woocommerce-woo-storeapi-cart-additem owner: woocommerce method: POST path: /wp-json/headlesswp/v1/store/wc/cart/add-item title: Store API cart add item usedBySite: true
POST /wp-json/headlesswp/v1/store/wc/cart/add-item
Adds an item 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:
product_id(required, integer)quantity(optional, integer)
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
DEPENDENCY_MISSINGUPSTREAM_UNAVAILABLE