API version 2021-01 Release candidate
API version 2020-10 Latest
API version 2020-07
API version 2020-04
API version 2020-01
API version 2019-10 Unsupported
API version 2019-07 Unsupported

subscriptionDraftLineAdd mutation

Version 2021-01 (Release candidate)

Adds a subscription line to a subscription draft.

Required access

write_own_subscription_contracts access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

draftId ( ID! ) required

The gid of the Subscription Contract draft to add a subscription line to.

input ( SubscriptionLineInput! ) required

The properties of the new Subscription Line.

SubscriptionLineInput fields

currentPrice (Decimal!) Required

The price of the product.

customAttributes ([AttributeInput!])

The custom attributes for this subscription line.

productVariantId (ID!) Required

The ID of the product variant the subscription line refers to.

quantity (Int!) Required

The quantity of the product.

sellingPlanId (ID)

The selling plan for the subscription line.

sellingPlanName (String)

The selling plan name for the subscription line.

Defaults to using the selling plan's current name when not specified.

Return fields

draft (SubscriptionDraft)

The Subscription Contract draft object.

lineAdded (SubscriptionLine)

The added Subscription Line.

userErrors ([SubscriptionDraftUserError!]!)

List of errors that occurred executing the mutation.