Schema Documentation

Coupon

Description

A coupon object

Fields
Field NameDescription
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
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - CouponToExcludedProductCategoriesConnectionWhereArgs

Arguments for filtering the connection

excludedProducts - CouponToExcludedProductsConnection Connection between the Coupon type and the ProductUnion type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - CouponToExcludedProductsConnectionWhereArgs

Arguments for filtering the connection

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
Arguments
key - String

Retrieve meta by key

keysIn - [String]

Retrieve multiple metas by key

multiple - Boolean

Retrieve meta with matching keys

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
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - CouponToProductCategoryConnectionWhereArgs

Arguments for filtering the connection

products - CouponToProductUnionConnection Connection between the Coupon type and the ProductUnion type
Arguments
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - CouponToProductUnionConnectionWhereArgs

Arguments for filtering the connection

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
first - Int

The number of items to return after the referenced "after" cursor

last - Int

The number of items to return before the referenced "before" cursor

after - String

Cursor used along with the "first" argument to reference where in the dataset to get data

before - String

Cursor used along with the "last" argument to reference where in the dataset to get data

where - CouponToCustomerConnectionWhereArgs

Arguments for filtering the connection

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}