Skip to main content
PUT
/
api
/
external
/
v2
/
subscription-groups
/
{id}
/
add-products
Add products or variants to an existing subscription group
curl --request PUT \
  --url https://subscription-admin.appstle.com/api/external/v2/subscription-groups/{id}/add-products \
  --header 'X-API-Key: <x-api-key>'
{
  "id": 123456789,
  "groupName": "Monthly Coffee Subscription",
  "productCount": 10,
  "productVariantCount": 35,
  "productIds": "[{\"id\":987654321,\"title\":\"Premium Coffee Blend\"},{\"id\":987654322,\"title\":\"Organic Dark Roast\"},{\"id\":987654323,\"title\":\"Colombian Single Origin\"}]",
  "variantIds": "[{\"id\":123456789,\"title\":\"250g Bag\"},{\"id\":123456790,\"title\":\"500g Bag\"}]",
  "subscriptionPlans": [
    {
      "id": "gid://shopify/SellingPlan/111111",
      "frequencyName": "Delivered Monthly",
      "frequencyDescription": "Get fresh coffee delivered to your door every month",
      "frequencyCount": 1,
      "frequencyInterval": "MONTH",
      "discountEnabled": true,
      "discountType": "PERCENTAGE",
      "discountOffer": 10,
      "planType": "PAY_AS_YOU_GO"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://developers.appstle.com/llms.txt

Use this file to discover all available pages before exploring further.

Headers

X-API-Key
string
required

API Key for authentication

x-return-short-response
boolean
default:false

Header to indicate if response should return only added products ID information. Set to 'true' for minimal response, any other value or omitted for full response.

Path Parameters

id
integer<int64>
required

Subscription group ID (numeric ID)

Query Parameters

api_key
string

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

productIds
string

Comma-separated list of Shopify product IDs to add. Adding a product makes all its variants eligible for subscription. Use numeric IDs only (e.g., '987654321,987654322,987654323')

Pattern: ^\d+(,\d+)*$
variantIds
string

Comma-separated list of Shopify variant IDs to add. Use this to enable subscription for specific variants only. Use numeric IDs only (e.g., '123456789,123456790,123456791')

Pattern: ^\d+(,\d+)*$

Response

Products successfully added to subscription group

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