Anchor to subscriptionDraftLineRemovesubscription
subscriptionDraftLineRemove
mutation
Requires access scope. Also: The user must have manage_orders_information permission.
Removes a subscription line from a subscription draft.
Anchor to Arguments
Arguments
- Anchor to draftIddraft•
Id ID!required The gid of the Subscription Contract draft to remove a subscription line from.
- Anchor to lineIdline•
Id ID!required The gid of the Subscription Line to remove.
Was this section helpful?
Anchor to SubscriptionDraftLineRemovePayload returnsSubscriptionDraftLineRemovePayload returns
- Anchor to discountsUpdateddiscounts•
Updated The list of updated subscription discounts impacted by the removed line.
- Anchor to draftdraft•
The Subscription Contract draft object.
- Anchor to lineRemovedline•
Removed The removed Subscription Line.
- 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 subscriptionDraftLineRemove($draftId: ID!, $lineId: ID!) {
subscriptionDraftLineRemove(draftId: $draftId, lineId: $lineId) {
discountsUpdated {
# SubscriptionManualDiscount fields
}
draft {
# SubscriptionDraft fields
}
lineRemoved {
# SubscriptionLine fields
}
userErrors {
field
message
}
}
}
Input
{
"draftId": "gid://shopify/<objectName>/10079785100",
"lineId": "gid://shopify/<objectName>/10079785100"
}
{
"draftId": "gid://shopify/<objectName>/10079785100",
"lineId": "gid://shopify/<objectName>/10079785100"
}