Skip to main content
Log inSign up

Shopify uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our privacy policy and our cookie policy.

mutation

Requires write_order_edits access scope.

Adds a line item from an existing product variant. As of API version 2025-04, the orderEditAddVariant API will respect the contextual pricing of the variant.

BooleanDefault:false

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

ID!required

The ID of the calculated order to edit.

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

Int!required

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

ID!required

The ID of the variant to add.


Was this section helpful?

Anchor to OrderEditAddVariantPayload returnsOrderEditAddVariantPayload returns

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

The calculated order with the edits applied but not saved.

The list of errors that occurred from executing the mutation.


Was this section helpful?