Skip to main content

VoucherEmbedded Object

Description

Embedded voucher information used within orders or checkouts.

Declaration

type VoucherEmbedded {
_id: ID!
type: VoucherTypes
id: String
value: Float
originalValue: Float
redeemType: RedeemType
redeemed: Boolean
isInRange: Boolean
singleSpending: Boolean
unlimited: Boolean
spendings: [VoucherSpending!]
spendingLimit: Int
startDate: Date
expires: Date
resourcePath: String
user: UserReference
created: Date
createdBy: UserReference
note: Note
logs: [LogEntry!]
recipients: [VoucherEmailRecipient!]
pdf: String
}

Fields

NameTypeDescription
_idID!Internal database identifier.
typeVoucherTypesType of voucher (coupon or gift card).
idStringVoucher identifier code.
valueFloatCurrent remaining value of the voucher.
originalValueFloatOriginal value of the voucher when it was created.
redeemTypeRedeemTypeHow the voucher discount is calculated (fixed value or percentage).
redeemedBooleanWhether the voucher has been fully redeemed.
isInRangeBooleanWhether the voucher is currently within its valid date range.
singleSpending ⚠️BooleanWhether the voucher can only be used once. Use spendingLimit instead. ⚠️ Deprecated: No longer supported
unlimited ⚠️BooleanWhether the voucher has unlimited usage. Use spendingLimit instead. ⚠️ Deprecated: No longer supported
spendings[VoucherSpending!]History of spending transactions where this voucher was used.
spendingLimitIntMaximum number of times the voucher can be used.
startDateDateStart date when the voucher becomes valid.
expiresDateExpiration date when the voucher becomes invalid.
resourcePathStringURL path to the voucher resource.
userUserReferenceUser who owns or is assigned to this voucher.
createdDateDate when the voucher was created.
createdByUserReferenceUser who created the voucher.
noteNoteNote or comment associated with the voucher.
logs[LogEntry!]Historical log entries tracking changes to the voucher.
recipients[VoucherEmailRecipient!]Email recipients who received this voucher.
pdfStringURL to the PDF document for the voucher.