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 Product 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 -
CouponToProductConnection | Connection between the Coupon type and the Product 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":987.65,"code":"abc123","databaseId":987,"date":"abc123","dateExpiry":"abc123","description":"abc123","discountType":"FIXED_CART","emailRestrictions":["xyz789"],"excludeSaleItems":false,"excludedProductCategories":CouponToExcludedProductCategoriesConnection,"excludedProducts":CouponToExcludedProductsConnection,"freeShipping":false,"id":"4","individualUse":true,"limitUsageToXItems":987,"maximumAmount":987.65,"metaData":[MetaData],"minimumAmount":123.45,"modified":"abc123","productCategories":CouponToProductCategoryConnection,"products":CouponToProductConnection,"usageCount":987,"usageLimit":987,"usageLimitPerUser":987,"usedBy":CouponToCustomerConnection}