Skip to main content
PUT
/
api
/
external
/
v2
/
subscription-contracts-update-min-cycles
Update minimum cycles for a subscription contract
curl --request PUT \
  --url https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-min-cycles
{
  "id": "gid://shopify/SubscriptionContract/123456789",
  "status": "ACTIVE",
  "nextBillingDate": "2024-04-01T00:00:00Z",
  "createdAt": "2024-01-01T00:00:00Z",
  "customer": {
    "id": "gid://shopify/Customer/987654321",
    "email": "customer@example.com",
    "displayName": "John Doe"
  },
  "billingPolicy": {
    "interval": "MONTH",
    "intervalCount": 1,
    "minCycles": 6,
    "maxCycles": null,
    "anchors": [
      {
        "type": "MONTHDAY",
        "day": 1
      }
    ]
  },
  "deliveryPolicy": {
    "interval": "MONTH",
    "intervalCount": 1
  },
  "customerPaymentMethod": {
    "id": "gid://shopify/CustomerPaymentMethod/123456",
    "instrument": {
      "__typename": "CustomerCreditCard",
      "brand": "VISA",
      "lastDigits": "4242",
      "expiryMonth": 12,
      "expiryYear": 2025
    }
  },
  "lines": {
    "edges": [
      {
        "node": {
          "id": "gid://shopify/SubscriptionLine/111111",
          "quantity": 1,
          "variantId": "gid://shopify/ProductVariant/42549172011164",
          "title": "Premium Subscription Box",
          "currentPrice": {
            "amount": "49.99",
            "currencyCode": "USD"
          }
        }
      }
    ]
  }
}

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

Query Parameters

contractId
integer<int64>
required

Contract ID

api_key
string

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

minCycles
integer | null

Minimum Number of Orders. The minimum number of billing cycles a customer must complete before being allowed to cancel. Set to null to remove the minimum commitment. Common values:

  • 3: Three-month commitment
  • 6: Six-month commitment
  • 12: Annual commitment
  • null: No commitment
Required range: 1 <= x <= 9999

Response

Minimum cycles updated successfully

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