---
title: "Customer"
description: "Customer object"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer.md'
---
# Customer

Customer object

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

## Type Signature

`Customer`

## Fields

* `addresses`

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

  Address information

* `amountSpent`

  [MoneyV2](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/money-v2.md)

  Total cost amount

* `canDelete`

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

  Can be deleted

* `createdAt`

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

  Creation time

* `defaultAddress`

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

  Default address

* `displayName`

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

  Full name

* `email`

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

  email

* `emailMarketingConsent`

  [CustomerEmailMarketingConsentState](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer-email-marketing-consent-state.md)

  Mailbox subscription information

* `firstName`

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

  firstName

* `id`

  [ID](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  Customer id

* `lastName`

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

  Last name

* `lifetimeDuration`

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

  The time when the customer joined the store, for example, one day, one week, one year

* `locale`

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

  Language

* `note`

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

  Notes

* `numberOfOrders`

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

  Order qty

* `phone`

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

  Phone number

* `smsMarketingConsent`

  [CustomerSmsMarketingConsentState](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer-sms-marketing-consent-state.md)

  Sms subscription status

* `state`

  [CustomerState](https://developer.shopline.com/docs/admin-graph-ql-api/customers/enums/customer-state.md)

  Customer status

* `tags`

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

  Tag

* `taxExempt`

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

  The customer's order can be marked as tax-free, true: tax-free, false: not tax-free

* `taxExemptions`

  [[FreeAreas]](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/free-areas.md)

  Customer's tax-free list

* `updatedAt`

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

  Update time

* `validEmailAddress`

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

  Email address verification does not guarantee the authenticity of the email address

* `verifiedEmail`

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

  Email verification or not

## Schema Definition

```graphql
type Customer { 
	addresses: [MailingAddress]
	amountSpent: MoneyV2
	canDelete: Boolean
	createdAt: Date
	defaultAddress: MailingAddress
	displayName: String
	email: String
	emailMarketingConsent: CustomerEmailMarketingConsentState
	firstName: String
	id: ID
	lastName: String
	lifetimeDuration: String
	locale: String
	note: String
	numberOfOrders: Int
	phone: String
	smsMarketingConsent: CustomerSmsMarketingConsentState
	state: CustomerState
	tags: [String]
	taxExempt: Boolean
	taxExemptions: [FreeAreas]
	updatedAt: Date
	validEmailAddress: Boolean
	verifiedEmail: Boolean 
}
```

## Field from

* [CustomerEmailMarketingConsentUpdatePayload](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer-email-marketing-consent-update-payload.md).customer

  The updated customer.

* [CustomerConnection](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer-connection.md).nodes

  node list

* [CustomerUpdateDefaultAddressPayload](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer-update-default-address-payload.md).customer

  The customer whose address was updated.

* [CompanyContact](https://developer.shopline.com/docs/admin-graph-ql-api/b-2-b/objects/company-contact.md).customer

  Customer information

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

  The updated customer.

* [CustomerAddTaxExemptionsPayload](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer-add-tax-exemptions-payload.md).customer

  The updated customer.

* [CustomerEdge](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer-edge.md).node

  
  Customer node information

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

  The created customer.

* [CustomerSmsMarketingConsentUpdatePayload](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer-sms-marketing-consent-update-payload.md).customer

  The updated customer.

* [Query](https://developer.shopline.com/docs/admin-graph-ql-api/customers/queries/customer.md).customer

  按ID返回客户信息

* [CustomerReplaceTaxExemptionsPayload](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer-replace-tax-exemptions-payload.md).customer

  The updated customer.

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

