Skip to main content
Log inSign up

Shopify uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our privacy policy and our cookie policy.

Anchor to orderEditAddLineItemDiscount

orderEditAddLineItemDiscount

mutation

Requires write_order_edits access scope. Also: The user must have apply_discounts_to_orders permission.

Adds a discount to a line item on the current order edit. For more information on how to use the GraphQL Admin API to edit an existing order, refer to Edit existing orders.

The discount to add to the line item.

ID!required

The ID of the calculated order or the order edit session to edit.

ID!required

The ID of the calculated line item to add the discount to.


Was this section helpful?

Anchor to OrderEditAddLineItemDiscountPayload returnsOrderEditAddLineItemDiscountPayload returns

Anchor to addedDiscountStagedChangeaddedDiscountStagedChange

The discount applied to a line item during this order edit.

The line item with the edits applied but not saved.

An order with the edits applied but not saved.

The order edit session with the edits applied but not saved.

The list of errors that occurred from executing the mutation.


Was this section helpful?