Schema Documentation

UpdateCouponInput

Description

Input for the updateCoupon mutation.

Fields
Input FieldDescription
amount - Float The amount of discount. Should always be numeric, even if setting a percentage.
clientMutationId - String This is an ID that can be passed to a mutation by the client to track the progress of mutations and catch possible duplicate mutation submissions.
code - String Coupon code.
dateExpires - String The date the coupon expires, in the site's timezone.
dateExpiresGmt - String The date the coupon expires, as GMT.
description - String Coupon description.
discountType - DiscountTypeEnum Determines the type of discount that will be applied.
emailRestrictions - [String] List of email addresses that can use this coupon.
excludeSaleItems - Boolean If true, this coupon will not be applied to items that have sale prices.
excludedProductCategories - [Int] List of category IDs the coupon does not apply to.
excludedProductIds - [Int] List of product IDs the coupon cannot be used on.
freeShipping - Boolean If true and if the free shipping method requires a coupon, this coupon will enable free shipping.
id - ID! Unique identifier for the object.
individualUse - Boolean If true, the coupon can only be used individually. Other applied coupons will be removed from the cart.
limitUsageToXItems - Int Max number of items in the cart the coupon can be applied to.
maximumAmount - String Maximum order amount allowed when using the coupon.
metaData - [MetaDataInput] Meta data.
minimumAmount - String Minimum order amount that needs to be in the cart before coupon applies.
productCategories - [Int] List of category IDs the coupon applies to.
productIds - [Int] List of product IDs the coupon can be used on.
usageLimit - Int How many times the coupon can be used in total.
usageLimitPerUser - Int How many times the coupon can be used per customer.
Example
{"amount":123.45,"clientMutationId":"xyz789","code":"xyz789","dateExpires":"abc123","dateExpiresGmt":"xyz789","description":"xyz789","discountType":"FIXED_CART","emailRestrictions":["xyz789"],"excludeSaleItems":false,"excludedProductCategories":[987],"excludedProductIds":[987],"freeShipping":true,"id":"4","individualUse":true,"limitUsageToXItems":987,"maximumAmount":"xyz789","metaData":[MetaDataInput],"minimumAmount":"abc123","productCategories":[987],"productIds":[123],"usageLimit":123,"usageLimitPerUser":987}