# cartLinesAdd Adds merchandise lines to an existing cart. ## Authentication > **Public Access**: Accessible with the public API key ## Mutation Structure ```graphql mutation { cartLinesAdd(id: String!, lines: [CartLineInput]!) { cart { # Cart fields } userErrors { # UserError fields } } } ``` ## Input Arguments | Argument | Type | Required | Description | |----------|------|----------|-------------| | id | String! | Yes | The ID of the cart to add lines to | | lines | [CartLineInput]! | Yes | The input for adding lines to the cart | ## Return Type [CartLinesAddPayload](/reference/storefront/1.3.0/objects/cart-lines-add-payload) - Payload returned by the cartLinesAdd mutation. Contains an optional updated cart object and a required list of user errors that may have occurred during the operation. ## Example ```graphql mutation { cartLinesAdd( id: "eyJhbGciOiJIUzI1NiJ9..." lines: [ { merchandiseId: "12345" quantity: 2 } ] ) { cart { id lines { edges { node { id quantity } } } } userErrors { field message } } } ``` ## Related Types - [CartLinesAddPayload](/reference/storefront/1.3.0/objects/cart-lines-add-payload) - [CartLineInput](/reference/storefront/1.3.0/inputs/cart-line-input)