Starting in API version 2027-01, you can add, update, and remove manual order-level discounts when you edit an order with the GraphQL Admin API. When your app targets 2027-01, you can manage manual discounts on the whole order in addition to individual line items.
What changed
API version 2027-01 adds the following order-editing discount capabilities:
- Call the new
mutation to stage a fixed-amount or percentage discount on the entire order. Shopify allocates the discount across all line items. - Call
andto update or remove manual order-level discounts and line item discounts. You still can't change discount codes, automatic discounts, or shipping discounts during an edit. - Query the new
field to list the order's discounts, including staged edits. On, checkto see whether a discount applies at theORDERorLINElevel, and checkto see whether a discount belongs to theORDER,PRODUCT, orSHIPPINGclass.returnsnullfor manual discounts. - Handle the new
member on theunion. If your app switches on__typename, then update your code to handle this type.
Who's affected
This change applies to apps that edit orders on API version 2027-01 or later. Shopify stages these changes until you commit them with . Your app needs the access scope, and staff who use your app need permission to apply discounts to orders.
What to do
- Update your app to target API version
2027-01. - Update your order-editing flows to call
and handlewhere you switch on__typename. - Test adding, updating, and removing manual order-level discounts in a development store.
Related docs
Was this page helpful?