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

orderEditAddVariant mutation

Version unstable

Add a line item from an existing product variant.

Required access

write_order_edits 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
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

Version 2021-07 (Release candidate)

Add a line item from an existing product variant.

Required access

write_order_edits 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
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

Version 2021-04 (Latest)

Add a line item from an existing product variant.

Required access

write_order_edits 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
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

Version 2021-01

Add a line item from an existing product variant.

Required access

write_order_edits 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
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

Version 2020-10

Add a line item from an existing product variant.

Required access

write_order_edits 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
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

Version 2020-07

Add a line item from an existing product variant.

Required access

write_order_edits 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
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

Version 2020-04 (Unsupported)

Add a line item from an existing product variant.

Required access

write_order_edits 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
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

Version 2020-01 (Unsupported)

Add a line item from an existing product variant.

Required access

write_order_edits 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
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

Version 2019-10 (Unsupported)

Add a line item from an existing product variant.

Required access

write_order_edits 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
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

Version 2019-07 (Unsupported)

Add a line item from an existing product variant.

Required access

write_order_edits 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
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

Version 2019-04 (Unsupported)

Add a line item from an existing product variant.

Required access

write_order_edits 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
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