4 March 2025
Pricing and DiscountsGraphQL
We've introduced a new field, discountTypeCombination
, that allows you to check how discounts apply and interact on a Cart and Order. Additionally, the new field also indicates the discount type chosen when the best deal logic applies to the Cart or Order.
Changes:
- [API] Added the
discountTypeCombination
field to Cart and Order. - [API] Added DiscountTypeCombination, BestDeal, and Stacking types to Carts API.
- [GraphQL API] Added the
discountTypeCombination
field to theCart
andOrder
types. - [GraphQL API] Added the following types to the GraphQL schema:
DiscountTypeCombination
,Stacking
,BestDeal
,ChosenDiscountType
.
extend type Cart {
discountTypeCombination: DiscountTypeCombination
}
extend type Order {
discountTypeCombination: DiscountTypeCombination
}
"Chosen discount type for the cart as part of best deal"
enum ChosenDiscountType {
CartDiscount
ProductDiscount
}
interface DiscountTypeCombination {
type: String!
}
type Stacking implements DiscountTypeCombination {
type: String!
}
type BestDeal implements DiscountTypeCombination {
type: String!
chosenDiscountType: ChosenDiscountType
}