subscription Draft
Returns a Subscription Draft resource by ID.
Arguments
- id (ID!)
- •ID!required
The ID of the Subscription Draft to return.
Anchor to Possible returnsPossible returns
- SubscriptionDraft (SubscriptionDraft)
- Anchor to SubscriptionDraftSubscription•Subscription
Draft Draft The
object represents a draft version of a subscription contract before it's committed. It serves as a staging area for making changes to an existing subscription or creating a new one. The draft allows you to preview and modify various aspects of a subscription before applying the changes.Use the
object to:- Add, remove, or modify subscription lines and their quantities
- Manage discounts (add, remove, or update manual and code-based discounts)
- Configure delivery options and shipping methods
- Set up billing and delivery policies
- Manage customer payment methods
- Add custom attributes and notes to generated orders
- Configure billing cycles and next billing dates
- Preview the projected state of the subscription
Each
object maintains a projected state that shows how the subscription will look after the changes are committed. This allows you to preview the impact of your modifications before applying them. The draft can be associated with an existing subscription contract (for modifications) or used to create a new subscription.The draft remains in a draft state until it's committed, at which point the changes are applied to the subscription contract and the draft is no longer accessible.
Learn more about how subscription contracts work and how to build, update, and combine subscription contracts.
- Anchor to billingCyclebilling•Subscription
Cycle Billing Cycle The billing cycle that the subscription contract will be associated with.
- Anchor to billingPolicybilling•Subscription
Policy Billing Policy! non-null The billing policy for the subscription contract.
- Anchor to concatenatedBillingCyclesconcatenated•Subscription
Billing Cycles Billing Cycle Connection! non-null The billing cycles of the contracts that will be concatenated to the subscription contract.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Subscription
Key Billing Cycles Sort Keys Default:CYCLE_INDEX Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.
Arguments
- Anchor to currencyCodecurrency•Currency
Code Code! non-null The currency used for the subscription contract.
- Anchor to customAttributescustom•[Attribute!]!
Attributes non-null A list of the custom attributes to be added to the generated orders.
- Anchor to customercustomer•Customer!non-null
The customer to whom the subscription contract belongs.
- Anchor to customerPaymentMethodcustomer•Customer
Payment Method Payment Method The customer payment method used for the subscription contract.
- Anchor to showRevokedshow•Boolean
Revoked Default:false Whether to show the customer's revoked payment method.
Arguments
- Anchor to deliveryMethoddelivery•Subscription
Method Delivery Method The delivery method for each billing of the subscription contract.
- Anchor to deliveryOptionsdelivery•Subscription
Options Delivery Option Result The available delivery options for a given delivery address. Returns
nullfor pending requests.- Anchor to deliveryPolicydelivery•Subscription
Policy Delivery Policy! non-null The delivery policy for the subscription contract.
- Anchor to deliveryPricedelivery•Money
Price V2 The delivery price for each billing the subscription contract.
- Anchor to discountsdiscounts•Subscription
Discount Connection! non-null The list of subscription discounts which will be associated with the subscription contract.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to discountsAddeddiscounts•Subscription
Added Discount Connection! non-null The list of subscription discounts to be added to the subscription contract.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to discountsRemoveddiscounts•Subscription
Removed Discount Connection! non-null The list of subscription discounts to be removed from the subscription contract.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to discountsUpdateddiscounts•Subscription
Updated Discount Connection! non-null The list of subscription discounts to be updated on the subscription contract.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- •ID!non-null
A globally-unique ID.
- Anchor to lineslines•Subscription
Line Connection! non-null The list of subscription lines which will be associated with the subscription contract.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to linesAddedlines•Subscription
Added Line Connection! non-null The list of subscription lines to be added to the subscription contract.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to linesRemovedlines•Subscription
Removed Line Connection! non-null The list of subscription lines to be removed from the subscription contract.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to nextBillingDatenext•Date
Billing Date Time The next billing date for the subscription contract.
- Anchor to notenote•String
The note field that will be applied to the generated orders.
- Anchor to originalContractoriginal•Subscription
Contract Contract The original subscription contract.
- Anchor to statusstatus•Subscription
Contract Subscription Status The current status of the subscription contract.
- Anchor to shippingOptionsshipping•Subscription
Options Shipping Option Result Deprecated