Skip to main content
POST
/
api
/
external
/
v2
/
subscription-groups
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": 5,
  "productIds": "[{\"id\":987654321,\"title\":\"Premium Coffee Blend\",\"status\":\"ACTIVE\"}]",
  "productVariantCount": 15,
  "subscriptionPlans": [
    {
      "afterCycle1": 0,
      "afterCycle2": 3,
      "billingFrequencyCount": 1,
      "billingFrequencyInterval": "MONTH",
      "discountEnabled": true,
      "discountEnabled2": true,
      "discountOffer": 10,
      "discountOffer2": 15,
      "discountType": "PERCENTAGE",
      "discountType2": "PERCENTAGE",
      "frequencyCount": 1,
      "frequencyDescription": "Get fresh coffee delivered to your door every month",
      "frequencyInterval": "MONTH",
      "frequencyName": "Delivered Monthly",
      "frequencySequence": 0,
      "id": "gid://shopify/SellingPlan/111111",
      "maxCycles": null,
      "minCycles": 3,
      "planType": "PAY_AS_YOU_GO"
    }
  ],
  "variantIds": "[]"
}

Headers

X-API-Key
string
required

API Key for authentication

Query Parameters

api_key
string

API Key (Deprecated - Use X-API-Key header instead)

isAddAllProduct
boolean
default:false

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.

collectionId
string
default:""

Shopify collection ID to limit product addition when isAddAllProduct is true. Format: numeric ID without gid prefix (e.g., '123456789' not 'gid://shopify/Collection/123456789')

Body

application/json

Complete subscription group configuration including name, plans, and product assignments

accessoryProductIds
string
deleteProducts
object
groupName
string
id
integer<int64>
productCount
integer<int64>
productId
string
productIds
string
productVariantCount
integer<int64>
subscriptionPlans
object[]
translations
string
updateProducts
object
variantIds
string

Response

Subscription group successfully created

accessoryProductIds
string
deleteProducts
object
groupName
string
id
integer<int64>
productCount
integer<int64>
productId
string
productIds
string
productVariantCount
integer<int64>
subscriptionPlans
object[]
translations
string
updateProducts
object
variantIds
string