Skip to Content
StoreOSv0.27.1
Storefront GraphQL APIReferenceObjects

Discount

typeDiscount

Fields

  1. fields
_id*ID!
tenant?String
title*String!
type*DiscountType!
Value inPRODUCT_AMOUNTORDER_AMOUNTBUY_X_GET_YFREE_SHIPPING
method*DiscountMethod!
Value inCODEAUTOMATIC
code?String

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

isActive*Boolean!
startsAt?DateTime

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

endsAt?DateTime

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

value?

Used by PRODUCT_AMOUNT and ORDER_AMOUNT discounts.

appliesTo?

Products a PRODUCT_AMOUNT discount applies to.

buyXGetY?
freeShipping?
minimumRequirement?
eligibility?
usageLimit?Int

Total redemptions across all customers. Empty means no limit.

oncePerCustomer*Boolean!
combinesWith?
usageCount?Int

Orders that used this discount. Resolved on read.

createdAt?DateTime

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

updatedAt?DateTime

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

commits?
isDemo?Boolean
SDL
type Discount {  _id: ID!  tenant: String  title: String!  type: DiscountType!  method: DiscountMethod!  code: String  isActive: Boolean!  startsAt: DateTime  endsAt: DateTime  value: DiscountValue  appliesTo: DiscountItemSelection  buyXGetY: DiscountBuyXGetY  freeShipping: DiscountFreeShipping  minimumRequirement: DiscountMinimumRequirement  eligibility: DiscountEligibility  usageLimit: Int  oncePerCustomer: Boolean!  combinesWith: DiscountCombinesWith  usageCount: Int  createdAt: DateTime  updatedAt: DateTime  commits: [ResourceCommitHistoryReference!]  isDemo: Boolean}