Discount

A Discount represents a discount that customers may apply to an order's subtotal, shipping, or both.

Properties

NameTypeDescription
IdintThe ID of the discount.
AccountIdintThe ID of the Liftoff account that the discount belongs to. (Note: This account ID will always correspond to the account code you use in your authentication credentials.)
Account (via $expand)AccountThe Liftoff account that the discount belongs to.
CreateDatedatetimeoffsetThe date the discount was created.
CodestringThe code for the discount. Must be unique across all discounts for the account.
CustomerIdintOptional. The ID of the customer assigned to the discount. If not specified, the discount may be used by any customer.
ValueTypecharCharacter that indicates the type of discount. Valid values are % (for percentage off), $ (for dollar amount off), and G (for depletable account).
Valuedecimal(18,2)Along with ValueType, the value of the discount.
StartDatedateOptional. The earliest date the discount may be applied.
ExpiresDatedateOptional. The latest date the discount may be applied. If not specified, the discount does not expire.
ApplyAutomaticallybooleanFlag that indicates whether the discount should be applied automatically at checkout. If this flag is not set, the customer must manually enter the discount code.
ApplyTostringThe portion of the order the discount applies to. Valid values are Subtotal, Shipping, and Total.
ApplicationsintOptional. The number of times the discount may be applied per customer. If not specified, the discount allows unlimited use. Not applicable to depletable accounts, which may be used until depleted.
DescriptionstringThe description of the discount that is displayed to customers.
CategoryIdintOptional. The ID of the category whose products the discount may be applied to.
ProductIdintOptional. The ID of the product the discount may be applied to.
ProductVariantFieldCodestringOptional. Only product variants with the specified ProductVariantFieldValue for the specified ProductVariantFieldCode qualify for the discount.
ProductVariantFieldValuestringOptional. Only product variants with the specified ProductVariantFieldValue for the specified ProductVariantFieldCode qualify for the discount.