A Discount represents a discount that customers may apply to an order's subtotal, shipping, or both.
Properties
Name | Type | Description |
---|---|---|
Id | int | The ID of the discount. |
AccountId | int | The 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) | Account | The Liftoff account that the discount belongs to. |
CreateDate | datetimeoffset | The date the discount was created. |
Code | string | The code for the discount. Must be unique across all discounts for the account. |
CustomerId | int | Optional. The ID of the customer assigned to the discount. If not specified, the discount may be used by any customer. |
ValueType | char | Character that indicates the type of discount. Valid values are % (for percentage off), $ (for dollar amount off), and G (for depletable account). |
Value | decimal(18,2) | Along with ValueType, the value of the discount. |
StartDate | date | Optional. The earliest date the discount may be applied. |
ExpiresDate | date | Optional. The latest date the discount may be applied. If not specified, the discount does not expire. |
ApplyAutomatically | boolean | Flag 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. |
ApplyTo | string | The portion of the order the discount applies to. Valid values are Subtotal, Shipping, and Total. |
Applications | int | Optional. 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. |
Description | string | The description of the discount that is displayed to customers. |
CategoryId | int | Optional. The ID of the category whose products the discount may be applied to. |
ProductId | int | Optional. The ID of the product the discount may be applied to. |
ProductVariantFieldCode | string | Optional. Only product variants with the specified ProductVariantFieldValue for the specified ProductVariantFieldCode qualify for the discount. |
ProductVariantFieldValue | string | Optional. Only product variants with the specified ProductVariantFieldValue for the specified ProductVariantFieldCode qualify for the discount. |