Skip to main content
PUT
/
api
/
external
/
v2
/
subscription-contracts-remove-line-items
Remove multiple products from subscription
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://developers.appstle.com/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 to remove products from

api_key
string

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

removeDiscount
boolean
default:false

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.

Body

application/json

Response

Products successfully removed from subscription (full or partial success)

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