---
title: "Customer"
description: "客户信息。"
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/customers/objects/customer'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/customers/objects/customer.md'
---
# Customer

客户信息。

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

## Fields

* `createdAt`

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

  客户创建的日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。      
  例子：`2024-08-31T02:20:26+08:00`

* `displayName`

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

  客户的展示名称。

* `acceptsMarketing`

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

  客户是否已订阅营销邮件。
  
  * `true`：已订阅
  * `false`：未订阅
  

* `defaultAddress`

  [MailingAddress](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/mailing-address.md)

  客户的默认地址。

* `email`

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

  客户的邮箱地址。

* `firstName`

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

  客户的名。

* `id`

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

  客户 ID。

* `lastName`

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

  客户的姓。

* `phone`

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

  客户的手机号码。

* `tags`

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

  客户标签。

* `updatedAt`

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

  客户信息更新日期和时间。格式：[ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)。      
  例子：`2024-08-31T02:20:26+08:00`

* `eraseTime`

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

  客户账号的注销时间，格式为 13 位毫秒级时间戳。    
  例子：`1729822782000`

* `logoutStatus`

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

  客户账号的注销状态，可基于注销状态控制店铺前台是否展示注销按钮。有效枚举值包含：
    * `1`：不可注销。可设置店铺前台不展示注销按钮。
    * `2`：可注销。可设置店铺前台展示注销按钮。
    * `3`：注销处理中。表示账号处于注销缓冲期。

* `orders`

  [OrderConnection](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/order-connection.md)

  客户关联的订单列表。

* `addresses`

  [AddressConnection](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/objects/address-connection.md)

  客户地址列表。

* `birthday`

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

  客户出生日期。格式：`yyyyMMdd`。    
  例子：`19931231`

* `gender`

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

  客户性别。有效枚举值包含：
  
  * `unknown`：未设置
  * `male`：男
  * `female`：女
  * `prefer not to say`：保密

## Field from

* [CustomerUpdatePayload](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/customers/objects/customer-update-payload.md).customer

* [CustomerActivatePayload](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/customers/objects/customer-activate-payload.md).customer

* [CustomerResetPayload](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/customers/objects/customer-reset-payload.md).customer

* [CustomerResetByUrlPayload](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/customers/objects/customer-reset-by-url-payload.md).customer

* [CustomerCreatePayload](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/customers/objects/customer-create-payload.md).customer

* [CustomerActivateByUrlPayload](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/customers/objects/customer-activate-by-url-payload.md).customer

* [CustomerDefaultAddressUpdatePayload](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/customers/objects/customer-default-address-update-payload.md).customer

