---
title: "Attribute"
description: "Attribute"
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/attribute'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/attribute.md'
---
# Attribute

Attribute

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

## Type Signature

`Attribute`

## Fields

* `key`

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

  属性的键

* `value`

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

  属性的值

## Schema Definition

```graphql
type Attribute { 
	key: String!
	value: String 
}
```

## Field from

* [Checkout](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/checkouts/objects/checkout.md).customAttributes

  添加到结账的额外信息列表。

* [Cart](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/cart/objects/cart.md).attributes

  购物车属性，属性为键值对

* [CartLine](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/cart/objects/cart-line.md).attributes

  购物车商品行属性，属性为键值对

## Error Handling

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

