Schema Documentation
coupon
Description
A coupon object
Response
Returns a Coupon
Arguments
Name | Description |
---|---|
id - ID! | |
idType - CouponIdTypeEnum | Type of ID being used identify coupon |
Example
Query
query coupon( $id: ID!, $idType: CouponIdTypeEnum){ coupon( id: $id, idType: $idType ){ amountcodedatabaseIddatedateExpirydescriptiondiscountTypeemailRestrictionsexcludeSaleItemsexcludedProductCategories { ...CouponToExcludedProductCategoriesConnectionFragment }excludedProducts { ...CouponToExcludedProductsConnectionFragment }freeShippingidindividualUselimitUsageToXItemsmaximumAmountmetaData { ...MetaDataFragment }minimumAmountmodifiedproductCategories { ...CouponToProductCategoryConnectionFragment }products { ...CouponToProductUnionConnectionFragment }usageCountusageLimitusageLimitPerUserusedBy { ...CouponToCustomerConnectionFragment } }}
Variables
{"id":"4","idType":"CODE"}
Response
{"data":{"coupon":{"amount":987.65,"code":"xyz789","databaseId":987,"date":"xyz789","dateExpiry":"xyz789","description":"xyz789","discountType":"FIXED_CART","emailRestrictions":["abc123"],"excludeSaleItems":true,"excludedProductCategories":CouponToExcludedProductCategoriesConnection,"excludedProducts":CouponToExcludedProductsConnection,"freeShipping":false,"id":4,"individualUse":true,"limitUsageToXItems":123,"maximumAmount":987.65,"metaData":[MetaData],"minimumAmount":123.45,"modified":"abc123","productCategories":CouponToProductCategoryConnection,"products":CouponToProductUnionConnection,"usageCount":987,"usageLimit":123,"usageLimitPerUser":123,"usedBy":CouponToCustomerConnection}}}