Skip to main content
PUT
/
api
/
external
/
v2
/
subscription-contracts-update-max-cycles
Update maximum cycles for a subscription contract
curl --request PUT \
  --url https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-max-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": 3,
    "maxCycles": 12,
    "anchors": [
      {
        "type": "MONTHDAY",
        "day": 15
      }
    ]
  },
  "deliveryPolicy": {
    "interval": "MONTH",
    "intervalCount": 1
  },
  "lastBillingAttemptDate": "2024-03-01T00:00:00Z",
  "orders": {
    "edges": [
      {
        "node": {
          "id": "gid://shopify/Order/5678901234",
          "createdAt": "2024-03-01T00:00:00Z",
          "fulfillmentStatus": "FULFILLED",
          "financialStatus": "PAID"
        }
      },
      {
        "node": {
          "id": "gid://shopify/Order/5678901233",
          "createdAt": "2024-02-01T00:00:00Z",
          "fulfillmentStatus": "FULFILLED",
          "financialStatus": "PAID"
        }
      },
      {
        "node": {
          "id": "gid://shopify/Order/5678901232",
          "createdAt": "2024-01-01T00:00:00Z",
          "fulfillmentStatus": "FULFILLED",
          "financialStatus": "PAID"
        }
      }
    ]
  },
  "lines": {
    "edges": [
      {
        "node": {
          "id": "gid://shopify/SubscriptionLine/111111",
          "quantity": 1,
          "variantId": "gid://shopify/ProductVariant/42549172011164",
          "title": "12-Month Subscription Box",
          "currentPrice": {
            "amount": "39.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)

maxCycles
integer | null
required

Maximum Cycles. The total number of orders after which the subscription will automatically terminate. Must be greater than or equal to the current cycle count and any configured minimum cycles. Common values:

  • 3: Three-order trial
  • 6: Six-month seasonal subscription
  • 12: Annual subscription
  • 24: Two-year commitment
  • null: Ongoing subscription with no end date
Required range: 1 <= x <= 9999

Response

Maximum 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