Anchor to subscriptionDraftLineUpdatesubscription
subscriptionDraftLineUpdate
mutation
Requires access scope. Also: The user must have manage_orders_information permission.
Updates a subscription line on a subscription draft.
Anchor to Arguments
Arguments
- Anchor to draftIddraft•
Id ID!required The gid of the Subscription Contract draft to update a subscription line from.
- Anchor to inputinput•Subscription
Line requiredUpdate Input! The properties of the new Subscription Line.
- Anchor to lineIdline•
Id ID!required The gid of the Subscription Line to update.
Was this section helpful?
Anchor to SubscriptionDraftLineUpdatePayload returnsSubscriptionDraftLineUpdatePayload returns
- Anchor to draftdraft•
The Subscription Contract draft object.
- Anchor to lineUpdatedline•
Updated The updated 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
1mutation subscriptionDraftLineUpdate($draftId: ID!, $input: SubscriptionLineUpdateInput!, $lineId: ID!) {2 subscriptionDraftLineUpdate(draftId: $draftId, input: $input, lineId: $lineId) {3 draft {4 # SubscriptionDraft fields5 }6 lineUpdated {7 # SubscriptionLine fields8 }9 userErrors {10 field11 message12 }13 }14}
Input
1{2 "draftId": "gid://shopify/<objectName>/10079785100",3 "input": {4 "currentPrice": "29.99",5 "customAttributes": [6 {7 "key": "<your-key>",8 "value": "<your-value>"9 }10 ],11 "pricingPolicy": {12 "basePrice": "29.99",13 "cycleDiscounts": [14 ""15 ]16 },17 "productVariantId": "gid://shopify/<objectName>/10079785100",18 "quantity": 1,19 "sellingPlanId": "gid://shopify/<objectName>/10079785100",20 "sellingPlanName": "<your-sellingPlanName>"21 },22 "lineId": "gid://shopify/<objectName>/10079785100"23}
{
"draftId": "gid://shopify/<objectName>/10079785100",
"input": {
"currentPrice": "29.99",
"customAttributes": [
{
"key": "<your-key>",
"value": "<your-value>"
}
],
"pricingPolicy": {
"basePrice": "29.99",
"cycleDiscounts": [
""
]
},
"productVariantId": "gid://shopify/<objectName>/10079785100",
"quantity": 1,
"sellingPlanId": "gid://shopify/<objectName>/10079785100",
"sellingPlanName": "<your-sellingPlanName>"
},
"lineId": "gid://shopify/<objectName>/10079785100"
}
input SubscriptionLineUpdateInput {
currentPrice: Decimal
customAttributes: [AttributeInput!]
pricingPolicy: SubscriptionPricingPolicyInput
productVariantId: ID
quantity: Int
sellingPlanId: ID
sellingPlanName: String
}
input AttributeInput {
key: String!
value: String!
}
input SubscriptionPricingPolicyInput {
basePrice: Decimal!
cycleDiscounts: [SubscriptionPricingPolicyCycleDiscountsInput!]!
}