Subscription Plans
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
PUT
/
api
/
external
/
v2
/
subscription-groups
curl --request PUT \
--url https://subscription-admin.appstle.com/api/external/v2/subscription-groups \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"groupName": "Coffee Collection Subscription",
"id": 123456789,
"subscriptionPlans": [
{
"afterCycle1": 0,
"discountEnabled": true,
"discountOffer": 15,
"discountType": "PERCENTAGE",
"frequencyCount": 1,
"frequencyDescription": "All coffee products eligible",
"frequencyInterval": "MONTH",
"frequencyName": "Monthly Coffee Box",
"idNew": "gid://shopify/SellingPlan/111111",
"planType": "PAY_AS_YOU_GO"
}
],
"updateProducts": {
"allProduct": true,
"collectionId": "987654321"
}
}
'{
"groupName": "Updated Monthly Coffee Subscription",
"id": 123456789,
"productCount": 8,
"productIds": "[{\"id\":987654321,\"title\":\"Premium Coffee Blend\",\"status\":\"ACTIVE\"}]",
"productVariantCount": 24,
"subscriptionPlans": [
{
"afterCycle1": 0,
"afterCycle2": 6,
"billingFrequencyCount": 1,
"billingFrequencyInterval": "MONTH",
"discountEnabled": true,
"discountEnabled2": true,
"discountOffer": 15,
"discountOffer2": 20,
"discountType": "PERCENTAGE",
"discountType2": "PERCENTAGE",
"frequencyCount": 1,
"frequencyDescription": "Fresh coffee delivered monthly with new pricing",
"frequencyInterval": "MONTH",
"frequencyName": "Updated Monthly Delivery",
"id": "gid://shopify/SellingPlan/111111",
"idNew": "gid://shopify/SellingPlan/111111",
"maxCycles": 24,
"minCycles": 3,
"planType": "PAY_AS_YOU_GO"
}
],
"variantIds": "[{\"id\":123456789,\"title\":\"250g Bag\",\"status\":\"ACTIVE\"}]"
}Headers
API Key for authentication
Body
application/json
Complete subscription group update request including group details, selling plans, and optional product management
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Subscription group successfully updated
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
curl --request PUT \
--url https://subscription-admin.appstle.com/api/external/v2/subscription-groups \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"groupName": "Coffee Collection Subscription",
"id": 123456789,
"subscriptionPlans": [
{
"afterCycle1": 0,
"discountEnabled": true,
"discountOffer": 15,
"discountType": "PERCENTAGE",
"frequencyCount": 1,
"frequencyDescription": "All coffee products eligible",
"frequencyInterval": "MONTH",
"frequencyName": "Monthly Coffee Box",
"idNew": "gid://shopify/SellingPlan/111111",
"planType": "PAY_AS_YOU_GO"
}
],
"updateProducts": {
"allProduct": true,
"collectionId": "987654321"
}
}
'{
"groupName": "Updated Monthly Coffee Subscription",
"id": 123456789,
"productCount": 8,
"productIds": "[{\"id\":987654321,\"title\":\"Premium Coffee Blend\",\"status\":\"ACTIVE\"}]",
"productVariantCount": 24,
"subscriptionPlans": [
{
"afterCycle1": 0,
"afterCycle2": 6,
"billingFrequencyCount": 1,
"billingFrequencyInterval": "MONTH",
"discountEnabled": true,
"discountEnabled2": true,
"discountOffer": 15,
"discountOffer2": 20,
"discountType": "PERCENTAGE",
"discountType2": "PERCENTAGE",
"frequencyCount": 1,
"frequencyDescription": "Fresh coffee delivered monthly with new pricing",
"frequencyInterval": "MONTH",
"frequencyName": "Updated Monthly Delivery",
"id": "gid://shopify/SellingPlan/111111",
"idNew": "gid://shopify/SellingPlan/111111",
"maxCycles": 24,
"minCycles": 3,
"planType": "PAY_AS_YOU_GO"
}
],
"variantIds": "[{\"id\":123456789,\"title\":\"250g Bag\",\"status\":\"ACTIVE\"}]"
}