---
title: CartLineUpdateInput - Storefront API
description: >-
  The input fields for updating a merchandise line in a cart. Used by the
  [`cartLinesUpdate`](/docs/api/storefront/2026-10/mutations/cartLinesUpdate)
  mutation.


  Specify the line item's
  [`id`](/docs/api/storefront/2026-10/input-objects/CartLineUpdateInput#fields-id)

  along with any fields to modify. You can change the quantity, swap the

  merchandise, update custom attributes, or associate a different selling plan.
api_version: 2026-10
source_url:
  html: >-
    https://shopify.dev/docs/api/storefront/latest/input-objects/CartLineUpdateInput
  md: >-
    https://shopify.dev/docs/api/storefront/latest/input-objects/CartLineUpdateInput.md
api_name: storefront
api_type: graphql
type: input-object
---

# Cart​Line​Update​Input

input\_object

The input fields for updating a merchandise line in a cart. Used by the [`cartLinesUpdate`](https://shopify.dev/docs/api/storefront/2026-10/mutations/cartLinesUpdate) mutation.

Specify the line item's [`id`](https://shopify.dev/docs/api/storefront/2026-10/input-objects/CartLineUpdateInput#fields-id) along with any fields to modify. You can change the quantity, swap the merchandise, update custom attributes, or associate a different selling plan.

## Fields

* attributes

  [\[Attribute​Input!\]](https://shopify.dev/docs/api/storefront/latest/input-objects/AttributeInput)

  An array of key-value pairs that contains additional information about the merchandise line.

  The input must not contain more than `250` values.

* id

  [ID](https://shopify.dev/docs/api/storefront/latest/scalars/ID)

  The ID of the merchandise line. Mutually exclusive with `viewKey`.

* merchandise​Id

  [ID](https://shopify.dev/docs/api/storefront/latest/scalars/ID)

  The ID of the merchandise for the line item.

* quantity

  [Int](https://shopify.dev/docs/api/storefront/latest/scalars/Int)

  The quantity of the line item.

* selling​Plan​Id

  [ID](https://shopify.dev/docs/api/storefront/latest/scalars/ID)

  The ID of the selling plan that the merchandise is being purchased with.

* view​Key

  [String](https://shopify.dev/docs/api/storefront/latest/scalars/String)

  The `view_key` of the merchandise line, as exposed in Liquid via the cart line `view_key` filter. Mutually exclusive with `id`.

***

## Mutations using this input

* [cart​Lines​Update.lines](https://shopify.dev/docs/api/storefront/latest/mutations/cartLinesUpdate#arguments-lines)

  ARGUMENT

***

## Map

### Mutations using this input

* [cart​Lines​Update.lines](https://shopify.dev/docs/api/storefront/latest/mutations/cartLinesUpdate#arguments-lines)
