Add, remove, and update discounts with the newest order editing API
API
Effective January 01, 2024
You can now add, remove, and update discounts to new or existing items when editing orders.
The orderEditAddLineItemDiscount mutation allows you to add a fixed amount or percentage discount to an already existing item during an order edit. Previously, this mutation was limited to applying discounts to new products or custom items added to the order.
In addition, two new mutations allow you to remove and update discounts. The mutation orderEditRemoveDiscount removes discounts on newly added, existing products, or custom items, while the orderEditUpdateDiscount mutation allows for updating discounts.
For more information about using discounts with order edits, visit the tutorial on editing an existing order with the Admin API.