Anchor to section titled 'undefined'

orderEditRemoveLineItemDiscount
mutation
deprecated

Requires write_order_edits access scope.

Removes a line item discount that was applied as part of an order edit. Use orderEditRemoveDiscount instead.


Anchor to discountApplicationId
discountApplicationId
required

The ID of the calculated discount application to remove.

Anchor to id
id
required

The ID of the calculated order from which to remove the discount.


Was this section helpful?

The calculated line item after removal of the discount.

An order with the edits applied but not saved.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation orderEditRemoveLineItemDiscount($discountApplicationId: ID!, $id: ID!) {
  orderEditRemoveLineItemDiscount(discountApplicationId: $discountApplicationId, id: $id) {
    calculatedLineItem {
      # CalculatedLineItem fields
    }
    calculatedOrder {
      # CalculatedOrder fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "discountApplicationId": "gid://shopify/<objectName>/10079785100",
  "id": "gid://shopify/<objectName>/10079785100"
}