Comprehensive endpoint for updating a subscription line item’s quantity, price, product variant, and/or selling plan in a single API call. Changes are applied intelligently - only modified values trigger updates.
Key Features:
Prepaid Subscription Handling: For prepaid subscriptions (billing interval > delivery interval):
isPricePerUnit=true: Price is multiplied by interval ratioisPricePerUnit=false: Price is used as total billing amountUpdate Process:
Selling Plan Updates:
Price Updates:
Quantity Updates:
Variant Updates:
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 \
--header 'X-API-Key: <x-api-key>'{
"id": "gid://shopify/SubscriptionContract/123456789",
"status": "ACTIVE",
"nextBillingDate": "2024-03-01T00:00:00Z",
"billingPolicy": {
"interval": "MONTH",
"intervalCount": 1
},
"deliveryPolicy": {
"interval": "WEEK",
"intervalCount": 1
},
"lines": {
"edges": [
{
"node": {
"id": "gid://shopify/SubscriptionLine/111111",
"quantity": 3,
"variantId": "gid://shopify/ProductVariant/98765432101",
"title": "Premium Coffee - Medium Roast",
"currentPrice": {
"amount": "119.97",
"currencyCode": "USD"
},
"pricingPolicy": {
"basePrice": {
"amount": "9.99",
"currencyCode": "USD"
},
"cycleDiscounts": [
{
"afterCycle": 3,
"adjustmentType": "PERCENTAGE",
"adjustmentValue": {
"percentage": 10
},
"computedPrice": {
"amount": "107.97",
"currencyCode": "USD"
}
}
]
},
"sellingPlanId": "gid://shopify/SellingPlan/777777",
"sellingPlanName": "Deliver every week"
}
}
]
}
}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
x >= 1API Key (Deprecated - Use X-API-Key header instead)
New quantity for the line item. Leave unchanged if not updating quantity.
1 <= x <= 9999New product variant ID in Shopify GID format (e.g., gid://shopify/ProductVariant/42549172011164). This updates the associated product. Leave this parameter blank if you are not switching products.
Line item ID to update. Must be the full GraphQL ID including gid:// prefix
New price for the line item in shop currency. Behavior depends on isPricePerUnit flag.
0.01 <= x <= 999999.99Determines how price is interpreted for prepaid subscriptions:
Example: Monthly billing, weekly delivery, price=$10
Name of the selling plan to apply. Takes precedence over current selling plan. Used to change delivery frequencies.
255Line item successfully updated
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 \
--header 'X-API-Key: <x-api-key>'{
"id": "gid://shopify/SubscriptionContract/123456789",
"status": "ACTIVE",
"nextBillingDate": "2024-03-01T00:00:00Z",
"billingPolicy": {
"interval": "MONTH",
"intervalCount": 1
},
"deliveryPolicy": {
"interval": "WEEK",
"intervalCount": 1
},
"lines": {
"edges": [
{
"node": {
"id": "gid://shopify/SubscriptionLine/111111",
"quantity": 3,
"variantId": "gid://shopify/ProductVariant/98765432101",
"title": "Premium Coffee - Medium Roast",
"currentPrice": {
"amount": "119.97",
"currencyCode": "USD"
},
"pricingPolicy": {
"basePrice": {
"amount": "9.99",
"currencyCode": "USD"
},
"cycleDiscounts": [
{
"afterCycle": 3,
"adjustmentType": "PERCENTAGE",
"adjustmentValue": {
"percentage": 10
},
"computedPrice": {
"amount": "107.97",
"currencyCode": "USD"
}
}
]
},
"sellingPlanId": "gid://shopify/SellingPlan/777777",
"sellingPlanName": "Deliver every week"
}
}
]
}
}