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.
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
Requires Chatter
No
HTTP methods
GET, POST
Request parameters for GET and POST
Parameter Name Type Description Required or Optional Available Version
effectiveAccountId String ID of the account for which the request is made. If unspecified, defaults to the account ID for the context user. 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 The coupon code. Required 54.0
Response body for GET and POST
Cart Coupon Collection