---
title: "customer"
description: "查询客户相关信息"
doc_type: graphql
doc_category: storefront
doc_version: v20260901
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/customers/queries/customer'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/customers/queries/customer.md'
---
# customer

查询客户相关信息

- **API Version:** v20260901
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Query

## Type Signature

`Customer`

## Arguments

* `customerAccessToken`

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

  客户访问令牌

## Returns

* `acceptsMarketing`

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

  是否邮件订阅

* `addresses`

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

  客户地址列表

* `createdAt`

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

  创建时间

* `defaultAddress`

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

  默认地址信息

* `displayName`

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

  显示名

* `email`

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

  用户邮箱

* `eraseTime`

  [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)

  姓

* `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)

  客户关联的订单

* `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)

  更新时间

## Code Example

```graphql
 {
	customer(customerAccessToken ) 
		 {
			# Customer fields
		}
}
```

## Error Handling

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

