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
mutation subscriptionDraftLineUpdate($draftId: ID!, $input: SubscriptionLineUpdateInput!, $lineId: ID!) {
subscriptionDraftLineUpdate(draftId: $draftId, input: $input, lineId: $lineId) {
draft {
# SubscriptionDraft fields
}
lineUpdated {
# SubscriptionLine fields
}
userErrors {
field
message
}
}
}
Input
{
"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"
}
{
"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!]!
}