Skip to main content
PUT
/
api
/
external
/
v2
/
subscription-contracts-update-line-item
Update multiple properties of a subscription line item
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.

Headers

X-API-Key
string
required

API Key for authentication

Query Parameters

contractId
integer<int64>
required

Subscription contract ID

Required range: x >= 1
api_key
string

API Key (Deprecated - Use X-API-Key header instead)

quantity
integer

New quantity for the line item. Leave unchanged if not updating quantity.

Required range: 1 <= x <= 9999
variantId
string

New 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.

lineId
string
required

Line item ID to update. Must be the full GraphQL ID including gid:// prefix

price
number<double>

New price for the line item in shop currency. Behavior depends on isPricePerUnit flag.

Required range: 0.01 <= x <= 999999.99
isPricePerUnit
boolean
default:false

Determines how price is interpreted for prepaid subscriptions:

  • true: Price is per unit (per delivery), will be multiplied by interval ratio
  • false: Price is total billing amount (for all deliveries in billing period)

Example: Monthly billing, weekly delivery, price=$10

  • isPricePerUnit=true: Customer pays $40/month ($10 × 4 weeks)
  • isPricePerUnit=false: Customer pays $10/month total
sellingPlanName
string

Name of the selling plan to apply. Takes precedence over current selling plan. Used to change delivery frequencies.

Maximum string length: 255

Response

Line item successfully updated

get__typename
string
id
string
createdAt
object
updatedAt
object
nextBillingDate
object
status
enum<string>
Available options:
ACTIVE,
PAUSED,
CANCELLED,
EXPIRED,
FAILED,
$UNKNOWN
deliveryPrice
object
lastPaymentStatus
enum<string>
Available options:
SUCCEEDED,
FAILED,
$UNKNOWN
billingPolicy
object
deliveryPolicy
object
lines
object
customerPaymentMethod
object
deliveryMethod
object
originOrder
object
customer
object
discounts
object
note
string
customAttributes
object[]
billingAttempts
object