Skip to main content
PUT
/
api
/
external
/
v2
/
subscription-contracts-update-line-item-pricing-policy
curl --request PUT \
  --url https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-line-item-pricing-policy \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <x-api-key>' \
  --data '[]'
{
  "id": "gid://shopify/SubscriptionContract/123456789",
  "lines": {
    "edges": [
      {
        "node": {
          "currentPrice": {
            "amount": "24.99",
            "currencyCode": "USD"
          },
          "id": "gid://shopify/SubscriptionLine/111111",
          "pricingPolicy": {
            "basePrice": {
              "amount": "24.99",
              "currencyCode": "USD"
            },
            "cycleDiscounts": [
              {
                "adjustmentType": "PERCENTAGE",
                "adjustmentValue": {
                  "percentage": 10
                },
                "afterCycle": 3,
                "computedPrice": {
                  "amount": "22.49",
                  "currencyCode": "USD"
                }
              },
              {
                "adjustmentType": "PERCENTAGE",
                "adjustmentValue": {
                  "percentage": 15
                },
                "afterCycle": 6,
                "computedPrice": {
                  "amount": "21.24",
                  "currencyCode": "USD"
                }
              }
            ]
          },
          "quantity": 1,
          "variantId": "gid://shopify/ProductVariant/42549172011164"
        }
      }
    ]
  },
  "status": "ACTIVE"
}

Headers

X-API-Key
string
required

API Key for authentication

Query Parameters

api_key
string

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

contractId
integer<int64>
required

Subscription contract ID

Required range: x >= 1
lineId
string
required

Line item ID to update. Must be full GraphQL ID format

basePrice
number<double>
required

Base price for the product (before any discounts). This is the starting price

Required range: 0.01 <= x <= 999999.99

Body

application/json

List of cycle-based pricing rules. Maximum 2 cycles, must have unique afterCycle values

The body is of type string.

Response

Pricing policy successfully updated

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