Add product line item to subscription contract
Adds a new product (line item) to an existing subscription contract. This allows customers or merchants to add products to their recurring subscription orders.
Full behavior, validation rules, and side effects
Key Features:
- Add Products: Include new products in future subscription deliveries
- Quantity Control: Specify how many units of the product to add
- Price Override: Set custom pricing for the added product
- Immediate Effect: Changes apply to next billing cycle
- Activity Logging: All additions are tracked in activity logs
Required Parameters:
- contractId: Subscription contract ID to modify
- variantId: Shopify product variant ID (with gid:// prefix or numeric)
- quantity: Number of units to add (must be positive integer)
- price: Price per unit in shop’s base currency
Product Variant ID Format: Accepts two formats:
- Shopify GID:
gid://shopify/ProductVariant/12345678901 - Numeric ID:
12345678901
Price Behavior:
- Price is per unit, not total
- Must be in shop’s base currency (USD, EUR, etc.)
- Can override product’s default price
- Does not include taxes or shipping
- Total line item cost = price × quantity
Line Item Addition Rules:
- Product variant must exist in Shopify catalog
- Product must be active and available
- Variant must have sufficient inventory (if tracked)
- Contract must be ACTIVE or PAUSED (not CANCELLED)
- Cannot add duplicate variants (use update quantity instead)
Common Use Cases:
- Customer adds complementary product to existing subscription
- Upsell additional products through customer portal
- Merchant adds bonus items to customer subscriptions
- Build custom “add-on” product selection interfaces
- Cross-sell related products to existing subscribers
- Create bundle upgrades (add multiple products at once)
Post-Addition Effects:
- Next billing amount increases by (price × quantity)
- Product appears in all future subscription deliveries
- Customer receives confirmation of subscription update
- Activity log records the addition with source (portal/merchant)
- Contract’s next billing date remains unchanged
Integration Example:
PUT /api/external/v2/subscription-contract-add-line-item?
contractId=123456&
variantId=gid://shopify/ProductVariant/987654321&
quantity=2&
price=19.99
This adds 2 units of variant 987654321 at 39.98 total) to contract 123456.
Important Notes:
- Changes apply to NEXT billing cycle, not current/past orders
- If product is out of stock, order may be delayed or skipped
- Price changes don’t affect historical orders
- Consider inventory availability before adding products
Authentication: Requires API key authentication via X-API-Key header or api_key parameter
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
Query Parameters
Subscription contract ID
API Key (Deprecated - Use Header X-API-Key instead)
Quantity of product to add
Shopify product variant ID (with or without gid:// prefix)
Price per unit in shop's base currency
Response
Line item successfully added to subscription contract
ACTIVE, PAUSED, CANCELLED, EXPIRED, FAILED, $UNKNOWN SUCCEEDED, FAILED, $UNKNOWN