Anchor to orderEditRemoveDiscountorder
orderEditRemoveDiscount
mutation
Requires 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 Arguments
Arguments
- Anchor to discountApplicationIddiscount•
Application Id ID!required The ID of the calculated discount application to remove.
- •ID!required
The ID of the calculated order or the order edit session to edit. This is the edit from which the discount is removed.
Was this section helpful?
Anchor to OrderEditRemoveDiscountPayload returnsOrderEditRemoveDiscountPayload returns
- Anchor to calculatedOrdercalculated•
Order An order with the edits applied but not saved.
- Anchor to orderEditSessionorder•
Edit Session The order edit session with the edits applied but not saved.
- Anchor to userErrorsuser•
Errors The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
mutation orderEditRemoveDiscount($discountApplicationId: ID!, $id: ID!) {
orderEditRemoveDiscount(discountApplicationId: $discountApplicationId, id: $id) {
calculatedOrder {
# CalculatedOrder fields
}
orderEditSession {
# OrderEditSession fields
}
userErrors {
field
message
}
}
}
Input
{
"discountApplicationId": "gid://shopify/<objectName>/10079785100",
"id": "gid://shopify/<objectName>/10079785100"
}
{
"discountApplicationId": "gid://shopify/<objectName>/10079785100",
"id": "gid://shopify/<objectName>/10079785100"
}