Create a new subscription group (selling plan group)
Creates a new subscription group with one or more selling plans in Shopify. A subscription group is a container for selling plans that can be applied to products and variants. Each group can contain multiple plans with different frequencies, discounts, and delivery schedules.
Key Features:
- Create multiple subscription plans within a single group
- Configure up to two discount levels, plus reward steps in appstleCycles
- Set up free trials with automatic discount transitions
- Define prepaid plans (PAY_AS_YOU_GO_PREPAID) with custom billing cycles
- Configure member-only plans with tag-based access control
- Set specific delivery dates (e.g., 15th of every month)
- Add all products from store or specific collection automatically
Discount Configuration:
- First discount tier: Applied from a specific cycle (afterCycle1)
- Second discount tier: Applied from another cycle (afterCycle2)
- Rewards: send appstleCycles with a plan to save its reward steps. A refused reward returns 400 with errorKey loyaltyRewardsNotIncluded or featureLocked, as described on the update call, and nothing is created
- Free trials: Automatically configure 100% discount for trial period
Response:
- The response has the new group’s id, but not its plans’ IDs or rewards. Read them with
GET /api/external/v2/subscription-groups/{id}
Product Assignment:
- Assign specific products via productIds field in request body
- Assign specific variants via variantIds field in request body
- Use isAddAllProduct=true to add all store products
- Use collectionId with isAddAllProduct=true to add all products from a collection
Authentication: Requires valid X-API-Key header
curl --request POST \
--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": "Loyalty Rewards Subscription",
"productIds": "[{\"id\":987654321}]",
"subscriptionPlans": [
{
"afterCycle1": 0,
"appstleCycles": [
{
"afterCycle": 6,
"discountType": "FREE_PRODUCT",
"freeVariantId": 42549172011164,
"preventDuplicationFreeProduct": true
},
{
"afterCycle": 12,
"discountType": "SHIPPING",
"repeatingCycle": true,
"repeatingNumberOfCycle": 3,
"value": 100
}
],
"discountEnabled": true,
"discountOffer": 10,
"discountType": "PERCENTAGE",
"frequencyCount": 1,
"frequencyDescription": "Earn rewards with every order",
"frequencyInterval": "MONTH",
"frequencyName": "Monthly with Rewards",
"planType": "PAY_AS_YOU_GO"
}
]
}
'{
"groupName": "Monthly Coffee Subscription",
"id": 123456789,
"productCount": null,
"productVariantCount": null,
"subscriptionPlans": [
{
"afterCycle1": 0,
"appstleCycles": [],
"billingFrequencyCount": 1,
"billingFrequencyInterval": "MONTH",
"defaultSelectedPlan": false,
"deliveryPolicyPreAnchorBehavior": "ASAP",
"discountEnabled": true,
"discountEnabled2": false,
"discountOffer": 10,
"discountType": "PERCENTAGE",
"freeTrialEnabled": false,
"frequencyCount": 1,
"frequencyDescription": "",
"frequencyInterval": "MONTH",
"frequencyName": "Monthly with Rewards",
"frequencySequence": 0,
"frequencyType": "ON_PURCHASE_DAY",
"id": null,
"idNew": null,
"inventoryPolicyReserve": "ON_SALE",
"planType": "PAY_AS_YOU_GO",
"repeatingCycle": false,
"specificDayEnabled": false
}
]
}Query Parameters
Add all products from the store or collection to this subscription group. When true without collectionId: adds all active products in the store. When true with collectionId: adds all products from the specified collection. This operation runs asynchronously and may take time for large catalogs.
Body
Complete subscription group configuration including name, plans, and product assignments
Response
Subscription group successfully created
curl --request POST \
--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": "Loyalty Rewards Subscription",
"productIds": "[{\"id\":987654321}]",
"subscriptionPlans": [
{
"afterCycle1": 0,
"appstleCycles": [
{
"afterCycle": 6,
"discountType": "FREE_PRODUCT",
"freeVariantId": 42549172011164,
"preventDuplicationFreeProduct": true
},
{
"afterCycle": 12,
"discountType": "SHIPPING",
"repeatingCycle": true,
"repeatingNumberOfCycle": 3,
"value": 100
}
],
"discountEnabled": true,
"discountOffer": 10,
"discountType": "PERCENTAGE",
"frequencyCount": 1,
"frequencyDescription": "Earn rewards with every order",
"frequencyInterval": "MONTH",
"frequencyName": "Monthly with Rewards",
"planType": "PAY_AS_YOU_GO"
}
]
}
'{
"groupName": "Monthly Coffee Subscription",
"id": 123456789,
"productCount": null,
"productVariantCount": null,
"subscriptionPlans": [
{
"afterCycle1": 0,
"appstleCycles": [],
"billingFrequencyCount": 1,
"billingFrequencyInterval": "MONTH",
"defaultSelectedPlan": false,
"deliveryPolicyPreAnchorBehavior": "ASAP",
"discountEnabled": true,
"discountEnabled2": false,
"discountOffer": 10,
"discountType": "PERCENTAGE",
"freeTrialEnabled": false,
"frequencyCount": 1,
"frequencyDescription": "",
"frequencyInterval": "MONTH",
"frequencyName": "Monthly with Rewards",
"frequencySequence": 0,
"frequencyType": "ON_PURCHASE_DAY",
"id": null,
"idNew": null,
"inventoryPolicyReserve": "ON_SALE",
"planType": "PAY_AS_YOU_GO",
"repeatingCycle": false,
"specificDayEnabled": false
}
]
}