---
title: "CartInput"
description: "cartCreateinput"
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/cart/inputs/cart-input'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/cart/inputs/cart-input.md'
---
# CartInput

cartCreateinput

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

## Type Signature

`CartInput`

## Input Fields

* `note`

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

  购物车备注

* `buyerIdentity`

  [CartBuyerIdentityInput](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/cart/inputs/cart-buyer-identity-input.md)

  购物车关联的顾客信息

* `attributes`

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

  购物车属性键值对

* `lines`

  [[CartLineInput]](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/cart/inputs/cart-line-input.md)

  购物车商品列表

* `isNeedReturnCartDetail`

  [Boolean](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/boolean.md)

  是否返回最新购物车详情

* `userToken`

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

  会员访问token

* `countryCode`

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

  国家编码

* `language`

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

  前台语言

## Schema Definition

```graphql
input CartInput { 
	note: String
	buyerIdentity: CartBuyerIdentityInput
	attributes: [AttributeInput]
	lines: [CartLineInput]
	isNeedReturnCartDetail: Boolean
	userToken: String
	countryCode: String
	language: String 
}
```

## Argument from

* [Mutation](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/cart/mutations/cart-create.md).cartCreate

## Error Handling

关于更多通用错误码说明，参考：[状态码和错误码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes)。

