Subscription Plans
Bulk add products or variants to an existing subscription group
Adds multiple products and/or product variants to an existing subscription group (selling plan group) using a JSON request body. This endpoint is ideal for adding large numbers of products/variants that would exceed URL length limits in the query parameter version.
Advantages over query parameter endpoint:
- No URL length restrictions
- Cleaner syntax for large lists
- Better for programmatic integrations
- Supports the same functionality with improved scalability
Behavior:
- Identical to the query parameter endpoint in functionality
- Adds products/variants to existing assignments
- Preserves product order
- Updates synchronously and returns the updated group — for very large batches (thousands of IDs) that risk request/gateway timeouts, use the async v3 endpoint (POST /api/external/v2/subscription-groups/v3//add-products) instead
Authentication: Requires valid X-API-Key header
POST
/
api
/
external
/
v2
/
subscription-groups
/
{id}
/
bulk-add-products
curl --request POST \
--url https://subscription-admin.appstle.com/api/external/v2/subscription-groups/{id}/bulk-add-products \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"productIds": [
987654321,
987654322,
987654323
],
"variantIds": [
123456789,
123456790,
123456791
]
}
'{}{}{}{}{}{}Headers
API Key for authentication
Path Parameters
Subscription group ID (numeric ID)
Query Parameters
API Key (Deprecated - Use X-API-Key header instead)
Body
application/json
Product and variant IDs to add to the subscription group
Response
Products/variants successfully added
The response is of type object.
⌘I
curl --request POST \
--url https://subscription-admin.appstle.com/api/external/v2/subscription-groups/{id}/bulk-add-products \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"productIds": [
987654321,
987654322,
987654323
],
"variantIds": [
123456789,
123456790,
123456791
]
}
'{}{}{}{}{}{}