Skip to Content

CartDiscount

Describes a cart discount, including title, description, discount percentage, type, code, and total amount.

Type Definition

type CartDiscount { title: String description: String discountPercent: Float type: String code: String amount: Float totalAmount: Float totalSavings: Float metafields: [Metafield]! metafield: Metafield }

Fields

FieldTypeDescription
titleStringReturns the title.
descriptionStringReturns the description.
discountPercentFloatReturns the discount percent.
typeStringReturns the discount type.
codeStringReturns the code for coupons.
amountFloatReturns the discount amount in customer’s currency.
totalAmountFloatReturns the total discount amount in customer’s currency.
totalSavingsFloatReturns the total savings in customer’s currency.
metafields[Metafield]!Metafields stored on this resource.
metafieldMetafieldA single metafield by namespace and key.

Relationships

CartDiscount contains metafield data through the metafields and metafield fields, allowing you to access custom metadata stored on the discount resource. The metafield field enables retrieval of a specific metafield by namespace and key, while metafields returns all metafield data associated with the discount.

Example

{ title description discountPercent type code amount totalAmount totalSavings metafields { id namespace key value } }

Implements

This type does not implement any interfaces.