As of GraphQL Customer Account API version 2026-07, draft orders now expose discount applications.
You can use the new field on DraftOrder to query discounts applied to a draft order, and the new field on to query how discounts are allocated across line items.
For example:
query DraftOrderDiscounts($id: ID!) {
draftOrder(id: $id) {
discountApplications(first: 10) {
nodes {
__typename
... on DiscountCodeApplication {
code
}
... on ManualDiscountApplication {
title
}
allocationMethod
targetSelection
targetType
value {
... on MoneyV2 {
amount
currencyCode
}
... on PricingPercentageValue {
percentage
}
}
}
}
lineItems(first: 10) {
nodes {
title
discountAllocations {
allocatedAmount {
amount
currencyCode
}
discountApplication {
__typename
}
}
}
}
}
}
query DraftOrderDiscounts($id: ID!) {
draftOrder(id: $id) {
discountApplications(first: 10) {
nodes {
__typename
... on DiscountCodeApplication {
code
}
... on ManualDiscountApplication {
title
}
allocationMethod
targetSelection
targetType
value {
... on MoneyV2 {
amount
currencyCode
}
... on PricingPercentageValue {
percentage
}
}
}
}
lineItems(first: 10) {
nodes {
title
discountAllocations {
allocatedAmount {
amount
currencyCode
}
discountApplication {
__typename
}
}
}
}
}
}
Use these fields to understand which discounts apply to a draft order and how those discounts affect individual draft order line items.
Was this page helpful?