selling Plan Group Updatemutation
mutation
2024-04
Requires
write_products
access scope as well as any of write_own_subscription_contracts
, write_purchase_options
access scopes. Also: The user must have manage_orders_information
permissions.
Update a Selling Plan Group.
Arguments
The Selling Plan Group to update.
The properties of the Selling Plan Group to update.
Was this section helpful?
SellingPlanGroupUpdatePayload returns
Anchor to SellingPlanGroupUpdatePayload.deletedSellingPlanIdsdeletedSelling Plan Ids The IDs of the deleted Subscription Plans.
The updated Selling Plan Group.
The list of errors that occurred from executing the mutation.
Was this section helpful?
Hide code
Mutation reference
Copy
mutation sellingPlanGroupUpdate($id: ID!, $input: SellingPlanGroupInput!) { sellingPlanGroupUpdate(id: $id, input: $input) { deletedSellingPlanIds sellingPlanGroup { # SellingPlanGroup fields } userErrors { field message } } }
Hide code
Input
Copy
{ "id": "gid://shopify/<objectName>/10079785100", "input": { "appId": "<your-appId>", "description": "<your-description>", "merchantCode": "<your-merchantCode>", "name": "<your-name>", "options": [ "<your-options>" ], "position": 1, "sellingPlansToCreate": [ { "billingPolicy": { "fixed": { "checkoutCharge": { "type": "PERCENTAGE", "value": { "fixedValue": "29.99", "percentage": 1.1 } }, "remainingBalanceChargeExactTime": "2019-09-07T15:50:00Z", "remainingBalanceChargeTimeAfterCheckout": "<your-remainingBalanceChargeTimeAfterCheckout>", "remainingBalanceChargeTrigger": "EXACT_TIME" }, "recurring": { "anchors": [ { "cutoffDay": 1, "day": 1, "month": 1, "type": "MONTHDAY" } ], "interval": "DAY", "intervalCount": 1, "maxCycles": 1, "minCycles": 1 } }, "category": "OTHER", "deliveryPolicy": { "fixed": { "anchors": [ { "cutoffDay": 1, "day": 1, "month": 1, "type": "MONTHDAY" } ], "cutoff": 1, "fulfillmentExactTime": "2019-09-07T15:50:00Z", "fulfillmentTrigger": "ANCHOR", "intent": "FULFILLMENT_BEGIN", "preAnchorBehavior": "ASAP" }, "recurring": { "anchors": [ { "cutoffDay": 1, "day": 1, "month": 1, "type": "MONTHDAY" } ], "cutoff": 1, "intent": "FULFILLMENT_BEGIN", "interval": "DAY", "intervalCount": 1, "preAnchorBehavior": "ASAP" } }, "description": "<your-description>", "id": "gid://shopify/<objectName>/10079785100", "inventoryPolicy": { "reserve": "ON_FULFILLMENT" }, "name": "<your-name>", "options": [ "<your-options>" ], "position": 1, "pricingPolicies": [ { "fixed": { "adjustmentType": "FIXED_AMOUNT", "adjustmentValue": { "fixedValue": "29.99", "percentage": 1.1 }, "id": "gid://shopify/<objectName>/10079785100" }, "recurring": { "adjustmentType": "FIXED_AMOUNT", "adjustmentValue": { "fixedValue": "29.99", "percentage": 1.1 }, "afterCycle": 1, "id": "gid://shopify/<objectName>/10079785100" } } ] } ], "sellingPlansToDelete": [ "gid://shopify/<objectName>/10079785100" ], "sellingPlansToUpdate": [ { "billingPolicy": { "fixed": { "checkoutCharge": { "type": "PERCENTAGE", "value": { "fixedValue": "29.99", "percentage": 1.1 } }, "remainingBalanceChargeExactTime": "2019-09-07T15:50:00Z", "remainingBalanceChargeTimeAfterCheckout": "<your-remainingBalanceChargeTimeAfterCheckout>", "remainingBalanceChargeTrigger": "EXACT_TIME" }, "recurring": { "anchors": [ { "cutoffDay": 1, "day": 1, "month": 1, "type": "MONTHDAY" } ], "interval": "DAY", "intervalCount": 1, "maxCycles": 1, "minCycles": 1 } }, "category": "OTHER", "deliveryPolicy": { "fixed": { "anchors": [ { "cutoffDay": 1, "day": 1, "month": 1, "type": "MONTHDAY" } ], "cutoff": 1, "fulfillmentExactTime": "2019-09-07T15:50:00Z", "fulfillmentTrigger": "ANCHOR", "intent": "FULFILLMENT_BEGIN", "preAnchorBehavior": "ASAP" }, "recurring": { "anchors": [ { "cutoffDay": 1, "day": 1, "month": 1, "type": "MONTHDAY" } ], "cutoff": 1, "intent": "FULFILLMENT_BEGIN", "interval": "DAY", "intervalCount": 1, "preAnchorBehavior": "ASAP" } }, "description": "<your-description>", "id": "gid://shopify/<objectName>/10079785100", "inventoryPolicy": { "reserve": "ON_FULFILLMENT" }, "name": "<your-name>", "options": [ "<your-options>" ], "position": 1, "pricingPolicies": [ { "fixed": { "adjustmentType": "FIXED_AMOUNT", "adjustmentValue": { "fixedValue": "29.99", "percentage": 1.1 }, "id": "gid://shopify/<objectName>/10079785100" }, "recurring": { "adjustmentType": "FIXED_AMOUNT", "adjustmentValue": { "fixedValue": "29.99", "percentage": 1.1 }, "afterCycle": 1, "id": "gid://shopify/<objectName>/10079785100" } } ] } ] } }
input SellingPlanGroupInput { appId: String description: String merchantCode: String name: String options: [String!] position: Int sellingPlansToCreate: [SellingPlanInput!] sellingPlansToDelete: [ID!] sellingPlansToUpdate: [SellingPlanInput!] } input SellingPlanInput { billingPolicy: SellingPlanBillingPolicyInput category: SellingPlanCategory deliveryPolicy: SellingPlanDeliveryPolicyInput description: String id: ID inventoryPolicy: SellingPlanInventoryPolicyInput name: String options: [String!] position: Int pricingPolicies: [SellingPlanPricingPolicyInput!] }