Anchor to section titled 'undefined'

orderEditRemoveDiscount
mutation

Requires write_order_edits access scope.

Removes a discount 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.


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?

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 orderEditRemoveDiscount($discountApplicationId: ID!, $id: ID!) {
  orderEditRemoveDiscount(discountApplicationId: $discountApplicationId, id: $id) {
    calculatedOrder {
      # CalculatedOrder fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "discountApplicationId": "gid://shopify/<objectName>/10079785100",
  "id": "gid://shopify/<objectName>/10079785100"
}