# Update subscription group details and product assignments Updates an existing subscription group (selling plan group) including its name, selling plans configuration, and optionally manages product/variant assignments. This endpoint provides comprehensive update capabilities for both the subscription group structure and its product associations. Key Capabilities: - Update subscription group name - Modify existing selling plan configurations (discounts, frequencies, trials, etc.) - Add or remove products/variants through updateProducts and deleteProducts fields - Cannot add or remove selling plans - only modify existing ones - Automatically handles complex discount transitions for free trials and prepaid plans - Updates delivery profile associations if changed - Triggers asynchronous operations for metafield updates and free product checks Important Notes: - The 'id' field is required and must match an existing subscription group - For each selling plan in subscriptionPlans array, provide 'idNew' with the existing selling plan ID - Plan modifications maintain the same selling plan ID in Shopify - Product/variant updates are processed after group details are updated - Large product updates (allProduct=true) run asynchronously Selling Plan Updates: - Can change discount amounts, types, and cycles - Can modify billing/delivery frequencies - Can add/remove free trials - Can change member restrictions and tags - Can update specific day delivery settings - Can modify min/max cycles Authentication: Requires valid X-API-Key header Endpoint: PUT /api/external/v2/subscription-groups Version: 0.0.1 ## Header parameters: - `X-API-Key` (string, required) API Key for authentication Example: "sk_live_1234567890abcdef" ## Request fields (application/json): - `id` (integer) - `productCount` (integer) - `productVariantCount` (integer) - `subscriptionPlans` (array) - `subscriptionPlans.frequencyCount` (integer) - `subscriptionPlans.frequencyInterval` (string) Enum: "DAY", "WEEK", "MONTH", "YEAR" - `subscriptionPlans.billingFrequencyCount` (integer) - `subscriptionPlans.payAsYouGoPrepaidBillingFrequencyCount` (integer) - `subscriptionPlans.billingFrequencyInterval` (string) Enum: "DAY", "WEEK", "MONTH", "YEAR" - `subscriptionPlans.frequencyName` (string) - `subscriptionPlans.frequencyDescription` (string) - `subscriptionPlans.discountOffer` (number) - `subscriptionPlans.discountOffer2` (number) - `subscriptionPlans.afterCycle1` (integer) - `subscriptionPlans.afterCycle2` (integer) - `subscriptionPlans.discountType` (string) Enum: "PERCENTAGE", "FIXED", "PRICE" - `subscriptionPlans.discountType2` (string) Enum: "PERCENTAGE", "FIXED", "PRICE" - `subscriptionPlans.discountEnabled` (boolean) - `subscriptionPlans.discountEnabled2` (boolean) - `subscriptionPlans.discountEnabledMasked` (boolean) - `subscriptionPlans.discountEnabled2Masked` (boolean) - `subscriptionPlans.frequencyType` (string) Enum: "ON_PURCHASE_DAY", "ON_SPECIFIC_DAY" - `subscriptionPlans.specificDayValue` (integer) - `subscriptionPlans.specificMonthValue` (integer) - `subscriptionPlans.specificDayEnabled` (boolean) - `subscriptionPlans.maxCycles` (integer) - `subscriptionPlans.minCycles` (integer) - `subscriptionPlans.cutOff` (integer) - `subscriptionPlans.prepaidFlag` (string) - `subscriptionPlans.idNew` (string) - `subscriptionPlans.planType` (string) Enum: "PAY_AS_YOU_GO", "PREPAID", "ADVANCED_PREPAID", "PAY_AS_YOU_GO_PREPAID" - `subscriptionPlans.deliveryPolicyPreAnchorBehavior` (string) Enum: "ASAP", "NEXT", "$UNKNOWN" - `subscriptionPlans.freeTrialEnabled` (boolean) - `subscriptionPlans.freeTrialCount` (integer) - `subscriptionPlans.freeTrialInterval` (string) Enum: "DAY", "WEEK", "MONTH", "YEAR" - `subscriptionPlans.memberOnly` (boolean) - `subscriptionPlans.nonMemberOnly` (boolean) - `subscriptionPlans.memberInclusiveTags` (string) - `subscriptionPlans.memberExclusiveTags` (string) - `subscriptionPlans.formFieldJson` (string) - `subscriptionPlans.upcomingOrderEmailBuffer` (integer) - `subscriptionPlans.frequencySequence` (integer) - `subscriptionPlans.groupName` (string) - `subscriptionPlans.groupId` (integer) - `subscriptionPlans.repeatingCycle` (boolean) - `subscriptionPlans.repeatingNumberOfCycle` (integer) - `subscriptionPlans.keepOriginalNextBillingDateAfterTrial` (boolean) - `subscriptionPlans.defaultSelectedPlan` (boolean) - `subscriptionPlans.inventoryPolicyReserve` (string) Enum: "ON_FULFILLMENT", "ON_SALE", "$UNKNOWN" - `subscriptionPlans.appstleCycles` (array) - `subscriptionPlans.appstleCycles.afterCycle` (integer) The billing cycle number after which this pricing applies Example: 3 - `subscriptionPlans.appstleCycles.discountType` (string) Type of discount to apply in pricing cycles Enum: "PERCENTAGE", "FIXED", "PRICE", "SHIPPING", "FREE_PRODUCT", "PERCENTAGE", "FIXED", "PRICE", "SHIPPING", "FREE_PRODUCT" - `subscriptionPlans.appstleCycles.value` (number) Discount value. For PERCENTAGE: 0-100 (e.g., 10 for 10% off). For FIXED: amount to subtract from price. For PRICE: new fixed price. For SHIPPING: shipping discount amount. For FREE_PRODUCT: not used (set freeVariantId or freeProductHandle instead) Example: 10 - `subscriptionPlans.appstleCycles.freeVariantId` (integer) Variant ID of a free product to add when discountType is FREE_PRODUCT Example: 42549172011164 - `subscriptionPlans.appstleCycles.freeProductHandle` (string) Product handle of a free product to add when discountType is FREE_PRODUCT Example: "free-gift-product" - `subscriptionPlans.appstleCycles.repeatingCycle` (boolean) Whether this pricing should repeat for subsequent cycles Example: true - `subscriptionPlans.appstleCycles.repeatingNumberOfCycle` (integer) Number of cycles to repeat this pricing for when repeatingCycle is true Example: 6 - `subscriptionPlans.appstleCycles.preventDuplicationFreeProduct` (boolean) Prevent adding duplicate free products if already in cart Example: true - `productIds` (string) - `productId` (string) - `variantIds` (string) - `accessoryProductIds` (string) - `updateProducts` (object) - `updateProducts.allProduct` (boolean) - `updateProducts.collectionId` (string) - `updateProducts.deleteAllProduct` (boolean) - `updateProducts.productDetails` (string) - `updateProducts.variantDetails` (string) - `deleteProducts` (object) - `translations` (string) ## Response 200 fields (application/json): - `id` (integer) - `productCount` (integer) - `productVariantCount` (integer) - `subscriptionPlans` (array) - `subscriptionPlans.frequencyCount` (integer) - `subscriptionPlans.frequencyInterval` (string) Enum: "DAY", "WEEK", "MONTH", "YEAR" - `subscriptionPlans.billingFrequencyCount` (integer) - `subscriptionPlans.payAsYouGoPrepaidBillingFrequencyCount` (integer) - `subscriptionPlans.billingFrequencyInterval` (string) Enum: "DAY", "WEEK", "MONTH", "YEAR" - `subscriptionPlans.frequencyName` (string) - `subscriptionPlans.frequencyDescription` (string) - `subscriptionPlans.discountOffer` (number) - `subscriptionPlans.discountOffer2` (number) - `subscriptionPlans.afterCycle1` (integer) - `subscriptionPlans.afterCycle2` (integer) - `subscriptionPlans.discountType` (string) Enum: "PERCENTAGE", "FIXED", "PRICE" - `subscriptionPlans.discountType2` (string) Enum: "PERCENTAGE", "FIXED", "PRICE" - `subscriptionPlans.discountEnabled` (boolean) - `subscriptionPlans.discountEnabled2` (boolean) - `subscriptionPlans.discountEnabledMasked` (boolean) - `subscriptionPlans.discountEnabled2Masked` (boolean) - `subscriptionPlans.frequencyType` (string) Enum: "ON_PURCHASE_DAY", "ON_SPECIFIC_DAY" - `subscriptionPlans.specificDayValue` (integer) - `subscriptionPlans.specificMonthValue` (integer) - `subscriptionPlans.specificDayEnabled` (boolean) - `subscriptionPlans.maxCycles` (integer) - `subscriptionPlans.minCycles` (integer) - `subscriptionPlans.cutOff` (integer) - `subscriptionPlans.prepaidFlag` (string) - `subscriptionPlans.idNew` (string) - `subscriptionPlans.planType` (string) Enum: "PAY_AS_YOU_GO", "PREPAID", "ADVANCED_PREPAID", "PAY_AS_YOU_GO_PREPAID" - `subscriptionPlans.deliveryPolicyPreAnchorBehavior` (string) Enum: "ASAP", "NEXT", "$UNKNOWN" - `subscriptionPlans.freeTrialEnabled` (boolean) - `subscriptionPlans.freeTrialCount` (integer) - `subscriptionPlans.freeTrialInterval` (string) Enum: "DAY", "WEEK", "MONTH", "YEAR" - `subscriptionPlans.memberOnly` (boolean) - `subscriptionPlans.nonMemberOnly` (boolean) - `subscriptionPlans.memberInclusiveTags` (string) - `subscriptionPlans.memberExclusiveTags` (string) - `subscriptionPlans.formFieldJson` (string) - `subscriptionPlans.upcomingOrderEmailBuffer` (integer) - `subscriptionPlans.frequencySequence` (integer) - `subscriptionPlans.groupName` (string) - `subscriptionPlans.groupId` (integer) - `subscriptionPlans.repeatingCycle` (boolean) - `subscriptionPlans.repeatingNumberOfCycle` (integer) - `subscriptionPlans.keepOriginalNextBillingDateAfterTrial` (boolean) - `subscriptionPlans.defaultSelectedPlan` (boolean) - `subscriptionPlans.inventoryPolicyReserve` (string) Enum: "ON_FULFILLMENT", "ON_SALE", "$UNKNOWN" - `subscriptionPlans.appstleCycles` (array) - `subscriptionPlans.appstleCycles.afterCycle` (integer) The billing cycle number after which this pricing applies Example: 3 - `subscriptionPlans.appstleCycles.discountType` (string) Type of discount to apply in pricing cycles Enum: "PERCENTAGE", "FIXED", "PRICE", "SHIPPING", "FREE_PRODUCT", "PERCENTAGE", "FIXED", "PRICE", "SHIPPING", "FREE_PRODUCT" - `subscriptionPlans.appstleCycles.value` (number) Discount value. For PERCENTAGE: 0-100 (e.g., 10 for 10% off). For FIXED: amount to subtract from price. For PRICE: new fixed price. For SHIPPING: shipping discount amount. For FREE_PRODUCT: not used (set freeVariantId or freeProductHandle instead) Example: 10 - `subscriptionPlans.appstleCycles.freeVariantId` (integer) Variant ID of a free product to add when discountType is FREE_PRODUCT Example: 42549172011164 - `subscriptionPlans.appstleCycles.freeProductHandle` (string) Product handle of a free product to add when discountType is FREE_PRODUCT Example: "free-gift-product" - `subscriptionPlans.appstleCycles.repeatingCycle` (boolean) Whether this pricing should repeat for subsequent cycles Example: true - `subscriptionPlans.appstleCycles.repeatingNumberOfCycle` (integer) Number of cycles to repeat this pricing for when repeatingCycle is true Example: 6 - `subscriptionPlans.appstleCycles.preventDuplicationFreeProduct` (boolean) Prevent adding duplicate free products if already in cart Example: true - `productIds` (string) - `productId` (string) - `variantIds` (string) - `accessoryProductIds` (string) - `updateProducts` (object) - `updateProducts.allProduct` (boolean) - `updateProducts.collectionId` (string) - `updateProducts.deleteAllProduct` (boolean) - `updateProducts.productDetails` (string) - `updateProducts.variantDetails` (string) - `deleteProducts` (object) - `translations` (string) ## Response 401 fields (*/*): - `id` (integer) - `productCount` (integer) - `productVariantCount` (integer) - `subscriptionPlans` (array) - `subscriptionPlans.frequencyCount` (integer) - `subscriptionPlans.frequencyInterval` (string) Enum: "DAY", "WEEK", "MONTH", "YEAR" - `subscriptionPlans.billingFrequencyCount` (integer) - `subscriptionPlans.payAsYouGoPrepaidBillingFrequencyCount` (integer) - `subscriptionPlans.billingFrequencyInterval` (string) Enum: "DAY", "WEEK", "MONTH", "YEAR" - `subscriptionPlans.frequencyName` (string) - `subscriptionPlans.frequencyDescription` (string) - `subscriptionPlans.discountOffer` (number) - `subscriptionPlans.discountOffer2` (number) - `subscriptionPlans.afterCycle1` (integer) - `subscriptionPlans.afterCycle2` (integer) - `subscriptionPlans.discountType` (string) Enum: "PERCENTAGE", "FIXED", "PRICE" - `subscriptionPlans.discountType2` (string) Enum: "PERCENTAGE", "FIXED", "PRICE" - `subscriptionPlans.discountEnabled` (boolean) - `subscriptionPlans.discountEnabled2` (boolean) - `subscriptionPlans.discountEnabledMasked` (boolean) - `subscriptionPlans.discountEnabled2Masked` (boolean) - `subscriptionPlans.frequencyType` (string) Enum: "ON_PURCHASE_DAY", "ON_SPECIFIC_DAY" - `subscriptionPlans.specificDayValue` (integer) - `subscriptionPlans.specificMonthValue` (integer) - `subscriptionPlans.specificDayEnabled` (boolean) - `subscriptionPlans.maxCycles` (integer) - `subscriptionPlans.minCycles` (integer) - `subscriptionPlans.cutOff` (integer) - `subscriptionPlans.prepaidFlag` (string) - `subscriptionPlans.idNew` (string) - `subscriptionPlans.planType` (string) Enum: "PAY_AS_YOU_GO", "PREPAID", "ADVANCED_PREPAID", "PAY_AS_YOU_GO_PREPAID" - `subscriptionPlans.deliveryPolicyPreAnchorBehavior` (string) Enum: "ASAP", "NEXT", "$UNKNOWN" - `subscriptionPlans.freeTrialEnabled` (boolean) - `subscriptionPlans.freeTrialCount` (integer) - `subscriptionPlans.freeTrialInterval` (string) Enum: "DAY", "WEEK", "MONTH", "YEAR" - `subscriptionPlans.memberOnly` (boolean) - `subscriptionPlans.nonMemberOnly` (boolean) - `subscriptionPlans.memberInclusiveTags` (string) - `subscriptionPlans.memberExclusiveTags` (string) - `subscriptionPlans.formFieldJson` (string) - `subscriptionPlans.upcomingOrderEmailBuffer` (integer) - `subscriptionPlans.frequencySequence` (integer) - `subscriptionPlans.groupName` (string) - `subscriptionPlans.groupId` (integer) - `subscriptionPlans.repeatingCycle` (boolean) - `subscriptionPlans.repeatingNumberOfCycle` (integer) - `subscriptionPlans.keepOriginalNextBillingDateAfterTrial` (boolean) - `subscriptionPlans.defaultSelectedPlan` (boolean) - `subscriptionPlans.inventoryPolicyReserve` (string) Enum: "ON_FULFILLMENT", "ON_SALE", "$UNKNOWN" - `subscriptionPlans.appstleCycles` (array) - `subscriptionPlans.appstleCycles.afterCycle` (integer) The billing cycle number after which this pricing applies Example: 3 - `subscriptionPlans.appstleCycles.discountType` (string) Type of discount to apply in pricing cycles Enum: "PERCENTAGE", "FIXED", "PRICE", "SHIPPING", "FREE_PRODUCT", "PERCENTAGE", "FIXED", "PRICE", "SHIPPING", "FREE_PRODUCT" - `subscriptionPlans.appstleCycles.value` (number) Discount value. For PERCENTAGE: 0-100 (e.g., 10 for 10% off). For FIXED: amount to subtract from price. For PRICE: new fixed price. For SHIPPING: shipping discount amount. For FREE_PRODUCT: not used (set freeVariantId or freeProductHandle instead) Example: 10 - `subscriptionPlans.appstleCycles.freeVariantId` (integer) Variant ID of a free product to add when discountType is FREE_PRODUCT Example: 42549172011164 - `subscriptionPlans.appstleCycles.freeProductHandle` (string) Product handle of a free product to add when discountType is FREE_PRODUCT Example: "free-gift-product" - `subscriptionPlans.appstleCycles.repeatingCycle` (boolean) Whether this pricing should repeat for subsequent cycles Example: true - `subscriptionPlans.appstleCycles.repeatingNumberOfCycle` (integer) Number of cycles to repeat this pricing for when repeatingCycle is true Example: 6 - `subscriptionPlans.appstleCycles.preventDuplicationFreeProduct` (boolean) Prevent adding duplicate free products if already in cart Example: true - `productIds` (string) - `productId` (string) - `variantIds` (string) - `accessoryProductIds` (string) - `updateProducts` (object) - `updateProducts.allProduct` (boolean) - `updateProducts.collectionId` (string) - `updateProducts.deleteAllProduct` (boolean) - `updateProducts.productDetails` (string) - `updateProducts.variantDetails` (string) - `deleteProducts` (object) - `translations` (string) ## Response 403 fields (*/*): - `id` (integer) - `productCount` (integer) - `productVariantCount` (integer) - `subscriptionPlans` (array) - `subscriptionPlans.frequencyCount` (integer) - `subscriptionPlans.frequencyInterval` (string) Enum: "DAY", "WEEK", "MONTH", "YEAR" - `subscriptionPlans.billingFrequencyCount` (integer) - `subscriptionPlans.payAsYouGoPrepaidBillingFrequencyCount` (integer) - `subscriptionPlans.billingFrequencyInterval` (string) Enum: "DAY", "WEEK", "MONTH", "YEAR" - `subscriptionPlans.frequencyName` (string) - `subscriptionPlans.frequencyDescription` (string) - `subscriptionPlans.discountOffer` (number) - `subscriptionPlans.discountOffer2` (number) - `subscriptionPlans.afterCycle1` (integer) - `subscriptionPlans.afterCycle2` (integer) - `subscriptionPlans.discountType` (string) Enum: "PERCENTAGE", "FIXED", "PRICE" - `subscriptionPlans.discountType2` (string) Enum: "PERCENTAGE", "FIXED", "PRICE" - `subscriptionPlans.discountEnabled` (boolean) - `subscriptionPlans.discountEnabled2` (boolean) - `subscriptionPlans.discountEnabledMasked` (boolean) - `subscriptionPlans.discountEnabled2Masked` (boolean) - `subscriptionPlans.frequencyType` (string) Enum: "ON_PURCHASE_DAY", "ON_SPECIFIC_DAY" - `subscriptionPlans.specificDayValue` (integer) - `subscriptionPlans.specificMonthValue` (integer) - `subscriptionPlans.specificDayEnabled` (boolean) - `subscriptionPlans.maxCycles` (integer) - `subscriptionPlans.minCycles` (integer) - `subscriptionPlans.cutOff` (integer) - `subscriptionPlans.prepaidFlag` (string) - `subscriptionPlans.idNew` (string) - `subscriptionPlans.planType` (string) Enum: "PAY_AS_YOU_GO", "PREPAID", "ADVANCED_PREPAID", "PAY_AS_YOU_GO_PREPAID" - `subscriptionPlans.deliveryPolicyPreAnchorBehavior` (string) Enum: "ASAP", "NEXT", "$UNKNOWN" - `subscriptionPlans.freeTrialEnabled` (boolean) - `subscriptionPlans.freeTrialCount` (integer) - `subscriptionPlans.freeTrialInterval` (string) Enum: "DAY", "WEEK", "MONTH", "YEAR" - `subscriptionPlans.memberOnly` (boolean) - `subscriptionPlans.nonMemberOnly` (boolean) - `subscriptionPlans.memberInclusiveTags` (string) - `subscriptionPlans.memberExclusiveTags` (string) - `subscriptionPlans.formFieldJson` (string) - `subscriptionPlans.upcomingOrderEmailBuffer` (integer) - `subscriptionPlans.frequencySequence` (integer) - `subscriptionPlans.groupName` (string) - `subscriptionPlans.groupId` (integer) - `subscriptionPlans.repeatingCycle` (boolean) - `subscriptionPlans.repeatingNumberOfCycle` (integer) - `subscriptionPlans.keepOriginalNextBillingDateAfterTrial` (boolean) - `subscriptionPlans.defaultSelectedPlan` (boolean) - `subscriptionPlans.inventoryPolicyReserve` (string) Enum: "ON_FULFILLMENT", "ON_SALE", "$UNKNOWN" - `subscriptionPlans.appstleCycles` (array) - `subscriptionPlans.appstleCycles.afterCycle` (integer) The billing cycle number after which this pricing applies Example: 3 - `subscriptionPlans.appstleCycles.discountType` (string) Type of discount to apply in pricing cycles Enum: "PERCENTAGE", "FIXED", "PRICE", "SHIPPING", "FREE_PRODUCT", "PERCENTAGE", "FIXED", "PRICE", "SHIPPING", "FREE_PRODUCT" - `subscriptionPlans.appstleCycles.value` (number) Discount value. For PERCENTAGE: 0-100 (e.g., 10 for 10% off). For FIXED: amount to subtract from price. For PRICE: new fixed price. For SHIPPING: shipping discount amount. For FREE_PRODUCT: not used (set freeVariantId or freeProductHandle instead) Example: 10 - `subscriptionPlans.appstleCycles.freeVariantId` (integer) Variant ID of a free product to add when discountType is FREE_PRODUCT Example: 42549172011164 - `subscriptionPlans.appstleCycles.freeProductHandle` (string) Product handle of a free product to add when discountType is FREE_PRODUCT Example: "free-gift-product" - `subscriptionPlans.appstleCycles.repeatingCycle` (boolean) Whether this pricing should repeat for subsequent cycles Example: true - `subscriptionPlans.appstleCycles.repeatingNumberOfCycle` (integer) Number of cycles to repeat this pricing for when repeatingCycle is true Example: 6 - `subscriptionPlans.appstleCycles.preventDuplicationFreeProduct` (boolean) Prevent adding duplicate free products if already in cart Example: true - `productIds` (string) - `productId` (string) - `variantIds` (string) - `accessoryProductIds` (string) - `updateProducts` (object) - `updateProducts.allProduct` (boolean) - `updateProducts.collectionId` (string) - `updateProducts.deleteAllProduct` (boolean) - `updateProducts.productDetails` (string) - `updateProducts.variantDetails` (string) - `deleteProducts` (object) - `translations` (string) ## Response 400 fields ## Response 404 fields ## Response 422 fields