Core GraphQL APIReferenceObjects
Discount
type
DiscountFields
- fields
_id*ID!appliesTo?Products a PRODUCT_AMOUNT discount applies to.
buyXGetY?code?StringCustomer-entered code. Only set when method is CODE.
combinesWith?commits?createdAt?DateTimeA date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
eligibility?endsAt?DateTimeA date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
freeShipping?isActive*Boolean!isDemo?Booleanmethod*DiscountMethod!Value in
AUTOMATICCODEminimumRequirement?oncePerCustomer*Boolean!startsAt?DateTimeA date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
tenant?Stringtitle*String!type*DiscountType!Value in
BUY_X_GET_YFREE_SHIPPINGORDER_AMOUNTPRODUCT_AMOUNTupdatedAt?DateTimeA date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
usageCount?IntOrders that used this discount. Resolved on read.
usageLimit?IntTotal redemptions across all customers. Empty means no limit.
value?Used by PRODUCT_AMOUNT and ORDER_AMOUNT discounts.
Usages
- Returned by
- QUERY
sale__discount - Field of
DiscountsWithPagination.nodes
type Discount { _id: ID! appliesTo: DiscountItemSelection buyXGetY: DiscountBuyXGetY code: String combinesWith: DiscountCombinesWith commits: [ResourceCommitHistoryReference!] createdAt: DateTime eligibility: DiscountEligibility endsAt: DateTime freeShipping: DiscountFreeShipping isActive: Boolean! isDemo: Boolean method: DiscountMethod! minimumRequirement: DiscountMinimumRequirement oncePerCustomer: Boolean! startsAt: DateTime tenant: String title: String! type: DiscountType! updatedAt: DateTime usageCount: Int usageLimit: Int value: DiscountValue}