# orderEditAddVariant - admin - MUTATION
Version: 2024-04

## Description
Adds a line item from an existing product variant. As of API version 2025-04, the [orderEditAddVariant](https://shopify.dev/api/admin-graphql/latest/mutations/ordereditaddvariant) API will respect the contextual pricing of the variant.

### Access Scopes
`write_order_edits` access scope.


## Arguments
* [allowDuplicates](/docs/api/admin/2024-04/scalars/Boolean): Boolean - Whether the mutation can create a line item for a variant that's already on the calculated order.
* [id](/docs/api/admin/2024-04/scalars/ID): ID! - The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder)
to edit.
* [locationId](/docs/api/admin/2024-04/scalars/ID): ID - The ID of the [location](https://shopify.dev/api/admin-graphql/latest/objects/location)
to check for inventory availability. A default location ID is chosen automatically if none is provided.
* [quantity](/docs/api/admin/2024-04/scalars/Int): Int! - The quantity of the item to add to the order. Must be a positive value.
* [variantId](/docs/api/admin/2024-04/scalars/ID): ID! - The ID of the variant to add.


## Returns
* [calculatedLineItem](/docs/api/admin/2024-04/objects/CalculatedLineItem): CalculatedLineItem The [calculated line item](https://shopify.dev/api/admin-graphql/latest/objects/calculatedlineitem)
that's added during this order edit.
* [calculatedOrder](/docs/api/admin/2024-04/objects/CalculatedOrder): CalculatedOrder The [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder)
with the edits applied but not saved.
* [userErrors](/docs/api/admin/2024-04/objects/UserError): UserError! The list of errors that occurred from executing the mutation.


## Examples