---
title: "Customer"
description: "Information about a customer."
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/storefront-api/customers/objects/customer'
  md: 'https://developer.shopline.com/docs/storefront-api/customers/objects/customer.md'
---
# Customer

Information about a customer.

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

## Fields

* `createdAt`

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

  The date and time when the customer was created.     
  Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).    
  Example: `2024-08-31T02:20:26+08:00`

* `displayName`

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

  The customer's display name.

* `acceptsMarketing`

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

  Whether the customer has subscribed to marketing information via email.
  * `true`: Subscribed
  * `false`: Not subscribed

* `defaultAddress`

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

  The customer's default address.

* `email`

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

  The customer's email address.

* `firstName`

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

  The customer's first name.

* `id`

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

  The customer ID.

* `lastName`

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

  The customer's last name.

* `phone`

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

  The customer's phone number.

* `tags`

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

  The tags attached to the customer.

* `updatedAt`

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

  The date and time when the customer was last updated.    
  Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).    
  Example: `2024-08-31T02:20:26+08:00`

* `eraseTime`

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

  The time when the customer's account was canceled, formatted as a 13-digit millisecond timestamp.    
  Example: `1729822782000`

* `logoutStatus`

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

  The customer's account cancellation status. You can control whether to display the account cancellation button on the storefront based on the account cancellation status. Valid values are:
  * `1`: Uncancellable. You can hide the account cancellation button on the storefront.
  * `2`: Cancellable. You can display the account cancellation button on the storefront.
  * `3`: Cancellation in progress. The state indicates that the account is currently in a cooling-off period.

* `orders`

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

  A list of orders associated with the customer.

* `addresses`

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

  A list of the customer's addresses.

* `birthday`

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

  The customer's date of birth. Format: `yyyyMMdd`.    
  Example: `19931231`

* `gender`

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

  The customer's gender. Valid values are: 
  * `unknown`: Unknown
  * `male`: Male
  * `female`: Female
  * `prefer not to say`: Secret

## Field from

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

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

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

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

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

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

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

