Removes multiple product line items from an existing subscription contract in a single request. Products are removed sequentially, allowing partial success if errors occur.
Key Features:
Processing Order Matters: Items are removed in the order provided:
Validation Per Item:
Discount Handling:
When removeDiscount=true:
Side Effects Per Removal: Each successful removal triggers:
Partial Success Scenarios: If removing 3 items and the 2nd fails:
Performance Considerations:
Build-a-Box Handling: For Build-a-Box subscriptions:
Important Notes:
Authentication: Requires valid X-API-Key header
curl --request PUT \
--url https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-remove-line-items \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '[
"<string>"
]'{
"id": "gid://shopify/SubscriptionContract/123456789",
"status": "ACTIVE",
"nextBillingDate": "2024-04-01T00:00:00Z",
"customer": {
"id": "gid://shopify/Customer/987654321",
"email": "customer@example.com"
},
"lines": {
"edges": [
{
"node": {
"id": "gid://shopify/SubscriptionLine/333333",
"quantity": 1,
"variantId": "gid://shopify/ProductVariant/42549172076700",
"title": "Essential Product - Monthly",
"currentPrice": {
"amount": "19.99",
"currencyCode": "USD"
}
}
}
]
},
"discounts": {
"edges": [
{
"node": {
"id": "gid://shopify/SubscriptionManualDiscount/444444",
"title": "10% OFF ALL ITEMS",
"targetType": "ALL_LINES"
}
}
]
}
}Documentation Index
Fetch the complete documentation index at: https://appstleinc-aeca3e0a.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
API Key for authentication
Subscription contract ID to remove products from
API Key (Deprecated - Use Header X-API-Key instead)
When true, removes discounts that apply only to each removed line item. When false, attempts to retain all discounts. Discounts that apply to multiple lines are always retained regardless of this setting.
Products successfully removed from subscription (full or partial success)
ACTIVE, PAUSED, CANCELLED, EXPIRED, FAILED, $UNKNOWN Show child attributes
SUCCEEDED, FAILED, $UNKNOWN Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
curl --request PUT \
--url https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-remove-line-items \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '[
"<string>"
]'{
"id": "gid://shopify/SubscriptionContract/123456789",
"status": "ACTIVE",
"nextBillingDate": "2024-04-01T00:00:00Z",
"customer": {
"id": "gid://shopify/Customer/987654321",
"email": "customer@example.com"
},
"lines": {
"edges": [
{
"node": {
"id": "gid://shopify/SubscriptionLine/333333",
"quantity": 1,
"variantId": "gid://shopify/ProductVariant/42549172076700",
"title": "Essential Product - Monthly",
"currentPrice": {
"amount": "19.99",
"currencyCode": "USD"
}
}
}
]
},
"discounts": {
"edges": [
{
"node": {
"id": "gid://shopify/SubscriptionManualDiscount/444444",
"title": "10% OFF ALL ITEMS",
"targetType": "ALL_LINES"
}
}
]
}
}