Anchor to section titled 'undefined'

orderEditAddVariant
mutation

Requires write_order_edits access scope.

Adds a line item from an existing product variant.


Anchor to allowDuplicates
allowDuplicates
default:false

Whether the mutation can create a line item for a variant that's already on the calculated order.

Anchor to id
id
required

The ID of the calculated order or the order edit session to edit.

The ID of the location to check for inventory availability. A default location ID is chosen automatically if none is provided.

Anchor to quantity
quantity
required

The quantity of the item to add to the order. Must be a positive value.

Anchor to variantId
variantId
required

The ID of the variant to add.


Was this section helpful?

The calculated line item that's added during this order edit.

The calculated order with the edits applied but not saved.

The order edit session with the edits applied but not saved.

The list of errors that occurred from executing the mutation.


Was this section helpful?