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 }

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.

Relationships

CartDiscount represents discount information applied to a cart. It provides comprehensive details about discount offers including their monetary value, percentage, and type classification. This type is typically returned as part of cart query results where discounts have been applied.

Example

query { cart(id: "eyJhbGciOiJIUzI1NiJ9...") { discounts { title description discountPercent type code amount totalAmount totalSavings } } }

Implements

This type does not implement any interfaces.

  • Cart
  • Discount