---
title: "CartLineInput"
description: "CartLineInput"
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/storefront-api/cart/inputs/cart-line-input'
  md: 'https://developer.shopline.com/docs/storefront-api/cart/inputs/cart-line-input.md'
---
# CartLineInput

CartLineInput

- **API Version:** v20270301
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Input

## Type Signature

`CartLineInput`

## Input Fields

* `variantId`

  [String!](https://developer.shopline.com/docs/storefront-api/common/scalars/string.md)

  variant id

* `attributes`

  [[AttributeInput]](https://developer.shopline.com/docs/storefront-api/common-objects/inputs/attribute-input.md)

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

* `quantity`

  [Int!](https://developer.shopline.com/docs/storefront-api/common/scalars/int.md)

  The quantity of the merchandise.

## Schema Definition

```graphql
input CartLineInput { 
	variantId: String!
	attributes: [AttributeInput]
	quantity: Int! 
}
```

## Input field from

* [CartInput](https://developer.shopline.com/docs/storefront-api/cart/inputs/cart-input.md).lines

  A list of merchandise lines to add to the cart.

* [CartLinesAddInput](https://developer.shopline.com/docs/storefront-api/cart/inputs/cart-lines-add-input.md).lines

  A list of merchandise lines to add to the cart.

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes).

