Add product to subscription
Adds a new product line item to an existing subscription contract. Can add either recurring products that will appear in each order or one-time products that appear only in the next order.
Full behavior, validation rules, and side effects
Key Features:
- Supports both recurring and one-time product additions
- Automatically applies appropriate pricing policies based on discount carry-forward settings
- Handles duplicate products by updating quantity (if enabled) or adding as new line
- Calculates prices based on billing/delivery frequency multipliers
- Sends email notifications to customers (unless suppressed)
- Creates activity logs for audit trail
Pricing Policy Application: The system applies discounts based on the store’s discount carry-forward setting:
- PRODUCT_PLAN: Uses the discount from the product’s selling plan
- EXISTING_PLAN: Applies the discount structure from existing subscription items
- PRODUCT_THEN_EXISTING: First attempts product plan, falls back to existing if not found
One-Time Products:
Products added with isOneTimeProduct=true will:
- Only appear in the next scheduled order
- Be automatically removed after fulfillment
- Still attempt to match with appropriate selling plans
- Can have subscription discounts applied if store setting allows
Duplicate Product Handling: When adding a product that already exists in the subscription:
- If store has ‘updateExistingQuantityOnAddProduct’ enabled and product is not one-time: Updates existing quantity
- Otherwise: Adds as a new line item
Price Calculation:
- Base price is fetched considering contract currency and delivery country
- Price is multiplied by fulfillment frequency ratio (billing interval / delivery interval)
- Example: Monthly billing with weekly delivery = price × 4
Authentication: Requires valid X-API-Key header
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
API Key for authentication
Query Parameters
Subscription contract ID to add product to. Provide the numeric ID without the gid:// prefix
^[0-9]+$API Key (Deprecated - Use X-API-Key header instead)
Quantity of product to add. Must be a positive integer
1 <= x <= 999Shopify variant ID of the product to add. Can be provided as numeric ID or with gid:// prefix
^([0-9]+|gid://shopify/ProductVariant/[0-9]+)$When true, product will only be included in the next order and automatically removed after fulfillment. When false, product will be included in all future orders until manually removed or subscription ends. One-time products are useful for samples, gifts, or limited-time additions
Response
Product successfully added to subscription
ACTIVE, PAUSED, CANCELLED, EXPIRED, FAILED, $UNKNOWN SUCCEEDED, FAILED, $UNKNOWN