# orderEditAddVariant - admin-graphql - MUTATION Version: 2024-07 ## Description Adds a line item from an existing product variant. ### Access Scopes `write_order_edits` access scope. ## Arguments * [allowDuplicates](/docs/api/admin-graphql/2024-07/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-graphql/2024-07/scalars/ID): ID! - The ID of the [calculated order](https://shopify.dev/api/admin-graphql/latest/objects/calculatedorder) to edit. * [locationId](/docs/api/admin-graphql/2024-07/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-graphql/2024-07/scalars/Int): Int! - The quantity of the item to add to the order. Must be a positive value. * [variantId](/docs/api/admin-graphql/2024-07/scalars/ID): ID! - The ID of the variant to add. ## Returns * [calculatedLineItem](/docs/api/admin-graphql/2024-07/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-graphql/2024-07/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-graphql/2024-07/objects/UserError): UserError! The list of errors that occurred from executing the mutation. ## Examples