# Remove products or variants from a subscription group Removes specified products and/or variants from an existing subscription group (selling plan group). This endpoint allows selective removal of products without affecting the group's configuration or other product assignments. Key Features: - Remove multiple products and variants in a single request - Remove all products from a specific collection - Silently ignores products/variants not currently in the group - Preserves subscription group configuration and settings - Updates synchronously and returns the modified group Collection Removal: - When collectionId is provided, fetches and removes all products from that collection - Collection processing is limited to 5000 products maximum - Collection removal is additive to any explicitly specified productIds/variantIds Important Notes: - Removing products does NOT affect existing active subscriptions - Can remove all products, leaving an empty subscription group - Products/variants not in the group are silently ignored - Use numeric IDs without gid:// prefix for products and variants Authentication: Requires valid X-API-Key header Endpoint: PUT /api/external/v2/subscription-groups/{id}/remove-products Version: 0.0.1 ## Path parameters: - `id` (integer, required) Subscription group ID (numeric ID) Example: 123456789 ## Query parameters: - `productIds` (string) Comma-separated list of product IDs to remove. Use numeric IDs without gid:// prefix. Example: "987654321,987654322" - `variantIds` (string) Comma-separated list of variant IDs to remove. Use numeric IDs without gid:// prefix. Example: "123456789,123456790" - `collectionId` (integer) Shopify collection ID. When provided, removes all products from this collection (up to 5000 products). This is in addition to any explicitly specified productIds/variantIds. Example: 287654321 - `deleteAllProductsAndVariants` (boolean) Set to true to delete all products and their variants. Defaults to false. - `api_key` (string) API Key (Deprecated - Use X-API-Key header instead) ## Header parameters: - `X-API-Key` (string, required) API Key for authentication Example: "sk_live_1234567890abcdef" ## 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 404 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