Updates the quantity of a specific product line item within a subscription contract. This comprehensive operation handles quantity validation, discount recalculation, and special Build-a-Box constraints.
Key Features:
Build-a-Box (BAB) Validation: For Build-a-Box subscriptions:
Line Item Validation: Individual products may have:
Post-Update Actions:
Discount Recalculation:
Important Notes:
Authentication: Requires valid X-API-Key header
curl --request PUT \
--url https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-line-item-quantity \
--header 'X-API-Key: <x-api-key>'{
"id": "gid://shopify/SubscriptionContract/123456789",
"status": "ACTIVE",
"nextBillingDate": "2024-04-01T12:00:00Z",
"customer": {
"id": "gid://shopify/Customer/987654321",
"email": "customer@example.com"
},
"lines": {
"edges": [
{
"node": {
"id": "gid://shopify/SubscriptionLine/111111",
"quantity": 3,
"variantId": "gid://shopify/ProductVariant/42549172011164",
"title": "Premium Coffee - Dark Roast",
"currentPrice": {
"amount": "44.97",
"currencyCode": "USD"
},
"customAttributes": [
{
"key": "_min_quantity",
"value": "1"
},
{
"key": "_max_quantity",
"value": "5"
}
]
}
}
]
},
"discounts": {
"edges": [
{
"node": {
"id": "gid://shopify/SubscriptionManualDiscount/222222",
"title": "BUILD_A_BOX_DISCOUNT_ABC123",
"targetType": "ALL_LINES",
"value": {
"percentage": 15
}
}
}
]
}
}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 update. Provide the numeric ID without the gid:// prefix
x >= 1API Key (Deprecated - Use X-API-Key header instead)
New quantity for the line item. Must be a positive integer
1 <= x <= 9999Line item ID to update. Must be the full GraphQL ID including the gid:// prefix
Product line item quantity updated successfully
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-update-line-item-quantity \
--header 'X-API-Key: <x-api-key>'{
"id": "gid://shopify/SubscriptionContract/123456789",
"status": "ACTIVE",
"nextBillingDate": "2024-04-01T12:00:00Z",
"customer": {
"id": "gid://shopify/Customer/987654321",
"email": "customer@example.com"
},
"lines": {
"edges": [
{
"node": {
"id": "gid://shopify/SubscriptionLine/111111",
"quantity": 3,
"variantId": "gid://shopify/ProductVariant/42549172011164",
"title": "Premium Coffee - Dark Roast",
"currentPrice": {
"amount": "44.97",
"currencyCode": "USD"
},
"customAttributes": [
{
"key": "_min_quantity",
"value": "1"
},
{
"key": "_max_quantity",
"value": "5"
}
]
}
}
]
},
"discounts": {
"edges": [
{
"node": {
"id": "gid://shopify/SubscriptionManualDiscount/222222",
"title": "BUILD_A_BOX_DISCOUNT_ABC123",
"targetType": "ALL_LINES",
"value": {
"percentage": 15
}
}
}
]
}
}