orderEditAddVariant mutation
Add a line item from an existing product variant.
Required access
write_order_edits
access scope.
On this page
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 |
---|---|
allowDuplicates
(
Boolean
)
|
Whether or not this mutation can create a line item with a variant that is already present on the order. Default false. |
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
locationId
(
ID
)
|
The ID of the location that this item will be fulfilled from. A default will be chosen automatically if none is provided. |
quantity
(
Int!
)
required
|
The amount of the item to add to the order. Must be a positive value. |
variantId
(
ID!
)
required
|
The ID of the variant to add. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The added line item.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Add a line item from an existing product variant.
Required access
write_order_edits
access scope.
On this page
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 |
---|---|
allowDuplicates
(
Boolean
)
|
Whether or not this mutation can create a line item with a variant that is already present on the order. Default false. |
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
locationId
(
ID
)
|
The ID of the location that this item will be fulfilled from. A default will be chosen automatically if none is provided. |
quantity
(
Int!
)
required
|
The amount of the item to add to the order. Must be a positive value. |
variantId
(
ID!
)
required
|
The ID of the variant to add. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The added line item.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Add a line item from an existing product variant.
Required access
write_order_edits
access scope.
On this page
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 |
---|---|
allowDuplicates
(
Boolean
)
|
Whether or not this mutation can create a line item with a variant that is already present on the order. Default false. |
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
locationId
(
ID
)
|
The ID of the location that this item will be fulfilled from. A default will be chosen automatically if none is provided. |
quantity
(
Int!
)
required
|
The amount of the item to add to the order. Must be a positive value. |
variantId
(
ID!
)
required
|
The ID of the variant to add. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The added line item.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Add a line item from an existing product variant.
Required access
write_order_edits
access scope.
On this page
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 |
---|---|
allowDuplicates
(
Boolean
)
|
Whether or not this mutation can create a line item with a variant that is already present on the order. Default false. |
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
locationId
(
ID
)
|
The ID of the location that this item will be fulfilled from. A default will be chosen automatically if none is provided. |
quantity
(
Int!
)
required
|
The amount of the item to add to the order. Must be a positive value. |
variantId
(
ID!
)
required
|
The ID of the variant to add. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The added line item.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Add a line item from an existing product variant.
Required access
write_order_edits
access scope.
On this page
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 |
---|---|
allowDuplicates
(
Boolean
)
|
Whether or not this mutation can create a line item with a variant that is already present on the order. Default false. |
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
locationId
(
ID
)
|
The ID of the location that this item will be fulfilled from. A default will be chosen automatically if none is provided. |
quantity
(
Int!
)
required
|
The amount of the item to add to the order. Must be a positive value. |
variantId
(
ID!
)
required
|
The ID of the variant to add. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The added line item.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Add a line item from an existing product variant.
Required access
write_order_edits
access scope.
On this page
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 |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
locationId
(
ID
)
|
The ID of the location that this item will be fulfilled from. A default will be chosen automatically if none is provided. |
quantity
(
Int!
)
required
|
The amount of the item to add to the order. Must be a positive value. |
variantId
(
ID!
)
required
|
The ID of the variant to add. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The added line item.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Add a line item from an existing product variant.
Required access
write_order_edits
access scope.
On this page
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 |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
locationId
(
ID
)
|
The ID of the location that this item will be fulfilled from. A default will be chosen automatically if none is provided. |
quantity
(
Int!
)
required
|
The amount of the item to add to the order. Must be a positive value. |
variantId
(
ID!
)
required
|
The ID of the variant to add. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The added line item.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Add a line item from an existing product variant.
Required access
write_order_edits
access scope.
On this page
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 |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
locationId
(
ID
)
|
The ID of the location that this item will be fulfilled from. A default will be chosen automatically if none is provided. |
quantity
(
Int!
)
required
|
The amount of the item to add to the order. Must be a positive value. |
variantId
(
ID!
)
required
|
The ID of the variant to add. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The added line item.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Add a line item from an existing product variant.
Required access
write_order_edits
access scope.
On this page
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 |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
locationId
(
ID
)
|
The ID of the location that this item will be fulfilled from. A default will be chosen automatically if none is provided. |
quantity
(
Int!
)
required
|
The amount of the item to add to the order. Must be a positive value. |
variantId
(
ID!
)
required
|
The ID of the variant to add. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The added line item.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Add a line item from an existing product variant.
Required access
write_order_edits
access scope.
On this page
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 |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
locationId
(
ID
)
|
The ID of the location that this item will be fulfilled from. A default will be chosen automatically if none is provided. |
quantity
(
Int!
)
required
|
The amount of the item to add to the order. Must be a positive value. |
variantId
(
ID!
)
required
|
The ID of the variant to add. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The added line item.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.
Add a line item from an existing product variant.
Required access
write_order_edits
access scope.
On this page
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 |
---|---|
id
(
ID!
)
required
|
The ID of the calculated order to edit. |
locationId
(
ID
)
|
The ID of the location that this item will be fulfilled from. A default will be chosen automatically if none is provided. |
quantity
(
Int!
)
required
|
The amount of the item to add to the order. Must be a positive value. |
variantId
(
ID!
)
required
|
The ID of the variant to add. |
Return fields
-
calculatedLineItem (
CalculatedLineItem
)The added line item.
-
calculatedOrder (
CalculatedOrder
)An order with the edits calculated.
-
userErrors (
[UserError!]!
)List of errors that occurred executing the mutation.