subscriptionDraftLineRemove mutation
Removes a subscription line from a subscription draft.
Required access
write_own_subscription_contracts
access scope.
On this page
Interactive example
This is an example mutation query. Use the embedded interactive tool below to edit the query.
Hint: use Ctrl + Space for autocompleting fields.
mutation subscriptionDraftLineRemove($draftId: ID!, $lineId: ID!) { subscriptionDraftLineRemove(draftId: $draftId, lineId: $lineId) {} } { “draftId”: “Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE=”, “lineId”: “Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE=” }
<font style="color:#1F61A0;">discountsUpdated</font> <font style="color:#555555;">{</font>
<font style="color:#1F61A0;">id</font>
<font style="color:#555555;">}</font>
<font style="color:#1F61A0;">draft</font> <font style="color:#555555;">{</font>
<font style="color:#1F61A0;">id</font>
<font style="color:#555555;">}</font>
<font style="color:#1F61A0;">lineRemoved</font> <font style="color:#555555;">{</font>
<font style="color:#1F61A0;">id</font>
<font style="color:#555555;">}</font>
<font style="color:#1F61A0;">userErrors</font> <font style="color:#555555;">{</font>
<font style="color:#1F61A0;">code</font>
<font style="color:#1F61A0;">field</font>
<font style="color:#1F61A0;">message</font>
<font style="color:#555555;">}</font>
Arguments
Return fields
- discountsUpdated (
[[SubscriptionManualDiscount!]](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptionmanualdiscount)
)
The list of updated subscription discounts impacted by the removed line. - draft (
[SubscriptionDraft](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptiondraft)
)
The Subscription Contract draft object. - lineRemoved (
[SubscriptionLine](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptionline)
)
The removed Subscription Line. - userErrors (
[[SubscriptionDraftUserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptiondraftusererror)
)
List of errors that occurred executing the mutation.