Anchor to subscriptionDraftUpdatesubscription
subscriptionDraftUpdate
mutation
Requires access scope. Also: The user must have manage_orders_information permission.
Updates a Subscription Draft.
Anchor to Arguments
Arguments
- Anchor to draftIddraft•
Id ID!required The gid of the Subscription Draft to update.
- Anchor to inputinput•Subscription
Draft requiredInput! The properties of the new Subscription Contract.
Was this section helpful?
Anchor to SubscriptionDraftUpdatePayload returnsSubscriptionDraftUpdatePayload returns
- Anchor to draftdraft•
The Subscription 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 subscriptionDraftUpdate($draftId: ID!, $input: SubscriptionDraftInput!) {
subscriptionDraftUpdate(draftId: $draftId, input: $input) {
draft {
# SubscriptionDraft fields
}
userErrors {
field
message
}
}
}
Input
{
"draftId": "gid://shopify/<objectName>/10079785100",
"input": {
"billingPolicy": {
"anchors": [
""
],
"interval": "",
"intervalCount": 1,
"maxCycles": 1,
"minCycles": 1
},
"customAttributes": [
{
"key": "<your-key>",
"value": "<your-value>"
}
],
"deliveryMethod": {
"localDelivery": "",
"pickup": "",
"shipping": ""
},
"deliveryPolicy": {
"anchors": [
""
],
"interval": "",
"intervalCount": 1
},
"deliveryPrice": "29.99",
"nextBillingDate": "2019-09-07T15:50:00Z",
{
"draftId": "gid://shopify/<objectName>/10079785100",
"input": {
"billingPolicy": {
"anchors": [
""
],
"interval": "",
"intervalCount": 1,
"maxCycles": 1,
"minCycles": 1
},
"customAttributes": [
{
"key": "<your-key>",
"value": "<your-value>"
}
],
"deliveryMethod": {
"localDelivery": "",
"pickup": "",
"shipping": ""
},
"deliveryPolicy": {
"anchors": [
""
],
"interval": "",
"intervalCount": 1
},
"deliveryPrice": "29.99",
"nextBillingDate": "2019-09-07T15:50:00Z",
"note": "<your-note>",
"paymentMethodId": "gid://shopify/<objectName>/10079785100",
"status": ""
}
}
input SubscriptionDraftInput {
billingPolicy: SubscriptionBillingPolicyInput
customAttributes: [AttributeInput!]
deliveryMethod: SubscriptionDeliveryMethodInput
deliveryPolicy: SubscriptionDeliveryPolicyInput
deliveryPrice: Decimal
nextBillingDate: DateTime
note: String
paymentMethodId: ID
status: SubscriptionContractSubscriptionStatus
}
input SubscriptionBillingPolicyInput {
anchors: [SellingPlanAnchorInput!]
interval: SellingPlanInterval!
intervalCount: Int!
maxCycles: Int
minCycles: Int
}
input AttributeInput {
key: String!
value: String!
}
input SubscriptionDeliveryMethodInput {
localDelivery: SubscriptionDeliveryMethodLocalDeliveryInput
pickup: SubscriptionDeliveryMethodPickupInput
shipping: SubscriptionDeliveryMethodShippingInput
}
input SubscriptionDeliveryPolicyInput {
anchors: [SellingPlanAnchorInput!]
interval: SellingPlanInterval!
intervalCount: Int!
}