orderEditAddVariant mutation

Version 2020-04 (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

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.

Version 2020-01 (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

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.

Sign up for a Partner account to get started.

Sign up