Schema Documentation
Coupon
Description
A coupon object
Fields
Field Name | Description |
---|---|
amount - Float | Amount off provided by the coupon |
code - String | Coupon code |
databaseId - Int | The ID of the coupon in the database |
date - String | Date coupon created |
dateExpiry - String | Date coupon expires |
description - String | Explanation of what the coupon does |
discountType - DiscountTypeEnum | Type of discount |
emailRestrictions - [String] | Only customers with a matching email address can use the coupon |
excludeSaleItems - Boolean | Excluding sale items mean this coupon cannot be used on items that are on sale (or carts that contain on sale items) |
excludedProductCategories - CouponToExcludedProductCategoriesConnection | Connection between the Coupon type and the productCategory type |
Arguments
| |
excludedProducts - CouponToExcludedProductsConnection | Connection between the Coupon type and the ProductUnion type |
Arguments
| |
freeShipping - Boolean | Does this coupon grant free shipping? |
id - ID! | The globally unique identifier for the coupon |
individualUse - Boolean | Individual use means this coupon cannot be used in conjunction with other coupons |
limitUsageToXItems - Int | The number of products in your cart this coupon can apply to (for product discounts) |
maximumAmount - Float | Maximum spend amount that must be met before this coupon can be used |
metaData - [MetaData] | Object meta data |
minimumAmount - Float | Minimum spend amount that must be met before this coupon can be used |
modified - String | Date coupon modified |
productCategories - CouponToProductCategoryConnection | Connection between the Coupon type and the productCategory type |
Arguments
| |
products - CouponToProductUnionConnection | Connection between the Coupon type and the ProductUnion type |
Arguments
| |
usageCount - Int | How many times the coupon has been used |
usageLimit - Int | Amount of times this coupon can be used globally |
usageLimitPerUser - Int | Amount of times this coupon can be used by a customer |
usedBy - CouponToCustomerConnection | Connection between the Coupon type and the Customer type |
Arguments
|
Example
{"amount":123.45,"code":"abc123","databaseId":987,"date":"xyz789","dateExpiry":"xyz789","description":"xyz789","discountType":"FIXED_CART","emailRestrictions":["abc123"],"excludeSaleItems":true,"excludedProductCategories":CouponToExcludedProductCategoriesConnection,"excludedProducts":CouponToExcludedProductsConnection,"freeShipping":true,"id":4,"individualUse":true,"limitUsageToXItems":123,"maximumAmount":123.45,"metaData":[MetaData],"minimumAmount":123.45,"modified":"abc123","productCategories":CouponToProductCategoryConnection,"products":CouponToProductUnionConnection,"usageCount":987,"usageLimit":987,"usageLimitPerUser":987,"usedBy":CouponToCustomerConnection}