Remove product from subscription
Removes a specific product line item from an existing subscription contract. Can optionally retain prorated discounts associated with the removed product.
Key Features:
- Validates minimum subscription requirements before removal
- Handles discount cleanup for line-specific discounts
- Enforces minimum cycle commitments on products
- Supports Build-a-Box quantity validation
- Automatic retry on concurrent modification conflicts
- Email notifications for subscription changes
Validation Rules:
- At least one recurring subscription product must remain after removal
- One-time products and free products don’t count toward the minimum
- Products with minimum cycle commitments cannot be removed until fulfilled
- Build-a-Box subscriptions validate against minimum/maximum quantity rules
Discount Handling:
When removeDiscount=true (default):
- Discounts applied only to the removed line item are deleted
- Discounts applied to multiple line items are retained
- System automatically identifies which discounts to remove
Retry Mechanism: The endpoint automatically retries in these scenarios:
- Concurrent modification detected (another process updated the subscription)
- Invalid discount code errors (removes problematic discount and retries)
- This ensures reliable operation in high-traffic environments
Post-Removal Actions:
- Activity log created for audit trail
- Email notification sent to customer
- Shipping price recalculated asynchronously
- Build-a-Box discounts resynced if applicable
- Product-specific discounts resynced
Authentication: Requires valid X-API-Key header
Headers
API Key for authentication
Query Parameters
Subscription contract ID to remove product from. Provide the numeric ID without the gid:// prefix
^[0-9]+$API Key (Deprecated - Use X-API-Key header instead)
Line item ID of the product to remove. Must be the full GraphQL ID including the gid:// prefix
Controls whether to remove discounts that apply only to this line item. When true (default), line-specific discounts are removed. When false, attempts to retain discounts where possible. Note: Discounts that apply to multiple lines are always retained regardless of this setting
Response
Product successfully removed from subscription
SUCCEEDED, FAILED, $UNKNOWN ACTIVE, PAUSED, CANCELLED, EXPIRED, FAILED, $UNKNOWN