Skip to main content
Back to changelog

Discount application information now available for draft orders on the Customer Account API

As of GraphQL Customer Account API version 2026-07, draft orders now expose discount applications.

You can use the new discountApplications field on DraftOrder to query discounts applied to a draft order, and the new discountAllocations field on DraftOrderLineItem 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
}
}
}
}
}
}

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?