Anchor to subscriptionDraftDiscountRemovesubscription
subscriptionDraftDiscountRemove
mutation
Requires access scope. Also: The user must have manage_orders_information permission.
Removes a subscription discount from a subscription draft.
Anchor to Arguments
Arguments
- Anchor to discountIddiscount•
Id ID!required The gid of the subscription draft discount to remove.
- Anchor to draftIddraft•
Id ID!required The gid of the subscription contract draft to remove a subscription discount from.
Was this section helpful?
Anchor to SubscriptionDraftDiscountRemovePayload returnsSubscriptionDraftDiscountRemovePayload returns
- Anchor to discountRemoveddiscount•
Removed The removed subscription draft discount.
- Anchor to draftdraft•
The subscription contract draft object.
- Anchor to userErrorsuser•
Errors [SubscriptionDraft non-nullUser Error!]! The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
mutation subscriptionDraftDiscountRemove($discountId: ID!, $draftId: ID!) {
subscriptionDraftDiscountRemove(discountId: $discountId, draftId: $draftId) {
discountRemoved {
# SubscriptionDiscount fields
}
draft {
# SubscriptionDraft fields
}
userErrors {
field
message
}
}
}
Input
{
"discountId": "gid://shopify/<objectName>/10079785100",
"draftId": "gid://shopify/<objectName>/10079785100"
}
{
"discountId": "gid://shopify/<objectName>/10079785100",
"draftId": "gid://shopify/<objectName>/10079785100"
}