subscriptionDraftLineAdd mutation
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
Argument | Description |
---|---|
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!
) RequiredThe price of the product.
-
customAttributes (
[AttributeInput!]
)The custom attributes for this subscription line.
-
pricingPolicy (
SubscriptionPricingPolicyInput
)Describes expected price changes of the subscription line over time.
-
productVariantId (
ID!
) RequiredThe ID of the product variant the subscription line refers to.
-
quantity (
Int!
) RequiredThe 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.
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
Argument | Description |
---|---|
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!
) RequiredThe price of the product.
-
customAttributes (
[AttributeInput!]
)The custom attributes for this subscription line.
-
pricingPolicy (
SubscriptionPricingPolicyInput
)Describes expected price changes of the subscription line over time.
-
productVariantId (
ID!
) RequiredThe ID of the product variant the subscription line refers to.
-
quantity (
Int!
) RequiredThe 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.
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
Argument | Description |
---|---|
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!
) RequiredThe price of the product.
-
customAttributes (
[AttributeInput!]
)The custom attributes for this subscription line.
-
pricingPolicy (
SubscriptionPricingPolicyInput
)Describes expected price changes of the subscription line over time.
-
productVariantId (
ID!
) RequiredThe ID of the product variant the subscription line refers to.
-
quantity (
Int!
) RequiredThe 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.