orderEditUpdateDiscount
Requires access scope. Also: The user must have apply_discounts_to_orders permission.
Updates a manual line level 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.
Arguments
- Anchor to discountdiscount•Order
Edit requiredApplied Discount Input! The updated discount.
- Anchor to discountApplicationIddiscount•
Application Id ID!required The ID of the calculated discount application to update.
- •ID!required
The ID of the calculated order or the order edit session to edit. This is the edit used to update the discount.
Anchor to OrderEditUpdateDiscountPayload returnsOrderEditUpdateDiscountPayload 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.
Mutation Reference
Input
{
"discount": {
"description": "<your-description>",
"fixedValue": {
"amount": "29.99",
"currencyCode": ""
},
"percentValue": 1.1
},
"discountApplicationId": "gid://shopify/<objectName>/10079785100",
"id": "gid://shopify/<objectName>/10079785100"
}
input OrderEditAppliedDiscountInput {
description: String
fixedValue: MoneyInput
percentValue: Float
}
input MoneyInput {
amount: Decimal!
currencyCode: CurrencyCode!
}