Skip to Content
StoreOSv0.27.1
Core GraphQL APIReferenceObjects

Discount

typeDiscount

Fields

  1. fields
_id*ID!
appliesTo?

Products a PRODUCT_AMOUNT discount applies to.

buyXGetY?
code?String

Customer-entered code. Only set when method is CODE.

combinesWith?
commits?
createdAt?DateTime

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.

eligibility?
endsAt?DateTime

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.

freeShipping?
isActive*Boolean!
isDemo?Boolean
method*DiscountMethod!
Value inAUTOMATICCODE
minimumRequirement?
oncePerCustomer*Boolean!
startsAt?DateTime

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.

tenant?String
title*String!
type*DiscountType!
Value inBUY_X_GET_YFREE_SHIPPINGORDER_AMOUNTPRODUCT_AMOUNT
updatedAt?DateTime

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.

usageCount?Int

Orders that used this discount. Resolved on read.

usageLimit?Int

Total redemptions across all customers. Empty means no limit.

value?

Used by PRODUCT_AMOUNT and ORDER_AMOUNT discounts.

Usages

Returned by
QUERYsale__discount
SDL
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}