> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: "CartResponse"
description: "Represents a shopping cart which is a result of queries or mutations, along with any possible errors that occurred during operations."
---

## Fields

***

<ParamField path="cart" type={<a href="/api-reference/cart">Cart!</a>} required>
  The [Cart](/api-reference/cart) object containing all cart information.
</ParamField>

<ParamField path="errors" type={<a href="/api-reference/carterror">[CartError!]!</a>} required>
  An array of possible cart errors.
</ParamField>

## Queries

***

[`cart(id: ID!)`](/api-reference/cartresponse)

Returns a `CartResponse` object by ID.

***

## Mutations

***

[`createCart(input: CartCreateInput!)`](/api-reference/createcart)

Create a Cart with buyer identity details

***

[`updateCartItems(input: CartItemsUpdateInput!)`](/api-reference/updatecartitems)

Updates only existing products in a Cart. Returns an error if prompted to update non-existing product.

***

[`updateCartBuyerIdentity(input: CartBuyerIdentityUpdateInput!)`](/api-reference/updatecartbuyeridentity)

Updates buyer identity if not provided in [`createCart`](/api-reference/createcart) mutation

***

[`addCartItems(input: CartItemsAddInput!)`](/api-reference/addcartitems)

Adds only non-existing products in a Cart. Skips already existing products.

***

[`deleteCartItems(input: CartItemsDeleteInput!)`](/api-reference/deletecartitems)

Removes existing products in a Cart. Returns an error if prompted to delete non-existing product.


---

*Powered by [holocron.so](https://holocron.so)*
