Skip to main content
PUT
Update maximum cycles for a subscription contract

Headers

X-API-Key
string

Query Parameters

contractId
integer<int64>
required

The subscription contract's numeric ID, without the gid://shopify/SubscriptionContract/ prefix.

api_key
string

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

maxCycles
integer
required

Maximum number of orders the subscription can place, counting the first order. Must be a whole number of at least 1, and not below the number of orders already placed. This endpoint can't remove a maximum.

Required range: x >= 1

Response

The contract after the change, with the new maximum in billingPolicy.maxCycles. The example is shortened: the response also has revisionId, deliveryPrice, lastPaymentStatus, customerPaymentMethod, deliveryMethod, originOrder, discounts, note, customAttributes and billingAttempts, and more fields on each line and on the customer.

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
revisionId
object
status
enum<string>
Available options:
ACTIVE,
PAUSED,
CANCELLED,
EXPIRED,
FAILED,
$UNKNOWN
updatedAt
object