> ## 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.

# 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

**Authentication:** Requires valid X-API-Key header



## OpenAPI

````yaml /subscription/admin-api-swagger.json post /api/external/v2/subscription-groups/{id}/bulk-add-products
openapi: 3.0.1
info:
  description: >-
    Comprehensive API documentation for managing subscriptions, payments, and
    related operations. These APIs allow you to programmatically manage
    subscription lifecycles, handle payments, configure products, and integrate
    subscription functionality into your applications.
  title: Admin APIs
  version: 0.0.1
servers:
  - url: https://subscription-admin.appstle.com
security: []
tags:
  - description: >-
      Core APIs for managing the complete subscription lifecycle including
      creation, updates, pausing, resuming, and cancellation of subscriptions.
    name: Subscription Management
  - description: >-
      APIs for managing subscription payment methods, processing payments,
      handling payment retries, and updating billing information.
    name: Subscription Payments
  - description: >-
      APIs for managing subscription contracts including delivery schedules,
      pricing, order notes, billing cycles, and shipping addresses.
    name: Subscription Contracts
  - description: >-
      APIs for managing products within subscriptions including adding,
      removing, updating quantities, and swapping products.
    name: Subscription Products
  - description: >-
      APIs for handling billing operations, payment processing, and financial
      transactions related to subscriptions.
    name: Billing & Payments
  - description: >-
      APIs for managing discounts and promotional codes applied to
      subscriptions.
    name: Subscription Discounts
  - description: >-
      APIs for managing one-time add-on products that can be purchased alongside
      recurring subscription items.
    name: Subscription One-Time Products
  - description: >-
      APIs for managing subscription plans, pricing tiers, and plan
      configurations.
    name: Subscription Plans
  - description: >-
      APIs for managing customizable product boxes and bundles where customers
      can select multiple items.
    name: Build-a-Box & Bundles
  - description: >-
      APIs for managing the product catalog including product information,
      variants, and inventory.
    name: Product Catalog
  - description: >-
      APIs for managing operational settings, configurations, and administrative
      functions.
    name: Operations & Settings
  - description: >-
      APIs powering the customer-facing portal where subscribers can manage
      their own subscriptions.
    name: Customer Portal
  - description: APIs for managing customer information, profiles, and account details.
    name: Customers
  - description: >-
      APIs for retrieving aggregated subscription data, customer subscription
      history, and account-level subscription information.
    name: Subscription Data
  - description: >-
      APIs for managing delivery profiles, shipping rates, free shipping
      configuration, and delivery method options on subscriptions.
    name: Delivery & Shipping
  - description: >-
      APIs for managing storefront customization including custom CSS, theme
      settings, label translations, and merchant-defined widget configuration.
    name: Customization
  - description: >-
      APIs for configuring cancellation flows, retention offers, cancellation
      reason management, and win-back automation.
    name: Customer Retention
paths:
  /api/external/v2/subscription-groups/{id}/bulk-add-products:
    post:
      tags:
        - Subscription Plans
      summary: Bulk add products or variants to an existing subscription group
      description: >-
        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


        **Authentication:** Requires valid X-API-Key header
      operationId: bulkAddProductsOrVariants
      parameters:
        - description: Subscription group ID (numeric ID)
          example: 123456789
          in: path
          name: id
          required: true
          schema:
            format: int64
            type: integer
        - deprecated: true
          description: API Key (Deprecated - Use X-API-Key header instead)
          in: query
          name: api_key
          required: false
          schema:
            type: string
        - description: API Key for authentication
          example: sk_live_1234567890abcdef
          in: header
          name: X-API-Key
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            examples:
              Add Both Products and Variants:
                description: Add Both Products and Variants
                value:
                  productIds:
                    - 987654321
                    - 987654322
                    - 987654323
                  variantIds:
                    - 123456789
                    - 123456790
                    - 123456791
              Add Multiple Products:
                description: Add Multiple Products
                value:
                  productIds:
                    - 987654321
                    - 987654322
                    - 987654323
                    - 987654324
                    - 987654325
                  variantIds: []
              Add Specific Variants:
                description: Add Specific Variants
                value:
                  productIds: []
                  variantIds:
                    - 123456789
                    - 123456790
                    - 123456791
                    - 123456792
              Large Bulk Addition:
                description: Large Bulk Addition
                value:
                  productIds:
                    - 987654321
                    - 987654322
                    - 987654323
                    - 987654324
                    - 987654325
                    - 987654326
                    - 987654327
                    - 987654328
                    - 987654329
                    - 987654330
                    - 987654331
                    - 987654332
                    - 987654333
                    - 987654334
                    - 987654335
                    - 987654336
                    - 987654337
                    - 987654338
                    - 987654339
                    - 987654340
                  variantIds:
                    - 123456789
                    - 123456790
                    - 123456791
                    - 123456792
                    - 123456793
                    - 123456794
                    - 123456795
                    - 123456796
                    - 123456797
                    - 123456798
            schema:
              $ref: '#/components/schemas/BulkAddProductsRequest'
        description: Product and variant IDs to add to the subscription group
        required: true
      responses:
        '200':
          content:
            '*/*':
              schema:
                type: object
          description: Products/variants successfully added
        '400':
          content:
            '*/*':
              schema:
                type: object
          description: Invalid request
        '401':
          content:
            '*/*':
              schema:
                type: object
          description: Authentication required
        '403':
          content:
            '*/*':
              schema:
                type: object
          description: Insufficient permissions
        '404':
          content:
            '*/*':
              schema:
                type: object
          description: Subscription group not found
        '422':
          content:
            '*/*':
              schema:
                type: object
          description: Shopify API error
components:
  schemas:
    BulkAddProductsRequest:
      properties:
        productIds:
          items:
            format: int64
            type: integer
          type: array
        variantIds:
          items:
            format: int64
            type: integer
          type: array
      type: object

````