Alokai
You are reading the documentation for SDK v2, which is no longer the latest version. Switch to current

ApplyCartCouponParams

Parameters for applying a discount code to cart.

export interface ApplyCartCouponParams {
	cartId: ApiUpdateCartParams["id"];
	cartVersion: ApiUpdateCartParams["version"];
	coupon: AddCartDiscountCode["code"];
	validateDuplicates?: AddCartDiscountCode["validateDuplicates"];
	versionFallback?: ApiUpdateCartParams["versionFallback"];
}

Properties

NameRequiredTypeDescription
cartIdRequiredApiUpdateCartParams["id"]ID of the cart to apply a discount code to.
cartVersionRequiredApiUpdateCartParams["version"]Version of the cart to apply a discount code to.
couponRequiredAddCartDiscountCode["code"]Discount code to apply to cart.
validateDuplicatesOptionalAddCartDiscountCode["validateDuplicates"]When set to true, commercetools will respond with an error when adding the same discount code to the same cart twice.
versionFallbackOptionalApiUpdateCartParams["versionFallback"]Flag enabling request retry in case of a ConcurrentModification error.

Referenced Types

On this page