> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# updateCartLineItem

GraphQL MUTATION

Updates line item in the cart.

Reference: https://docs.bigcommerce.com/developer/api-reference/graphql/storefront/mutations/cart/update-cart-line-item

## GraphQL Schema

```graphql
mutation ExampleMutation($input: UpdateCartLineItemInput!) {
  cart {
    updateCartLineItem(input: $input) {
      cart {
        id
        entityId
        currencyCode
        displayCurrencyCode
        isTaxIncluded
        baseAmount
        baseAmountInDisplayCurrency
        discountedAmount
        discountedAmountInDisplayCurrency
        amount
      }
    }
  }
}
```

## Variables

```json
{
  "input": {
    "cartEntityId": "example",
    "lineItemEntityId": "example",
    "data": {
      "lineItem": {
        "quantity": 0,
        "productEntityId": 0,
        "variantEntityId": 0,
        "sku": "example",
        "selectedOptions": {
          "checkboxes": [
            {
              "optionEntityId": null,
              "optionValueEntityId": null
            }
          ],
          "dateFields": [
            {
              "optionEntityId": null,
              "date": null
            }
          ],
          "multiLineTextFields": [
            {
              "optionEntityId": null,
              "text": null
            }
          ],
          "multipleChoices": [
            {
              "optionEntityId": null,
              "optionValueEntityId": null
            }
          ],
          "numberFields": [
            {
              "optionEntityId": null,
              "number": null
            }
          ],
          "textFields": [
            {
              "optionEntityId": null,
              "text": null
            }
          ]
        }
      },
      "giftCertificate": {
        "name": "example",
        "theme": "BIRTHDAY",
        "amount": "example",
        "quantity": 0,
        "sender": {
          "name": "example",
          "email": "example"
        },
        "recipient": {
          "name": "example",
          "email": "example"
        },
        "message": "example"
      }
    },
    "version": 0
  }
}
```