Newer Version Available

This content describes an older version of this product. View Latest

Commerce Webstore Cart Coupons

Get coupons associated with a cart, and apply a coupon code to a cart.

If a store is segmented into markets, this API looks at the language parameter appended to the URL to determine the shopper’s locale and returns the appropriate values.

Resource
1/commerce/webstores/webstoreId/carts/cartStateOrId/cart-coupons
Values for cartStateOrId are:
  • cartId—ID of the cart.
  • active—Active cart.
  • current—Cart that isn’t closed or pending deletion. Available in version 50.0 and later.
Available version
54.0
HTTP methods
GET, POST
Request parameters for GET and POST
Parameter Name Type Description Required or Optional Available Version
currencyIsoCode String Currency ISO code of the cart. Optional 57.0
effectiveAccountId String ID of the buyer account or guest buyer profile for which the request is made. If unspecified, the default value is determined from context. Optional 54.0
Request body for POST
Root XML tag
<cartCouponInput>
JSON example
1{
2        "couponCode": "FALL2021"
3}
Properties
Name Type Description Required or Optional Available Version
couponCode String Coupon code. Required 54.0
Response body for GET and POST
Cart Coupon Collection